diff --git a/AutomatedTesting/Assets/Prefabs/PinkFlower.prefab b/AutomatedTesting/Assets/Prefabs/PinkFlower.prefab new file mode 100644 index 0000000000..47dd6bc8d3 --- /dev/null +++ b/AutomatedTesting/Assets/Prefabs/PinkFlower.prefab @@ -0,0 +1,131 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "PinkFlower", + "Components": { + "Component_[10444337162843472597]": { + "$type": "EditorLockComponent", + "Id": 10444337162843472597 + }, + "Component_[14431042590323756177]": { + "$type": "EditorEntitySortComponent", + "Id": 14431042590323756177, + "ChildEntityOrderEntryArray": [ + { + "EntityId": "Entity_[491002114939]" + } + ] + }, + "Component_[14577735453176806353]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 14577735453176806353 + }, + "Component_[15674021346798629563]": { + "$type": "EditorInspectorComponent", + "Id": 15674021346798629563 + }, + "Component_[16784074985702513600]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 16784074985702513600, + "Parent Entity": "" + }, + "Component_[3351614541100572773]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3351614541100572773 + }, + "Component_[3600658560328167663]": { + "$type": "EditorPrefabComponent", + "Id": 3600658560328167663 + }, + "Component_[6155673728651558934]": { + "$type": "EditorEntityIconComponent", + "Id": 6155673728651558934 + }, + "Component_[8458684662170321289]": { + "$type": "EditorVisibilityComponent", + "Id": 8458684662170321289 + }, + "Component_[8705192117416252351]": { + "$type": "SelectionComponent", + "Id": 8705192117416252351 + }, + "Component_[8801280051488695852]": { + "$type": "EditorPendingCompositionComponent", + "Id": 8801280051488695852 + } + } + }, + "Entities": { + "Entity_[491002114939]": { + "Id": "Entity_[491002114939]", + "Name": "PinkFlower", + "Components": { + "Component_[11083205340162142682]": { + "$type": "EditorLockComponent", + "Id": 11083205340162142682 + }, + "Component_[11327363779873517]": { + "$type": "EditorOnlyEntityComponent", + "Id": 11327363779873517 + }, + "Component_[12717389211269537921]": { + "$type": "EditorEntitySortComponent", + "Id": 12717389211269537921 + }, + "Component_[12826285685970138542]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 12826285685970138542, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{549F4C4D-A7D9-5F2A-A6BD-F24C8BC43BBF}", + "subId": 280086017 + }, + "assetHint": "assets/objects/foliage/grass_flower_pink.azmodel" + } + } + } + }, + "Component_[14101419970865342875]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14101419970865342875 + }, + "Component_[14770464075286403207]": { + "$type": "EditorVisibilityComponent", + "Id": 14770464075286403207 + }, + "Component_[15205142653091190082]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 15205142653091190082, + "Parent Entity": "ContainerEntity" + }, + "Component_[15510898811147803772]": { + "$type": "EditorInspectorComponent", + "Id": 15510898811147803772, + "ComponentOrderEntryArray": [ + { + "ComponentId": 15205142653091190082 + }, + { + "ComponentId": 12826285685970138542, + "SortIndex": 1 + } + ] + }, + "Component_[15988401742428977134]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 15988401742428977134 + }, + "Component_[4300550837037679336]": { + "$type": "EditorEntityIconComponent", + "Id": 4300550837037679336 + }, + "Component_[996914988793716659]": { + "$type": "SelectionComponent", + "Id": 996914988793716659 + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Assets/TestAnim/rin_skeleton.fbx b/AutomatedTesting/Assets/TestAnim/rin_skeleton.fbx new file mode 100644 index 0000000000..f727c26ad2 --- /dev/null +++ b/AutomatedTesting/Assets/TestAnim/rin_skeleton.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27f87510ae07771dbad3e430e31502b1d1d13dee868f143b7f1de2a7febc8eb9 +size 7046400 diff --git a/AutomatedTesting/Assets/TestAnim/rin_skeleton.fbx.assetinfo b/AutomatedTesting/Assets/TestAnim/rin_skeleton.fbx.assetinfo new file mode 100644 index 0000000000..2d5502f42f --- /dev/null +++ b/AutomatedTesting/Assets/TestAnim/rin_skeleton.fbx.assetinfo @@ -0,0 +1,8 @@ +{ + "values": [ + { + "$type": "ScriptProcessorRule", + "scriptFilename": "Assets/TestAnim/scene_export_actor.py" + } + ] +} \ No newline at end of file diff --git a/AutomatedTesting/Assets/TestAnim/scene_export_actor.py b/AutomatedTesting/Assets/TestAnim/scene_export_actor.py new file mode 100644 index 0000000000..9dddc056a2 --- /dev/null +++ b/AutomatedTesting/Assets/TestAnim/scene_export_actor.py @@ -0,0 +1,221 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# +import traceback, sys, uuid, os, json + +# +# Example for exporting ActorGroup scene rules +# + +def log_exception_traceback(): + exc_type, exc_value, exc_tb = sys.exc_info() + data = traceback.format_exception(exc_type, exc_value, exc_tb) + print(str(data)) + +def get_node_names(sceneGraph, nodeTypeName, testEndPoint = False, validList = None): + import azlmbr.scene.graph + import scene_api.scene_data + + node = sceneGraph.get_root() + nodeList = [] + children = [] + paths = [] + + while node.IsValid(): + # store children to process after siblings + if sceneGraph.has_node_child(node): + children.append(sceneGraph.get_node_child(node)) + + nodeName = scene_api.scene_data.SceneGraphName(sceneGraph.get_node_name(node)) + paths.append(nodeName.get_path()) + + include = True + + if (validList is not None): + include = False # if a valid list filter provided, assume to not include node name + name_parts = nodeName.get_path().split('.') + for valid in validList: + if (valid in name_parts[-1]): + include = True + break + + # store any node that has provides specifc data content + nodeContent = sceneGraph.get_node_content(node) + if include and nodeContent.CastWithTypeName(nodeTypeName): + if testEndPoint is not None: + include = sceneGraph.is_node_end_point(node) is testEndPoint + if include: + if (len(nodeName.get_path())): + nodeList.append(scene_api.scene_data.SceneGraphName(sceneGraph.get_node_name(node))) + + # advance to next node + if sceneGraph.has_node_sibling(node): + node = sceneGraph.get_node_sibling(node) + elif children: + node = children.pop() + else: + node = azlmbr.scene.graph.NodeIndex() + + return nodeList, paths + +def generate_mesh_group(scene, sceneManifest, meshDataList, paths): + # Compute the name of the scene file + clean_filename = scene.sourceFilename.replace('.', '_') + mesh_group_name = os.path.basename(clean_filename) + + # make the mesh group + mesh_group = sceneManifest.add_mesh_group(mesh_group_name) + mesh_group['id'] = '{' + str(uuid.uuid5(uuid.NAMESPACE_DNS, clean_filename)) + '}' + + # add all nodes to this mesh group + for activeMeshIndex in range(len(meshDataList)): + mesh_name = meshDataList[activeMeshIndex] + mesh_path = mesh_name.get_path() + sceneManifest.mesh_group_select_node(mesh_group, mesh_path) + +def create_shape_configuration(nodeName): + import scene_api.physics_data + + if(nodeName in ['_foot_','_wrist_']): + shapeConfiguration = scene_api.physics_data.BoxShapeConfiguration() + shapeConfiguration.scale = [1.1, 1.1, 1.1] + shapeConfiguration.dimensions = [2.1, 3.1, 4.1] + return shapeConfiguration + else: + shapeConfiguration = scene_api.physics_data.CapsuleShapeConfiguration() + shapeConfiguration.scale = [1.0, 1.0, 1.0] + shapeConfiguration.height = 1.0 + shapeConfiguration.radius = 1.0 + return shapeConfiguration + +def create_collider_configuration(nodeName): + import scene_api.physics_data + + colliderConfiguration = scene_api.physics_data.ColliderConfiguration() + colliderConfiguration.Position = [0.1, 0.1, 0.2] + colliderConfiguration.Rotation = [45.0, 35.0, 25.0] + return colliderConfiguration + +def generate_physics_nodes(actorPhysicsSetupRule, nodeNameList): + import scene_api.physics_data + + hitDetectionConfig = scene_api.physics_data.CharacterColliderConfiguration() + simulatedObjectColliderConfig = scene_api.physics_data.CharacterColliderConfiguration() + clothConfig = scene_api.physics_data.CharacterColliderConfiguration() + ragdollConfig = scene_api.physics_data.RagdollConfiguration() + + for nodeName in nodeNameList: + shapeConfiguration = create_shape_configuration(nodeName) + colliderConfiguration = create_collider_configuration(nodeName) + hitDetectionConfig.add_character_collider_node_configuration_node(nodeName, colliderConfiguration, shapeConfiguration) + simulatedObjectColliderConfig.add_character_collider_node_configuration_node(nodeName, colliderConfiguration, shapeConfiguration) + clothConfig.add_character_collider_node_configuration_node(nodeName, colliderConfiguration, shapeConfiguration) + # + ragdollNode = scene_api.physics_data.RagdollNodeConfiguration() + ragdollNode.JointConfig.Name = nodeName + ragdollConfig.add_ragdoll_node_configuration(ragdollNode) + ragdollConfig.colliders.add_character_collider_node_configuration_node(nodeName, colliderConfiguration, shapeConfiguration) + + actorPhysicsSetupRule.set_simulated_object_collider_config(simulatedObjectColliderConfig) + actorPhysicsSetupRule.set_hit_detection_config(hitDetectionConfig) + actorPhysicsSetupRule.set_cloth_config(clothConfig) + actorPhysicsSetupRule.set_ragdoll_config(ragdollConfig) + +def generate_actor_group(scene, sceneManifest, meshDataList, paths): + import scene_api.scene_data + import scene_api.physics_data + import scene_api.actor_group + + # fetch bone data + validNames = ['_neck_','_pelvis_','_leg_','_knee_','_spine_','_arm_','_clavicle_','_head_','_elbow_','_wrist_'] + graph = scene_api.scene_data.SceneGraph(scene.graph) + nodeList, allNodePaths = get_node_names(graph, 'BoneData', validList = validNames) + + nodeNameList = [] + for activeMeshIndex, nodeName in enumerate(nodeList): + nodeNameList.append(nodeName.get_name()) + + # add comment + commentRule = scene_api.actor_group.CommentRule() + commentRule.text = str(nodeNameList) + + # ActorPhysicsSetupRule + actorPhysicsSetupRule = scene_api.actor_group.ActorPhysicsSetupRule() + generate_physics_nodes(actorPhysicsSetupRule, nodeNameList) + + # add scale of the Actor rule + actorScaleRule = scene_api.actor_group.ActorScaleRule() + actorScaleRule.scaleFactor = 2.0 + + # add coordinate system rule + coordinateSystemRule = scene_api.actor_group.CoordinateSystemRule() + coordinateSystemRule.useAdvancedData = False + + # add morph target rule + morphTargetRule = scene_api.actor_group.MorphTargetRule() + morphTargetRule.targets.select_targets([nodeNameList[0]], nodeNameList) + + # add skeleton optimization rule + skeletonOptimizationRule = scene_api.actor_group.SkeletonOptimizationRule() + skeletonOptimizationRule.autoSkeletonLOD = True + skeletonOptimizationRule.criticalBonesList.select_targets([nodeNameList[0:2]], nodeNameList) + + # add LOD rule + lodRule = scene_api.actor_group.LodRule() + lodRule0 = lodRule.add_lod_level(0) + lodRule0.select_targets([nodeNameList[1:4]], nodeNameList) + + actorGroup = scene_api.actor_group.ActorGroup() + actorGroup.name = os.path.basename(scene.sourceFilename) + actorGroup.add_rule(actorScaleRule) + actorGroup.add_rule(coordinateSystemRule) + actorGroup.add_rule(skeletonOptimizationRule) + actorGroup.add_rule(morphTargetRule) + actorGroup.add_rule(lodRule) + actorGroup.add_rule(actorPhysicsSetupRule) + actorGroup.add_rule(commentRule) + sceneManifest.manifest['values'].append(actorGroup.to_dict()) + +def update_manifest(scene): + import json, uuid, os + import azlmbr.scene.graph + import scene_api.scene_data + + graph = scene_api.scene_data.SceneGraph(scene.graph) + mesh_name_list, all_node_paths = get_node_names(graph, 'MeshData') + scene_manifest = scene_api.scene_data.SceneManifest() + generate_actor_group(scene, scene_manifest, mesh_name_list, all_node_paths) + generate_mesh_group(scene, scene_manifest, mesh_name_list, all_node_paths) + + # Convert the manifest to a JSON string and return it + return scene_manifest.export() + +sceneJobHandler = None + +def on_update_manifest(args): + try: + scene = args[0] + return update_manifest(scene) + except RuntimeError as err: + print (f'ERROR - {err}') + log_exception_traceback() + except: + log_exception_traceback() + + global sceneJobHandler + sceneJobHandler.disconnect() + sceneJobHandler = None + +# try to create SceneAPI handler for processing +try: + import azlmbr.scene + + sceneJobHandler = azlmbr.scene.ScriptBuildingNotificationBusHandler() + sceneJobHandler.connect() + sceneJobHandler.add_callback('OnUpdateManifest', on_update_manifest) +except: + sceneJobHandler = None diff --git a/AutomatedTesting/Assets/Textures/image.png b/AutomatedTesting/Assets/Textures/image.png new file mode 100644 index 0000000000..2f558c634e --- /dev/null +++ b/AutomatedTesting/Assets/Textures/image.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:011454252e40c927343cce16296412f02f45d1f345c75c036651bdcca473bda5 +size 2672 diff --git a/AutomatedTesting/Assets/Textures/normal.png b/AutomatedTesting/Assets/Textures/normal.png new file mode 100644 index 0000000000..d3355e6699 --- /dev/null +++ b/AutomatedTesting/Assets/Textures/normal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7bafcc4aefab827e1414e64bcdde235500b51392e52c9ccd588b2d7a24b865a0 +size 20214 diff --git a/AutomatedTesting/Editor/Scripts/auto_lod.py b/AutomatedTesting/Editor/Scripts/auto_lod.py new file mode 100644 index 0000000000..058303242a --- /dev/null +++ b/AutomatedTesting/Editor/Scripts/auto_lod.py @@ -0,0 +1,124 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# +import os, traceback, binascii, sys, json, pathlib, logging +import azlmbr.math +import azlmbr.bus +from scene_helpers import * + +# +# SceneAPI Processor +# + +def update_manifest(scene): + import uuid + import azlmbr.scene as sceneApi + import azlmbr.scene.graph + from scene_api import scene_data as sceneData + + graph = sceneData.SceneGraph(scene.graph) + # Get a list of all the mesh nodes, as well as all the nodes + mesh_name_list, all_node_paths = get_mesh_node_names(graph) + mesh_name_list.sort(key=lambda node: str.casefold(node.get_path())) + scene_manifest = sceneData.SceneManifest() + + clean_filename = scene.sourceFilename.replace('.', '_') + + # Compute the filename of the scene file + source_basepath = scene.watchFolder + source_relative_path = os.path.dirname(os.path.relpath(clean_filename, source_basepath)) + source_filename_only = os.path.basename(clean_filename) + + created_entities = [] + previous_entity_id = azlmbr.entity.InvalidEntityId + first_mesh = True + + # Make a list of mesh node paths + mesh_path_list = list(map(lambda node: node.get_path(), mesh_name_list)) + + # Assume the first mesh is the main mesh + main_mesh = mesh_name_list[0] + mesh_path = main_mesh.get_path() + + # Create a unique mesh group name using the filename + node name + mesh_group_name = '{}_{}'.format(source_filename_only, main_mesh.get_name()) + # Remove forbidden filename characters from the name since this will become a file on disk later + mesh_group_name = "".join(char for char in mesh_group_name if char not in "|<>:\"/?*\\") + # Add the MeshGroup to the manifest and give it a unique ID + mesh_group = scene_manifest.add_mesh_group(mesh_group_name) + mesh_group['id'] = '{' + str(uuid.uuid5(uuid.NAMESPACE_DNS, source_filename_only + mesh_path)) + '}' + # Set our current node as the only node that is included in this MeshGroup + scene_manifest.mesh_group_select_node(mesh_group, mesh_path) + + # Explicitly remove all other nodes to prevent implicit inclusions + for node in mesh_path_list: + if node != mesh_path: + scene_manifest.mesh_group_unselect_node(mesh_group, node) + + # Create a LOD rule + lod_rule = scene_manifest.mesh_group_add_lod_rule(mesh_group) + + # Loop all the mesh nodes after the first + for x in mesh_path_list[1:]: + # Add a new LOD level + lod = scene_manifest.lod_rule_add_lod(lod_rule) + # Select the current mesh for this LOD level + scene_manifest.lod_select_node(lod, x) + + # Unselect every other mesh for this LOD level + for y in mesh_path_list: + if y != x: + scene_manifest.lod_unselect_node(lod, y) + + # Create an editor entity + entity_id = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "CreateEditorReadyEntity", mesh_group_name) + # Add an EditorMeshComponent to the entity + editor_mesh_component = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "GetOrAddComponentByTypeName", entity_id, "AZ::Render::EditorMeshComponent") + # Set the ModelAsset assetHint to the relative path of the input asset + the name of the MeshGroup we just created + the azmodel extension + # The MeshGroup we created will be output as a product in the asset's path named mesh_group_name.azmodel + # The assetHint will be converted to an AssetId later during prefab loading + json_update = json.dumps({ + "Controller": { "Configuration": { "ModelAsset": { + "assetHint": os.path.join(source_relative_path, mesh_group_name) + ".azmodel" }}} + }); + # Apply the JSON above to the component we created + result = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "UpdateComponentForEntity", entity_id, editor_mesh_component, json_update) + + if not result: + raise RuntimeError("UpdateComponentForEntity failed for Mesh component") + + create_prefab(scene_manifest, source_filename_only, [entity_id]) + + # Convert the manifest to a JSON string and return it + new_manifest = scene_manifest.export() + + return new_manifest + +sceneJobHandler = None + +def on_update_manifest(args): + try: + scene = args[0] + return update_manifest(scene) + except RuntimeError as err: + print (f'ERROR - {err}') + log_exception_traceback() + except: + log_exception_traceback() + + global sceneJobHandler + sceneJobHandler = None + +# try to create SceneAPI handler for processing +try: + import azlmbr.scene as sceneApi + if (sceneJobHandler == None): + sceneJobHandler = sceneApi.ScriptBuildingNotificationBusHandler() + sceneJobHandler.connect() + sceneJobHandler.add_callback('OnUpdateManifest', on_update_manifest) +except: + sceneJobHandler = None diff --git a/AutomatedTesting/Editor/Scripts/scene_helpers.py b/AutomatedTesting/Editor/Scripts/scene_helpers.py new file mode 100644 index 0000000000..761068e796 --- /dev/null +++ b/AutomatedTesting/Editor/Scripts/scene_helpers.py @@ -0,0 +1,95 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +import traceback, logging, json +from typing import Tuple, List + +import azlmbr.bus +from scene_api import scene_data as sceneData +from scene_api.scene_data import SceneGraphName + + +def log_exception_traceback(): + """ + Outputs an exception stacktrace. + """ + data = traceback.format_exc() + logger = logging.getLogger('python') + logger.error(data) + + +def sanitize_name_for_disk(name: str): + """ + Removes illegal filename characters from a string. + + :param name: String to clean. + :return: Name with illegal characters removed. + """ + return "".join(char for char in name if char not in "|<>:\"/?*\\") + + +def get_mesh_node_names(scene_graph: sceneData.SceneGraph) -> Tuple[List[SceneGraphName], List[str]]: + """ + Returns a tuple of all the mesh nodes as well as all the node paths + + :param scene_graph: Scene graph to search + :return: Tuple of [Mesh Nodes, All Node Paths] + """ + import azlmbr.scene as sceneApi + import azlmbr.scene.graph + + mesh_data_list = [] + node = scene_graph.get_root() + children = [] + paths = [] + + while node.IsValid(): + # store children to process after siblings + if scene_graph.has_node_child(node): + children.append(scene_graph.get_node_child(node)) + + node_name = sceneData.SceneGraphName(scene_graph.get_node_name(node)) + paths.append(node_name.get_path()) + + # store any node that has mesh data content + node_content = scene_graph.get_node_content(node) + if node_content.CastWithTypeName('MeshData'): + if scene_graph.is_node_end_point(node) is False: + if len(node_name.get_path()): + mesh_data_list.append(sceneData.SceneGraphName(scene_graph.get_node_name(node))) + + # advance to next node + if scene_graph.has_node_sibling(node): + node = scene_graph.get_node_sibling(node) + elif children: + node = children.pop() + else: + node = azlmbr.scene.graph.NodeIndex() + + return mesh_data_list, paths + + +def create_prefab(scene_manifest: sceneData.SceneManifest, prefab_name: str, entities: list) -> None: + prefab_filename = prefab_name + ".prefab" + created_template_id = azlmbr.prefab.PrefabSystemScriptingBus(azlmbr.bus.Broadcast, "CreatePrefab", entities, + prefab_filename) + + if created_template_id is None or created_template_id == azlmbr.prefab.InvalidTemplateId: + raise RuntimeError("CreatePrefab {} failed".format(prefab_filename)) + + # Convert the prefab to a JSON string + output = azlmbr.prefab.PrefabLoaderScriptingBus(azlmbr.bus.Broadcast, "SaveTemplateToString", created_template_id) + + if output is not None and output.IsSuccess(): + json_string = output.GetValue() + uuid = azlmbr.math.Uuid_CreateRandom().ToString() + json_result = json.loads(json_string) + # Add a PrefabGroup to the manifest and store the JSON on it + scene_manifest.add_prefab_group(prefab_name, uuid, json_result) + else: + raise RuntimeError( + "SaveTemplateToString failed for template id {}, prefab {}".format(created_template_id, prefab_filename)) diff --git a/AutomatedTesting/Editor/Scripts/scene_mesh_to_prefab.py b/AutomatedTesting/Editor/Scripts/scene_mesh_to_prefab.py index 7b9349e270..db8df09091 100644 --- a/AutomatedTesting/Editor/Scripts/scene_mesh_to_prefab.py +++ b/AutomatedTesting/Editor/Scripts/scene_mesh_to_prefab.py @@ -5,55 +5,17 @@ # SPDX-License-Identifier: Apache-2.0 OR MIT # # -import os, traceback, binascii, sys, json, pathlib, logging -import azlmbr.math import azlmbr.bus +import azlmbr.math + +from scene_api.scene_data import PrimitiveShape, DecompositionMode +from scene_helpers import * + # # SceneAPI Processor # - -def log_exception_traceback(): - data = traceback.format_exc() - logger = logging.getLogger('python') - logger.error(data) - -def get_mesh_node_names(sceneGraph): - import azlmbr.scene as sceneApi - import azlmbr.scene.graph - from scene_api import scene_data as sceneData - - meshDataList = [] - node = sceneGraph.get_root() - children = [] - paths = [] - - while node.IsValid(): - # store children to process after siblings - if sceneGraph.has_node_child(node): - children.append(sceneGraph.get_node_child(node)) - - nodeName = sceneData.SceneGraphName(sceneGraph.get_node_name(node)) - paths.append(nodeName.get_path()) - - # store any node that has mesh data content - nodeContent = sceneGraph.get_node_content(node) - if nodeContent.CastWithTypeName('MeshData'): - if sceneGraph.is_node_end_point(node) is False: - if (len(nodeName.get_path())): - meshDataList.append(sceneData.SceneGraphName(sceneGraph.get_node_name(node))) - - # advance to next node - if sceneGraph.has_node_sibling(node): - node = sceneGraph.get_node_sibling(node) - elif children: - node = children.pop() - else: - node = azlmbr.scene.graph.NodeIndex() - - return meshDataList, paths - def add_material_component(entity_id): # Create an override AZ::Render::EditorMaterialComponent editor_material_component = azlmbr.entity.EntityUtilityBus( @@ -64,24 +26,53 @@ def add_material_component(entity_id): # this fills out the material asset to a known product AZMaterial asset relative path json_update = json.dumps({ - "Controller": { "Configuration": { "materials": [ - { - "Key": {}, - "Value": { "MaterialAsset":{ - "assetHint": "materials/basic_grey.azmaterial" - }} - }] - }} - }); - result = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "UpdateComponentForEntity", entity_id, editor_material_component, json_update) + "Controller": {"Configuration": {"materials": [ + { + "Key": {}, + "Value": {"MaterialAsset": { + "assetHint": "materials/basic_grey.azmaterial" + }} + }] + }} + }) + result = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "UpdateComponentForEntity", entity_id, + editor_material_component, json_update) if not result: raise RuntimeError("UpdateComponentForEntity for editor_material_component failed") + +def add_physx_meshes(scene_manifest: sceneData.SceneManifest, source_file_name: str, mesh_name_list: List, all_node_paths: List[str]): + first_mesh = mesh_name_list[0].get_path() + + # Add a Box Primitive PhysX mesh with a comment + physx_box = scene_manifest.add_physx_primitive_mesh_group(source_file_name + "_box", PrimitiveShape.BOX, 0.0, None) + scene_manifest.physx_mesh_group_add_comment(physx_box, "This is a box primitive") + # Select the first mesh, unselect every other node + scene_manifest.physx_mesh_group_add_selected_node(physx_box, first_mesh) + + for node in all_node_paths: + if node != first_mesh: + scene_manifest.physx_mesh_group_add_unselected_node(physx_box, node) + + # Add a Convex Mesh PhysX mesh with a comment + convex_mesh = scene_manifest.add_physx_convex_mesh_group(source_file_name + "_convex", 0.08, .0004, + True, True, True, True, True, 24, True, "Glass") + scene_manifest.physx_mesh_group_add_comment(convex_mesh, "This is a convex mesh") + # Select/Unselect nodes using lists + all_except_first_mesh = [x for x in all_node_paths if x != first_mesh] + scene_manifest.physx_mesh_group_add_selected_unselected_nodes(convex_mesh, [first_mesh], all_except_first_mesh) + + # Configure mesh decomposition for this mesh + scene_manifest.physx_mesh_group_decompose_meshes(convex_mesh, 512, 32, .002, 100100, DecompositionMode.TETRAHEDRON, + 0.06, 0.055, 0.00015, 3, 3, True, False) + + # Add a Triangle mesh + triangle = scene_manifest.add_physx_triangle_mesh_group(source_file_name + "_triangle", False, True, True, True, True, True) + scene_manifest.physx_mesh_group_add_selected_unselected_nodes(triangle, [first_mesh], all_except_first_mesh) + def update_manifest(scene): - import json import uuid, os - import azlmbr.scene as sceneApi import azlmbr.scene.graph from scene_api import scene_data as sceneData @@ -89,9 +80,9 @@ def update_manifest(scene): # Get a list of all the mesh nodes, as well as all the nodes mesh_name_list, all_node_paths = get_mesh_node_names(graph) scene_manifest = sceneData.SceneManifest() - + clean_filename = scene.sourceFilename.replace('.', '_') - + # Compute the filename of the scene file source_basepath = scene.watchFolder source_relative_path = os.path.dirname(os.path.relpath(clean_filename, source_basepath)) @@ -101,6 +92,8 @@ def update_manifest(scene): previous_entity_id = azlmbr.entity.InvalidEntityId first_mesh = True + add_physx_meshes(scene_manifest, source_filename_only, mesh_name_list, all_node_paths) + # Loop every mesh node in the scene for activeMeshIndex in range(len(mesh_name_list)): mesh_name = mesh_name_list[activeMeshIndex] @@ -108,7 +101,7 @@ def update_manifest(scene): # Create a unique mesh group name using the filename + node name mesh_group_name = '{}_{}'.format(source_filename_only, mesh_name.get_name()) # Remove forbidden filename characters from the name since this will become a file on disk later - mesh_group_name = "".join(char for char in mesh_group_name if char not in "|<>:\"/?*\\") + mesh_group_name = sanitize_name_for_disk(mesh_group_name) # Add the MeshGroup to the manifest and give it a unique ID mesh_group = scene_manifest.add_mesh_group(mesh_group_name) mesh_group['id'] = '{' + str(uuid.uuid5(uuid.NAMESPACE_DNS, source_filename_only + mesh_path)) + '}' @@ -129,37 +122,61 @@ def update_manifest(scene): # Create an editor entity entity_id = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "CreateEditorReadyEntity", mesh_group_name) # Add an EditorMeshComponent to the entity - editor_mesh_component = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "GetOrAddComponentByTypeName", entity_id, "AZ::Render::EditorMeshComponent") - # Set the ModelAsset assetHint to the relative path of the input asset + the name of the MeshGroup we just created + the azmodel extension - # The MeshGroup we created will be output as a product in the asset's path named mesh_group_name.azmodel - # The assetHint will be converted to an AssetId later during prefab loading + editor_mesh_component = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "GetOrAddComponentByTypeName", + entity_id, "AZ::Render::EditorMeshComponent") + # Set the ModelAsset assetHint to the relative path of the input asset + the name of the MeshGroup we just + # created + the azmodel extension The MeshGroup we created will be output as a product in the asset's path + # named mesh_group_name.azmodel The assetHint will be converted to an AssetId later during prefab loading json_update = json.dumps({ - "Controller": { "Configuration": { "ModelAsset": { - "assetHint": os.path.join(source_relative_path, mesh_group_name) + ".azmodel" }}} - }); + "Controller": {"Configuration": {"ModelAsset": { + "assetHint": os.path.join(source_relative_path, mesh_group_name) + ".azmodel"}}} + }) # Apply the JSON above to the component we created - result = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "UpdateComponentForEntity", entity_id, editor_mesh_component, json_update) + result = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "UpdateComponentForEntity", entity_id, + editor_mesh_component, json_update) if not result: raise RuntimeError("UpdateComponentForEntity failed for Mesh component") + # Add a physics component referencing the triangle mesh we made for the first node + if previous_entity_id is None: + physx_mesh_component = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "GetOrAddComponentByTypeName", + entity_id, "{FD429282-A075-4966-857F-D0BBF186CFE6} EditorColliderComponent") + + json_update = json.dumps({ + "ShapeConfiguration": { + "PhysicsAsset": { + "Asset": { + "assetHint": os.path.join(source_relative_path, source_filename_only + "_triangle.pxmesh") + } + } + } + }) + + result = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "UpdateComponentForEntity", entity_id, physx_mesh_component, json_update) + + if not result: + raise RuntimeError("UpdateComponentForEntity failed for PhysX mesh component") + # an example of adding a material component to override the default material if previous_entity_id is not None and first_mesh: first_mesh = False add_material_component(entity_id) # Get the transform component - transform_component = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "GetOrAddComponentByTypeName", entity_id, "27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0") + transform_component = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "GetOrAddComponentByTypeName", + entity_id, "27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0") # Set this entity to be a child of the last entity we created # This is just an example of how to do parenting and isn't necessarily useful to parent everything like this if previous_entity_id is not None: transform_json = json.dumps({ - "Parent Entity" : previous_entity_id.to_json() - }); + "Parent Entity": previous_entity_id.to_json() + }) # Apply the JSON update - result = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "UpdateComponentForEntity", entity_id, transform_component, transform_json) + result = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "UpdateComponentForEntity", entity_id, + transform_component, transform_json) if not result: raise RuntimeError("UpdateComponentForEntity failed for Transform component") @@ -171,37 +188,23 @@ def update_manifest(scene): created_entities.append(entity_id) # Create a prefab with all our entities - prefab_filename = source_filename_only + ".prefab" - created_template_id = azlmbr.prefab.PrefabSystemScriptingBus(azlmbr.bus.Broadcast, "CreatePrefab", created_entities, prefab_filename) - - if created_template_id == azlmbr.prefab.InvalidTemplateId: - raise RuntimeError("CreatePrefab {} failed".format(prefab_filename)) - - # Convert the prefab to a JSON string - output = azlmbr.prefab.PrefabLoaderScriptingBus(azlmbr.bus.Broadcast, "SaveTemplateToString", created_template_id) - - if output.IsSuccess(): - jsonString = output.GetValue() - uuid = azlmbr.math.Uuid_CreateRandom().ToString() - jsonResult = json.loads(jsonString) - # Add a PrefabGroup to the manifest and store the JSON on it - scene_manifest.add_prefab_group(source_filename_only, uuid, jsonResult) - else: - raise RuntimeError("SaveTemplateToString failed for template id {}, prefab {}".format(created_template_id, prefab_filename)) + create_prefab(scene_manifest, source_filename_only, created_entities) # Convert the manifest to a JSON string and return it new_manifest = scene_manifest.export() return new_manifest + sceneJobHandler = None + def on_update_manifest(args): try: scene = args[0] return update_manifest(scene) except RuntimeError as err: - print (f'ERROR - {err}') + print(f'ERROR - {err}') log_exception_traceback() except: log_exception_traceback() @@ -209,10 +212,12 @@ def on_update_manifest(args): global sceneJobHandler sceneJobHandler = None + # try to create SceneAPI handler for processing try: import azlmbr.scene as sceneApi - if (sceneJobHandler == None): + + if sceneJobHandler is None: sceneJobHandler = sceneApi.ScriptBuildingNotificationBusHandler() sceneJobHandler.connect() sceneJobHandler.add_callback('OnUpdateManifest', on_update_manifest) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/Atom/CMakeLists.txt index 87a66c880e..26eb96e7ec 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/Atom/CMakeLists.txt @@ -47,18 +47,4 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_BUILD_TESTS_SUPPORTED) COMPONENT Atom ) - ly_add_pytest( - NAME AutomatedTesting::Atom_TestSuite_Main_GPU_Optimized - TEST_SUITE main - TEST_REQUIRES gpu - TEST_SERIAL - TIMEOUT 1200 - PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Main_GPU_Optimized.py - RUNTIME_DEPENDENCIES - AssetProcessor - AutomatedTesting.Assets - Editor - COMPONENT - Atom - ) endif() diff --git a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_GPU.py b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_GPU.py index 6a220d1bd8..14d850245c 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_GPU.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_GPU.py @@ -4,129 +4,82 @@ For complete copyright and license terms please see the LICENSE at the root of t SPDX-License-Identifier: Apache-2.0 OR MIT """ - -import datetime import logging import os -import zipfile import pytest +import editor_python_test_tools.hydra_test_utils as hydra import ly_test_tools.environment.file_system as file_system from ly_test_tools.benchmark.data_aggregator import BenchmarkDataAggregator +from ly_test_tools.o3de.editor_test import EditorSharedTest, EditorTestSuite +from Atom.atom_utils.atom_component_helper import compare_screenshot_to_golden_image, golden_images_directory -import editor_python_test_tools.hydra_test_utils as hydra -from .atom_utils.atom_component_helper import compare_screenshot_similarity, ImageComparisonTestFailure - -logger = logging.getLogger(__name__) DEFAULT_SUBFOLDER_PATH = 'user/PythonTests/Automated/Screenshots' -TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "tests") - - -def golden_images_directory(): - """ - Uses this file location to return the valid location for golden image files. - :return: The path to the golden_images directory, but raises an IOError if the golden_images directory is missing. - """ - current_file_directory = os.path.join(os.path.dirname(__file__)) - golden_images_dir = os.path.join(current_file_directory, 'golden_images') - - if not os.path.exists(golden_images_dir): - raise IOError( - f'golden_images" directory was not found at path "{golden_images_dir}"' - f'Please add a "golden_images" directory inside: "{current_file_directory}"' - ) - - return golden_images_dir - - -def create_screenshots_archive(screenshot_path): - """ - Creates a new zip file archive at archive_path containing all files listed within archive_path. - :param screenshot_path: location containing the files to archive, the zip archive file will also be saved here. - :return: None, but creates a new zip file archive inside path containing all of the files inside archive_path. - """ - files_to_archive = [] - - # Search for .png and .ppm files to add to the zip archive file. - for (folder_name, sub_folders, file_names) in os.walk(screenshot_path): - for file_name in file_names: - if file_name.endswith(".png") or file_name.endswith(".ppm"): - file_path = os.path.join(folder_name, file_name) - files_to_archive.append(file_path) - - # Setup variables for naming the zip archive file. - timestamp = datetime.datetime.now().timestamp() - formatted_timestamp = datetime.datetime.utcfromtimestamp(timestamp).strftime("%Y-%m-%d_%H-%M-%S") - screenshots_file = os.path.join(screenshot_path, f'zip_archive_{formatted_timestamp}.zip') - - # Write all of the valid .png and .ppm files to the archive file. - with zipfile.ZipFile(screenshots_file, 'w', compression=zipfile.ZIP_DEFLATED, allowZip64=True) as zip_archive: - for file_path in files_to_archive: - file_name = os.path.basename(file_path) - zip_archive.write(file_path, file_name) +logger = logging.getLogger(__name__) @pytest.mark.parametrize("project", ["AutomatedTesting"]) -@pytest.mark.parametrize("launcher_platform", ["windows_editor"]) -@pytest.mark.parametrize("level", ["Base"]) -class TestAllComponentsIndepthTests(object): +@pytest.mark.parametrize("launcher_platform", ['windows_editor']) +class TestAutomation(EditorTestSuite): + # Remove -autotest_mode from global_extra_cmdline_args since we need rendering for these tests. + global_extra_cmdline_args = ["-BatchMode"] # Default is ["-BatchMode", "-autotest_mode"] + + enable_prefab_system = False - @pytest.mark.parametrize("screenshot_name", ["AtomBasicLevelSetup.ppm"]) @pytest.mark.test_case_id("C34603773") - def test_BasicLevelSetup_SetsUpLevel( - self, request, editor, workspace, project, launcher_platform, level, screenshot_name): - """ - Please review the hydra script run by this test for more specific test info. - Tests that a basic rendering level setup can be created (lighting, meshes, materials, etc.). - """ + class AtomGPU_BasicLevelSetup_SetsUpLevel(EditorSharedTest): + use_null_renderer = False # Default is True + screenshot_name = "AtomBasicLevelSetup.ppm" + test_screenshots = [] # Gets set by setup() + screenshot_directory = "" # Gets set by setup() + # Clear existing test screenshots before starting test. - screenshot_directory = os.path.join(workspace.paths.project(), DEFAULT_SUBFOLDER_PATH) - test_screenshots = [os.path.join(screenshot_directory, screenshot_name)] - file_system.delete(test_screenshots, True, True) + def setup(self, workspace): + screenshot_directory = os.path.join(workspace.paths.project(), DEFAULT_SUBFOLDER_PATH) + test_screenshots = [os.path.join(screenshot_directory, self.screenshot_name)] + file_system.delete(test_screenshots, True, True) golden_images = [os.path.join(golden_images_directory(), screenshot_name)] - level_creation_expected_lines = [ - "Viewport is set to the expected size: True", - "Exited game mode" - ] - unexpected_lines = ["Traceback (most recent call last):"] + from Atom.tests import hydra_AtomGPU_BasicLevelSetup as test_module - hydra.launch_and_validate_results( - request, - TEST_DIRECTORY, - editor, - "hydra_GPUTest_BasicLevelSetup.py", - timeout=180, - expected_lines=level_creation_expected_lines, - unexpected_lines=unexpected_lines, - halt_on_unexpected=True, - cfg_args=[level], - null_renderer=False, - enable_prefab_system=False, - ) - - similarity_threshold = 0.99 - for test_screenshot, golden_image in zip(test_screenshots, golden_images): - screenshot_comparison_result = compare_screenshot_similarity( - test_screenshot, golden_image, similarity_threshold, True, screenshot_directory) - if screenshot_comparison_result != "Screenshots match": - raise Exception(f"Screenshot test failed: {screenshot_comparison_result}") + assert compare_screenshot_to_golden_image(screenshot_directory, test_screenshots, golden_images, 0.99) is True @pytest.mark.test_case_id("C34525095") - def test_LightComponent_ScreenshotMatchesGoldenImage( - self, request, editor, workspace, project, launcher_platform, level): - """ - Please review the hydra script run by this test for more specific test info. - Tests that the Light component screenshots in a rendered level appear the same as the golden images. - """ + class AtomGPU_LightComponent_AreaLightScreenshotsMatchGoldenImages(EditorSharedTest): + use_null_renderer = False # Default is True screenshot_names = [ "AreaLight_1.ppm", "AreaLight_2.ppm", "AreaLight_3.ppm", "AreaLight_4.ppm", "AreaLight_5.ppm", + ] + test_screenshots = [] # Gets set by setup() + screenshot_directory = "" # Gets set by setup() + + # Clear existing test screenshots before starting test. + def setup(self, workspace): + screenshot_directory = os.path.join(workspace.paths.project(), DEFAULT_SUBFOLDER_PATH) + for screenshot in self.screenshot_names: + screenshot_path = os.path.join(screenshot_directory, screenshot) + self.test_screenshots.append(screenshot_path) + file_system.delete(self.test_screenshots, True, True) + + golden_images = [] + for golden_image in screenshot_names: + golden_image_path = os.path.join(golden_images_directory(), golden_image) + golden_images.append(golden_image_path) + + from Atom.tests import hydra_AtomGPU_AreaLightScreenshotTest as test_module + + assert compare_screenshot_to_golden_image(screenshot_directory, test_screenshots, golden_images, 0.99) is True + + @pytest.mark.test_case_id("C34525110") + class AtomGPU_LightComponent_SpotLightScreenshotsMatchGoldenImages(EditorSharedTest): + use_null_renderer = False # Default is True + screenshot_names = [ "SpotLight_1.ppm", "SpotLight_2.ppm", "SpotLight_3.ppm", @@ -134,40 +87,25 @@ class TestAllComponentsIndepthTests(object): "SpotLight_5.ppm", "SpotLight_6.ppm", ] - screenshot_directory = os.path.join(workspace.paths.project(), DEFAULT_SUBFOLDER_PATH) - test_screenshots = [] - for screenshot in screenshot_names: - screenshot_path = os.path.join(screenshot_directory, screenshot) - test_screenshots.append(screenshot_path) - file_system.delete(test_screenshots, True, True) + test_screenshots = [] # Gets set by setup() + screenshot_directory = "" # Gets set by setup() + + # Clear existing test screenshots before starting test. + def setup(self, workspace): + screenshot_directory = os.path.join(workspace.paths.project(), DEFAULT_SUBFOLDER_PATH) + for screenshot in self.screenshot_names: + screenshot_path = os.path.join(screenshot_directory, screenshot) + self.test_screenshots.append(screenshot_path) + file_system.delete(self.test_screenshots, True, True) golden_images = [] for golden_image in screenshot_names: golden_image_path = os.path.join(golden_images_directory(), golden_image) golden_images.append(golden_image_path) - expected_lines = ["spot_light Controller|Configuration|Shadows|Shadowmap size: SUCCESS"] - unexpected_lines = ["Traceback (most recent call last):"] - hydra.launch_and_validate_results( - request, - TEST_DIRECTORY, - editor, - "hydra_GPUTest_LightComponent.py", - timeout=180, - expected_lines=expected_lines, - unexpected_lines=unexpected_lines, - halt_on_unexpected=True, - cfg_args=[level], - null_renderer=False, - enable_prefab_system=False, - ) + from Atom.tests import hydra_AtomGPU_SpotLightScreenshotTest as test_module - similarity_threshold = 0.99 - for test_screenshot, golden_image in zip(test_screenshots, golden_images): - screenshot_comparison_result = compare_screenshot_similarity( - test_screenshot, golden_image, similarity_threshold, True, screenshot_directory) - if screenshot_comparison_result != "Screenshots match": - raise ImageComparisonTestFailure(f"Screenshot test failed: {screenshot_comparison_result}") + assert compare_screenshot_to_golden_image(screenshot_directory, test_screenshots, golden_images, 0.99) is True @pytest.mark.parametrize('rhi', ['dx12', 'vulkan']) @@ -198,7 +136,7 @@ class TestPerformanceBenchmarkSuite(object): hydra.launch_and_validate_results( request, - TEST_DIRECTORY, + os.path.join(os.path.dirname(__file__), "tests"), editor, "hydra_GPUTest_AtomFeatureIntegrationBenchmark.py", timeout=600, @@ -235,7 +173,7 @@ class TestMaterialEditor(object): hydra.launch_and_validate_results( request, - TEST_DIRECTORY, + os.path.join(os.path.dirname(__file__), "tests"), generic_launcher, editor_script="", run_python="--runpython", diff --git a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_GPU_Optimized.py b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_GPU_Optimized.py deleted file mode 100644 index 7f97c132bb..0000000000 --- a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_GPU_Optimized.py +++ /dev/null @@ -1,46 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" -import os - -import pytest - -import ly_test_tools.environment.file_system as file_system -from ly_test_tools.o3de.editor_test import EditorSharedTest, EditorTestSuite -from ly_test_tools.image.screenshot_compare_qssim import qssim as compare_screenshots -from .atom_utils.atom_component_helper import create_screenshots_archive, golden_images_directory - -DEFAULT_SUBFOLDER_PATH = 'user/PythonTests/Automated/Screenshots' - - -@pytest.mark.xfail(reason="Optimized tests are experimental, we will enable xfail and monitor them temporarily.") -@pytest.mark.parametrize("project", ["AutomatedTesting"]) -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) -class TestAutomation(EditorTestSuite): - # Remove -autotest_mode from global_extra_cmdline_args since we need rendering for these tests. - global_extra_cmdline_args = ["-BatchMode"] # Default is ["-BatchMode", "-autotest_mode"] - - enable_prefab_system = False - - @pytest.mark.test_case_id("C34603773") - class AtomGPU_BasicLevelSetup_SetsUpLevel(EditorSharedTest): - use_null_renderer = False # Default is True - screenshot_name = "AtomBasicLevelSetup.ppm" - test_screenshots = [] # Gets set by setup() - screenshot_directory = "" # Gets set by setup() - - # Clear existing test screenshots before starting test. - def setup(self, workspace): - screenshot_directory = os.path.join(workspace.paths.project(), DEFAULT_SUBFOLDER_PATH) - test_screenshots = [os.path.join(screenshot_directory, self.screenshot_name)] - file_system.delete(test_screenshots, True, True) - - from Atom.tests import hydra_AtomGPU_BasicLevelSetup as test_module - - golden_images = [os.path.join(golden_images_directory(), screenshot_name)] - for test_screenshot, golden_screenshot in zip(test_screenshots, golden_images): - compare_screenshots(test_screenshot, golden_screenshot) - create_screenshots_archive(screenshot_directory) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Sandbox.py b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Sandbox.py index 292bb9c19c..f0bb6e72ca 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Sandbox.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Sandbox.py @@ -12,6 +12,7 @@ import pytest import ly_test_tools.environment.file_system as file_system import editor_python_test_tools.hydra_test_utils as hydra +from ly_test_tools.o3de.editor_test import EditorSharedTest, EditorTestSuite from Atom.atom_utils.atom_constants import LIGHT_TYPES logger = logging.getLogger(__name__) @@ -159,3 +160,17 @@ class TestMaterialEditorBasicTests(object): enable_prefab_system=False, ) + +@pytest.mark.parametrize("project", ["AutomatedTesting"]) +@pytest.mark.parametrize("launcher_platform", ['windows_editor']) +class TestAutomation(EditorTestSuite): + + enable_prefab_system = False + + @pytest.mark.test_case_id("C36529666") + class AtomEditorComponentsLevel_DiffuseGlobalIlluminationAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponentsLevel_DiffuseGlobalIlluminationAdded as test_module + + @pytest.mark.test_case_id("C36525660") + class AtomEditorComponentsLevel_DisplayMapperAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponentsLevel_DisplayMapperAdded as test_module diff --git a/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_component_helper.py b/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_component_helper.py index 9f37873557..5fdd4c810d 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_component_helper.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_component_helper.py @@ -93,161 +93,165 @@ def compare_screenshot_similarity( return result -def create_basic_atom_level(level_name): +def compare_screenshot_to_golden_image( + screenshot_directory, test_screenshots, golden_images, similarity_threshold=0.99): """ - Creates a new level inside the Editor matching level_name & adds the following: - 1. "default_level" entity to hold all other entities. - 2. Adds Grid, Global Skylight (IBL), ground Mesh, Directional Light, Sphere w/ material+mesh, & Camera components. - 3. Each of these components has its settings tweaked slightly to match the ideal scene to test Atom rendering. - :param level_name: name of the level to create and apply this basic setup to. + Compares a list of test_screenshots to a list of golden_images and return True if they match within the + similarity threshold set. Otherwise, it will raise ImageComparisonTestFailure with a failure message. + :param screenshot_directory: path to the directory containing screenshots for creating .zip archives. + :param test_screenshots: list of test screenshot path strings. + :param golden_images: list of golden image path strings. + :param similarity_threshold: float threshold tolerance to set when comparing screenshots to golden images. + """ + for test_screenshot, golden_image in zip(test_screenshots, golden_images): + screenshot_comparison_result = compare_screenshot_similarity( + test_screenshot, golden_image, similarity_threshold, True, screenshot_directory) + if screenshot_comparison_result != "Screenshots match": + raise ImageComparisonTestFailure(f"Screenshot test failed: {screenshot_comparison_result}") + + return True + + +def initial_viewport_setup(screen_width=1280, screen_height=720): + """ + For setting up the initial viewport resolution to expected default values before running a screenshot test. + Defaults to 1280 x 720 resolution (in pixels). + :param screen_width: Width in pixels to set the viewport width size to. + :param screen_height: Height in pixels to set the viewport height size to. + :return: None + """ + import azlmbr.legacy.general as general + + general.set_viewport_size(screen_width, screen_height) + general.update_viewport() + + +def enter_exit_game_mode_take_screenshot(screenshot_name, enter_game_tuple, exit_game_tuple, timeout_in_seconds=4): + """ + Enters game mode, takes a screenshot named screenshot_name (must include file extension), and exits game mode. + :param screenshot_name: string representing the name of the screenshot file, including file extension. + :param enter_game_tuple: tuple where the 1st string is success & 2nd string is failure for entering the game. + :param exit_game_tuple: tuple where the 1st string is success & 2nd string is failure for exiting the game. + :param timeout_in_seconds: int or float seconds to wait for entering/exiting game mode. :return: None """ - import azlmbr.asset as asset - import azlmbr.bus as bus - import azlmbr.camera as camera - import azlmbr.editor as editor - import azlmbr.entity as entity import azlmbr.legacy.general as general + + from editor_python_test_tools.utils import TestHelper + + from Atom.atom_utils.screenshot_utils import ScreenshotHelper + + TestHelper.enter_game_mode(enter_game_tuple) + TestHelper.wait_for_condition(function=lambda: general.is_in_game_mode(), timeout_in_seconds=timeout_in_seconds) + ScreenshotHelper(general.idle_wait_frames).capture_screenshot_blocking(screenshot_name) + TestHelper.exit_game_mode(exit_game_tuple) + TestHelper.wait_for_condition(function=lambda: not general.is_in_game_mode(), timeout_in_seconds=timeout_in_seconds) + + +def create_basic_atom_rendering_scene(): + """ + Sets up a new scene inside the Editor for testing Atom rendering GPU output. + Setup: Deletes all existing entities before creating the scene. + The created scene includes: + 1. "Default Level" entity that holds all of the other entities. + 2. "Grid" entity: Contains a Grid component. + 3. "Global Skylight (IBL)" entity: Contains HDRI Skybox & Global Skylight (IBL) components. + 4. "Ground Plane" entity: Contains Material & Mesh components. + 5. "Directional Light" entity: Contains Directional Light component. + 6. "Sphere" entity: Contains Material & Mesh components. + 7. "Camera" entity: Contains Camera component. + :return: None + """ import azlmbr.math as math - import azlmbr.object + import azlmbr.paths - import editor_python_test_tools.hydra_editor_utils as hydra - from editor_python_test_tools.editor_test_helper import EditorTestHelper + from editor_python_test_tools.asset_utils import Asset + from editor_python_test_tools.editor_entity_utils import EditorEntity - helper = EditorTestHelper(log_prefix="Atom_EditorTestHelper") + from Atom.atom_utils.atom_constants import AtomComponentProperties - # Wait for Editor idle loop before executing Python hydra scripts. - general.idle_enable(True) + DEGREE_RADIAN_FACTOR = 0.0174533 - # Basic setup for opened level. - helper.open_level(level_name="Base") - general.idle_wait(1.0) - general.update_viewport() - general.idle_wait(0.5) # half a second is more than enough for updating the viewport. - - # Close out problematic windows, FPS meters, and anti-aliasing. - if general.is_helpers_shown(): # Turn off the helper gizmos if visible - general.toggle_helpers() - general.idle_wait(1.0) - if general.is_pane_visible("Error Report"): # Close Error Report windows that block focus. - general.close_pane("Error Report") - if general.is_pane_visible("Error Log"): # Close Error Log windows that block focus. - general.close_pane("Error Log") - general.idle_wait(1.0) - general.run_console("r_displayInfo=0") - general.idle_wait(1.0) - - # Delete all existing entities & create default_level entity + # Setup: Deletes all existing entities before creating the scene. search_filter = azlmbr.entity.SearchFilter() - all_entities = entity.SearchBus(azlmbr.bus.Broadcast, "SearchEntities", search_filter) - editor.ToolsApplicationRequestBus(bus.Broadcast, "DeleteEntities", all_entities) - default_level = hydra.Entity("default_level") - default_position = math.Vector3(0.0, 0.0, 0.0) - default_level.create_entity(default_position, ["Grid"]) - default_level.get_set_test(0, "Controller|Configuration|Secondary Grid Spacing", 1.0) - - # Set the viewport up correctly after adding the parent default_level entity. - screen_width = 1280 - screen_height = 720 - degree_radian_factor = 0.0174533 # Used by "Rotation" property for the Transform component. - general.set_viewport_size(screen_width, screen_height) - general.update_viewport() - helper.wait_for_condition( - function=lambda: helper.isclose(a=general.get_viewport_size().x, b=screen_width, rel_tol=0.1) - and helper.isclose(a=general.get_viewport_size().y, b=screen_height, rel_tol=0.1), - timeout_in_seconds=4.0 - ) - result = helper.isclose(a=general.get_viewport_size().x, b=screen_width, rel_tol=0.1) and helper.isclose( - a=general.get_viewport_size().y, b=screen_height, rel_tol=0.1) - general.log(general.get_viewport_size().x) - general.log(general.get_viewport_size().y) - general.log(general.get_viewport_size().z) - general.log(f"Viewport is set to the expected size: {result}") - general.log("Basic level created") - general.run_console("r_DisplayInfo = 0") - - # Create global_skylight entity and set the properties - global_skylight = hydra.Entity("global_skylight") - global_skylight.create_entity( - entity_position=default_position, - components=["HDRi Skybox", "Global Skylight (IBL)"], - parent_id=default_level.id) - global_skylight_asset_path = os.path.join("LightingPresets", "default_iblskyboxcm.exr.streamingimage") - global_skylight_asset_value = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", global_skylight_asset_path, math.Uuid(), False) - global_skylight.get_set_test(0, "Controller|Configuration|Cubemap Texture", global_skylight_asset_value) - global_skylight.get_set_test(1, "Controller|Configuration|Diffuse Image", global_skylight_asset_value) - global_skylight.get_set_test(1, "Controller|Configuration|Specular Image", global_skylight_asset_value) - - # Create ground_plane entity and set the properties - ground_plane = hydra.Entity("ground_plane") - ground_plane.create_entity( - entity_position=default_position, - components=["Material"], - parent_id=default_level.id) - azlmbr.components.TransformBus(azlmbr.bus.Event, "SetLocalUniformScale", ground_plane.id, 32.0) - - # Work around to add the correct Atom Mesh component and asset. - mesh_type_id = azlmbr.globals.property.EditorMeshComponentTypeId - ground_plane.components.append( - editor.EditorComponentAPIBus( - bus.Broadcast, "AddComponentsOfType", ground_plane.id, [mesh_type_id] - ).GetValue()[0] - ) + all_entities = azlmbr.entity.SearchBus(azlmbr.bus.Broadcast, "SearchEntities", search_filter) + azlmbr.editor.ToolsApplicationRequestBus(azlmbr.bus.Broadcast, "DeleteEntities", all_entities) + + # 1. "Default Level" entity that holds all of the other entities. + default_level_entity_name = "Default Level" + default_level_entity = EditorEntity.create_editor_entity_at(math.Vector3(0.0, 0.0, 0.0), default_level_entity_name) + + # 2. "Grid" entity: Contains a Grid component. + grid_entity = EditorEntity.create_editor_entity(AtomComponentProperties.grid(), default_level_entity.id) + grid_component = grid_entity.add_component(AtomComponentProperties.grid()) + secondary_grid_spacing_value = 1.0 + grid_component.set_component_property_value( + AtomComponentProperties.grid('Secondary Grid Spacing'), secondary_grid_spacing_value) + + # 3. "Global Skylight (IBL)" entity: Contains HDRI Skybox & Global Skylight (IBL) components. + global_skylight_entity = EditorEntity.create_editor_entity( + AtomComponentProperties.global_skylight(), default_level_entity.id) + hdri_skybox_component = global_skylight_entity.add_component(AtomComponentProperties.hdri_skybox()) + global_skylight_component = global_skylight_entity.add_component(AtomComponentProperties.global_skylight()) + global_skylight_image_asset_path = os.path.join("LightingPresets", "default_iblskyboxcm.exr.streamingimage") + global_skylight_image_asset = Asset.find_asset_by_path(global_skylight_image_asset_path, False) + hdri_skybox_component.set_component_property_value( + AtomComponentProperties.hdri_skybox('Cubemap Texture'), global_skylight_image_asset.id) + global_skylight_diffuse_image_asset_path = os.path.join( + "LightingPresets", "default_iblskyboxcm_ibldiffuse.exr.streamingimage") + global_skylight_diffuse_image_asset = Asset.find_asset_by_path(global_skylight_diffuse_image_asset_path, False) + global_skylight_component.set_component_property_value( + AtomComponentProperties.global_skylight('Diffuse Image'), global_skylight_diffuse_image_asset.id) + global_skylight_specular_image_asset_path = os.path.join( + "LightingPresets", "default_iblskyboxcm_iblspecular.exr.streamingimage") + global_skylight_specular_image_asset = Asset.find_asset_by_path( + global_skylight_specular_image_asset_path, False) + global_skylight_component.set_component_property_value( + AtomComponentProperties.global_skylight('Specular Image'), global_skylight_specular_image_asset.id) + + # 4. "Ground Plane" entity: Contains Material & Mesh components. + ground_plane_name = "Ground Plane" + ground_plane_entity = EditorEntity.create_editor_entity(ground_plane_name, default_level_entity.id) + ground_plane_material_component = ground_plane_entity.add_component(AtomComponentProperties.material()) + ground_plane_entity.set_local_uniform_scale(32.0) + ground_plane_mesh_component = ground_plane_entity.add_component(AtomComponentProperties.mesh()) ground_plane_mesh_asset_path = os.path.join("TestData", "Objects", "plane.azmodel") - ground_plane_mesh_asset_value = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", ground_plane_mesh_asset_path, math.Uuid(), False) - ground_plane.get_set_test(1, "Controller|Configuration|Mesh Asset", ground_plane_mesh_asset_value) - - # Add Atom Material component and asset. + ground_plane_mesh_asset = Asset.find_asset_by_path(ground_plane_mesh_asset_path, False) + ground_plane_mesh_component.set_component_property_value( + AtomComponentProperties.mesh('Mesh Asset'), ground_plane_mesh_asset.id) ground_plane_material_asset_path = os.path.join("Materials", "Presets", "PBR", "metal_chrome.azmaterial") - ground_plane_material_asset_value = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", ground_plane_material_asset_path, math.Uuid(), False) - ground_plane.get_set_test(0, "Default Material|Material Asset", ground_plane_material_asset_value) - - # Create directional_light entity and set the properties - directional_light = hydra.Entity("directional_light") - directional_light.create_entity( - entity_position=math.Vector3(0.0, 0.0, 10.0), - components=["Directional Light"], - parent_id=default_level.id) - directional_light_rotation = math.Vector3(degree_radian_factor * -90.0, 0.0, 0.0) - azlmbr.components.TransformBus( - azlmbr.bus.Event, "SetLocalRotation", directional_light.id, directional_light_rotation) - - # Create sphere entity and set the properties - sphere_entity = hydra.Entity("sphere") - sphere_entity.create_entity( - entity_position=math.Vector3(0.0, 0.0, 1.0), - components=["Material"], - parent_id=default_level.id) - - # Work around to add the correct Atom Mesh component and asset. - sphere_entity.components.append( - editor.EditorComponentAPIBus( - bus.Broadcast, "AddComponentsOfType", sphere_entity.id, [mesh_type_id] - ).GetValue()[0] - ) + ground_plane_material_asset = Asset.find_asset_by_path(ground_plane_material_asset_path, False) + ground_plane_material_component.set_component_property_value( + AtomComponentProperties.material('Material Asset'), ground_plane_material_asset.id) + + # 5. "Directional Light" entity: Contains Directional Light component. + directional_light_entity = EditorEntity.create_editor_entity_at( + math.Vector3(0.0, 0.0, 10.0), AtomComponentProperties.directional_light(), default_level_entity.id) + directional_light_entity.add_component(AtomComponentProperties.directional_light()) + directional_light_entity_rotation = math.Vector3(DEGREE_RADIAN_FACTOR * -90.0, 0.0, 0.0) + directional_light_entity.set_local_rotation(directional_light_entity_rotation) + + # 6. "Sphere" entity: Contains Material & Mesh components. + sphere_entity = EditorEntity.create_editor_entity_at( + math.Vector3(0.0, 0.0, 1.0), "Sphere", default_level_entity.id) + sphere_mesh_component = sphere_entity.add_component(AtomComponentProperties.mesh()) sphere_mesh_asset_path = os.path.join("Models", "sphere.azmodel") - sphere_mesh_asset_value = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", sphere_mesh_asset_path, math.Uuid(), False) - sphere_entity.get_set_test(1, "Controller|Configuration|Mesh Asset", sphere_mesh_asset_value) - - # Add Atom Material component and asset. + sphere_mesh_asset = Asset.find_asset_by_path(sphere_mesh_asset_path, False) + sphere_mesh_component.set_component_property_value( + AtomComponentProperties.mesh('Mesh Asset'), sphere_mesh_asset.id) + sphere_material_component = sphere_entity.add_component(AtomComponentProperties.material()) sphere_material_asset_path = os.path.join("Materials", "Presets", "PBR", "metal_brass_polished.azmaterial") - sphere_material_asset_value = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", sphere_material_asset_path, math.Uuid(), False) - sphere_entity.get_set_test(0, "Default Material|Material Asset", sphere_material_asset_value) - - # Create camera component and set the properties - camera_entity = hydra.Entity("camera") - camera_entity.create_entity( - entity_position=math.Vector3(5.5, -12.0, 9.0), - components=["Camera"], - parent_id=default_level.id) - rotation = math.Vector3( - degree_radian_factor * -27.0, degree_radian_factor * -12.0, degree_radian_factor * 25.0 - ) - azlmbr.components.TransformBus(azlmbr.bus.Event, "SetLocalRotation", camera_entity.id, rotation) - camera_entity.get_set_test(0, "Controller|Configuration|Field of view", 60.0) - camera.EditorCameraViewRequestBus(azlmbr.bus.Event, "ToggleCameraAsActiveView", camera_entity.id) + sphere_material_asset = Asset.find_asset_by_path(sphere_material_asset_path, False) + sphere_material_component.set_component_property_value( + AtomComponentProperties.material('Material Asset'), sphere_material_asset.id) + + # 7. "Camera" entity: Contains Camera component. + camera_entity = EditorEntity.create_editor_entity_at( + math.Vector3(5.5, -12.0, 9.0), AtomComponentProperties.camera(), default_level_entity.id) + camera_component = camera_entity.add_component(AtomComponentProperties.camera()) + camera_entity_rotation = math.Vector3( + DEGREE_RADIAN_FACTOR * -27.0, DEGREE_RADIAN_FACTOR * -12.0, DEGREE_RADIAN_FACTOR * 25.0) + camera_entity.set_local_rotation(camera_entity_rotation) + camera_fov_value = 60.0 + camera_component.set_component_property_value(AtomComponentProperties.camera('Field of view'), camera_fov_value) + azlmbr.camera.EditorCameraViewRequestBus(azlmbr.bus.Event, "ToggleCameraAsActiveView", camera_entity.id) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_constants.py b/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_constants.py index ef9e90802b..e6d6ac7fb1 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_constants.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_constants.py @@ -19,6 +19,20 @@ LIGHT_TYPES = { } +# Attenuation Radius Mode options for the Light component. +ATTENUATION_RADIUS_MODE = { + 'automatic': 1, + 'explicit': 0, +} + +# Qualiity Level settings for Diffuse Global Illumination level component +GLOBAL_ILLUMINATION_QUALITY = { + 'Low': 0, + 'Medium': 1, + 'High': 2, +} + + class AtomComponentProperties: """ Holds Atom component related constants @@ -116,6 +130,21 @@ class AtomComponentProperties: } return properties[property] + @staticmethod + def diffuse_global_illumination(property: str = 'name') -> str: + """ + Diffuse Global Illumination level component properties. + Controls global settings for Diffuse Probe Grid components. + - 'Quality Level' from atom_constants.py GLOBAL_ILLUMINATION_QUALITY + :param property: From the last element of the property tree path. Default 'name' for component name string. + :return: Full property path OR component name if no property specified. + """ + properties = { + 'name': 'Diffuse Global Illumination', + 'Quality Level': 'Controller|Configuration|Quality Level' + } + return properties[property] + @staticmethod def diffuse_probe_grid(property: str = 'name') -> str: """ @@ -148,12 +177,17 @@ class AtomComponentProperties: @staticmethod def display_mapper(property: str = 'name') -> str: """ - Display Mapper component properties. + Display Mapper level component properties. + - 'Enable LDR color grading LUT' toggles the use of LDR color grading LUT + - 'LDR color Grading LUT' is the Low Definition Range (LDR) color grading for Look-up Textures (LUT) which is + an Asset.id value corresponding to a lighting asset file. :param property: From the last element of the property tree path. Default 'name' for component name string. :return: Full property path OR component name if no property specified. """ properties = { 'name': 'Display Mapper', + 'Enable LDR color grading LUT': 'Controller|Configuration|Enable LDR color grading LUT', + 'LDR color Grading LUT': 'Controller|Configuration|LDR color Grading LUT', } return properties[property] @@ -249,13 +283,27 @@ class AtomComponentProperties: def light(property: str = 'name') -> str: """ Light component properties. + - 'Attenuation Radius Mode' controls whether the attenuation radius is calculated automatically or explicitly. + - 'Color' the RGB value to set for the color of the light. + - 'Enable shadow' toggle for enabling shadows for the light. + - 'Enable shutters' toggle for enabling shutters for the light. + - 'Inner angle' inner angle value for the shutters (in degrees) + - 'Intensity' the intensity of the light in the set photometric unit (float with no ceiling). - 'Light type' from atom_constants.py LIGHT_TYPES + - 'Outer angle' outer angle value for the shutters (in degrees) :param property: From the last element of the property tree path. Default 'name' for component name string. :return: Full property path OR component name if no property specified. """ properties = { 'name': 'Light', + 'Attenuation Radius Mode': 'Controller|Configuration|Attenuation radius|Mode', + 'Color': 'Controller|Configuration|Color', + 'Enable shadow': 'Controller|Configuration|Shadows|Enable shadow', + 'Enable shutters': 'Controller|Configuration|Shutters|Enable shutters', + 'Inner angle': 'Controller|Configuration|Shutters|Inner angle', + 'Intensity': 'Controller|Configuration|Intensity', 'Light type': 'Controller|Configuration|Light type', + 'Outer angle': 'Controller|Configuration|Shutters|Outer angle', } return properties[property] @@ -390,7 +438,7 @@ class AtomComponentProperties: 'name': 'PostFX Shape Weight Modifier', 'requires': [AtomComponentProperties.postfx_layer()], 'shapes': ['Axis Aligned Box Shape', 'Box Shape', 'Capsule Shape', 'Compound Shape', 'Cylinder Shape', - 'Disk Shape', 'Polygon Prism Shape', 'Quad Shape', 'Sphere Shape', 'Vegetation Reference Shape'], + 'Disk Shape', 'Polygon Prism Shape', 'Quad Shape', 'Sphere Shape', 'Shape Reference'], } return properties[property] diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponentsLevel_DiffuseGlobalIlluminationAdded.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponentsLevel_DiffuseGlobalIlluminationAdded.py new file mode 100644 index 0000000000..ddcd5c3c46 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponentsLevel_DiffuseGlobalIlluminationAdded.py @@ -0,0 +1,109 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +class Tests: + creation_undo = ( + "UNDO Level component addition success", + "UNDO Level component addition failed") + creation_redo = ( + "REDO Level component addition success", + "REDO Level component addition failed") + diffuse_global_illumination_component = ( + "Level has a Diffuse Global Illumination component", + "Level failed to find Diffuse Global Illumination component") + diffuse_global_illumination_quality = ( + "Quality Level set", + "Quality Level could not be set") + enter_game_mode = ( + "Entered game mode", + "Failed to enter game mode") + exit_game_mode = ( + "Exited game mode", + "Couldn't exit game mode") + + +def AtomEditorComponentsLevel_DiffuseGlobalIllumination_AddedToEntity(): + """ + Summary: + Tests the Diffuse Global Illumination level component can be added to the level entity and is stable. + + Test setup: + - Wait for Editor idle loop. + - Open the "Base" level. + + Expected Behavior: + The component can be added, used in game mode, and has accurate required components. + Creation and deletion undo/redo should also work. + + Test Steps: + 1) Add Diffuse Global Illumination level component to the level entity. + 2) UNDO the level component addition. + 3) REDO the level component addition. + 4) Set Quality Level property to Low + 5) Enter/Exit game mode. + 6) Look for errors and asserts. + + :return: None + """ + + import azlmbr.legacy.general as general + + from editor_python_test_tools.editor_entity_utils import EditorLevelEntity + from editor_python_test_tools.utils import Report, Tracer, TestHelper + from Atom.atom_utils.atom_constants import AtomComponentProperties, GLOBAL_ILLUMINATION_QUALITY + + with Tracer() as error_tracer: + # Test setup begins. + # Setup: Wait for Editor idle loop before executing Python hydra scripts then open "Base" level. + TestHelper.init_idle() + TestHelper.open_level("", "Base") + + # Test steps begin. + # 1. Add Diffuse Global Illumination level component to the level entity. + diffuse_global_illumination_component = EditorLevelEntity.add_component( + AtomComponentProperties.diffuse_global_illumination()) + Report.critical_result( + Tests.diffuse_global_illumination_component, + EditorLevelEntity.has_component(AtomComponentProperties.diffuse_global_illumination())) + + # 2. UNDO the level component addition. + # -> UNDO component addition. + general.undo() + general.idle_wait_frames(1) + Report.result(Tests.creation_undo, + not EditorLevelEntity.has_component(AtomComponentProperties.diffuse_global_illumination())) + + # 3. REDO the level component addition. + # -> REDO component addition. + general.redo() + general.idle_wait_frames(1) + Report.result(Tests.creation_redo, + EditorLevelEntity.has_component(AtomComponentProperties.diffuse_global_illumination())) + + # 4. Set Quality Level property to Low + diffuse_global_illumination_component.set_component_property_value( + AtomComponentProperties.diffuse_global_illumination('Quality Level', GLOBAL_ILLUMINATION_QUALITY['Low'])) + quality = diffuse_global_illumination_component.get_component_property_value( + AtomComponentProperties.diffuse_global_illumination('Quality Level')) + Report.result(diffuse_global_illumination_quality, quality == GLOBAL_ILLUMINATION_QUALITY['Low']) + + # 5. Enter/Exit game mode. + TestHelper.enter_game_mode(Tests.enter_game_mode) + general.idle_wait_frames(1) + TestHelper.exit_game_mode(Tests.exit_game_mode) + + # 6. Look for errors and asserts. + TestHelper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0) + for error_info in error_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in error_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(AtomEditorComponentsLevel_DiffuseGlobalIllumination_AddedToEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponentsLevel_DisplayMapperAdded.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponentsLevel_DisplayMapperAdded.py new file mode 100644 index 0000000000..c050dd76d4 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponentsLevel_DisplayMapperAdded.py @@ -0,0 +1,124 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + + +class Tests: + creation_undo = ( + "UNDO level component addition success", + "UNDO level component addition failed") + creation_redo = ( + "REDO Level component addition success", + "REDO Level component addition failed") + display_mapper_component = ( + "Level has a Display Mapper component", + "Level failed to find Display Mapper component") + ldr_color_grading_lut = ( + "LDR color Grading LUT asset set", + "LDR color Grading LUT asset could not be set") + enable_ldr_color_grading_lut = ( + "Enable LDR color grading LUT set", + "Enable LDR color grading LUT could not be set") + enter_game_mode = ( + "Entered game mode", + "Failed to enter game mode") + exit_game_mode = ( + "Exited game mode", + "Couldn't exit game mode") + + +def AtomEditorComponentsLevel_DisplayMapper_AddedToEntity(): + """ + Summary: + Tests the Display Mapper level component can be added to the level entity and has the expected functionality. + + Test setup: + - Wait for Editor idle loop. + - Open the "Base" level. + + Expected Behavior: + The component can be added, used in game mode, and has accurate required components. + Creation and deletion undo/redo should also work. + + Test Steps: + 1) Add Display Mapper level component to the level entity. + 2) UNDO the level component addition. + 3) REDO the level component addition. + 4) Set LDR color Grading LUT asset. + 5) Set Enable LDR color grading LUT property True + 6) Enter/Exit game mode. + 7) Look for errors and asserts. + + :return: None + """ + import os + + import azlmbr.legacy.general as general + + from editor_python_test_tools.asset_utils import Asset + from editor_python_test_tools.editor_entity_utils import EditorLevelEntity + from editor_python_test_tools.utils import Report, Tracer, TestHelper + from Atom.atom_utils.atom_constants import AtomComponentProperties + + with Tracer() as error_tracer: + # Test setup begins. + # Setup: Wait for Editor idle loop before executing Python hydra scripts then open "Base" level. + TestHelper.init_idle() + TestHelper.open_level("", "Base") + + # Test steps begin. + # 1. Add Display Mapper level component to the level entity. + display_mapper_component = EditorLevelEntity.add_component(AtomComponentProperties.display_mapper()) + Report.critical_result( + Tests.display_mapper_component, + EditorLevelEntity.has_component(AtomComponentProperties.display_mapper())) + + # 2. UNDO the level component addition. + # -> UNDO component addition. + general.undo() + general.idle_wait_frames(1) + Report.result(Tests.creation_undo, not EditorLevelEntity.has_component(AtomComponentProperties.display_mapper())) + + # 3. REDO the level component addition. + # -> REDO component addition. + general.redo() + general.idle_wait_frames(1) + Report.result(Tests.creation_redo, EditorLevelEntity.has_component(AtomComponentProperties.display_mapper())) + + # 4. Set LDR color Grading LUT asset. + display_mapper_asset_path = os.path.join("TestData", "test.lightingpreset.azasset") + display_mapper_asset = Asset.find_asset_by_path(display_mapper_asset_path, False) + display_mapper_component.set_component_property_value( + AtomComponentProperties.display_mapper('LDR color Grading LUT'), display_mapper_asset.id) + Report.result( + Tests.ldr_color_grading_lut, + display_mapper_component.get_component_property_value( + AtomComponentProperties.display_mapper('LDR color Grading LUT')) == display_mapper_asset.id) + + # 5. Set Enable LDR color grading LUT property True + display_mapper_component.set_component_property_value( + AtomComponentProperties.display_mapper('Enable LDR color grading LUT'), True) + Report.result( + Test.enable_ldr_color_grading_lut, + display_mapper_component.get_component_property_value( + AtomComponentProperties.display_mapper('Enable LDR color grading LUT')) is True) + + # 6. Enter/Exit game mode. + TestHelper.enter_game_mode(Tests.enter_game_mode) + general.idle_wait_frames(1) + TestHelper.exit_game_mode(Tests.exit_game_mode) + + # 7. Look for errors and asserts. + TestHelper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0) + for error_info in error_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in error_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(AtomEditorComponentsLevel_DisplayMapper_AddedToEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_DisplayMapperAdded.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_DisplayMapperAdded.py index f8881bfa2a..558d69046e 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_DisplayMapperAdded.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_DisplayMapperAdded.py @@ -5,16 +5,8 @@ For complete copyright and license terms please see the LICENSE at the root of t SPDX-License-Identifier: Apache-2.0 OR MIT """ + class Tests: - camera_creation = ( - "Camera Entity successfully created", - "Camera Entity failed to be created") - camera_component_added = ( - "Camera component was added to entity", - "Camera component failed to be added to entity") - camera_component_check = ( - "Entity has a Camera component", - "Entity failed to find Camera component") creation_undo = ( "UNDO Entity creation success", "UNDO Entity creation failed") @@ -39,6 +31,12 @@ class Tests: is_hidden = ( "Entity is hidden", "Entity was not hidden") + ldr_color_grading_lut = ( + "LDR color Grading LUT asset set", + "LDR color Grading LUT asset could not be set") + enable_ldr_color_grading_lut = ( + "Enable LDR color grading LUT set", + "Enable LDR color grading LUT could not be set") entity_deleted = ( "Entity deleted", "Entity was not deleted") @@ -68,19 +66,23 @@ def AtomEditorComponents_DisplayMapper_AddedToEntity(): 2) Add Display Mapper component to Display Mapper entity. 3) UNDO the entity creation and component addition. 4) REDO the entity creation and component addition. - 5) Enter/Exit game mode. - 6) Test IsHidden. - 7) Test IsVisible. - 8) Delete Display Mapper entity. - 9) UNDO deletion. - 10) REDO deletion. - 11) Look for errors and asserts. + 5) Set LDR color Grading LUT asset. + 6) Set Enable LDR color grading LUT property True + 7) Enter/Exit game mode. + 8) Test IsHidden. + 9) Test IsVisible. + 10) Delete Display Mapper entity. + 11) UNDO deletion. + 12) REDO deletion. + 13) Look for errors and asserts. :return: None """ + import os import azlmbr.legacy.general as general + from editor_python_test_tools.asset_utils import Asset from editor_python_test_tools.editor_entity_utils import EditorEntity from editor_python_test_tools.utils import Report, Tracer, TestHelper from Atom.atom_utils.atom_constants import AtomComponentProperties @@ -97,7 +99,7 @@ def AtomEditorComponents_DisplayMapper_AddedToEntity(): Report.critical_result(Tests.display_mapper_creation, display_mapper_entity.exists()) # 2. Add Display Mapper component to Display Mapper entity. - display_mapper_entity.add_component(AtomComponentProperties.display_mapper()) + display_mapper_component = display_mapper_entity.add_component(AtomComponentProperties.display_mapper()) Report.critical_result( Tests.display_mapper_component, display_mapper_entity.has_component(AtomComponentProperties.display_mapper())) @@ -126,33 +128,51 @@ def AtomEditorComponents_DisplayMapper_AddedToEntity(): general.idle_wait_frames(1) Report.result(Tests.creation_redo, display_mapper_entity.exists()) - # 5. Enter/Exit game mode. + # 5. Set LDR color Grading LUT asset. + display_mapper_asset_path = os.path.join("TestData", "test.lightingpreset.azasset") + display_mapper_asset = Asset.find_asset_by_path(display_mapper_asset_path, False) + display_mapper_component.set_component_property_value( + AtomComponentProperties.display_mapper("LDR color Grading LUT"), display_mapper_asset.id) + Report.result( + Tests.ldr_color_grading_lut, + display_mapper_component.get_component_property_value( + AtomComponentProperties.display_mapper("LDR color Grading LUT")) == display_mapper_asset.id) + + # 6. Set Enable LDR color grading LUT property True + display_mapper_component.set_component_property_value( + AtomComponentProperties.display_mapper('Enable LDR color grading LUT'), True) + Report.result( + Tests.enable_ldr_color_grading_lut, + display_mapper_component.get_component_property_value( + AtomComponentProperties.display_mapper('Enable LDR color grading LUT')) is True) + + # 7. Enter/Exit game mode. TestHelper.enter_game_mode(Tests.enter_game_mode) general.idle_wait_frames(1) TestHelper.exit_game_mode(Tests.exit_game_mode) - # 6. Test IsHidden. + # 8. Test IsHidden. display_mapper_entity.set_visibility_state(False) Report.result(Tests.is_hidden, display_mapper_entity.is_hidden() is True) - # 7. Test IsVisible. + # 9. Test IsVisible. display_mapper_entity.set_visibility_state(True) general.idle_wait_frames(1) Report.result(Tests.is_visible, display_mapper_entity.is_visible() is True) - # 8. Delete Display Mapper entity. + # 10. Delete Display Mapper entity. display_mapper_entity.delete() Report.result(Tests.entity_deleted, not display_mapper_entity.exists()) - # 9. UNDO deletion. + # 11. UNDO deletion. general.undo() Report.result(Tests.deletion_undo, display_mapper_entity.exists()) - # 10. REDO deletion. + # 12. REDO deletion. general.redo() Report.result(Tests.deletion_redo, not display_mapper_entity.exists()) - # 11. Look for errors and asserts. + # 13. Look for errors and asserts. TestHelper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0) for error_info in error_tracer.errors: Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_AreaLightScreenshotTest.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_AreaLightScreenshotTest.py new file mode 100644 index 0000000000..a56c72e46c --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_AreaLightScreenshotTest.py @@ -0,0 +1,199 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + + +class Tests: + area_light_entity_created = ( + "Area Light entity successfully created", + "Area Light entity failed to be created") + area_light_entity_deleted = ( + "Area Light entity was deleted", + "Area Light entity was not deleted") + enter_game_mode = ( + "Entered game mode", + "Failed to enter game mode") + exit_game_mode = ( + "Exited game mode", + "Couldn't exit game mode") + light_component_added = ( + "Light component was added", + "Light component wasn't added") + light_component_attenuation_radius_property_set = ( + "Light component Attenuation Radius Property was set", + "Light component Attenuation Radius Property was not set") + light_component_color_property_set = ( + "Light component Color property was set", + "Light component Color property was not set") + light_component_intensity_property_set = ( + "Light component Intensity property was set", + "Light component Intensity property was not set") + light_component_light_type_property_set = ( + "Light type property was set", + "Light type property was not set") + + +def AtomGPU_LightComponent_AreaLightScreenshotsMatchGoldenImages(): + """ + Summary: + Light component test using the Capsule, Spot (disk), and Point (sphere) Light type property options. + Sets each scene up and then takes a screenshot of each scene for test comparison. + + Test setup: + - Wait for Editor idle loop. + - Open the "Base" level. + - Close error windows and display helpers then update the viewport size. + - Runs the create_basic_atom_rendering_scene() function to setup the test scene. + + Expected Behavior: + The test scripts sets up the scenes correctly and takes accurate screenshots. + + Test Steps: + 1. Create Area Light entity with no components. + 2. Add a Light component to the Area Light entity. + 3. Set the Light type property to Capsule for the Light component. + 4. Set the Light component's Color property to 255, 0, 0. + 5. Enter game mode and take a screenshot then exit game mode. + 6. Set the Intensity property of the Light component to 0.0. + 7. Set the Attenuation Radius Mode property of the Light component to 1 (automatic). + 8. Enter game mode and take a screenshot then exit game mode. + 9. Set the Intensity property of the Light component to 1000.0 + 10. Enter game mode and take a screenshot then exit game mode. + 11. Set the Light type property to Spot (disk) for the Light component & rotate DEGREE_RADIAN_FACTOR * 90 degrees. + 12. Enter game mode and take a screenshot then exit game mode. + 13. Set the Light type property to Point (sphere) instead of Spot (disk) for the Light component. + 14. Enter game mode and take a screenshot then exit game mode. + 15. Delete the Area Light entity. + 16. Look for errors. + + :return: None + """ + + import azlmbr.legacy.general as general + import azlmbr.paths + + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.utils import Report, Tracer, TestHelper + + from Atom.atom_utils.atom_constants import AtomComponentProperties, ATTENUATION_RADIUS_MODE, LIGHT_TYPES + from Atom.atom_utils.atom_component_helper import ( + initial_viewport_setup, create_basic_atom_rendering_scene, enter_exit_game_mode_take_screenshot) + + DEGREE_RADIAN_FACTOR = 0.0174533 + + with Tracer() as error_tracer: + # Test setup begins. + # Setup: Wait for Editor idle loop before executing Python hydra scripts then open "Base" level. + TestHelper.init_idle() + TestHelper.open_level("", "Base") + + # Setup: Close error windows and display helpers then update the viewport size. + TestHelper.close_error_windows() + TestHelper.close_display_helpers() + initial_viewport_setup() + general.update_viewport() + + # Setup: Runs the create_basic_atom_rendering_scene() function to setup the test scene. + create_basic_atom_rendering_scene() + + # Test steps begin. + # 1. Create Area Light entity with no components. + area_light_entity_name = "Area Light" + area_light_entity = EditorEntity.create_editor_entity_at( + azlmbr.math.Vector3(0.0, 0.0, 0.0), area_light_entity_name) + Report.critical_result(Tests.area_light_entity_created, area_light_entity.exists()) + + # 2. Add a Light component to the Area Light entity. + light_component = area_light_entity.add_component(AtomComponentProperties.light()) + Report.critical_result( + Tests.light_component_added, area_light_entity.has_component(AtomComponentProperties.light())) + + # 3. Set the Light type property to Capsule for the Light component. + light_component.set_component_property_value( + AtomComponentProperties.light('Light type'), LIGHT_TYPES['capsule']) + Report.result( + Tests.light_component_light_type_property_set, + light_component.get_component_property_value( + AtomComponentProperties.light('Light type')) == LIGHT_TYPES['capsule']) + + # 4. Set the Light component's Color property to 255, 0, 0. + light_component_color_value = azlmbr.math.Color(255.0, 0.0, 0.0, 0.0) + light_component.set_component_property_value( + AtomComponentProperties.light('Color'), light_component_color_value) + Report.result( + Tests.light_component_color_property_set, + light_component.get_component_property_value( + AtomComponentProperties.light('Color')) == light_component_color_value) + + # 5. Enter game mode and take a screenshot then exit game mode. + enter_exit_game_mode_take_screenshot("AreaLight_1.ppm", Tests.enter_game_mode, Tests.exit_game_mode) + + # 6. Set the Intensity property of the Light component to 0.0. + light_component.set_component_property_value(AtomComponentProperties.light('Intensity'), 0.0) + Report.result( + Tests.light_component_intensity_property_set, + light_component.get_component_property_value(AtomComponentProperties.light('Intensity')) == 0.0) + + # 7. Set the Attenuation Radius Mode property of the Light component to 1 (automatic). + light_component.set_component_property_value( + AtomComponentProperties.light('Attenuation Radius Mode'), ATTENUATION_RADIUS_MODE['automatic']) + Report.result( + Tests.light_component_attenuation_radius_property_set, + light_component.get_component_property_value( + AtomComponentProperties.light('Attenuation Radius Mode')) == ATTENUATION_RADIUS_MODE['automatic']) + + # 8. Enter game mode and take a screenshot then exit game mode. + enter_exit_game_mode_take_screenshot("AreaLight_2.ppm", Tests.enter_game_mode, Tests.exit_game_mode) + + # 9. Set the Intensity property of the Light component to 1000.0 + light_component.set_component_property_value(AtomComponentProperties.light('Intensity'), 1000.0) + Report.result( + Tests.light_component_intensity_property_set, + light_component.get_component_property_value(AtomComponentProperties.light('Intensity')) == 1000.0) + + # 10. Enter game mode and take a screenshot then exit game mode. + enter_exit_game_mode_take_screenshot("AreaLight_3.ppm", Tests.enter_game_mode, Tests.exit_game_mode) + + # 11. Set the Light type property to Spot (disk) for the Light component & + # rotate DEGREE_RADIAN_FACTOR * 90 degrees. + light_component.set_component_property_value( + AtomComponentProperties.light('Light type'), LIGHT_TYPES['spot_disk']) + area_light_rotation = azlmbr.math.Vector3(DEGREE_RADIAN_FACTOR * 90.0, 0.0, 0.0) + azlmbr.components.TransformBus(azlmbr.bus.Event, "SetLocalRotation", area_light_entity.id, area_light_rotation) + Report.result( + Tests.light_component_light_type_property_set, + light_component.get_component_property_value( + AtomComponentProperties.light('Light type')) == LIGHT_TYPES['spot_disk']) + + # 12. Enter game mode and take a screenshot then exit game mode. + enter_exit_game_mode_take_screenshot("AreaLight_4.ppm", Tests.enter_game_mode, Tests.exit_game_mode) + + # 13. Set the Light type property to Point (sphere) instead of Spot (disk) for the Light component. + light_component.set_component_property_value( + AtomComponentProperties.light('Light type'), LIGHT_TYPES['sphere']) + Report.result( + Tests.light_component_light_type_property_set, + light_component.get_component_property_value( + AtomComponentProperties.light('Light type')) == LIGHT_TYPES['sphere']) + + # 14. Enter game mode and take a screenshot then exit game mode. + enter_exit_game_mode_take_screenshot("AreaLight_5.ppm", Tests.enter_game_mode, Tests.exit_game_mode) + + # 15. Delete the Area Light entity. + area_light_entity.delete() + Report.result(Tests.area_light_entity_deleted, not area_light_entity.exists()) + + # 16. Look for errors. + TestHelper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0) + for error_info in error_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in error_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(AtomGPU_LightComponent_AreaLightScreenshotsMatchGoldenImages) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_BasicLevelSetup.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_BasicLevelSetup.py index 127b3e5b5f..b15e5b2131 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_BasicLevelSetup.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_BasicLevelSetup.py @@ -80,6 +80,7 @@ def AtomGPU_BasicLevelSetup_SetsUpLevel(): Test setup: - Wait for Editor idle loop. - Open the "Base" level. + - Deletes all existing entities before creating the scene. Expected Behavior: The scene can be setup for a basic level. @@ -115,7 +116,6 @@ def AtomGPU_BasicLevelSetup_SetsUpLevel(): """ import os - from math import isclose import azlmbr.legacy.general as general import azlmbr.math as math @@ -126,21 +126,11 @@ def AtomGPU_BasicLevelSetup_SetsUpLevel(): from editor_python_test_tools.utils import Report, Tracer, TestHelper from Atom.atom_utils.atom_constants import AtomComponentProperties + from Atom.atom_utils.atom_component_helper import initial_viewport_setup from Atom.atom_utils.screenshot_utils import ScreenshotHelper - SCREENSHOT_NAME = "AtomBasicLevelSetup" - SCREEN_WIDTH = 1280 - SCREEN_HEIGHT = 720 DEGREE_RADIAN_FACTOR = 0.0174533 - - def initial_viewport_setup(screen_width, screen_height): - general.set_viewport_size(screen_width, screen_height) - general.update_viewport() - TestHelper.wait_for_condition( - function=lambda: isclose(a=general.get_viewport_size().x, b=SCREEN_WIDTH, rel_tol=0.1) - and isclose(a=general.get_viewport_size().y, b=SCREEN_HEIGHT, rel_tol=0.1), - timeout_in_seconds=4.0 - ) + SCREENSHOT_NAME = "AtomBasicLevelSetup" with Tracer() as error_tracer: # Test setup begins. @@ -148,11 +138,16 @@ def AtomGPU_BasicLevelSetup_SetsUpLevel(): TestHelper.init_idle() TestHelper.open_level("", "Base") + # Setup: Deletes all existing entities before creating the scene. + search_filter = azlmbr.entity.SearchFilter() + all_entities = azlmbr.entity.SearchBus(azlmbr.bus.Broadcast, "SearchEntities", search_filter) + azlmbr.editor.ToolsApplicationRequestBus(azlmbr.bus.Broadcast, "DeleteEntities", all_entities) + # Test steps begin. # 1. Close error windows and display helpers then update the viewport size. TestHelper.close_error_windows() TestHelper.close_display_helpers() - initial_viewport_setup(SCREEN_WIDTH, SCREEN_HEIGHT) + initial_viewport_setup() general.update_viewport() # 2. Create Default Level Entity. diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_SpotLightScreenshotTest.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_SpotLightScreenshotTest.py new file mode 100644 index 0000000000..fbfb6e3468 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_SpotLightScreenshotTest.py @@ -0,0 +1,248 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + + +class Tests: + directional_light_component_disabled = ( + "Disabled Directional Light component", + "Couldn't disable Directional Light component") + enter_game_mode = ( + "Entered game mode", + "Failed to enter game mode") + exit_game_mode = ( + "Exited game mode", + "Couldn't exit game mode") + global_skylight_component_disabled = ( + "Disabled Global Skylight (IBL) component", + "Couldn't disable Global Skylight (IBL) component") + hdri_skybox_component_disabled = ( + "Disabled HDRi Skybox component", + "Couldn't disable HDRi Skybox component") + light_component_added = ( + "Light component added", + "Couldn't add Light component") + light_component_color_property_set = ( + "Color property was set", + "Color property was not set") + light_component_enable_shadow_property_set = ( + "Enable shadow property was set", + "Enable shadow property was not set") + light_component_enable_shutters_property_set = ( + "Enable shutters property was set", + "Enable shutters property was not set") + light_component_inner_angle_property_set = ( + "Inner angle property was set", + "Inner angle property was not set") + light_component_intensity_property_set = ( + "Intensity property was set", + "Intensity property was not set") + light_component_light_type_property_set = ( + "Light type property was set", + "Light type property was not set") + light_component_outer_angle_property_set = ( + "Outer angle property was set", + "Outer angle property was not set") + material_component_material_asset_property_set = ( + "Material Asset property was set", + "Material Asset property was not set") + spot_light_entity_created = ( + "Spot Light entity created", + "Couldn't create Spot Light entity") + + +def AtomGPU_LightComponent_SpotLightScreenshotsMatchGoldenImages(): + """ + Summary: + Light component test using the Spot (disk) Light type property option and modifying the shadows and colors. + Sets each scene up and then takes a screenshot of each scene for test comparison. + + Test setup: + - Wait for Editor idle loop. + - Open the "Base" level. + - Close error windows and display helpers then update the viewport size. + - Runs the create_basic_atom_rendering_scene() function to setup the test scene. + + Expected Behavior: + The test scripts sets up the scenes correctly and takes accurate screenshots. + + Test Steps: + 1. Find the Directional Light entity then disable its Directional Light component. + 2. Disable Global Skylight (IBL) component on the Global Skylight (IBL) entity. + 3. Disable HDRi Skybox component on the Global Skylight (IBL) entity. + 4. Create a Spot Light entity and rotate it. + 5. Attach a Light component to the Spot Light entity. + 6. Set the Light component Light Type to Spot (disk). + 7. Enter game mode and take a screenshot then exit game mode. + 8. Change the default material asset for the Ground Plane entity. + 9. Enter game mode and take a screenshot then exit game mode. + 10. Increase the Intensity value of the Light component. + 11. Enter game mode and take a screenshot then exit game mode. + 12. Change the Light component Color property value. + 13. Enter game mode and take a screenshot then exit game mode. + 14. Change the Light component Enable shutters, Inner angle, and Outer angle property values. + 15. Enter game mode and take a screenshot then exit game mode. + 16. Change the Light component Enable shadow and Shadowmap size property values then move Spot Light entity. + 17. Enter game mode and take a screenshot then exit game mode. + 18. Look for errors. + + :return: None + """ + import os + + import azlmbr.legacy.general as general + import azlmbr.paths + + from editor_python_test_tools.asset_utils import Asset + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.utils import Report, Tracer, TestHelper + + from Atom.atom_utils.atom_constants import AtomComponentProperties, LIGHT_TYPES + from Atom.atom_utils.atom_component_helper import ( + initial_viewport_setup, create_basic_atom_rendering_scene, enter_exit_game_mode_take_screenshot) + + DEGREE_RADIAN_FACTOR = 0.0174533 + + with Tracer() as error_tracer: + # Test setup begins. + # Setup: Wait for Editor idle loop before executing Python hydra scripts then open "Base" level. + TestHelper.init_idle() + TestHelper.open_level("", "Base") + + # Setup: Close error windows and display helpers then update the viewport size. + TestHelper.close_error_windows() + TestHelper.close_display_helpers() + initial_viewport_setup() + general.update_viewport() + + # Setup: Runs the create_basic_atom_rendering_scene() function to setup the test scene. + create_basic_atom_rendering_scene() + + # Test steps begin. + # 1. Find the Directional Light entity then disable its Directional Light component. + directional_light_entity = EditorEntity.find_editor_entity(AtomComponentProperties.directional_light()) + directional_light_component = directional_light_entity.get_components_of_type( + [AtomComponentProperties.directional_light()])[0] + directional_light_component.disable_component() + Report.critical_result(Tests.directional_light_component_disabled, not directional_light_component.is_enabled()) + + # 2. Disable Global Skylight (IBL) component on the Global Skylight (IBL) entity. + global_skylight_entity = EditorEntity.find_editor_entity(AtomComponentProperties.global_skylight()) + global_skylight_component = global_skylight_entity.get_components_of_type( + [AtomComponentProperties.global_skylight()])[0] + global_skylight_component.disable_component() + Report.critical_result(Tests.global_skylight_component_disabled, not global_skylight_component.is_enabled()) + + # 3. Disable HDRi Skybox component on the Global Skylight (IBL) entity. + hdri_skybox_component = global_skylight_entity.get_components_of_type( + [AtomComponentProperties.hdri_skybox()])[0] + hdri_skybox_component.disable_component() + Report.critical_result(Tests.hdri_skybox_component_disabled, not hdri_skybox_component.is_enabled()) + + # 4. Create a Spot Light entity and rotate it. + spot_light_name = "Spot Light" + spot_light_entity = EditorEntity.create_editor_entity_at( + azlmbr.math.Vector3(0.7, -2.0, 1.0), spot_light_name) + rotation = azlmbr.math.Vector3(DEGREE_RADIAN_FACTOR * 300.0, 0.0, 0.0) + spot_light_entity.set_local_rotation(rotation) + Report.critical_result(Tests.spot_light_entity_created, spot_light_entity.exists()) + + # 5. Attach a Light component to the Spot Light entity. + light_component = spot_light_entity.add_component(AtomComponentProperties.light()) + Report.critical_result(Tests.light_component_added, light_component.is_enabled()) + + # 6. Set the Light component Light Type to Spot (disk). + light_component.set_component_property_value( + AtomComponentProperties.light('Light type'), LIGHT_TYPES['spot_disk']) + Report.result( + Tests.light_component_light_type_property_set, + light_component.get_component_property_value( + AtomComponentProperties.light('Light type')) == LIGHT_TYPES['spot_disk']) + + # 7. Enter game mode and take a screenshot then exit game mode. + enter_exit_game_mode_take_screenshot("SpotLight_1.ppm", Tests.enter_game_mode, Tests.exit_game_mode) + + # 8. Change the default material asset for the Ground Plane entity. + ground_plane_name = "Ground Plane" + ground_plane_entity = EditorEntity.find_editor_entity(ground_plane_name) + ground_plane_material_component_name = AtomComponentProperties.material() + ground_plane_material_component = ground_plane_entity.get_components_of_type( + [ground_plane_material_component_name])[0] + ground_plane_material_asset_path = os.path.join( + "Materials", "Presets", "Macbeth", "22_neutral_5-0_0-70d.azmaterial") + ground_plane_material_asset = Asset.find_asset_by_path(ground_plane_material_asset_path, False) + ground_plane_material_component.set_component_property_value( + AtomComponentProperties.material('Material Asset'), ground_plane_material_asset.id) + Report.result( + Tests.material_component_material_asset_property_set, + ground_plane_material_component.get_component_property_value( + AtomComponentProperties.material('Material Asset')) == ground_plane_material_asset.id) + + # 9. Enter game mode and take a screenshot then exit game mode. + enter_exit_game_mode_take_screenshot("SpotLight_2.ppm", Tests.enter_game_mode, Tests.exit_game_mode) + + # 10. Increase the Intensity value of the Light component. + light_component.set_component_property_value(AtomComponentProperties.light('Intensity'), 800.0) + Report.result( + Tests.light_component_intensity_property_set, + light_component.get_component_property_value( + AtomComponentProperties.light('Intensity')) == 800.0) + + # 11. Enter game mode and take a screenshot then exit game mode. + enter_exit_game_mode_take_screenshot("SpotLight_3.ppm", Tests.enter_game_mode, Tests.exit_game_mode) + + # 12. Change the Light component Color property value. + color_value = azlmbr.math.Color(47.0 / 255.0, 75.0 / 255.0, 37.0 / 255.0, 255.0 / 255.0) + light_component.set_component_property_value(AtomComponentProperties.light('Color'), color_value) + Report.result( + Tests.light_component_color_property_set, + light_component.get_component_property_value(AtomComponentProperties.light('Color')) == color_value) + + # 13. Enter game mode and take a screenshot then exit game mode. + enter_exit_game_mode_take_screenshot("SpotLight_4.ppm", Tests.enter_game_mode, Tests.exit_game_mode) + + # 14. Change the Light component Enable shutters, Inner angle, and Outer angle property values. + enable_shutters = True + inner_angle = 60.0 + outer_angle = 75.0 + light_component.set_component_property_value(AtomComponentProperties.light('Enable shutters'), enable_shutters) + light_component.set_component_property_value(AtomComponentProperties.light('Inner angle'), inner_angle) + light_component.set_component_property_value(AtomComponentProperties.light('Outer angle'), outer_angle) + Report.result( + Tests.light_component_enable_shutters_property_set, + light_component.get_component_property_value( + AtomComponentProperties.light('Enable shutters')) == enable_shutters) + Report.result( + Tests.light_component_inner_angle_property_set, + light_component.get_component_property_value(AtomComponentProperties.light('Inner angle')) == inner_angle) + Report.result( + Tests.light_component_outer_angle_property_set, + light_component.get_component_property_value(AtomComponentProperties.light('Outer angle')) == outer_angle) + + # 15. Enter game mode and take a screenshot then exit game mode. + enter_exit_game_mode_take_screenshot("SpotLight_5.ppm", Tests.enter_game_mode, Tests.exit_game_mode) + + # 16. Change the Light component Enable shadow and slightly move Spot Light entity. + light_component.set_component_property_value(AtomComponentProperties.light('Enable shadow'), True) + Report.result( + Tests.light_component_enable_shadow_property_set, + light_component.get_component_property_value(AtomComponentProperties.light('Enable shadow')) is True) + spot_light_entity.set_world_rotation(azlmbr.math.Vector3(0.7, -2.0, 1.9)) + + # 17. Enter game mode and take a screenshot then exit game mode. + enter_exit_game_mode_take_screenshot("SpotLight_6.ppm", Tests.enter_game_mode, Tests.exit_game_mode) + + # 18. Look for errors. + TestHelper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0) + for error_info in error_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in error_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(AtomGPU_LightComponent_SpotLightScreenshotsMatchGoldenImages) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_GPUTest_BasicLevelSetup.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_GPUTest_BasicLevelSetup.py deleted file mode 100644 index 1641b529ae..0000000000 --- a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_GPUTest_BasicLevelSetup.py +++ /dev/null @@ -1,200 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -import os - -import editor_python_test_tools.hydra_editor_utils as hydra -from editor_python_test_tools.editor_test_helper import EditorTestHelper -from Atom.atom_utils.screenshot_utils import ScreenshotHelper - -SCREEN_WIDTH = 1280 -SCREEN_HEIGHT = 720 -DEGREE_RADIAN_FACTOR = 0.0174533 - -helper = EditorTestHelper(log_prefix="Test_Atom_BasicLevelSetup") - - -def run(): - """ - 1. View -> Layouts -> Restore Default Layout, sets the viewport to ratio 16:9 @ 1280 x 720 - 2. Runs console command r_DisplayInfo = 0 - 3. Deletes all entities currently present in the level. - 4. Creates a "default_level" entity to hold all other entities, setting the translate values to x:0, y:0, z:0 - 5. Adds a Grid component to the "default_level" & updates its Grid Spacing to 1.0m - 6. Adds a "global_skylight" entity to "default_level", attaching an HDRi Skybox w/ a Cubemap Texture. - 7. Adds a Global Skylight (IBL) component w/ diffuse image and specular image to "global_skylight" entity. - 8. Adds a "ground_plane" entity to "default_level", attaching a Mesh component & Material component. - 9. Adds a "directional_light" entity to "default_level" & adds a Directional Light component. - 10. Adds a "sphere" entity to "default_level" & adds a Mesh component with a Material component to it. - 11. Adds a "camera" entity to "default_level" & adds a Camera component with 80 degree FOV and Transform values: - Translate - x:5.5m, y:-12.0m, z:9.0m - Rotate - x:-27.0, y:-12.0, z:25.0 - 12. Finally enters game mode, takes a screenshot, & exits game mode. - :return: None - """ - import azlmbr.asset as asset - import azlmbr.bus as bus - import azlmbr.camera as camera - import azlmbr.entity as entity - import azlmbr.legacy.general as general - import azlmbr.math as math - import azlmbr.paths - import azlmbr.editor as editor - - def initial_viewport_setup(screen_width, screen_height): - general.set_viewport_size(screen_width, screen_height) - general.update_viewport() - helper.wait_for_condition( - function=lambda: helper.isclose(a=general.get_viewport_size().x, b=SCREEN_WIDTH, rel_tol=0.1) - and helper.isclose(a=general.get_viewport_size().y, b=SCREEN_HEIGHT, rel_tol=0.1), - timeout_in_seconds=4.0 - ) - result = helper.isclose(a=general.get_viewport_size().x, b=SCREEN_WIDTH, rel_tol=0.1) and helper.isclose( - a=general.get_viewport_size().y, b=SCREEN_HEIGHT, rel_tol=0.1) - general.log(general.get_viewport_size().x) - general.log(general.get_viewport_size().y) - general.log(general.get_viewport_size().z) - general.log(f"Viewport is set to the expected size: {result}") - general.run_console("r_DisplayInfo = 0") - - def after_level_load(): - """Function to call after creating/opening a level to ensure it loads.""" - # Give everything a second to initialize. - general.idle_enable(True) - general.idle_wait(1.0) - general.update_viewport() - general.idle_wait(0.5) # half a second is more than enough for updating the viewport. - - # Close out problematic windows, FPS meters, and anti-aliasing. - if general.is_helpers_shown(): # Turn off the helper gizmos if visible - general.toggle_helpers() - general.idle_wait(1.0) - if general.is_pane_visible("Error Report"): # Close Error Report windows that block focus. - general.close_pane("Error Report") - if general.is_pane_visible("Error Log"): # Close Error Log windows that block focus. - general.close_pane("Error Log") - general.idle_wait(1.0) - general.run_console("r_displayInfo=0") - general.idle_wait(1.0) - - # Wait for Editor idle loop before executing Python hydra scripts. - general.idle_enable(True) - - # Basic setup for opened level. - helper.open_level(level_name="Base") - after_level_load() - initial_viewport_setup(SCREEN_WIDTH, SCREEN_HEIGHT) - - # Create default_level entity - search_filter = azlmbr.entity.SearchFilter() - all_entities = entity.SearchBus(azlmbr.bus.Broadcast, "SearchEntities", search_filter) - editor.ToolsApplicationRequestBus(bus.Broadcast, "DeleteEntities", all_entities) - - default_level = hydra.Entity("default_level") - position = math.Vector3(0.0, 0.0, 0.0) - default_level.create_entity(position, ["Grid"]) - default_level.get_set_test(0, "Controller|Configuration|Secondary Grid Spacing", 1.0) - - # Create global_skylight entity and set the properties - global_skylight = hydra.Entity("global_skylight") - global_skylight.create_entity( - entity_position=math.Vector3(0.0, 0.0, 0.0), - components=["HDRi Skybox", "Global Skylight (IBL)"], - parent_id=default_level.id - ) - global_skylight_image_asset_path = os.path.join("LightingPresets", "default_iblskyboxcm.exr.streamingimage") - global_skylight_image_asset = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", global_skylight_image_asset_path, math.Uuid(), False) - global_skylight.get_set_test(0, "Controller|Configuration|Cubemap Texture", global_skylight_image_asset) - hydra.get_set_test(global_skylight, 1, "Controller|Configuration|Diffuse Image", global_skylight_image_asset) - hydra.get_set_test(global_skylight, 1, "Controller|Configuration|Specular Image", global_skylight_image_asset) - - # Create ground_plane entity and set the properties - ground_plane = hydra.Entity("ground_plane") - ground_plane.create_entity( - entity_position=math.Vector3(0.0, 0.0, 0.0), - components=["Material"], - parent_id=default_level.id - ) - azlmbr.components.TransformBus(azlmbr.bus.Event, "SetLocalUniformScale", ground_plane.id, 32.0) - - # Work around to add the correct Atom Mesh component and asset. - mesh_type_id = azlmbr.globals.property.EditorMeshComponentTypeId - ground_plane.components.append( - editor.EditorComponentAPIBus( - bus.Broadcast, "AddComponentsOfType", ground_plane.id, [mesh_type_id] - ).GetValue()[0] - ) - ground_plane_mesh_asset_path = os.path.join("TestData", "Objects", "plane.azmodel") - ground_plane_mesh_asset = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", ground_plane_mesh_asset_path, math.Uuid(), False) - hydra.get_set_test(ground_plane, 1, "Controller|Configuration|Mesh Asset", ground_plane_mesh_asset) - - # Add Atom Material component and asset. - ground_plane_material_asset_path = os.path.join("Materials", "Presets", "PBR", "metal_chrome.azmaterial") - ground_plane_material_asset = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", ground_plane_material_asset_path, math.Uuid(), False) - ground_plane.get_set_test(0, "Default Material|Material Asset", ground_plane_material_asset) - - # Create directional_light entity and set the properties - directional_light = hydra.Entity("directional_light") - directional_light.create_entity( - entity_position=math.Vector3(0.0, 0.0, 10.0), - components=["Directional Light"], - parent_id=default_level.id - ) - rotation = math.Vector3(DEGREE_RADIAN_FACTOR * -90.0, 0.0, 0.0) - azlmbr.components.TransformBus(azlmbr.bus.Event, "SetLocalRotation", directional_light.id, rotation) - - # Create sphere entity and set the properties - sphere = hydra.Entity("sphere") - sphere.create_entity( - entity_position=math.Vector3(0.0, 0.0, 1.0), - components=["Material"], - parent_id=default_level.id - ) - - # Work around to add the correct Atom Mesh component and asset. - sphere.components.append( - editor.EditorComponentAPIBus( - bus.Broadcast, "AddComponentsOfType", sphere.id, [mesh_type_id] - ).GetValue()[0] - ) - sphere_mesh_asset_path = os.path.join("Models", "sphere.azmodel") - sphere_mesh_asset = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", sphere_mesh_asset_path, math.Uuid(), False) - hydra.get_set_test(sphere, 1, "Controller|Configuration|Mesh Asset", sphere_mesh_asset) - - # Add Atom Material component and asset. - sphere_material_asset_path = os.path.join("Materials", "Presets", "PBR", "metal_brass_polished.azmaterial") - sphere_material_asset = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", sphere_material_asset_path, math.Uuid(), False) - sphere.get_set_test(0, "Default Material|Material Asset", sphere_material_asset) - - # Create camera component and set the properties - camera_entity = hydra.Entity("camera") - position = math.Vector3(5.5, -12.0, 9.0) - camera_entity.create_entity(components=["Camera"], entity_position=position, parent_id=default_level.id) - rotation = math.Vector3( - DEGREE_RADIAN_FACTOR * -27.0, DEGREE_RADIAN_FACTOR * -12.0, DEGREE_RADIAN_FACTOR * 25.0 - ) - azlmbr.components.TransformBus(azlmbr.bus.Event, "SetLocalRotation", camera_entity.id, rotation) - camera_entity.get_set_test(0, "Controller|Configuration|Field of view", 60.0) - camera.EditorCameraViewRequestBus(azlmbr.bus.Event, "ToggleCameraAsActiveView", camera_entity.id) - - # Enter game mode, take screenshot, & exit game mode. - general.idle_wait(0.5) - general.enter_game_mode() - general.idle_wait(1.0) - helper.wait_for_condition(function=lambda: general.is_in_game_mode(), timeout_in_seconds=2.0) - ScreenshotHelper(general.idle_wait_frames).capture_screenshot_blocking(f"{'AtomBasicLevelSetup'}.ppm") - general.exit_game_mode() - helper.wait_for_condition(function=lambda: not general.is_in_game_mode(), timeout_in_seconds=2.0) - - -if __name__ == "__main__": - run() diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_GPUTest_LightComponent.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_GPUTest_LightComponent.py deleted file mode 100644 index f69ceb2120..0000000000 --- a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_GPUTest_LightComponent.py +++ /dev/null @@ -1,261 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" -import os -import sys - -import azlmbr.asset as asset -import azlmbr.bus as bus -import azlmbr.editor as editor -import azlmbr.math as math -import azlmbr.paths -import azlmbr.legacy.general as general - -sys.path.append(os.path.join(azlmbr.paths.projectroot, "Gem", "PythonTests")) - -import editor_python_test_tools.hydra_editor_utils as hydra -from Atom.atom_utils import atom_component_helper, atom_constants, screenshot_utils -from editor_python_test_tools.editor_test_helper import EditorTestHelper - -helper = EditorTestHelper(log_prefix="Atom_EditorTestHelper") - -LEVEL_NAME = "Base" -LIGHT_COMPONENT = "Light" -LIGHT_TYPE_PROPERTY = 'Controller|Configuration|Light type' -DEGREE_RADIAN_FACTOR = 0.0174533 - - -def run(): - """ - Sets up the tests by making sure the required level is created & setup correctly. - It then executes 2 test cases - see each associated test function's docstring for more info. - - Finally prints the string "Light component tests completed" after completion - - Tests will fail immediately if any of these log lines are found: - 1. Trace::Assert - 2. Trace::Error - 3. Traceback (most recent call last): - - :return: None - """ - atom_component_helper.create_basic_atom_level(level_name=LEVEL_NAME) - - # Run tests. - area_light_test() - spot_light_test() - general.log("Light component tests completed.") - - -def area_light_test(): - """ - Basic test for the "Light" component attached to an "area_light" entity. - - Test Case - Light Component: Capsule, Spot (disk), and Point (sphere): - 1. Creates "area_light" entity w/ a Light component that has a Capsule Light type w/ the color set to 255, 0, 0 - 2. Enters game mode to take a screenshot for comparison, then exits game mode. - 3. Sets the Light component Intensity Mode to Lumens (default). - 4. Ensures the Light component Mode is Automatic (default). - 5. Sets the Intensity value of the Light component to 0.0 - 6. Enters game mode again, takes another screenshot for comparison, then exits game mode. - 7. Updates the Intensity value of the Light component to 1000.0 - 8. Enters game mode again, takes another screenshot for comparison, then exits game mode. - 9. Swaps the Capsule light type option to Spot (disk) light type on the Light component - 10. Updates "area_light" entity Transform rotate value to x: 90.0, y:0.0, z:0.0 - 11. Enters game mode again, takes another screenshot for comparison, then exits game mode. - 12. Swaps the Spot (disk) light type for the Point (sphere) light type in the Light component. - 13. Enters game mode again, takes another screenshot for comparison, then exits game mode. - 14. Deletes the Light component from the "area_light" entity and verifies its successful. - """ - # Create an "area_light" entity with "Light" component using Light type of "Capsule" - area_light_entity_name = "area_light" - area_light = hydra.Entity(area_light_entity_name) - area_light.create_entity(math.Vector3(-1.0, -2.0, 3.0), [LIGHT_COMPONENT]) - general.log( - f"{area_light_entity_name}_test: Component added to the entity: " - f"{hydra.has_components(area_light.id, [LIGHT_COMPONENT])}") - light_component_id_pair = hydra.attach_component_to_entity(area_light.id, LIGHT_COMPONENT) - - # Select the "Capsule" light type option. - azlmbr.editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, - 'SetComponentProperty', - light_component_id_pair, - LIGHT_TYPE_PROPERTY, - atom_constants.LIGHT_TYPES['capsule'] - ) - - # Update color and take screenshot in game mode - color = math.Color(255.0, 0.0, 0.0, 0.0) - area_light.get_set_test(0, "Controller|Configuration|Color", color) - general.idle_wait(1.0) - screenshot_utils.take_screenshot_game_mode("AreaLight_1", area_light_entity_name) - - # Update intensity value to 0.0 and take screenshot in game mode - area_light.get_set_test(0, "Controller|Configuration|Attenuation Radius|Mode", 1) - area_light.get_set_test(0, "Controller|Configuration|Intensity", 0.0) - general.idle_wait(1.0) - screenshot_utils.take_screenshot_game_mode("AreaLight_2", area_light_entity_name) - - # Update intensity value to 1000.0 and take screenshot in game mode - area_light.get_set_test(0, "Controller|Configuration|Intensity", 1000.0) - general.idle_wait(1.0) - screenshot_utils.take_screenshot_game_mode("AreaLight_3", area_light_entity_name) - - # Swap the "Capsule" light type option to "Spot (disk)" light type - azlmbr.editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, - 'SetComponentProperty', - light_component_id_pair, - LIGHT_TYPE_PROPERTY, - atom_constants.LIGHT_TYPES['spot_disk'] - ) - area_light_rotation = math.Vector3(DEGREE_RADIAN_FACTOR * 90.0, 0.0, 0.0) - azlmbr.components.TransformBus(azlmbr.bus.Event, "SetLocalRotation", area_light.id, area_light_rotation) - general.idle_wait(1.0) - screenshot_utils.take_screenshot_game_mode("AreaLight_4", area_light_entity_name) - - # Swap the "Spot (disk)" light type to the "Point (sphere)" light type and take screenshot. - azlmbr.editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, - 'SetComponentProperty', - light_component_id_pair, - LIGHT_TYPE_PROPERTY, - atom_constants.LIGHT_TYPES['sphere'] - ) - general.idle_wait(1.0) - screenshot_utils.take_screenshot_game_mode("AreaLight_5", area_light_entity_name) - - editor.ToolsApplicationRequestBus(bus.Broadcast, "DeleteEntityById", area_light.id) - - -def spot_light_test(): - """ - Basic test for the Light component attached to a "spot_light" entity. - - Test Case - Light Component: Spot (disk) with shadows & colors: - 1. Creates "spot_light" entity w/ a Light component attached to it. - 2. Selects the "directional_light" entity already present in the level and disables it. - 3. Selects the "global_skylight" entity already present in the level and disables the HDRi Skybox component, - as well as the Global Skylight (IBL) component. - 4. Enters game mode to take a screenshot for comparison, then exits game mode. - 5. Selects the "ground_plane" entity and changes updates the material to a new material. - 6. Enters game mode to take a screenshot for comparison, then exits game mode. - 7. Selects the "spot_light" entity and increases the Light component Intensity to 800 lm - 8. Enters game mode to take a screenshot for comparison, then exits game mode. - 9. Selects the "spot_light" entity and sets the Light component Color to 47, 75, 37 - 10. Enters game mode to take a screenshot for comparison, then exits game mode. - 11. Selects the "spot_light" entity and modifies the Shutter controls to the following values: - - Enable shutters: True - - Inner Angle: 60.0 - - Outer Angle: 75.0 - 12. Enters game mode to take a screenshot for comparison, then exits game mode. - 13. Selects the "spot_light" entity and modifies the Shadow controls to the following values: - - Enable Shadow: True - - ShadowmapSize: 256 - 14. Modifies the world translate position of the "spot_light" entity to 0.7, -2.0, 1.9 (for casting shadows better) - 15. Enters game mode to take a screenshot for comparison, then exits game mode. - """ - # Disable "Directional Light" component for the "directional_light" entity - # "directional_light" entity is created by the create_basic_atom_level() function by default. - directional_light_entity_id = hydra.find_entity_by_name("directional_light") - directional_light = hydra.Entity(name='directional_light', id=directional_light_entity_id) - directional_light_component_type = azlmbr.editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, 'FindComponentTypeIdsByEntityType', ["Directional Light"], 0)[0] - directional_light_component = azlmbr.editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, 'GetComponentOfType', directional_light.id, directional_light_component_type - ).GetValue() - editor.EditorComponentAPIBus(bus.Broadcast, "DisableComponents", [directional_light_component]) - general.idle_wait(0.5) - - # Disable "Global Skylight (IBL)" and "HDRi Skybox" components for the "global_skylight" entity - global_skylight_entity_id = hydra.find_entity_by_name("global_skylight") - global_skylight = hydra.Entity(name='global_skylight', id=global_skylight_entity_id) - global_skylight_component_type = azlmbr.editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, 'FindComponentTypeIdsByEntityType', ["Global Skylight (IBL)"], 0)[0] - global_skylight_component = azlmbr.editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, 'GetComponentOfType', global_skylight.id, global_skylight_component_type - ).GetValue() - editor.EditorComponentAPIBus(bus.Broadcast, "DisableComponents", [global_skylight_component]) - hdri_skybox_component_type = azlmbr.editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, 'FindComponentTypeIdsByEntityType', ["HDRi Skybox"], 0)[0] - hdri_skybox_component = azlmbr.editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, 'GetComponentOfType', global_skylight.id, hdri_skybox_component_type - ).GetValue() - editor.EditorComponentAPIBus(bus.Broadcast, "DisableComponents", [hdri_skybox_component]) - general.idle_wait(0.5) - - # Create a "spot_light" entity with "Light" component using Light Type of "Spot (disk)" - spot_light_entity_name = "spot_light" - spot_light = hydra.Entity(spot_light_entity_name) - spot_light.create_entity(math.Vector3(0.7, -2.0, 1.0), [LIGHT_COMPONENT]) - general.log( - f"{spot_light_entity_name}_test: Component added to the entity: " - f"{hydra.has_components(spot_light.id, [LIGHT_COMPONENT])}") - rotation = math.Vector3(DEGREE_RADIAN_FACTOR * 300.0, 0.0, 0.0) - azlmbr.components.TransformBus(azlmbr.bus.Event, "SetLocalRotation", spot_light.id, rotation) - light_component_type = hydra.attach_component_to_entity(spot_light.id, LIGHT_COMPONENT) - editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, - 'SetComponentProperty', - light_component_type, - LIGHT_TYPE_PROPERTY, - atom_constants.LIGHT_TYPES['spot_disk'] - ) - - general.idle_wait(1.0) - screenshot_utils.take_screenshot_game_mode("SpotLight_1", spot_light_entity_name) - - # Change default material of ground plane entity and take screenshot - ground_plane_entity_id = hydra.find_entity_by_name("ground_plane") - ground_plane = hydra.Entity(name='ground_plane', id=ground_plane_entity_id) - ground_plane_asset_path = os.path.join("Materials", "Presets", "MacBeth", "22_neutral_5-0_0-70d.azmaterial") - ground_plane_asset_value = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", ground_plane_asset_path, math.Uuid(), False) - material_property_path = "Default Material|Material Asset" - material_component_type = azlmbr.editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, 'FindComponentTypeIdsByEntityType', ["Material"], 0)[0] - material_component = azlmbr.editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, 'GetComponentOfType', ground_plane.id, material_component_type).GetValue() - editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, - 'SetComponentProperty', - material_component, - material_property_path, - ground_plane_asset_value - ) - general.idle_wait(1.0) - screenshot_utils.take_screenshot_game_mode("SpotLight_2", spot_light_entity_name) - - # Increase intensity value of the Spot light and take screenshot in game mode - spot_light.get_set_test(0, "Controller|Configuration|Intensity", 800.0) - general.idle_wait(1.0) - screenshot_utils.take_screenshot_game_mode("SpotLight_3", spot_light_entity_name) - - # Update the Spot light color and take screenshot in game mode - color_value = math.Color(47.0 / 255.0, 75.0 / 255.0, 37.0 / 255.0, 255.0 / 255.0) - spot_light.get_set_test(0, "Controller|Configuration|Color", color_value) - general.idle_wait(1.0) - screenshot_utils.take_screenshot_game_mode("SpotLight_4", spot_light_entity_name) - - # Update the Shutter controls of the Light component and take screenshot - spot_light.get_set_test(0, "Controller|Configuration|Shutters|Enable shutters", True) - spot_light.get_set_test(0, "Controller|Configuration|Shutters|Inner angle", 60.0) - spot_light.get_set_test(0, "Controller|Configuration|Shutters|Outer angle", 75.0) - general.idle_wait(1.0) - screenshot_utils.take_screenshot_game_mode("SpotLight_5", spot_light_entity_name) - - # Update the Shadow controls, move the spot_light entity world translate position and take screenshot - spot_light.get_set_test(0, "Controller|Configuration|Shadows|Enable shadow", True) - spot_light.get_set_test(0, "Controller|Configuration|Shadows|Shadowmap size", 256.0) - azlmbr.components.TransformBus( - azlmbr.bus.Event, "SetWorldTranslation", spot_light.id, math.Vector3(0.7, -2.0, 1.9)) - general.idle_wait(1.0) - screenshot_utils.take_screenshot_game_mode("SpotLight_6", spot_light_entity_name) - - -if __name__ == "__main__": - run() diff --git a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/editor_entity_utils.py b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/editor_entity_utils.py index 309601b0ba..72530325e0 100644 --- a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/editor_entity_utils.py +++ b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/editor_entity_utils.py @@ -25,7 +25,7 @@ class EditorComponent: """ EditorComponent class used to set and get the component property value using path EditorComponent object is returned from either of - EditorEntity.add_component() or Entity.add_components() or EditorEntity.get_component_objects() + EditorEntity.add_component() or Entity.add_components() or EditorEntity.get_components_of_type() which also assigns self.id and self.type_id to the EditorComponent object. """ @@ -94,6 +94,13 @@ class EditorComponent: """ return editor.EditorComponentAPIBus(bus.Broadcast, "IsComponentEnabled", self.id) + def disable_component(self): + """ + Used to disable the component using its id value. + :return: None + """ + editor.EditorComponentAPIBus(bus.Broadcast, "DisableComponents", [self.id]) + @staticmethod def get_type_ids(component_names: list) -> list: """ @@ -107,7 +114,6 @@ class EditorComponent: return type_ids - def convert_to_azvector3(xyz) -> azlmbr.math.Vector3: """ Converts a vector3-like element into a azlmbr.math.Vector3 @@ -120,6 +126,7 @@ def convert_to_azvector3(xyz) -> azlmbr.math.Vector3: else: raise ValueError("vector must be a 3 element list/tuple or azlmbr.math.Vector3") + class EditorEntity: """ Entity class is used to create and interact with Editor Entities. @@ -136,10 +143,11 @@ class EditorEntity: # Creation functions @classmethod - def find_editor_entity(cls, entity_name: str, must_be_unique : bool = False) -> EditorEntity: + def find_editor_entity(cls, entity_name: str, must_be_unique: bool = False) -> EditorEntity: """ Given Entity name, outputs entity object :param entity_name: Name of entity to find + :param must_be_unique: bool that asserts the entity_name specified is unique when set to True :return: EditorEntity class object """ entities = cls.find_editor_entities([entity_name]) @@ -147,14 +155,14 @@ class EditorEntity: if must_be_unique: assert len(entities) == 1, f"Failure: Multiple entities with name: '{entity_name}' when expected only one" - entity = cls(entities[0]) + entity = entities[0] return entity @classmethod - def find_editor_entities(cls, entity_names: List[str]) -> EditorEntity: + def find_editor_entities(cls, entity_names: List[str]) -> List[EditorEntity]: """ Given Entities names, returns a list of EditorEntity - :param entity_name: Name of entity to find + :param entity_names: List of entity names to find :return: List[EditorEntity] class object """ searchFilter = azlmbr.entity.SearchFilter() @@ -438,7 +446,7 @@ class EditorEntity: def set_local_rotation(self, new_rotation) -> None: """ Sets the set the local rotation(relative to the parent) of the current entity. - :param vector3_rotation: The math.Vector3 value to use for rotation on the entity (uses radians). + :param new_rotation: The math.Vector3 value to use for rotation on the entity (uses radians). :return: None """ new_rotation = convert_to_azvector3(new_rotation) @@ -454,7 +462,7 @@ class EditorEntity: def set_local_translation(self, new_translation) -> None: """ Sets the local translation(relative to the parent) of the current entity. - :param vector3_translation: The math.Vector3 value to use for translation on the entity. + :param new_translation: The math.Vector3 value to use for translation on the entity. :return: None """ new_translation = convert_to_azvector3(new_translation) @@ -470,3 +478,99 @@ class EditorEntity: assert self.id.isValid(), "A valid entity id is required to focus on its owning prefab." focus_prefab_result = azlmbr.prefab.PrefabFocusPublicRequestBus(bus.Broadcast, "FocusOnOwningPrefab", self.id) assert focus_prefab_result.IsSuccess(), f"Prefab operation 'FocusOnOwningPrefab' failed. Error: {focus_prefab_result.GetError()}" + + +class EditorLevelEntity: + """ + EditorLevel class used to add and fetch level components. + Level entity is a special entity that you do not create/destroy independently of larger systems of level creation. + This collects a number of staticmethods that do not rely on entityId since Level entity is found internally by + EditorLevelComponentAPIBus requests. + """ + + @staticmethod + def get_type_ids(component_names: list) -> list: + """ + Used to get type ids of given components list for EntityType Level + :param: component_names: List of components to get type ids + :return: List of type ids of given components. + """ + type_ids = editor.EditorComponentAPIBus( + bus.Broadcast, "FindComponentTypeIdsByEntityType", component_names, azlmbr.entity.EntityType().Level + ) + return type_ids + + @staticmethod + def add_component(component_name: str) -> EditorComponent: + """ + Used to add new component to Level. + :param component_name: String of component name to add. + :return: Component object of newly added component. + """ + component = EditorLevelEntity.add_components([component_name])[0] + return component + + @staticmethod + def add_components(component_names: list) -> List[EditorComponent]: + """ + Used to add multiple components + :param: component_names: List of components to add to level + :return: List of newly added components to the level + """ + components = [] + type_ids = EditorLevelEntity.get_type_ids(component_names) + for type_id in type_ids: + new_comp = EditorComponent() + new_comp.type_id = type_id + add_component_outcome = editor.EditorLevelComponentAPIBus( + bus.Broadcast, "AddComponentsOfType", [type_id] + ) + assert ( + add_component_outcome.IsSuccess() + ), f"Failure: Could not add component: '{new_comp.get_component_name()}' to level" + new_comp.id = add_component_outcome.GetValue()[0] + components.append(new_comp) + return components + + @staticmethod + def get_components_of_type(component_names: list) -> List[EditorComponent]: + """ + Used to get components of type component_name that already exists on the level + :param component_names: List of names of components to check + :return: List of Level Component objects of given component name + """ + component_list = [] + type_ids = EditorLevelEntity.get_type_ids(component_names) + for type_id in type_ids: + component = EditorComponent() + component.type_id = type_id + get_component_of_type_outcome = editor.EditorLevelComponentAPIBus( + bus.Broadcast, "GetComponentOfType", type_id + ) + assert ( + get_component_of_type_outcome.IsSuccess() + ), f"Failure: Level does not have component:'{component.get_component_name()}'" + component.id = get_component_of_type_outcome.GetValue() + component_list.append(component) + + return component_list + + @staticmethod + def has_component(component_name: str) -> bool: + """ + Used to verify if the level has the specified component + :param component_name: Name of component to check for + :return: True, if level has specified component. Else, False + """ + type_ids = EditorLevelEntity.get_type_ids([component_name]) + return editor.EditorLevelComponentAPIBus(bus.Broadcast, "HasComponentOfType", type_ids[0]) + + @staticmethod + def count_components_of_type(component_name: str) -> int: + """ + Used to get a count of the specified level component attached to the level + :param component_name: Name of component to check for + :return: integer count of occurences of level component attached to level or zero if none are present + """ + type_ids = EditorLevelEntity.get_type_ids([component_name]) + return editor.EditorLevelComponentAPIBus(bus.Broadcast, "CountComponentsOfType", type_ids[0]) diff --git a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py index 481d73274f..f277148bc8 100644 --- a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py +++ b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py @@ -34,6 +34,38 @@ class TestHelper: # JIRA: SPEC-2880 # general.idle_wait_frames(1) + @staticmethod + def create_level(level_name: str) -> bool: + """ + :param level_name: The name of the level to be created + :return: True if ECreateLevelResult returns 0, False otherwise with logging to report reason + """ + Report.info(f"Creating level {level_name}") + + # Use these hardcoded values to pass expected values for old terrain system until new create_level API is + # available + heightmap_resolution = 1024 + heightmap_meters_per_pixel = 1 + terrain_texture_resolution = 4096 + use_terrain = False + + result = general.create_level_no_prompt(level_name, heightmap_resolution, heightmap_meters_per_pixel, + terrain_texture_resolution, use_terrain) + + # Result codes are ECreateLevelResult defined in CryEdit.h + if result == 1: + Report.info(f"{level_name} level already exists") + elif result == 2: + Report.info("Failed to create directory") + elif result == 3: + Report.info("Directory length is too long") + elif result != 0: + Report.info("Unknown error, failed to create level") + else: + Report.info(f"{level_name} level created successfully") + + return result == 0 + @staticmethod def open_level(directory : str, level : str): # type: (str, str) -> None @@ -56,8 +88,7 @@ class TestHelper: general.idle_wait_frames(200) @staticmethod - def enter_game_mode(msgtuple_success_fail : Tuple[str, str]): - # type: (tuple) -> None + def enter_game_mode(msgtuple_success_fail: Tuple[str, str]) -> None: """ :param msgtuple_success_fail: The tuple with the expected/unexpected messages for entering game mode. @@ -70,8 +101,7 @@ class TestHelper: Report.critical_result(msgtuple_success_fail, general.is_in_game_mode()) @staticmethod - def multiplayer_enter_game_mode(msgtuple_success_fail : Tuple[str, str], sv_default_player_spawn_asset : str): - # type: (tuple) -> None + def multiplayer_enter_game_mode(msgtuple_success_fail: Tuple[str, str], sv_default_player_spawn_asset: str) -> None: """ :param msgtuple_success_fail: The tuple with the expected/unexpected messages for entering game mode. :param sv_default_player_spawn_asset: The path to the network player prefab that will be automatically spawned upon entering gamemode. The engine default is "prefabs/player.network.spawnable" diff --git a/AutomatedTesting/Gem/PythonTests/Physics/utils/FileManagement.py b/AutomatedTesting/Gem/PythonTests/Physics/utils/FileManagement.py index 017bb672a4..03287d0542 100644 --- a/AutomatedTesting/Gem/PythonTests/Physics/utils/FileManagement.py +++ b/AutomatedTesting/Gem/PythonTests/Physics/utils/FileManagement.py @@ -98,38 +98,32 @@ class FileManagement: """ file_map = FileManagement._load_file_map() backup_path = FileManagement.backup_folder_path - backup_file_name = "{}.bak".format(file_name) - backup_file = os.path.join(backup_path, backup_file_name) # If backup directory DNE, make one if not os.path.exists(backup_path): os.mkdir(backup_path) - # If "traditional" backup file exists, delete it (myFile.txt.bak) - if os.path.exists(backup_file): - fs.delete([backup_file], True, False) - # Find my next storage name (myFile_1.txt.bak) - backup_storage_file_name = FileManagement._next_available_name(backup_file_name, file_map) - if backup_storage_file_name is None: + + # Find my next storage name (myFile_1.txt) + backup_file_name = FileManagement._next_available_name(file_name, file_map) + if backup_file_name is None: # If _next_available_name returns None, we have backed up MAX_BACKUPS of files name [file_name] raise Exception( "FileManagement class ran out of backups per name. Max: {}".format(FileManagement.MAX_BACKUPS) ) - backup_storage_file = os.path.join(backup_path, backup_storage_file_name) + + # If this backup file already exists, delete it. + backup_storage_file = "{}.bak".format(os.path.normpath(os.path.join(backup_path, backup_file_name))) if os.path.exists(backup_storage_file): - # This file should not exists, but if it does it's about to get clobbered! - fs.unlock_file(backup_storage_file) - # Create "traditional" backup file (myFile.txt.bak) - fs.create_backup(os.path.join(file_path, file_name), backup_path) - # Copy "traditional" backup file into storage backup (myFile_1.txt.bak) - FileManagement._copy_file(backup_file_name, backup_path, backup_storage_file_name, backup_path) - fs.lock_file(backup_storage_file) - # Delete "traditional" back up file - fs.unlock_file(backup_file) - fs.delete([backup_file], True, False) + fs.delete([backup_storage_file], True, False) + + # Create backup file (myFile_1.txt.bak) + original_file = os.path.normpath(os.path.join(file_path, file_name)) + fs.create_backup(original_file, backup_path, backup_file_name) + # Update file map with new file - file_map[os.path.join(file_path, file_name)] = backup_storage_file_name + file_map[original_file] = backup_file_name FileManagement._save_file_map(file_map) # Unlock original file to get it ready to be edited by the test - fs.unlock_file(os.path.join(file_path, file_name)) + fs.unlock_file(original_file) @staticmethod def _restore_file(file_name, file_path): @@ -143,20 +137,15 @@ class FileManagement: """ file_map = FileManagement._load_file_map() backup_path = FileManagement.backup_folder_path - src_file = os.path.join(file_path, file_name) + src_file = os.path.normpath(os.path.join(file_path, file_name)) if src_file in file_map: - backup_file = os.path.join(backup_path, file_map[src_file]) - if os.path.exists(backup_file): - fs.unlock_file(backup_file) - fs.unlock_file(src_file) - # Make temporary copy of backed up file to restore from - temp_file = "{}.bak".format(file_name) - FileManagement._copy_file(file_map[src_file], backup_path, temp_file, backup_path) - fs.restore_backup(src_file, backup_path) - fs.lock_file(src_file) - # Delete backup file - fs.delete([os.path.join(backup_path, temp_file)], True, False) + backup_file_name = file_map[src_file] + backup_file = "{}.bak".format(os.path.join(backup_path, backup_file_name)) + + fs.unlock_file(src_file) + if fs.restore_backup(src_file, backup_path, backup_file_name): fs.delete([backup_file], True, False) + # Remove from file map del file_map[src_file] FileManagement._save_file_map(file_map) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/Prefab/CMakeLists.txt index 48c24d1ebf..629db72dc7 100644 --- a/AutomatedTesting/Gem/PythonTests/Prefab/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/Prefab/CMakeLists.txt @@ -12,7 +12,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS) NAME AutomatedTesting::PrefabTests TEST_SUITE main TEST_SERIAL - PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Main.py + PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Main_Optimized.py RUNTIME_DEPENDENCIES Legacy::Editor AZ::AssetProcessor diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/TestSuite_Main_Optimized.py b/AutomatedTesting/Gem/PythonTests/Prefab/TestSuite_Main_Optimized.py new file mode 100644 index 0000000000..bf67b2c661 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Prefab/TestSuite_Main_Optimized.py @@ -0,0 +1,52 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +import pytest + +from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, EditorParallelTest, EditorTestSuite + + +@pytest.mark.SUITE_main +@pytest.mark.parametrize("launcher_platform", ['windows_editor']) +@pytest.mark.parametrize("project", ["AutomatedTesting"]) +class TestAutomationNoAutoTestMode(EditorTestSuite): + + # Enable only -BatchMode for these tests. Some tests cannot run in -autotest_mode due to UI interactions + global_extra_cmdline_args = ["-BatchMode"] + + class test_CreatePrefab_UnderAnEntity(EditorSharedTest): + from .tests.create_prefab import CreatePrefab_UnderAnEntity as test_module + + class test_CreatePrefab_UnderAnotherPrefab(EditorSharedTest): + from .tests.create_prefab import CreatePrefab_UnderAnotherPrefab as test_module + + class test_DeleteEntity_UnderAnotherPrefab(EditorSharedTest): + from .tests.delete_entity import DeleteEntity_UnderAnotherPrefab as test_module + + class test_DeleteEntity_UnderLevelPrefab(EditorSharedTest): + from .tests.delete_entity import DeleteEntity_UnderLevelPrefab as test_module + + class test_ReparentPrefab_UnderAnotherPrefab(EditorSharedTest): + from .tests.reparent_prefab import ReparentPrefab_UnderAnotherPrefab as test_module + + class test_DetachPrefab_UnderAnotherPrefab(EditorSharedTest): + from .tests.detach_prefab import DetachPrefab_UnderAnotherPrefab as test_module + + class test_OpenLevel_ContainingTwoEntities(EditorSharedTest): + from .tests.open_level import OpenLevel_ContainingTwoEntities as test_module + + class test_CreatePrefab_WithSingleEntity(EditorSharedTest): + from .tests.create_prefab import CreatePrefab_WithSingleEntity as test_module + + class test_InstantiatePrefab_ContainingASingleEntity(EditorSharedTest): + from .tests.instantiate_prefab import InstantiatePrefab_ContainingASingleEntity as test_module + + class test_DeletePrefab_ContainingASingleEntity(EditorSharedTest): + from .tests.delete_prefab import DeletePrefab_ContainingASingleEntity as test_module + + class test_DuplicatePrefab_ContainingASingleEntity(EditorSharedTest): + from .tests.duplicate_prefab import DuplicatePrefab_ContainingASingleEntity as test_module \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_WithSingleEntity.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_WithSingleEntity.py index 80f4c0e596..eb8a262a69 100644 --- a/AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_WithSingleEntity.py +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_WithSingleEntity.py @@ -24,6 +24,7 @@ def CreatePrefab_WithSingleEntity(): # Creates a prefab from the new entity Prefab.create_prefab(car_prefab_entities, CAR_PREFAB_FILE_NAME) + if __name__ == "__main__": from editor_python_test_tools.utils import Report Report.start_test(CreatePrefab_WithSingleEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/detach_prefab/DetachPrefab_UnderAnotherPrefab.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/detach_prefab/DetachPrefab_UnderAnotherPrefab.py index 5c97f0b032..69dbcfc89c 100644 --- a/AutomatedTesting/Gem/PythonTests/Prefab/tests/detach_prefab/DetachPrefab_UnderAnotherPrefab.py +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/detach_prefab/DetachPrefab_UnderAnotherPrefab.py @@ -7,8 +7,8 @@ SPDX-License-Identifier: Apache-2.0 OR MIT def DetachPrefab_UnderAnotherPrefab(): - CAR_PREFAB_FILE_NAME = 'car_prefab' - WHEEL_PREFAB_FILE_NAME = 'wheel_prefab' + CAR_PREFAB_FILE_NAME = 'car_prefab2' + WHEEL_PREFAB_FILE_NAME = 'wheel_prefab2' import editor_python_test_tools.pyside_utils as pyside_utils diff --git a/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainHeightGradientList_AddRemoveGradientWorks.py b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainHeightGradientList_AddRemoveGradientWorks.py new file mode 100644 index 0000000000..0be1f1ca10 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainHeightGradientList_AddRemoveGradientWorks.py @@ -0,0 +1,144 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +class HeightTests: + single_gradient_height_correct = ( + "Successfully retrieved height for gradient1.", + "Failed to retrieve height for gradient1." + ) + double_gradient_height_correct = ( + "Successfully retrieved height when two gradients exist.", + "Failed to retrieve height when two gradients exist." + ) + triple_gradient_height_correct = ( + "Successfully retrieved height when three gradients exist.", + "Failed to retrieve height when three gradients exist." + ) + terrain_data_changed_call_count_correct = ( + "OnTerrainDataChanged called expected number of times.", + "OnTerrainDataChanged call count incorrect." + ) + +def TerrainHeightGradientList_AddRemoveGradientWorks(): + """ + Summary: + Test aspects of the TerrainHeightGradientList through the BehaviorContext and the Property Tree. + :return: None + """ + + import os + import math as sys_math + + import azlmbr.legacy.general as general + import azlmbr.bus as bus + import azlmbr.math as math + import azlmbr.terrain as terrain + import azlmbr.editor as editor + import azlmbr.vegetation as vegetation + import azlmbr.entity as EntityId + + import editor_python_test_tools.hydra_editor_utils as hydra + from editor_python_test_tools.utils import Report + from editor_python_test_tools.utils import TestHelper as helper + import editor_python_test_tools.pyside_utils as pyside_utils + from editor_python_test_tools.editor_entity_utils import EditorEntity + + terrain_changed_call_count = 0 + expected_terrain_changed_calls = 0 + + aabb_component_name = "Axis Aligned Box Shape" + gradientlist_component_name = "Terrain Height Gradient List" + layerspawner_component_name = "Terrain Layer Spawner" + + gradient_value_path = "Configuration|Value" + + def create_entity_at(entity_name, components_to_add, x, y, z): + entity = hydra.Entity(entity_name) + entity.create_entity(math.Vector3(x, y, z), components_to_add) + + return entity + + def on_terrain_changed(args): + nonlocal terrain_changed_call_count + + terrain_changed_call_count += 1 + + def set_component_path_val(entity, component, path, value): + entity.get_set_test(component, path, value) + + def set_gradients_check_height(main_entity, gradient_list, expected_height, test_results): + nonlocal expected_terrain_changed_calls + + test_tolerance = 0.01 + gradient_list_path = "Configuration|Gradient Entities" + + set_component_path_val(main_entity, 1, gradient_list_path, gradient_list) + + expected_terrain_changed_calls += 1 + + # Wait until the terrain data has been updated. + helper.wait_for_condition(lambda: terrain_changed_call_count == expected_terrain_changed_calls, 2.0) + + # Get the height at the origin. + height = terrain.TerrainDataRequestBus(bus.Broadcast, "GetHeightFromFloats", 0.0, 0.0, 0) + + Report.result(test_results, sys_math.isclose(height, expected_height, abs_tol=test_tolerance)) + + helper.init_idle() + + # Open a level. + helper.open_level("Physics", "Base") + helper.wait_for_condition(lambda: general.get_current_level_name() == "Base", 2.0) + + general.idle_wait_frames(1) + + # Add a terrain world component + world_component = hydra.add_level_component("Terrain World") + + aabb_height = 1024.0 + box_dimensions = math.Vector3(1.0, 1.0, aabb_height); + + # Create a main entity with a LayerSpawner, AAbb and HeightGradientList. + main_entity = create_entity_at("entity2", [layerspawner_component_name, gradientlist_component_name, aabb_component_name], 0.0, 0.0, aabb_height/2.0) + + # Create three gradient entities. + gradient_entity1 = create_entity_at("Constant Gradient1", ["Constant Gradient"], 0.0, 0.0, 0.0); + gradient_entity2 = create_entity_at("Constant Gradient2", ["Constant Gradient"], 0.0, 0.0, 0.0); + gradient_entity3 = create_entity_at("Constant Gradient3", ["Constant Gradient"], 0.0, 0.0, 0.0); + + # Give everything a chance to finish initializing. + general.idle_wait_frames(1) + + # Set the gradients to different values. + gradient_values = [0.5, 0.8, 0.3] + set_component_path_val(gradient_entity1, 0, gradient_value_path, gradient_values[0]) + set_component_path_val(gradient_entity2, 0, gradient_value_path, gradient_values[1]) + set_component_path_val(gradient_entity3, 0, gradient_value_path, gradient_values[2]) + + # Give the TerrainSystem time to tick. + general.idle_wait_frames(1) + + # Set the dimensions of the Aabb. + set_component_path_val(main_entity, 2, "Axis Aligned Box Shape|Box Configuration|Dimensions", box_dimensions) + + # Set up a handler to wait for notifications from the TerrainSystem. + handler = azlmbr.terrain.TerrainDataNotificationBusHandler() + handler.connect() + handler.add_callback("OnTerrainDataChanged", on_terrain_changed) + + # Add a gradient to GradientList, then check the height returned from the TerrainSystem is correct. + set_gradients_check_height(main_entity, [gradient_entity1.id], aabb_height * gradient_values[0], HeightTests.single_gradient_height_correct) + + # Add gradient2 and check height at the origin, this should have changed to match the second gradient value. + set_gradients_check_height(main_entity, [gradient_entity1.id, gradient_entity2.id], aabb_height * gradient_values[1], HeightTests.double_gradient_height_correct) + + # Add gradient3, the height should still be the second value, as that was the highest. + set_gradients_check_height(main_entity, [gradient_entity1.id, gradient_entity2.id, gradient_entity3.id], aabb_height * gradient_values[1], HeightTests.triple_gradient_height_correct) + +if __name__ == "__main__": + + from editor_python_test_tools.utils import Report + Report.start_test(TerrainHeightGradientList_AddRemoveGradientWorks) \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainMacroMaterialComponent_MacroMaterialActivates.py b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainMacroMaterialComponent_MacroMaterialActivates.py new file mode 100644 index 0000000000..71ff02739a --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainMacroMaterialComponent_MacroMaterialActivates.py @@ -0,0 +1,166 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +class MacroMaterialTests: + setup_test = ( + "Setup successful", + "Setup failed" + ) + material_changed_not_called_when_inactive = ( + "OnTerrainMacroMaterialRegionChanged not called successfully", + "OnTerrainMacroMaterialRegionChanged called when component inactive." + ) + material_created = ( + "MaterialCreated called successfully", + "MaterialCreated failed" + ) + material_destroyed = ( + "MaterialDestroyed called successfully", + "MaterialDestroyed failed" + ) + material_recreated = ( + "MaterialCreated called successfully on second test", + "MaterialCreated failed on second test" + ) + material_changed_call_on_aabb_change = ( + "OnTerrainMacroMaterialRegionChanged called successfully", + "Timed out waiting for OnTerrainMacroMaterialRegionChanged" + ) + +def TerrainMacroMaterialComponent_MacroMaterialActivates(): + """ + Summary: + Load an empty level, create a MacroMaterialComponent and check assigning textures results in the correct callbacks. + :return: None + """ + + import os + import math as sys_math + + import azlmbr.legacy.general as general + import azlmbr.asset as asset + import azlmbr.bus as bus + import azlmbr.math as math + import azlmbr.terrain as terrain + import azlmbr.editor as editor + import azlmbr.vegetation as vegetation + import azlmbr.entity as EntityId + + import editor_python_test_tools.hydra_editor_utils as hydra + from editor_python_test_tools.utils import Report + from editor_python_test_tools.utils import TestHelper as helper + import editor_python_test_tools.pyside_utils as pyside_utils + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.asset_utils import Asset + + material_created_called = False + material_changed_called = False + material_region_changed_called = False + material_destroyed_called = False + + def create_entity_at(entity_name, components_to_add, x, y, z): + entity = EditorEntity.create_editor_entity_at([x, y, z], entity_name) + for component in components_to_add: + entity.add_component(component) + + return entity + + def on_macro_material_created(args): + nonlocal material_created_called + material_created_called = True + + def on_macro_material_changed(args): + nonlocal material_changed_called + material_changed_called = True + + def on_macro_material_region_changed(args): + nonlocal material_region_changed_called + material_region_changed_called = True + + def on_macro_material_destroyed(args): + nonlocal material_destroyed_called + material_destroyed_called = True + + helper.init_idle() + + # Open a level. + helper.open_level("Physics", "Base") + helper.wait_for_condition(lambda: general.get_current_level_name() == "Base", 2.0) + + general.idle_wait_frames(1) + + # Set up a handler to wait for notifications from the TerrainSystem. + handler = terrain.TerrainMacroMaterialAutomationBusHandler() + handler.connect() + handler.add_callback("OnTerrainMacroMaterialCreated", on_macro_material_created) + handler.add_callback("OnTerrainMacroMaterialChanged", on_macro_material_changed) + handler.add_callback("OnTerrainMacroMaterialRegionChanged", on_macro_material_region_changed) + handler.add_callback("OnTerrainMacroMaterialDestroyed", on_macro_material_destroyed) + + macro_material_entity = create_entity_at("macro", ["Terrain Macro Material", "Axis Aligned Box Shape"], 0.0, 0.0, 0.0) + + # Check that no macro material callbacks happened. It should be "inactive" as it has no assets assigned. + setup_success = not material_created_called and not material_changed_called and not material_region_changed_called and not material_destroyed_called + Report.result(MacroMaterialTests.setup_test, setup_success) + + # Find the aabb component. + aabb_component_type_id_type = azlmbr.editor.EditorComponentAPIBus(azlmbr.bus.Broadcast, 'FindComponentTypeIdsByEntityType', ["Axis Aligned Box Shape"], 0)[0] + aabb_component_id = azlmbr.editor.EditorComponentAPIBus(azlmbr.bus.Broadcast, 'GetComponentOfType', macro_material_entity.id, aabb_component_type_id_type).GetValue() + + # Change the aabb dimensions + material_region_changed_called = False + box_dimensions_path = "Axis Aligned Box Shape|Box Configuration|Dimensions" + editor.EditorComponentAPIBus(bus.Broadcast, "SetComponentProperty", aabb_component_id, box_dimensions_path, math.Vector3(1.0, 1.0, 1.0)) + + # Check we don't receive a callback. The macro material component should be inactive as it has no images assigned. + general.idle_wait_frames(1) + Report.result(MacroMaterialTests.material_changed_not_called_when_inactive, material_region_changed_called == False) + + # Find the macro material component. + macro_material_id_type = azlmbr.editor.EditorComponentAPIBus(azlmbr.bus.Broadcast, 'FindComponentTypeIdsByEntityType', ["Terrain Macro Material"], 0)[0] + macro_material_component_id = azlmbr.editor.EditorComponentAPIBus(azlmbr.bus.Broadcast, 'GetComponentOfType', macro_material_entity.id, macro_material_id_type).GetValue() + + # Find a color image asset. + color_image_path = os.path.join("assets", "textures", "image.png.streamingimage") + color_image_asset = asset.AssetCatalogRequestBus(bus.Broadcast, "GetAssetIdByPath", color_image_path, math.Uuid(), False) + + # Assign the image to the MacroMaterial component, which should result in a created message. + material_created_called = False + color_texture_path = "Configuration|Color Texture" + editor.EditorComponentAPIBus(bus.Broadcast, "SetComponentProperty", macro_material_component_id, color_texture_path, color_image_asset) + + call_result = helper.wait_for_condition(lambda: material_created_called == True, 2.0) + Report.result(MacroMaterialTests.material_created, call_result) + + # Find a normal image asset. + normal_image_path = os.path.join("assets", "textures", "normal.png.streamingimage") + normal_image_asset = asset.AssetCatalogRequestBus(bus.Broadcast, "GetAssetIdByPath", normal_image_path, math.Uuid(), False) + + # Assign the normal image to the MacroMaterial component, which should result in a created message. + material_created_called = False + material_destroyed_called = False + normal_texture_path = "Configuration|Normal Texture" + editor.EditorComponentAPIBus(bus.Broadcast, "SetComponentProperty", macro_material_component_id, normal_texture_path, normal_image_asset) + + # Check the MacroMaterial was destroyed and recreated. + destroyed_call_result = helper.wait_for_condition(lambda: material_destroyed_called == True, 2.0) + Report.result(MacroMaterialTests.material_destroyed, destroyed_call_result) + + recreated_call_result = helper.wait_for_condition(lambda: material_created_called == True, 2.0) + Report.result(MacroMaterialTests.material_recreated, recreated_call_result) + + # Change the aabb dimensions. + box_dimensions_path = "Axis Aligned Box Shape|Box Configuration|Dimensions" + editor.EditorComponentAPIBus(bus.Broadcast, "SetComponentProperty", aabb_component_id, box_dimensions_path, math.Vector3(1.0, 1.0, 1.0)) + + # Check that a callback is received. + region_changed_call_result = helper.wait_for_condition(lambda: material_region_changed_called == True, 2.0) + Report.result(MacroMaterialTests.material_changed_call_on_aabb_change, region_changed_call_result) + +if __name__ == "__main__": + + from editor_python_test_tools.utils import Report + Report.start_test(TerrainMacroMaterialComponent_MacroMaterialActivates) \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainSystem_VegetationSpawnsOnTerrainSurfaces.py b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainSystem_VegetationSpawnsOnTerrainSurfaces.py new file mode 100644 index 0000000000..f1769ae3d9 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainSystem_VegetationSpawnsOnTerrainSurfaces.py @@ -0,0 +1,214 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +class VegetationTests: + vegetation_on_gradient_1 = ( + "Vegetation detected at correct position on Gradient1", + "Vegetation not detected at correct position on Gradient1" + ) + vegetation_on_gradient_2 = ( + "Vegetation detected at correct position on Gradient2", + "Vegetation not detected at correct position on Gradient2" + ) + unfiltered_vegetation_count_correct = ( + "Unfiltered vegetation spawn count correct", + "Unfiltered vegetation spawn count incorrect" + ) + + testTag2_excluded_vegetation_count_correct = ( + "TestTag2 filtered vegetation count correct", + "TestTag2 filtered vegetation count incorrect" + ) + testTag2_excluded_vegetation_z_correct = ( + "TestTag2 filtered vegetation spawned in correct position", + "TestTag2 filtered vegetation failed to spawn in correct position" + ) + + testTag3_excluded_vegetation_count_correct = ( + "TestTag3 filtered vegetation count correct", + "TestTag3 filtered vegetation count incorrect" + ) + testTag3_excluded_vegetation_z_correct = ( + "TestTag3 filtered vegetation spawned in correct position", + "TestTag3 filtered vegetation failed to spawn in correct position" + ) + + cleared_exclusion_vegetation_count_correct = ( + "Cleared filter vegetation count correct", + "Cleared filter vegetation count incorrect" + ) + +def TerrainSystem_VegetationSpawnsOnTerrainSurfaces(): + """ + Summary: + Load an empty level, + Create two entities with constant gradient components with different values. + Create two entities with TerrainLayerSpawners + Create an entity to spawn vegetation + Ensure that vegetation spawns at the correct heights + Add a VegetationSurfaceMaskFilter and ensure it responds correctly to surface changes. + :return: None + """ + + import os + import sys + import math as sys_math + + import azlmbr.legacy.general as general + import azlmbr.bus as bus + import azlmbr.math as math + + import azlmbr.areasystem as areasystem + import azlmbr.editor as editor + import azlmbr.vegetation as vegetation + import azlmbr.terrain as terrain + import azlmbr.entity as EntityId + import azlmbr.surface_data as surface_data + + import editor_python_test_tools.hydra_editor_utils as hydra + from editor_python_test_tools.utils import Report + from editor_python_test_tools.utils import TestHelper as helper + + def create_entity_at(entity_name, components_to_add, x, y, z): + entity = hydra.Entity(entity_name) + entity.create_entity(math.Vector3(x, y, z), components_to_add) + + return entity + + def FindHighestAndLowestZValuesInArea(aabb): + vegetation_items = areasystem.AreaSystemRequestBus(bus.Broadcast, 'GetInstancesInAabb', aabb) + + lowest_z = min([item.position.z for item in vegetation_items]) + highest_z = max([item.position.z for item in vegetation_items]) + + return highest_z, lowest_z + + helper.init_idle() + + # Open an empty level. + helper.open_level("Physics", "Base") + helper.wait_for_condition(lambda: general.get_current_level_name() == "Base", 2.0) + + general.idle_wait_frames(1) + + box_height = 20.0 + box_y_position = 10.0 + box_dimensions = math.Vector3(20.0, 20.0, box_height) + + # Add Terrain Rendering + hydra.add_level_component("Terrain World") + hydra.add_level_component("Terrain World Renderer") + + # Create two terrain entities at adjoining positions + terrain_entity_1 = create_entity_at("Terrain1", ["Terrain Layer Spawner", "Axis Aligned Box Shape", "Terrain Height Gradient List", "Terrain Surface Gradient List"], 0.0, box_y_position, box_height/2.0) + terrain_entity_1.get_set_test(1, "Axis Aligned Box Shape|Box Configuration|Dimensions", box_dimensions) + + terrain_entity_2 = create_entity_at("Terrain2", ["Terrain Layer Spawner", "Axis Aligned Box Shape", "Terrain Height Gradient List", "Terrain Surface Gradient List"], 20.0, box_y_position, box_height/2.0) + terrain_entity_2.get_set_test(1, "Axis Aligned Box Shape|Box Configuration|Dimensions", box_dimensions) + + # Create two gradient entities. + gradient_value_1 = 0.25 + gradient_value_2 = 0.5 + + gradient_entity_1 = create_entity_at("Gradient1", ["Constant Gradient"], 0.0, 0.0, 0.0) + gradient_entity_1.get_set_test(0, "Configuration|Value", gradient_value_1) + + gradient_entity_2 = create_entity_at("Gradient2", ["Constant Gradient"], 0.0, 0.0, 0.0) + gradient_entity_2.get_set_test(0, "Configuration|Value", gradient_value_2) + + mapping = terrain.TerrainSurfaceGradientMapping() + mapping.gradientEntityId = gradient_entity_1.id + pte = hydra.get_property_tree(terrain_entity_1.components[3]) + pte.add_container_item("Configuration|Gradient to Surface Mappings", 0, mapping) + + mapping = terrain.TerrainSurfaceGradientMapping() + mapping.gradientEntityId = gradient_entity_2.id + pte = hydra.get_property_tree(terrain_entity_2.components[3]) + pte.add_container_item("Configuration|Gradient to Surface Mappings", 0, mapping) + + # create a vegetation entity that overlaps both terrain entities. + vegetation_entity = create_entity_at("Vegetation", ["Vegetation Layer Spawner", "Axis Aligned Box Shape", "Vegetation Asset List", "Vegetation Surface Mask Filter"], 10.0, box_y_position, box_height/2.0) + vegetation_entity.get_set_test(1, "Axis Aligned Box Shape|Box Configuration|Dimensions", box_dimensions) + + # Set the vegetation area to a PrefabInstanceSpawner with a specific prefab asset selected. + prefab_spawner = vegetation.PrefabInstanceSpawner() + prefab_spawner.SetPrefabAssetPath(os.path.join("Prefabs", "PinkFlower.spawnable")) + descriptor = hydra.get_component_property_value(vegetation_entity.components[2], 'Configuration|Embedded Assets|[0]') + descriptor.spawner = prefab_spawner + vegetation_entity.get_set_test(2, "Configuration|Embedded Assets|[0]", descriptor) + + # Assign gradients to layer spawners. + terrain_entity_1.get_set_test(2, "Configuration|Gradient Entities", [gradient_entity_1.id]) + terrain_entity_2.get_set_test(2, "Configuration|Gradient Entities", [gradient_entity_2.id]) + + # Move view so that the entities are visible. + general.set_current_view_position(17.0, -66.0, 41.0) + general.set_current_view_rotation(-15, 0, 0) + + # Expected item counts under conditions to be tested. + # By default, vegetation spawns at a density of 20 items per 16 meters, + # so in a 20m square, there should be around 25 ^ 2 items depending on whether area edges are included. + # In this case there are 26 ^ 2 items. + expected_surface_tag_excluded_item_count = 338 + expected_no_exclusions_item_count = 676 + + # Wait for the vegetation to spawn + helper.wait_for_condition(lambda: vegetation.VegetationSpawnerRequestBus(bus.Event, "GetAreaProductCount", vegetation_entity.id) == expected_no_exclusions_item_count, 5.0) + + # Check the spawn count is correct. + item_count = vegetation.VegetationSpawnerRequestBus(bus.Event, "GetAreaProductCount", vegetation_entity.id) + Report.result(VegetationTests.unfiltered_vegetation_count_correct, item_count == expected_no_exclusions_item_count) + + test_aabb = math.Aabb_CreateFromMinMax(math.Vector3(-10.0, -10.0, 0.0), math.Vector3(30.0, 10.0, box_height)) + + # Find the z positions of the items with the lowest and highest x values, this will avoid the overlap area where z values are blended between the surface heights. + highest_z, lowest_z = FindHighestAndLowestZValuesInArea(test_aabb) + + # Check that the z values are as expected. + Report.result(VegetationTests.vegetation_on_gradient_1, sys_math.isclose(lowest_z, box_height * gradient_value_1, abs_tol=0.01)) + Report.result(VegetationTests.vegetation_on_gradient_2, sys_math.isclose(highest_z, box_height * gradient_value_2, abs_tol=0.01)) + + # Assign SurfaceTags to the SurfaceGradientLists + terrain_entity_1.get_set_test(3, "Configuration|Gradient to Surface Mappings|[0]|Surface Tag", surface_data.SurfaceTag("test_tag2")) + terrain_entity_2.get_set_test(3, "Configuration|Gradient to Surface Mappings|[0]|Surface Tag", surface_data.SurfaceTag("test_tag3")) + + # Give the VegetationSurfaceFilter an exclusion list, set it to exclude test_tag2 which should remove all the lower items which are in terrain_entity_1. + vegetation_entity.get_set_test(3, "Configuration|Exclusion|Surface Tags", [surface_data.SurfaceTag()]) + vegetation_entity.get_set_test(3, "Configuration|Exclusion|Surface Tags|[0]", surface_data.SurfaceTag("test_tag2")) + + # Wait for the vegetation to respawn and check z values. + helper.wait_for_condition(lambda: vegetation.VegetationSpawnerRequestBus(bus.Event, "GetAreaProductCount", vegetation_entity.id) == expected_surface_tag_excluded_item_count, 5.0) + + item_count = vegetation.VegetationSpawnerRequestBus(bus.Event, "GetAreaProductCount", vegetation_entity.id) + Report.result(VegetationTests.testTag2_excluded_vegetation_count_correct, item_count == expected_surface_tag_excluded_item_count) + + highest_z, lowest_z = FindHighestAndLowestZValuesInArea(test_aabb) + + Report.result(VegetationTests.testTag2_excluded_vegetation_z_correct, lowest_z > box_height * gradient_value_1) + + # Clear the filter and ensure vegetation respawns. + vegetation_entity.get_set_test(3, "Configuration|Exclusion|Surface Tags|[0]", surface_data.SurfaceTag("invalid")) + helper.wait_for_condition(lambda: vegetation.VegetationSpawnerRequestBus(bus.Event, "GetAreaProductCount", vegetation_entity.id) == expected_no_exclusions_item_count, 5.0) + + item_count = vegetation.VegetationSpawnerRequestBus(bus.Event, "GetAreaProductCount", vegetation_entity.id) + Report.result(VegetationTests.cleared_exclusion_vegetation_count_correct, item_count == expected_no_exclusions_item_count) + + # Exclude test_tag3 to exclude the higher items in terrain_entity_2 and recheck. + vegetation_entity.get_set_test(3, "Configuration|Exclusion|Surface Tags|[0]", surface_data.SurfaceTag("test_tag3")) + + helper.wait_for_condition(lambda: vegetation.VegetationSpawnerRequestBus(bus.Event, "GetAreaProductCount", vegetation_entity.id) == expected_surface_tag_excluded_item_count, 5.0) + + item_count = vegetation.VegetationSpawnerRequestBus(bus.Event, "GetAreaProductCount", vegetation_entity.id) + Report.result(VegetationTests.testTag3_excluded_vegetation_count_correct, item_count == expected_surface_tag_excluded_item_count) + + highest_z, lowest_z = FindHighestAndLowestZValuesInArea(test_aabb) + + Report.result(VegetationTests.testTag3_excluded_vegetation_z_correct, highest_z < box_height * gradient_value_2) + +if __name__ == "__main__": + + from editor_python_test_tools.utils import Report + Report.start_test(TerrainSystem_VegetationSpawnsOnTerrainSurfaces) \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/Terrain_SupportsPhysics.py b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/Terrain_SupportsPhysics.py index e68b0932c2..390ec6a6b0 100644 --- a/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/Terrain_SupportsPhysics.py +++ b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/Terrain_SupportsPhysics.py @@ -72,7 +72,7 @@ def Terrain_SupportsPhysics(): # 2) Create 2 test entities, one parent at 512.0, 512.0, 50.0 and one child at the default position and add the required components entity1_components_to_add = ["Axis Aligned Box Shape", "Terrain Layer Spawner", "Terrain Height Gradient List", "Terrain Physics Heightfield Collider", "PhysX Heightfield Collider"] - entity2_components_to_add = ["Vegetation Reference Shape", "Gradient Transform Modifier", "FastNoise Gradient"] + entity2_components_to_add = ["Shape Reference", "Gradient Transform Modifier", "FastNoise Gradient"] ball_components_to_add = ["Sphere Shape", "PhysX Collider", "PhysX Rigid Body"] terrain_spawner_entity = hydra.Entity("TestEntity1") terrain_spawner_entity.create_entity(azmath.Vector3(512.0, 512.0, 50.0), entity1_components_to_add) diff --git a/AutomatedTesting/Gem/PythonTests/Terrain/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/Terrain/TestSuite_Main.py index 786651713c..60d6e2b75f 100644 --- a/AutomatedTesting/Gem/PythonTests/Terrain/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/Terrain/TestSuite_Main.py @@ -27,3 +27,12 @@ class TestAutomation(EditorTestSuite): class test_Terrain_SupportsPhysics(EditorSharedTest): from .EditorScripts import Terrain_SupportsPhysics as test_module + + class test_TerrainHeightGradientList_AddRemoveGradientWorks(EditorSharedTest): + from .EditorScripts import TerrainHeightGradientList_AddRemoveGradientWorks as test_module + + class test_TerrainSystem_VegetationSpawnsOnTerrainSurfaces(EditorSharedTest): + from .EditorScripts import TerrainSystem_VegetationSpawnsOnTerrainSurfaces as test_module + + class test_TerrainMacroMaterialComponent_MacroMaterialActivates(EditorSharedTest): + from .EditorScripts import TerrainMacroMaterialComponent_MacroMaterialActivates as test_module diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/asset_processor_fixture.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/asset_processor_fixture.py index 674862443e..885b4c2959 100755 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/asset_processor_fixture.py +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/asset_processor_fixture.py @@ -15,6 +15,7 @@ import logging # Import LyTestTools import ly_test_tools.o3de.asset_processor as asset_processor_commands +import ly_test_tools.o3de.asset_processor_utils logger = logging.getLogger(__name__) @@ -36,5 +37,8 @@ def asset_processor(request: pytest.fixture, workspace: pytest.fixture) -> asset ap.stop() request.addfinalizer(teardown) + for n in ly_test_tools.o3de.asset_processor_utils.processList: + assert not ly_test_tools.o3de.asset_processor_utils.check_ap_running(n), f"{n} process did not shutdown correctly." + return ap diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_processor_batch_tests.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_processor_batch_tests.py index 2d67bca8fe..cc79ed7c27 100755 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_processor_batch_tests.py +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_processor_batch_tests.py @@ -8,6 +8,8 @@ General Asset Processor Batch Tests """ # Import builtin libraries +from os import listdir + import pytest import logging import os @@ -724,3 +726,11 @@ class TestsAssetProcessorBatch_AllPlatforms(object): assert error_line_found, "The error could not be found in the newest run of the AP Batch log." + @pytest.mark.assetpipeline + def test_AssetProcessor_Log_On_Failure(self, asset_processor, ap_setup_fixture, workspace): + asset_processor.prepare_test_environment(ap_setup_fixture["tests_dir"], "test_AP_Logs") + result, output = asset_processor.batch_process(expect_failure=True, capture_output=True) + assert result == False, f'AssetProcessorBatch should have failed because there is a bad asset, output was {output}' + + jobLogs = listdir(workspace.paths.ap_job_logs() + "/test_AP_Logs") + assert not len(jobLogs) == 0, 'No job logs where output during failure.' diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_AP_Logs/BadAsset.fbx b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_AP_Logs/BadAsset.fbx new file mode 100644 index 0000000000..cf1bbaac8a --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_AP_Logs/BadAsset.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c6b33c6137d6bd8c696f180c30a23089c95c1af398a630b4b13e080bec3254d +size 18220 diff --git a/AutomatedTesting/Gem/PythonTests/automatedtesting_shared/base.py b/AutomatedTesting/Gem/PythonTests/automatedtesting_shared/base.py index 4543888a7c..88188aa6c0 100755 --- a/AutomatedTesting/Gem/PythonTests/automatedtesting_shared/base.py +++ b/AutomatedTesting/Gem/PythonTests/automatedtesting_shared/base.py @@ -8,7 +8,7 @@ SPDX-License-Identifier: Apache-2.0 OR MIT import os import logging -import subprocess +import sys import pytest import time @@ -128,7 +128,8 @@ class TestAutomationBase: errors.append(TestRunError("FAILED TEST", error_str)) if return_code and return_code != TestAutomationBase.TEST_FAIL_RETCODE: # Crashed crash_info = "-- No crash log available --" - crash_log = os.path.join(workspace.paths.project_log(), 'error.log') + crash_log = workspace.paths.crash_log() + try: waiter.wait_for(lambda: os.path.exists(crash_log), timeout=TestAutomationBase.WAIT_FOR_CRASH_LOG) except AssertionError: diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DynamicSliceInstanceSpawner_Embedded_E2E.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DynamicSliceInstanceSpawner_Embedded_E2E.py index 84c661873c..fa45e057e2 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DynamicSliceInstanceSpawner_Embedded_E2E.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DynamicSliceInstanceSpawner_Embedded_E2E.py @@ -72,9 +72,9 @@ def DynamicSliceInstanceSpawner_Embedded_E2E(): # 1) Create a new, temporary level lvl_name = "tmp_level" helper.init_idle() - level_created = general.create_level_no_prompt(lvl_name, 1024, 1, 4096, False) + level_created = helper.create_level(lvl_name) general.idle_wait(1.0) - Report.critical_result(Tests.level_created, level_created == 0) + Report.critical_result(Tests.level_created, level_created) general.set_current_view_position(512.0, 480.0, 38.0) # 2) Create a new entity with required vegetation area components and Script Canvas component for launcher test diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DynamicSliceInstanceSpawner_External_E2E.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DynamicSliceInstanceSpawner_External_E2E.py index de2554034f..2353095849 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DynamicSliceInstanceSpawner_External_E2E.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DynamicSliceInstanceSpawner_External_E2E.py @@ -73,9 +73,9 @@ def DynamicSliceInstanceSpawner_External_E2E(): # 1) Create a new, temporary level lvl_name = "tmp_level" helper.init_idle() - level_created = general.create_level_no_prompt(lvl_name, 1024, 1, 4096, False) + level_created = helper.create_level(lvl_name) general.idle_wait(1.0) - Report.critical_result(Tests.level_created, level_created == 0) + Report.critical_result(Tests.level_created, level_created) general.set_current_view_position(512.0, 480.0, 38.0) # 2) Create a new entity with required vegetation area components and switch the Vegetation Asset List Source diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerBlender_E2E_Editor.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerBlender_E2E_Editor.py index bf6501f469..130d56937b 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerBlender_E2E_Editor.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerBlender_E2E_Editor.py @@ -76,9 +76,9 @@ def LayerBlender_E2E_Editor(): # 1) Create a new, temporary level lvl_name = "tmp_level" helper.init_idle() - level_created = general.create_level_no_prompt(lvl_name, 1024, 1, 4096, False) + level_created = helper.create_level(lvl_name) general.idle_wait(1.0) - Report.critical_result(Tests.level_created, level_created == 0) + Report.critical_result(Tests.level_created, level_created) general.set_current_view_position(500.49, 498.69, 46.66) general.set_current_view_rotation(-42.05, 0.00, -36.33) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InheritBehaviorFlag.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InheritBehaviorFlag.py index 649c7d0776..1153ae2657 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InheritBehaviorFlag.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InheritBehaviorFlag.py @@ -78,7 +78,7 @@ def LayerSpawner_InheritBehaviorFlag(): # Create Vegetation area and assign a valid asset veg_1 = hydra.Entity("veg_1") veg_1.create_entity( - position, ["Vegetation Layer Spawner", "Vegetation Reference Shape", "Vegetation Asset List"] + position, ["Vegetation Layer Spawner", "Shape Reference", "Vegetation Asset List"] ) set_dynamic_slice_asset(veg_1, 2, os.path.join("Slices", "PinkFlower.dynamicslice")) veg_1.get_set_test(1, "Configuration|Shape Entity Id", blender_entity.id) @@ -86,7 +86,7 @@ def LayerSpawner_InheritBehaviorFlag(): # Create second vegetation area and assign a valid asset veg_2 = hydra.Entity("veg_2") veg_2.create_entity( - position, ["Vegetation Layer Spawner", "Vegetation Reference Shape", "Vegetation Asset List"] + position, ["Vegetation Layer Spawner", "Shape Reference", "Vegetation Asset List"] ) set_dynamic_slice_asset(veg_2, 2, os.path.join("Slices", "PurpleFlower.dynamicslice")) veg_2.get_set_test(1, "Configuration|Shape Entity Id", blender_entity.id) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InstancesPlantInAllSupportedShapes.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InstancesPlantInAllSupportedShapes.py index 0da200d87a..42604cd2da 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InstancesPlantInAllSupportedShapes.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InstancesPlantInAllSupportedShapes.py @@ -9,7 +9,7 @@ SPDX-License-Identifier: Apache-2.0 OR MIT def LayerSpawner_InstancesPlantInAllSupportedShapes(): """ Summary: - The level is loaded and vegetation area is created. Then the Vegetation Reference Shape + The level is loaded and vegetation area is created. Then the Shape Reference component of vegetation area is pinned with entities of different shape components to check if the vegetation plants in different shaped areas. @@ -67,7 +67,7 @@ def LayerSpawner_InstancesPlantInAllSupportedShapes(): 10.0, 10.0, 10.0, asset_path) vegetation.remove_component("Box Shape") - vegetation.add_component("Vegetation Reference Shape") + vegetation.add_component("Shape Reference") # Create surface for planting on dynveg.create_surface_entity("Surface Entity", entity_position, 60.0, 60.0, 1.0) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main_Optimized.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main_Optimized.py index 2211c28060..673e40e397 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main_Optimized.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main_Optimized.py @@ -18,6 +18,17 @@ from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, E class TestAutomation(EditorTestSuite): enable_prefab_system = False + + # Helpers for test asset cleanup + def cleanup_test_level(self, workspace): + file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "Levels", "tmp_level")], + True, True) + + def cleanup_test_slices(self, workspace): + file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "slices", + "TestSlice_1.slice")], True, True) + file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "slices", + "TestSlice_2.slice")], True, True) class test_DynamicSliceInstanceSpawner_DynamicSliceSpawnerWorks(EditorParallelTest): from .EditorScripts import DynamicSliceInstanceSpawner_DynamicSliceSpawnerWorks as test_module @@ -37,10 +48,7 @@ class TestAutomation(EditorTestSuite): class test_SpawnerSlices_SliceCreationAndVisibilityToggleWorks(EditorSingleTest): # Custom teardown to remove slice asset created during test def teardown(self, request, workspace, editor, editor_test_results, launcher_platform): - file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "slices", - "TestSlice_1.slice")], True, True) - file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "slices", - "TestSlice_2.slice")], True, True) + TestAutomation.cleanup_test_slices(self, workspace) from .EditorScripts import SpawnerSlices_SliceCreationAndVisibilityToggleWorks as test_module class test_AssetListCombiner_CombinedDescriptorsExpressInConfiguredArea(EditorParallelTest): @@ -148,29 +156,32 @@ class TestAutomation(EditorTestSuite): class test_SlopeFilter_ComponentAndOverrides_InstancesPlantOnValidSlopes(EditorParallelTest): from .EditorScripts import SlopeFilter_ComponentAndOverrides_InstancesPlantOnValidSlope as test_module - @pytest.mark.xfail(reason="Intermittently fails to create level") class test_DynamicSliceInstanceSpawner_Embedded_E2E_Editor(EditorSingleTest): from .EditorScripts import DynamicSliceInstanceSpawner_Embedded_E2E as test_module - # Custom teardown to remove test level created during test + # Custom setup/teardown to remove test level created during test + def setup(self, request, workspace, editor, editor_test_results, launcher_platform): + TestAutomation.cleanup_test_level(self, workspace) + def teardown(self, request, workspace, editor, editor_test_results, launcher_platform): - file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "Levels", "tmp_level")], - True, True) + TestAutomation.cleanup_test_level(self, workspace) - @pytest.mark.xfail(reason="Intermittently fails to create level") class test_DynamicSliceInstanceSpawner_External_E2E_Editor(EditorSingleTest): from .EditorScripts import DynamicSliceInstanceSpawner_External_E2E as test_module - # Custom teardown to remove test level created during test + # Custom setup/teardown to remove test level created during test + def setup(self, request, workspace, editor, editor_test_results, launcher_platform): + TestAutomation.cleanup_test_level(self, workspace) + def teardown(self, request, workspace, editor, editor_test_results, launcher_platform): - file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "Levels", "tmp_level")], - True, True) + TestAutomation.cleanup_test_level(self, workspace) - @pytest.mark.xfail(reason="Intermittently fails to create level") class test_LayerBlender_E2E_Editor(EditorSingleTest): from .EditorScripts import LayerBlender_E2E_Editor as test_module - # Custom teardown to remove test level created during test + # Custom setup/teardown to remove test level created during test + def setup(self, request, workspace, editor, editor_test_results, launcher_platform): + TestAutomation.cleanup_test_level(self, workspace) + def teardown(self, request, workspace, editor, editor_test_results, launcher_platform): - file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "Levels", "tmp_level")], - True, True) + TestAutomation.cleanup_test_level(self, workspace) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_DependentComponentsAdded.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_DependentComponentsAdded.py index 9703423901..c69ce77041 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_DependentComponentsAdded.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_DependentComponentsAdded.py @@ -96,7 +96,7 @@ def AreaNodes_DependentComponentsAdded(): 'SpawnerAreaNode': [ 'Vegetation Layer Spawner', 'Vegetation Asset List', - 'Vegetation Reference Shape' + 'Shape Reference' ], 'MeshBlockerAreaNode': [ 'Vegetation Layer Blocker (Mesh)', @@ -104,7 +104,7 @@ def AreaNodes_DependentComponentsAdded(): ], 'BlockerAreaNode': [ 'Vegetation Layer Blocker', - 'Vegetation Reference Shape' + 'Shape Reference' ] } diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/Edit_DisabledNodeDuplication.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/Edit_DisabledNodeDuplication.py index 417e093567..4dfc227c53 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/Edit_DisabledNodeDuplication.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/Edit_DisabledNodeDuplication.py @@ -82,7 +82,7 @@ def Edit_DisabledNodeDuplication(): nodes = { 'SpawnerAreaNode': 'Vegetation Asset List', 'MeshBlockerAreaNode': 'Mesh', - 'BlockerAreaNode': 'Vegetation Reference Shape', + 'BlockerAreaNode': 'Shape Reference', 'FastNoiseGradientNode': 'Gradient Transform Modifier', 'ImageGradientNode': 'Gradient Transform Modifier', 'PerlinNoiseGradientNode': 'Gradient Transform Modifier', diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_DependentComponentsAdded.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_DependentComponentsAdded.py index c04f9f05f6..63df9a6fcb 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_DependentComponentsAdded.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_DependentComponentsAdded.py @@ -104,7 +104,7 @@ def GradientNodes_DependentComponentsAdded(): # we will be checking for commonComponents = [ 'Gradient Transform Modifier', - 'Vegetation Reference Shape' + 'Shape Reference' ] componentNames = [] for name in gradients: @@ -114,7 +114,7 @@ def GradientNodes_DependentComponentsAdded(): # Create nodes for the gradients that have additional required dependencies and check if # the Entity created by adding the node has the appropriate Component and required - # Gradient Transform Modifier and Vegetation Reference Shape components added automatically to it + # Gradient Transform Modifier and Shape Reference components added automatically to it newGraph = graph.GraphManagerRequestBus(bus.Broadcast, 'GetGraph', newGraphId) x = 10.0 y = 10.0 diff --git a/AutomatedTesting/Levels/macbeth_shaderballs/macbeth_shaderballs.prefab b/AutomatedTesting/Levels/macbeth_shaderballs/macbeth_shaderballs.prefab new file mode 100644 index 0000000000..22504f168a --- /dev/null +++ b/AutomatedTesting/Levels/macbeth_shaderballs/macbeth_shaderballs.prefab @@ -0,0 +1,3401 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "macbeth_shaderballs", + "Components": { + "Component_[10182366347512475253]": { + "$type": "EditorPrefabComponent", + "Id": 10182366347512475253 + }, + "Component_[12917798267488243668]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12917798267488243668 + }, + "Component_[3261249813163778338]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3261249813163778338 + }, + "Component_[3837204912784440039]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 3837204912784440039 + }, + "Component_[4272963378099646759]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 4272963378099646759, + "Parent Entity": "" + }, + "Component_[4848458548047175816]": { + "$type": "EditorVisibilityComponent", + "Id": 4848458548047175816 + }, + "Component_[5787060997243919943]": { + "$type": "EditorInspectorComponent", + "Id": 5787060997243919943 + }, + "Component_[7804170251266531779]": { + "$type": "EditorLockComponent", + "Id": 7804170251266531779 + }, + "Component_[7874177159288365422]": { + "$type": "EditorEntitySortComponent", + "Id": 7874177159288365422 + }, + "Component_[8018146290632383969]": { + "$type": "EditorEntityIconComponent", + "Id": 8018146290632383969 + }, + "Component_[8452360690590857075]": { + "$type": "SelectionComponent", + "Id": 8452360690590857075 + } + } + }, + "Entities": { + "Entity_[471076350497]": { + "Id": "Entity_[471076350497]", + "Name": "WorldOrigin", + "Components": { + "Component_[10118378636607282023]": { + "$type": "AZ::Render::EditorImageBasedLightComponent", + "Id": 10118378636607282023, + "Controller": { + "Configuration": { + "diffuseImageAsset": { + "assetId": { + "guid": "{10853039-DC8A-558A-B27E-4433A6386731}", + "subId": 3000 + }, + "assetHint": "lightingpresets/lowcontrast/blouberg_sunrise_1_4k_iblskyboxcm_ibldiffuse.exr.streamingimage" + }, + "specularImageAsset": { + "assetId": { + "guid": "{10853039-DC8A-558A-B27E-4433A6386731}", + "subId": 2000 + }, + "assetHint": "lightingpresets/lowcontrast/blouberg_sunrise_1_4k_iblskyboxcm_iblspecular.exr.streamingimage" + }, + "exposure": 1.0 + } + } + }, + "Component_[10390989140659450689]": { + "$type": "EditorInspectorComponent", + "Id": 10390989140659450689, + "ComponentOrderEntryArray": [ + { + "ComponentId": 6066687697346848609 + }, + { + "ComponentId": 1538992203183232042, + "SortIndex": 1 + }, + { + "ComponentId": 10118378636607282023, + "SortIndex": 2 + } + ] + }, + "Component_[1122756123782465575]": { + "$type": "EditorLockComponent", + "Id": 1122756123782465575 + }, + "Component_[1411541685315998773]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1411541685315998773 + }, + "Component_[1538992203183232042]": { + "$type": "AZ::Render::EditorGridComponent", + "Id": 1538992203183232042 + }, + "Component_[16871442125196328877]": { + "$type": "EditorEntitySortComponent", + "Id": 16871442125196328877, + "ChildEntityOrderEntryArray": [ + { + "EntityId": "Entity_[604220336673]" + }, + { + "EntityId": "Entity_[599925369377]", + "SortIndex": 1 + }, + { + "EntityId": "Entity_[475371317793]", + "SortIndex": 2 + }, + { + "EntityId": "Entity_[509731056161]", + "SortIndex": 3 + }, + { + "EntityId": "Entity_[505436088865]", + "SortIndex": 4 + }, + { + "EntityId": "Entity_[539795827233]", + "SortIndex": 5 + }, + { + "EntityId": "Entity_[569860598305]", + "SortIndex": 6 + } + ] + }, + "Component_[18389136819207633744]": { + "$type": "SelectionComponent", + "Id": 18389136819207633744 + }, + "Component_[2967708543517171475]": { + "$type": "EditorEntityIconComponent", + "Id": 2967708543517171475 + }, + "Component_[6066687697346848609]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6066687697346848609, + "Parent Entity": "ContainerEntity" + }, + "Component_[7035058231756199033]": { + "$type": "EditorVisibilityComponent", + "Id": 7035058231756199033 + }, + "Component_[7861798362721154905]": { + "$type": "EditorOnlyEntityComponent", + "Id": 7861798362721154905 + }, + "Component_[8535986786667781968]": { + "$type": "EditorPendingCompositionComponent", + "Id": 8535986786667781968 + } + } + }, + "Entity_[475371317793]": { + "Id": "Entity_[475371317793]", + "Name": "00_Illuminant", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{29C7358C-9899-56DF-8F99-F654C7138DB8}" + }, + "assetHint": "materials/presets/macbeth/00_illuminant.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[471076350497]", + "Transform Data": { + "Translate": [ + -0.020035700872540474, + 10.880657196044922, + 1.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[479666285089]": { + "Id": "Entity_[479666285089]", + "Name": "09_moderate_red", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{FD3D09E1-9B20-5761-87A2-388ADD3C966A}" + }, + "assetHint": "materials/presets/macbeth/09_moderate_red.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[505436088865]", + "Transform Data": { + "Translate": [ + -2.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[483961252385]": { + "Id": "Entity_[483961252385]", + "Name": "08_purplish_blue", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{0478869F-5E19-5A5C-AA22-0D31972E83B7}" + }, + "assetHint": "materials/presets/macbeth/08_purplish_blue.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[505436088865]", + "Transform Data": { + "Translate": [ + -6.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[488256219681]": { + "Id": "Entity_[488256219681]", + "Name": "07_orange", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{3E414822-FF6A-5A79-BF1A-66F4C48C381D}" + }, + "assetHint": "materials/presets/macbeth/07_orange.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[505436088865]", + "Transform Data": { + "Translate": [ + -10.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[492551186977]": { + "Id": "Entity_[492551186977]", + "Name": "10_purple", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{6A0A0CBE-FE95-5732-B2A9-442ABAC6B3AA}" + }, + "assetHint": "materials/presets/macbeth/10_purple.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[505436088865]", + "Transform Data": { + "Translate": [ + 1.8866175413131714, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[496846154273]": { + "Id": "Entity_[496846154273]", + "Name": "11_yellowish_green", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{8D382D9F-D56E-523E-8372-C372B002B81D}" + }, + "assetHint": "materials/presets/macbeth/11_yellow_green.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[505436088865]", + "Transform Data": { + "Translate": [ + 5.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[501141121569]": { + "Id": "Entity_[501141121569]", + "Name": "12_orange_yellow", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{7C8D9C96-8D79-5AA5-9A1D-DE68760127D7}" + }, + "assetHint": "materials/presets/macbeth/12_orange_yellow.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[505436088865]", + "Transform Data": { + "Translate": [ + 9.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[505436088865]": { + "Id": "Entity_[505436088865]", + "Name": "Row", + "Components": { + "Component_[10247332857034196288]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10247332857034196288 + }, + "Component_[1050259146293298025]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1050259146293298025 + }, + "Component_[10963468433108777551]": { + "$type": "EditorInspectorComponent", + "Id": 10963468433108777551, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5648156935684358836 + } + ] + }, + "Component_[11044618010943237536]": { + "$type": "EditorEntityIconComponent", + "Id": 11044618010943237536 + }, + "Component_[11056805018150955063]": { + "$type": "EditorEntitySortComponent", + "Id": 11056805018150955063, + "ChildEntityOrderEntryArray": [ + { + "EntityId": "Entity_[488256219681]" + }, + { + "EntityId": "Entity_[483961252385]", + "SortIndex": 1 + }, + { + "EntityId": "Entity_[479666285089]", + "SortIndex": 2 + }, + { + "EntityId": "Entity_[492551186977]", + "SortIndex": 3 + }, + { + "EntityId": "Entity_[496846154273]", + "SortIndex": 4 + }, + { + "EntityId": "Entity_[501141121569]", + "SortIndex": 5 + } + ] + }, + "Component_[11466054095979053511]": { + "$type": "EditorPendingCompositionComponent", + "Id": 11466054095979053511 + }, + "Component_[1364058654406679998]": { + "$type": "SelectionComponent", + "Id": 1364058654406679998 + }, + "Component_[1550934027474222562]": { + "$type": "EditorVisibilityComponent", + "Id": 1550934027474222562 + }, + "Component_[15938036103959223730]": { + "$type": "EditorLockComponent", + "Id": 15938036103959223730 + }, + "Component_[5648156935684358836]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5648156935684358836, + "Parent Entity": "Entity_[471076350497]", + "Transform Data": { + "Translate": [ + 0.0, + 2.0, + 1.0 + ] + } + } + } + }, + "Entity_[509731056161]": { + "Id": "Entity_[509731056161]", + "Name": "Row", + "Components": { + "Component_[10247332857034196288]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10247332857034196288 + }, + "Component_[1050259146293298025]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1050259146293298025 + }, + "Component_[10963468433108777551]": { + "$type": "EditorInspectorComponent", + "Id": 10963468433108777551, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5648156935684358836 + } + ] + }, + "Component_[11044618010943237536]": { + "$type": "EditorEntityIconComponent", + "Id": 11044618010943237536 + }, + "Component_[11056805018150955063]": { + "$type": "EditorEntitySortComponent", + "Id": 11056805018150955063, + "ChildEntityOrderEntryArray": [ + { + "EntityId": "Entity_[522615958049]" + }, + { + "EntityId": "Entity_[518320990753]", + "SortIndex": 1 + }, + { + "EntityId": "Entity_[514026023457]", + "SortIndex": 2 + }, + { + "EntityId": "Entity_[526910925345]", + "SortIndex": 3 + }, + { + "EntityId": "Entity_[531205892641]", + "SortIndex": 4 + }, + { + "EntityId": "Entity_[535500859937]", + "SortIndex": 5 + } + ] + }, + "Component_[11466054095979053511]": { + "$type": "EditorPendingCompositionComponent", + "Id": 11466054095979053511 + }, + "Component_[1364058654406679998]": { + "$type": "SelectionComponent", + "Id": 1364058654406679998 + }, + "Component_[1550934027474222562]": { + "$type": "EditorVisibilityComponent", + "Id": 1550934027474222562 + }, + "Component_[15938036103959223730]": { + "$type": "EditorLockComponent", + "Id": 15938036103959223730 + }, + "Component_[5648156935684358836]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5648156935684358836, + "Parent Entity": "Entity_[471076350497]", + "Transform Data": { + "Translate": [ + 0.0, + 6.0, + 1.0 + ] + } + } + } + }, + "Entity_[514026023457]": { + "Id": "Entity_[514026023457]", + "Name": "03_blue_sky", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{65DF9715-8D50-5852-BDDF-345BF9A36AAF}" + }, + "assetHint": "materials/presets/macbeth/03_blue_sky.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[509731056161]", + "Transform Data": { + "Translate": [ + -2.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[518320990753]": { + "Id": "Entity_[518320990753]", + "Name": "02_light_skin", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{0B0603C9-E7C3-5166-98EC-F8B3A4D469FB}" + }, + "assetHint": "materials/presets/macbeth/02_light_skin.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[509731056161]", + "Transform Data": { + "Translate": [ + -6.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[522615958049]": { + "Id": "Entity_[522615958049]", + "Name": "01_dark_skin", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{73B6CE55-0766-51FD-8D9C-92C60862D270}" + }, + "assetHint": "materials/presets/macbeth/01_dark_skin.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[509731056161]", + "Transform Data": { + "Translate": [ + -10.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[526910925345]": { + "Id": "Entity_[526910925345]", + "Name": "04_foliage", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{C11C560D-F984-5836-928A-45CF96179862}" + }, + "assetHint": "materials/presets/macbeth/04_foliage.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[509731056161]", + "Transform Data": { + "Translate": [ + 1.8866175413131714, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[531205892641]": { + "Id": "Entity_[531205892641]", + "Name": "05_blue_flower", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{3326A6D9-FEA4-5CDE-AE4A-8BD28DF3A7CA}" + }, + "assetHint": "materials/presets/macbeth/05_blue_flower.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[509731056161]", + "Transform Data": { + "Translate": [ + 5.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[535500859937]": { + "Id": "Entity_[535500859937]", + "Name": "06_bluish_green", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{BD7A8B80-242E-50CC-900F-9001945C5A0C}" + }, + "assetHint": "materials/presets/macbeth/06_bluish_green.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[509731056161]", + "Transform Data": { + "Translate": [ + 9.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[539795827233]": { + "Id": "Entity_[539795827233]", + "Name": "Row", + "Components": { + "Component_[10247332857034196288]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10247332857034196288 + }, + "Component_[1050259146293298025]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1050259146293298025 + }, + "Component_[10963468433108777551]": { + "$type": "EditorInspectorComponent", + "Id": 10963468433108777551, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5648156935684358836 + } + ] + }, + "Component_[11044618010943237536]": { + "$type": "EditorEntityIconComponent", + "Id": 11044618010943237536 + }, + "Component_[11056805018150955063]": { + "$type": "EditorEntitySortComponent", + "Id": 11056805018150955063, + "ChildEntityOrderEntryArray": [ + { + "EntityId": "Entity_[552680729121]" + }, + { + "EntityId": "Entity_[548385761825]", + "SortIndex": 1 + }, + { + "EntityId": "Entity_[544090794529]", + "SortIndex": 2 + }, + { + "EntityId": "Entity_[556975696417]", + "SortIndex": 3 + }, + { + "EntityId": "Entity_[561270663713]", + "SortIndex": 4 + }, + { + "EntityId": "Entity_[565565631009]", + "SortIndex": 5 + } + ] + }, + "Component_[11466054095979053511]": { + "$type": "EditorPendingCompositionComponent", + "Id": 11466054095979053511 + }, + "Component_[1364058654406679998]": { + "$type": "SelectionComponent", + "Id": 1364058654406679998 + }, + "Component_[1550934027474222562]": { + "$type": "EditorVisibilityComponent", + "Id": 1550934027474222562 + }, + "Component_[15938036103959223730]": { + "$type": "EditorLockComponent", + "Id": 15938036103959223730 + }, + "Component_[5648156935684358836]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5648156935684358836, + "Parent Entity": "Entity_[471076350497]", + "Transform Data": { + "Translate": [ + 0.0, + -2.0, + 1.0 + ] + } + } + } + }, + "Entity_[544090794529]": { + "Id": "Entity_[544090794529]", + "Name": "15_red", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{9C47066E-BD8F-5C1B-B935-933296BBE312}" + }, + "assetHint": "materials/presets/macbeth/15_red.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[539795827233]", + "Transform Data": { + "Translate": [ + -2.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[548385761825]": { + "Id": "Entity_[548385761825]", + "Name": "14_green", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{82346ED7-D369-5EF0-A7E0-70C1082EE073}" + }, + "assetHint": "materials/presets/macbeth/14_green.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[539795827233]", + "Transform Data": { + "Translate": [ + -6.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[552680729121]": { + "Id": "Entity_[552680729121]", + "Name": "13_blue", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{B8972ADB-DBA9-5807-9742-2B14453FDD96}" + }, + "assetHint": "materials/presets/macbeth/13_blue.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[539795827233]", + "Transform Data": { + "Translate": [ + -10.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[556975696417]": { + "Id": "Entity_[556975696417]", + "Name": "16_yellow", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{099BB2A1-F76E-5B77-BCFD-B0A6249F0EA3}" + }, + "assetHint": "materials/presets/macbeth/16_yellow.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[539795827233]", + "Transform Data": { + "Translate": [ + 1.8866175413131714, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[561270663713]": { + "Id": "Entity_[561270663713]", + "Name": "17_magenta", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{2A83451E-0FE6-508E-BAA2-6142AAA53C42}" + }, + "assetHint": "materials/presets/macbeth/17_magenta.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[539795827233]", + "Transform Data": { + "Translate": [ + 5.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[565565631009]": { + "Id": "Entity_[565565631009]", + "Name": "18_cyan", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{6949B983-05D6-50A4-9D43-A6CDAB2BF3F5}" + }, + "assetHint": "materials/presets/macbeth/18_cyan.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[539795827233]", + "Transform Data": { + "Translate": [ + 9.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[569860598305]": { + "Id": "Entity_[569860598305]", + "Name": "Row", + "Components": { + "Component_[10247332857034196288]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10247332857034196288 + }, + "Component_[1050259146293298025]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1050259146293298025 + }, + "Component_[10963468433108777551]": { + "$type": "EditorInspectorComponent", + "Id": 10963468433108777551, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5648156935684358836 + } + ] + }, + "Component_[11044618010943237536]": { + "$type": "EditorEntityIconComponent", + "Id": 11044618010943237536 + }, + "Component_[11056805018150955063]": { + "$type": "EditorEntitySortComponent", + "Id": 11056805018150955063, + "ChildEntityOrderEntryArray": [ + { + "EntityId": "Entity_[582745500193]" + }, + { + "EntityId": "Entity_[578450532897]", + "SortIndex": 1 + }, + { + "EntityId": "Entity_[574155565601]", + "SortIndex": 2 + }, + { + "EntityId": "Entity_[587040467489]", + "SortIndex": 3 + }, + { + "EntityId": "Entity_[591335434785]", + "SortIndex": 4 + }, + { + "EntityId": "Entity_[595630402081]", + "SortIndex": 5 + } + ] + }, + "Component_[11466054095979053511]": { + "$type": "EditorPendingCompositionComponent", + "Id": 11466054095979053511 + }, + "Component_[1364058654406679998]": { + "$type": "SelectionComponent", + "Id": 1364058654406679998 + }, + "Component_[1550934027474222562]": { + "$type": "EditorVisibilityComponent", + "Id": 1550934027474222562 + }, + "Component_[15938036103959223730]": { + "$type": "EditorLockComponent", + "Id": 15938036103959223730 + }, + "Component_[5648156935684358836]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5648156935684358836, + "Parent Entity": "Entity_[471076350497]", + "Transform Data": { + "Translate": [ + 0.0, + -6.0, + 1.0 + ] + } + } + } + }, + "Entity_[574155565601]": { + "Id": "Entity_[574155565601]", + "Name": "21_neutral_6.5", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{ADAA8BF6-1580-5684-A7F5-4B0150117375}" + }, + "assetHint": "materials/presets/macbeth/21_neutral_6-5_0-44d.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[569860598305]", + "Transform Data": { + "Translate": [ + -2.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[578450532897]": { + "Id": "Entity_[578450532897]", + "Name": "20_neutral_8", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{A9BAEC06-A3F6-53E9-9E3E-61E12048FC75}" + }, + "assetHint": "materials/presets/macbeth/20_neutral_8-0_0-23d.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[569860598305]", + "Transform Data": { + "Translate": [ + -6.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[582745500193]": { + "Id": "Entity_[582745500193]", + "Name": "19_white_9.5", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{94E3052F-2B5A-5C28-912A-C0FDC00F5CD3}" + }, + "assetHint": "materials/presets/macbeth/19_white_9-5_0-05d.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[569860598305]", + "Transform Data": { + "Translate": [ + -10.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[587040467489]": { + "Id": "Entity_[587040467489]", + "Name": "22_neutral_5", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{1E45E15B-8035-5775-B796-A77654CDB094}" + }, + "assetHint": "materials/presets/macbeth/22_neutral_5-0_0-70d.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[569860598305]", + "Transform Data": { + "Translate": [ + 1.8866175413131714, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[591335434785]": { + "Id": "Entity_[591335434785]", + "Name": "23_neutral_3.5", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{23C26041-7155-5FE2-8E12-FACFD52DA006}" + }, + "assetHint": "materials/presets/macbeth/23_neutral_3-5_1-05d.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[569860598305]", + "Transform Data": { + "Translate": [ + 5.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[595630402081]": { + "Id": "Entity_[595630402081]", + "Name": "24_black_2", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{1D83625A-4016-58F0-A94A-13B92B19F5B5}" + }, + "assetHint": "materials/presets/macbeth/24_black_2-0_1-50d.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[569860598305]", + "Transform Data": { + "Translate": [ + 9.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[599925369377]": { + "Id": "Entity_[599925369377]", + "Name": "MacBeth_Chart", + "Components": { + "Component_[10911367092756441312]": { + "$type": "EditorLockComponent", + "Id": 10911367092756441312 + }, + "Component_[11487615730470734577]": { + "$type": "EditorEntitySortComponent", + "Id": 11487615730470734577 + }, + "Component_[1380862607750834390]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1380862607750834390 + }, + "Component_[17376808010180534107]": { + "$type": "EditorOnlyEntityComponent", + "Id": 17376808010180534107 + }, + "Component_[18051852481298910543]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18051852481298910543 + }, + "Component_[2468310869499941539]": { + "$type": "EditorVisibilityComponent", + "Id": 2468310869499941539 + }, + "Component_[3104847651593575388]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3104847651593575388, + "Parent Entity": "Entity_[471076350497]", + "Transform Data": { + "Translate": [ + 0.0, + 0.0, + 1.0 + ], + "Scale": [ + 24.748918533325195, + 24.748918533325195, + 24.748918533325195 + ], + "UniformScale": 24.748918533325195 + } + }, + "Component_[4039743767801786212]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 4039743767801786212, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{767B3209-EDF7-503A-BF3D-6A69DAABC966}", + "subId": 285003870 + }, + "assetHint": "materialeditor/viewportmodels/plane_1x1.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[4350883917310195183]": { + "$type": "EditorMaterialComponent", + "Id": 4350883917310195183, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{6BCA78B0-98F0-5843-A0D9-2FD6AB5B8B95}" + }, + "assetHint": "materials/presets/macbeth/macbeth_lab_16bit_2014_srgb.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5382697958657080154]": { + "$type": "EditorInspectorComponent", + "Id": 5382697958657080154, + "ComponentOrderEntryArray": [ + { + "ComponentId": 3104847651593575388 + }, + { + "ComponentId": 4039743767801786212, + "SortIndex": 1 + }, + { + "ComponentId": 4350883917310195183, + "SortIndex": 2 + } + ] + }, + "Component_[5944774294236360498]": { + "$type": "SelectionComponent", + "Id": 5944774294236360498 + }, + "Component_[7918181081161287223]": { + "$type": "EditorEntityIconComponent", + "Id": 7918181081161287223 + } + } + }, + "Entity_[604220336673]": { + "Id": "Entity_[604220336673]", + "Name": "Camera1", + "Components": { + "Component_[10875630838724467144]": { + "$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent", + "Id": 10875630838724467144, + "Controller": { + "Configuration": { + "EditorEntityId": 604220336673 + } + } + }, + "Component_[11853636775353879324]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11853636775353879324, + "Parent Entity": "Entity_[471076350497]", + "Transform Data": { + "Translate": [ + -0.088332898914814, + -14.735246658325195, + 12.247514724731445 + ], + "Rotate": [ + -34.60991287231445, + 0.19504709541797638, + -0.282683789730072 + ] + } + }, + "Component_[14115131108729471373]": { + "$type": "EditorEntitySortComponent", + "Id": 14115131108729471373 + }, + "Component_[14490537709933782275]": { + "$type": "SelectionComponent", + "Id": 14490537709933782275 + }, + "Component_[15389860813854215395]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 15389860813854215395 + }, + "Component_[16956210187152487952]": { + "$type": "EditorVisibilityComponent", + "Id": 16956210187152487952 + }, + "Component_[3120168445836073859]": { + "$type": "EditorInspectorComponent", + "Id": 3120168445836073859, + "ComponentOrderEntryArray": [ + { + "ComponentId": 11853636775353879324 + }, + { + "ComponentId": 6418726603140010485, + "SortIndex": 1 + }, + { + "ComponentId": 6573470892650938647, + "SortIndex": 2 + }, + { + "ComponentId": 10875630838724467144, + "SortIndex": 3 + }, + { + "ComponentId": 9127356411199949930, + "SortIndex": 4 + } + ] + }, + "Component_[397791896240265054]": { + "$type": "EditorEntityIconComponent", + "Id": 397791896240265054 + }, + "Component_[6418726603140010485]": { + "$type": "AZ::Render::EditorExposureControlComponent", + "Id": 6418726603140010485, + "Controller": { + "Configuration": { + "ExposureControlType": 1, + "EyeAdaptationExposureMin": -10.0, + "EyeAdaptationExposureMax": 10.0 + } + } + }, + "Component_[6572845495569063152]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6572845495569063152 + }, + "Component_[6573470892650938647]": { + "$type": "AZ::Render::EditorPostFxLayerComponent", + "Id": 6573470892650938647 + }, + "Component_[7175586201406734874]": { + "$type": "EditorLockComponent", + "Id": 7175586201406734874 + }, + "Component_[7393764569438584638]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7393764569438584638 + }, + "Component_[9127356411199949930]": { + "$type": "GenericComponentWrapper", + "Id": 9127356411199949930, + "m_template": { + "$type": "FlyCameraInputComponent" + } + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/macbeth_shaderballs/tags.txt b/AutomatedTesting/Levels/macbeth_shaderballs/tags.txt new file mode 100644 index 0000000000..0d6c1880e7 --- /dev/null +++ b/AutomatedTesting/Levels/macbeth_shaderballs/tags.txt @@ -0,0 +1,12 @@ +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 diff --git a/AutomatedTesting/Objects/sphere_5lods.fbx b/AutomatedTesting/Objects/sphere_5lods.fbx new file mode 100644 index 0000000000..965738c933 --- /dev/null +++ b/AutomatedTesting/Objects/sphere_5lods.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e169277bca473325281d5fe043cffc9196bd3ef46f6bffbea6e0b5e3b7194a1 +size 62700 diff --git a/AutomatedTesting/Objects/sphere_5lods.fbx.assetinfo b/AutomatedTesting/Objects/sphere_5lods.fbx.assetinfo new file mode 100644 index 0000000000..d46cbf322a --- /dev/null +++ b/AutomatedTesting/Objects/sphere_5lods.fbx.assetinfo @@ -0,0 +1,8 @@ +{ + "values": [ + { + "$type": "ScriptProcessorRule", + "scriptFilename": "Editor/Scripts/auto_lod.py" + } + ] +} diff --git a/Code/Editor/EditorPreferencesPageViewportManipulator.cpp b/Code/Editor/EditorPreferencesPageViewportManipulator.cpp index ea00d6a7f0..32e0e5b573 100644 --- a/Code/Editor/EditorPreferencesPageViewportManipulator.cpp +++ b/Code/Editor/EditorPreferencesPageViewportManipulator.cpp @@ -10,6 +10,8 @@ #include "EditorPreferencesPageViewportManipulator.h" +#include + // Editor #include "EditorViewportSettings.h" #include "Settings.h" @@ -19,7 +21,17 @@ void CEditorPreferencesPage_ViewportManipulator::Reflect(AZ::SerializeContext& s serialize.Class() ->Version(1) ->Field("LineBoundWidth", &Manipulators::m_manipulatorLineBoundWidth) - ->Field("CircleBoundWidth", &Manipulators::m_manipulatorCircleBoundWidth); + ->Field("CircleBoundWidth", &Manipulators::m_manipulatorCircleBoundWidth) + ->Field("LinearManipulatorAxisLength", &Manipulators::m_linearManipulatorAxisLength) + ->Field("PlanarManipulatorAxisLength", &Manipulators::m_planarManipulatorAxisLength) + ->Field("SurfaceManipulatorRadius", &Manipulators::m_surfaceManipulatorRadius) + ->Field("SurfaceManipulatorOpacity", &Manipulators::m_surfaceManipulatorOpacity) + ->Field("LinearManipulatorConeLength", &Manipulators::m_linearManipulatorConeLength) + ->Field("LinearManipulatorConeRadius", &Manipulators::m_linearManipulatorConeRadius) + ->Field("ScaleManipulatorBoxHalfExtent", &Manipulators::m_scaleManipulatorBoxHalfExtent) + ->Field("RotationManipulatorRadius", &Manipulators::m_rotationManipulatorRadius) + ->Field("ManipulatorViewBaseScale", &Manipulators::m_manipulatorViewBaseScale) + ->Field("FlipManipulatorAxesTowardsView", &Manipulators::m_flipManipulatorAxesTowardsView); serialize.Class()->Version(2)->Field( "Manipulators", &CEditorPreferencesPage_ViewportManipulator::m_manipulators); @@ -36,7 +48,55 @@ void CEditorPreferencesPage_ViewportManipulator::Reflect(AZ::SerializeContext& s AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_manipulatorCircleBoundWidth, "Circle Bound Width", "Manipulator Circle Bound Width") ->Attribute(AZ::Edit::Attributes::Min, 0.001f) - ->Attribute(AZ::Edit::Attributes::Max, 2.0f); + ->Attribute(AZ::Edit::Attributes::Max, 2.0f) + ->DataElement( + AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_linearManipulatorAxisLength, "Linear Manipulator Axis Length", + "Length of default Linear Manipulator (for Translation and Scale Manipulators)") + ->Attribute(AZ::Edit::Attributes::Min, 0.1f) + ->Attribute(AZ::Edit::Attributes::Max, 5.0f) + ->DataElement( + AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_planarManipulatorAxisLength, "Planar Manipulator Axis Length", + "Length of default Planar Manipulator (for Translation Manipulators)") + ->Attribute(AZ::Edit::Attributes::Min, 0.1f) + ->Attribute(AZ::Edit::Attributes::Max, 5.0f) + ->DataElement( + AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_surfaceManipulatorRadius, "Surface Manipulator Radius", + "Radius of default Surface Manipulator (for Translation Manipulators)") + ->Attribute(AZ::Edit::Attributes::Min, 0.05f) + ->Attribute(AZ::Edit::Attributes::Max, 1.0f) + ->DataElement( + AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_surfaceManipulatorOpacity, "Surface Manipulator Opacity", + "Opacity of default Surface Manipulator (for Translation Manipulators)") + ->Attribute(AZ::Edit::Attributes::Min, 0.01f) + ->Attribute(AZ::Edit::Attributes::Max, 1.0f) + ->DataElement( + AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_linearManipulatorConeLength, "Linear Manipulator Cone Length", + "Length of cone for default Linear Manipulator (for Translation Manipulators)") + ->Attribute(AZ::Edit::Attributes::Min, 0.05f) + ->Attribute(AZ::Edit::Attributes::Max, 1.0f) + ->DataElement( + AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_linearManipulatorConeRadius, "Linear Manipulator Cone Radius", + "Radius of cone for default Linear Manipulator (for Translation Manipulators)") + ->Attribute(AZ::Edit::Attributes::Min, 0.05f) + ->Attribute(AZ::Edit::Attributes::Max, 0.5f) + ->DataElement( + AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_scaleManipulatorBoxHalfExtent, "Scale Manipulator Box Half Extent", + "Half extent of box for default Scale Manipulator") + ->Attribute(AZ::Edit::Attributes::Min, 0.05f) + ->Attribute(AZ::Edit::Attributes::Max, 1.0f) + ->DataElement( + AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_rotationManipulatorRadius, "Rotation Manipulator Radius", + "Radius of default Angular Manipulators (for Rotation Manipulators)") + ->Attribute(AZ::Edit::Attributes::Min, 0.5f) + ->Attribute(AZ::Edit::Attributes::Max, 5.0f) + ->DataElement( + AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_manipulatorViewBaseScale, "Manipulator View Base Scale", + "The base scale to apply to all Manipulator Views (default is 1.0)") + ->Attribute(AZ::Edit::Attributes::Min, 0.5f) + ->Attribute(AZ::Edit::Attributes::Max, 2.0f) + ->DataElement( + AZ::Edit::UIHandlers::CheckBox, &Manipulators::m_flipManipulatorAxesTowardsView, "Flip Manipulator Axes Towards View", + "Determines whether Planar and Linear Manipulators should switch to face the view (camera) in the Editor"); editContext ->Class("Manipulator Viewport Preferences", "Manipulator Viewport Preferences") @@ -82,10 +142,32 @@ void CEditorPreferencesPage_ViewportManipulator::OnApply() { SandboxEditor::SetManipulatorLineBoundWidth(m_manipulators.m_manipulatorLineBoundWidth); SandboxEditor::SetManipulatorCircleBoundWidth(m_manipulators.m_manipulatorCircleBoundWidth); + + AzToolsFramework::SetLinearManipulatorAxisLength(m_manipulators.m_linearManipulatorAxisLength); + AzToolsFramework::SetPlanarManipulatorAxisLength(m_manipulators.m_planarManipulatorAxisLength); + AzToolsFramework::SetSurfaceManipulatorRadius(m_manipulators.m_surfaceManipulatorRadius); + AzToolsFramework::SetSurfaceManipulatorOpacity(m_manipulators.m_surfaceManipulatorOpacity); + AzToolsFramework::SetLinearManipulatorConeLength(m_manipulators.m_linearManipulatorConeLength); + AzToolsFramework::SetLinearManipulatorConeRadius(m_manipulators.m_linearManipulatorConeRadius); + AzToolsFramework::SetScaleManipulatorBoxHalfExtent(m_manipulators.m_scaleManipulatorBoxHalfExtent); + AzToolsFramework::SetRotationManipulatorRadius(m_manipulators.m_rotationManipulatorRadius); + AzToolsFramework::SetFlipManipulatorAxesTowardsView(m_manipulators.m_flipManipulatorAxesTowardsView); + AzToolsFramework::SetManipulatorViewBaseScale(m_manipulators.m_manipulatorViewBaseScale); } void CEditorPreferencesPage_ViewportManipulator::InitializeSettings() { m_manipulators.m_manipulatorLineBoundWidth = SandboxEditor::ManipulatorLineBoundWidth(); m_manipulators.m_manipulatorCircleBoundWidth = SandboxEditor::ManipulatorCircleBoundWidth(); + + m_manipulators.m_linearManipulatorAxisLength = AzToolsFramework::LinearManipulatorAxisLength(); + m_manipulators.m_planarManipulatorAxisLength = AzToolsFramework::PlanarManipulatorAxisLength(); + m_manipulators.m_surfaceManipulatorRadius = AzToolsFramework::SurfaceManipulatorRadius(); + m_manipulators.m_surfaceManipulatorOpacity = AzToolsFramework::SurfaceManipulatorOpacity(); + m_manipulators.m_linearManipulatorConeLength = AzToolsFramework::LinearManipulatorConeLength(); + m_manipulators.m_linearManipulatorConeRadius = AzToolsFramework::LinearManipulatorConeRadius(); + m_manipulators.m_scaleManipulatorBoxHalfExtent = AzToolsFramework::ScaleManipulatorBoxHalfExtent(); + m_manipulators.m_rotationManipulatorRadius = AzToolsFramework::RotationManipulatorRadius(); + m_manipulators.m_flipManipulatorAxesTowardsView = AzToolsFramework::FlipManipulatorAxesTowardsView(); + m_manipulators.m_manipulatorViewBaseScale = AzToolsFramework::ManipulatorViewBaseScale(); } diff --git a/Code/Editor/EditorPreferencesPageViewportManipulator.h b/Code/Editor/EditorPreferencesPageViewportManipulator.h index 93db6a7035..eb76cec2c5 100644 --- a/Code/Editor/EditorPreferencesPageViewportManipulator.h +++ b/Code/Editor/EditorPreferencesPageViewportManipulator.h @@ -41,6 +41,16 @@ private: float m_manipulatorLineBoundWidth = 0.0f; float m_manipulatorCircleBoundWidth = 0.0f; + float m_linearManipulatorAxisLength = 0.0f; + float m_planarManipulatorAxisLength = 0.0f; + float m_surfaceManipulatorRadius = 0.0f; + float m_surfaceManipulatorOpacity = 0.0f; + float m_linearManipulatorConeLength = 0.0f; + float m_linearManipulatorConeRadius = 0.0f; + float m_scaleManipulatorBoxHalfExtent = 0.0f; + float m_rotationManipulatorRadius = 0.0f; + float m_manipulatorViewBaseScale = 0.0f; + bool m_flipManipulatorAxesTowardsView = false; }; Manipulators m_manipulators; diff --git a/Code/Editor/EditorViewportSettings.cpp b/Code/Editor/EditorViewportSettings.cpp index ae188c7d98..e06b9696e1 100644 --- a/Code/Editor/EditorViewportSettings.cpp +++ b/Code/Editor/EditorViewportSettings.cpp @@ -12,6 +12,7 @@ #include #include #include +#include namespace SandboxEditor { @@ -57,31 +58,6 @@ namespace SandboxEditor constexpr AZStd::string_view CameraDefaultStartingPositionY = "/Amazon/Preferences/Editor/Camera/DefaultStartingPosition/y"; constexpr AZStd::string_view CameraDefaultStartingPositionZ = "/Amazon/Preferences/Editor/Camera/DefaultStartingPosition/z"; - template - void SetRegistry(const AZStd::string_view setting, T&& value) - { - if (auto* registry = AZ::SettingsRegistry::Get()) - { - registry->Set(setting, AZStd::forward(value)); - } - } - - template - AZStd::remove_cvref_t GetRegistry(const AZStd::string_view setting, T&& defaultValue) - { - AZStd::remove_cvref_t value = AZStd::forward(defaultValue); - if (const auto* registry = AZ::SettingsRegistry::Get()) - { - T potentialValue; - if (registry->Get(potentialValue, setting)) - { - value = AZStd::move(potentialValue); - } - } - - return value; - } - struct EditorViewportSettingsCallbacksImpl : public EditorViewportSettingsCallbacks { EditorViewportSettingsCallbacksImpl() @@ -118,399 +94,409 @@ namespace SandboxEditor AZ::Vector3 CameraDefaultEditorPosition() { return AZ::Vector3( - aznumeric_cast(GetRegistry(CameraDefaultStartingPositionX, 0.0)), - aznumeric_cast(GetRegistry(CameraDefaultStartingPositionY, -10.0)), - aznumeric_cast(GetRegistry(CameraDefaultStartingPositionZ, 4.0))); + aznumeric_cast(AzToolsFramework::GetRegistry(CameraDefaultStartingPositionX, 0.0)), + aznumeric_cast(AzToolsFramework::GetRegistry(CameraDefaultStartingPositionY, -10.0)), + aznumeric_cast(AzToolsFramework::GetRegistry(CameraDefaultStartingPositionZ, 4.0))); } void SetCameraDefaultEditorPosition(const AZ::Vector3& defaultCameraPosition) { - SetRegistry(CameraDefaultStartingPositionX, defaultCameraPosition.GetX()); - SetRegistry(CameraDefaultStartingPositionY, defaultCameraPosition.GetY()); - SetRegistry(CameraDefaultStartingPositionZ, defaultCameraPosition.GetZ()); + AzToolsFramework::SetRegistry(CameraDefaultStartingPositionX, defaultCameraPosition.GetX()); + AzToolsFramework::SetRegistry(CameraDefaultStartingPositionY, defaultCameraPosition.GetY()); + AzToolsFramework::SetRegistry(CameraDefaultStartingPositionZ, defaultCameraPosition.GetZ()); } AZ::u64 MaxItemsShownInAssetBrowserSearch() { - return GetRegistry(AssetBrowserMaxItemsShownInSearchSetting, aznumeric_cast(50)); + return AzToolsFramework::GetRegistry(AssetBrowserMaxItemsShownInSearchSetting, aznumeric_cast(50)); } void SetMaxItemsShownInAssetBrowserSearch(const AZ::u64 numberOfItemsShown) { - SetRegistry(AssetBrowserMaxItemsShownInSearchSetting, numberOfItemsShown); + AzToolsFramework::SetRegistry(AssetBrowserMaxItemsShownInSearchSetting, numberOfItemsShown); } bool GridSnappingEnabled() { - return GetRegistry(GridSnappingSetting, false); + return AzToolsFramework::GetRegistry(GridSnappingSetting, false); } void SetGridSnapping(const bool enabled) { - SetRegistry(GridSnappingSetting, enabled); + AzToolsFramework::SetRegistry(GridSnappingSetting, enabled); } float GridSnappingSize() { - return aznumeric_cast(GetRegistry(GridSizeSetting, 0.1)); + return aznumeric_cast(AzToolsFramework::GetRegistry(GridSizeSetting, 0.1)); } void SetGridSnappingSize(const float size) { - SetRegistry(GridSizeSetting, size); + AzToolsFramework::SetRegistry(GridSizeSetting, size); } bool AngleSnappingEnabled() { - return GetRegistry(AngleSnappingSetting, false); + return AzToolsFramework::GetRegistry(AngleSnappingSetting, false); } void SetAngleSnapping(const bool enabled) { - SetRegistry(AngleSnappingSetting, enabled); + AzToolsFramework::SetRegistry(AngleSnappingSetting, enabled); } float AngleSnappingSize() { - return aznumeric_cast(GetRegistry(AngleSizeSetting, 5.0)); + return aznumeric_cast(AzToolsFramework::GetRegistry(AngleSizeSetting, 5.0)); } void SetAngleSnappingSize(const float size) { - SetRegistry(AngleSizeSetting, size); + AzToolsFramework::SetRegistry(AngleSizeSetting, size); } bool ShowingGrid() { - return GetRegistry(ShowGridSetting, false); + return AzToolsFramework::GetRegistry(ShowGridSetting, false); } void SetShowingGrid(const bool showing) { - SetRegistry(ShowGridSetting, showing); + AzToolsFramework::SetRegistry(ShowGridSetting, showing); } bool StickySelectEnabled() { - return GetRegistry(StickySelectSetting, false); + return AzToolsFramework::GetRegistry(StickySelectSetting, false); } void SetStickySelectEnabled(const bool enabled) { - SetRegistry(StickySelectSetting, enabled); + AzToolsFramework::SetRegistry(StickySelectSetting, enabled); } float ManipulatorLineBoundWidth() { - return aznumeric_cast(GetRegistry(ManipulatorLineBoundWidthSetting, 0.1)); + return aznumeric_cast(AzToolsFramework::GetRegistry(ManipulatorLineBoundWidthSetting, 0.1)); } void SetManipulatorLineBoundWidth(const float lineBoundWidth) { - SetRegistry(ManipulatorLineBoundWidthSetting, lineBoundWidth); + AzToolsFramework::SetRegistry(ManipulatorLineBoundWidthSetting, lineBoundWidth); } float ManipulatorCircleBoundWidth() { - return aznumeric_cast(GetRegistry(ManipulatorCircleBoundWidthSetting, 0.1)); + return aznumeric_cast(AzToolsFramework::GetRegistry(ManipulatorCircleBoundWidthSetting, 0.1)); } void SetManipulatorCircleBoundWidth(const float circleBoundWidth) { - SetRegistry(ManipulatorCircleBoundWidthSetting, circleBoundWidth); + AzToolsFramework::SetRegistry(ManipulatorCircleBoundWidthSetting, circleBoundWidth); } float CameraTranslateSpeed() { - return aznumeric_cast(GetRegistry(CameraTranslateSpeedSetting, 10.0)); + return aznumeric_cast(AzToolsFramework::GetRegistry(CameraTranslateSpeedSetting, 10.0)); } void SetCameraTranslateSpeed(const float speed) { - SetRegistry(CameraTranslateSpeedSetting, speed); + AzToolsFramework::SetRegistry(CameraTranslateSpeedSetting, speed); } float CameraBoostMultiplier() { - return aznumeric_cast(GetRegistry(CameraBoostMultiplierSetting, 3.0)); + return aznumeric_cast(AzToolsFramework::GetRegistry(CameraBoostMultiplierSetting, 3.0)); } void SetCameraBoostMultiplier(const float multiplier) { - SetRegistry(CameraBoostMultiplierSetting, multiplier); + AzToolsFramework::SetRegistry(CameraBoostMultiplierSetting, multiplier); } float CameraRotateSpeed() { - return aznumeric_cast(GetRegistry(CameraRotateSpeedSetting, 0.005)); + return aznumeric_cast(AzToolsFramework::GetRegistry(CameraRotateSpeedSetting, 0.005)); } void SetCameraRotateSpeed(const float speed) { - SetRegistry(CameraRotateSpeedSetting, speed); + AzToolsFramework::SetRegistry(CameraRotateSpeedSetting, speed); } float CameraScrollSpeed() { - return aznumeric_cast(GetRegistry(CameraScrollSpeedSetting, 0.02)); + return aznumeric_cast(AzToolsFramework::GetRegistry(CameraScrollSpeedSetting, 0.02)); } void SetCameraScrollSpeed(const float speed) { - SetRegistry(CameraScrollSpeedSetting, speed); + AzToolsFramework::SetRegistry(CameraScrollSpeedSetting, speed); } float CameraDollyMotionSpeed() { - return aznumeric_cast(GetRegistry(CameraDollyMotionSpeedSetting, 0.01)); + return aznumeric_cast(AzToolsFramework::GetRegistry(CameraDollyMotionSpeedSetting, 0.01)); } void SetCameraDollyMotionSpeed(const float speed) { - SetRegistry(CameraDollyMotionSpeedSetting, speed); + AzToolsFramework::SetRegistry(CameraDollyMotionSpeedSetting, speed); } bool CameraOrbitYawRotationInverted() { - return GetRegistry(CameraOrbitYawRotationInvertedSetting, false); + return AzToolsFramework::GetRegistry(CameraOrbitYawRotationInvertedSetting, false); } void SetCameraOrbitYawRotationInverted(const bool inverted) { - SetRegistry(CameraOrbitYawRotationInvertedSetting, inverted); + AzToolsFramework::SetRegistry(CameraOrbitYawRotationInvertedSetting, inverted); } bool CameraPanInvertedX() { - return GetRegistry(CameraPanInvertedXSetting, true); + return AzToolsFramework::GetRegistry(CameraPanInvertedXSetting, true); } void SetCameraPanInvertedX(const bool inverted) { - SetRegistry(CameraPanInvertedXSetting, inverted); + AzToolsFramework::SetRegistry(CameraPanInvertedXSetting, inverted); } bool CameraPanInvertedY() { - return GetRegistry(CameraPanInvertedYSetting, true); + return AzToolsFramework::GetRegistry(CameraPanInvertedYSetting, true); } void SetCameraPanInvertedY(const bool inverted) { - SetRegistry(CameraPanInvertedYSetting, inverted); + AzToolsFramework::SetRegistry(CameraPanInvertedYSetting, inverted); } float CameraPanSpeed() { - return aznumeric_cast(GetRegistry(CameraPanSpeedSetting, 0.01)); + return aznumeric_cast(AzToolsFramework::GetRegistry(CameraPanSpeedSetting, 0.01)); } void SetCameraPanSpeed(float speed) { - SetRegistry(CameraPanSpeedSetting, speed); + AzToolsFramework::SetRegistry(CameraPanSpeedSetting, speed); } float CameraRotateSmoothness() { - return aznumeric_cast(GetRegistry(CameraRotateSmoothnessSetting, 5.0)); + return aznumeric_cast(AzToolsFramework::GetRegistry(CameraRotateSmoothnessSetting, 5.0)); } void SetCameraRotateSmoothness(const float smoothness) { - SetRegistry(CameraRotateSmoothnessSetting, smoothness); + AzToolsFramework::SetRegistry(CameraRotateSmoothnessSetting, smoothness); } float CameraTranslateSmoothness() { - return aznumeric_cast(GetRegistry(CameraTranslateSmoothnessSetting, 5.0)); + return aznumeric_cast(AzToolsFramework::GetRegistry(CameraTranslateSmoothnessSetting, 5.0)); } void SetCameraTranslateSmoothness(const float smoothness) { - SetRegistry(CameraTranslateSmoothnessSetting, smoothness); + AzToolsFramework::SetRegistry(CameraTranslateSmoothnessSetting, smoothness); } bool CameraRotateSmoothingEnabled() { - return GetRegistry(CameraRotateSmoothingSetting, true); + return AzToolsFramework::GetRegistry(CameraRotateSmoothingSetting, true); } void SetCameraRotateSmoothingEnabled(const bool enabled) { - SetRegistry(CameraRotateSmoothingSetting, enabled); + AzToolsFramework::SetRegistry(CameraRotateSmoothingSetting, enabled); } bool CameraTranslateSmoothingEnabled() { - return GetRegistry(CameraTranslateSmoothingSetting, true); + return AzToolsFramework::GetRegistry(CameraTranslateSmoothingSetting, true); } void SetCameraTranslateSmoothingEnabled(const bool enabled) { - SetRegistry(CameraTranslateSmoothingSetting, enabled); + AzToolsFramework::SetRegistry(CameraTranslateSmoothingSetting, enabled); } bool CameraCaptureCursorForLook() { - return GetRegistry(CameraCaptureCursorLookSetting, true); + return AzToolsFramework::GetRegistry(CameraCaptureCursorLookSetting, true); } void SetCameraCaptureCursorForLook(const bool capture) { - SetRegistry(CameraCaptureCursorLookSetting, capture); + AzToolsFramework::SetRegistry(CameraCaptureCursorLookSetting, capture); } float CameraDefaultOrbitDistance() { - return aznumeric_cast(GetRegistry(CameraDefaultOrbitDistanceSetting, 20.0)); + return aznumeric_cast(AzToolsFramework::GetRegistry(CameraDefaultOrbitDistanceSetting, 20.0)); } void SetCameraDefaultOrbitDistance(const float distance) { - SetRegistry(CameraDefaultOrbitDistanceSetting, distance); + AzToolsFramework::SetRegistry(CameraDefaultOrbitDistanceSetting, distance); } AzFramework::InputChannelId CameraTranslateForwardChannelId() { return AzFramework::InputChannelId( - GetRegistry(CameraTranslateForwardIdSetting, AZStd::string("keyboard_key_alphanumeric_W")).c_str()); + AzToolsFramework::GetRegistry(CameraTranslateForwardIdSetting, AZStd::string("keyboard_key_alphanumeric_W")).c_str()); } void SetCameraTranslateForwardChannelId(AZStd::string_view cameraTranslateForwardId) { - SetRegistry(CameraTranslateForwardIdSetting, cameraTranslateForwardId); + AzToolsFramework::SetRegistry(CameraTranslateForwardIdSetting, cameraTranslateForwardId); } AzFramework::InputChannelId CameraTranslateBackwardChannelId() { return AzFramework::InputChannelId( - GetRegistry(CameraTranslateBackwardIdSetting, AZStd::string("keyboard_key_alphanumeric_S")).c_str()); + AzToolsFramework::GetRegistry(CameraTranslateBackwardIdSetting, AZStd::string("keyboard_key_alphanumeric_S")).c_str()); } void SetCameraTranslateBackwardChannelId(AZStd::string_view cameraTranslateBackwardId) { - SetRegistry(CameraTranslateBackwardIdSetting, cameraTranslateBackwardId); + AzToolsFramework::SetRegistry(CameraTranslateBackwardIdSetting, cameraTranslateBackwardId); } AzFramework::InputChannelId CameraTranslateLeftChannelId() { - return AzFramework::InputChannelId(GetRegistry(CameraTranslateLeftIdSetting, AZStd::string("keyboard_key_alphanumeric_A")).c_str()); + return AzFramework::InputChannelId( + AzToolsFramework::GetRegistry(CameraTranslateLeftIdSetting, AZStd::string("keyboard_key_alphanumeric_A")).c_str()); } void SetCameraTranslateLeftChannelId(AZStd::string_view cameraTranslateLeftId) { - SetRegistry(CameraTranslateLeftIdSetting, cameraTranslateLeftId); + AzToolsFramework::SetRegistry(CameraTranslateLeftIdSetting, cameraTranslateLeftId); } AzFramework::InputChannelId CameraTranslateRightChannelId() { return AzFramework::InputChannelId( - GetRegistry(CameraTranslateRightIdSetting, AZStd::string("keyboard_key_alphanumeric_D")).c_str()); + AzToolsFramework::GetRegistry(CameraTranslateRightIdSetting, AZStd::string("keyboard_key_alphanumeric_D")).c_str()); } void SetCameraTranslateRightChannelId(AZStd::string_view cameraTranslateRightId) { - SetRegistry(CameraTranslateRightIdSetting, cameraTranslateRightId); + AzToolsFramework::SetRegistry(CameraTranslateRightIdSetting, cameraTranslateRightId); } AzFramework::InputChannelId CameraTranslateUpChannelId() { - return AzFramework::InputChannelId(GetRegistry(CameraTranslateUpIdSetting, AZStd::string("keyboard_key_alphanumeric_E")).c_str()); + return AzFramework::InputChannelId( + AzToolsFramework::GetRegistry(CameraTranslateUpIdSetting, AZStd::string("keyboard_key_alphanumeric_E")).c_str()); } void SetCameraTranslateUpChannelId(AZStd::string_view cameraTranslateUpId) { - SetRegistry(CameraTranslateUpIdSetting, cameraTranslateUpId); + AzToolsFramework::SetRegistry(CameraTranslateUpIdSetting, cameraTranslateUpId); } AzFramework::InputChannelId CameraTranslateDownChannelId() { - return AzFramework::InputChannelId(GetRegistry(CameraTranslateDownIdSetting, AZStd::string("keyboard_key_alphanumeric_Q")).c_str()); + return AzFramework::InputChannelId( + AzToolsFramework::GetRegistry(CameraTranslateDownIdSetting, AZStd::string("keyboard_key_alphanumeric_Q")).c_str()); } void SetCameraTranslateDownChannelId(AZStd::string_view cameraTranslateDownId) { - SetRegistry(CameraTranslateDownIdSetting, cameraTranslateDownId); + AzToolsFramework::SetRegistry(CameraTranslateDownIdSetting, cameraTranslateDownId); } AzFramework::InputChannelId CameraTranslateBoostChannelId() { return AzFramework::InputChannelId( - GetRegistry(CameraTranslateBoostIdSetting, AZStd::string("keyboard_key_modifier_shift_l")).c_str()); + AzToolsFramework::GetRegistry(CameraTranslateBoostIdSetting, AZStd::string("keyboard_key_modifier_shift_l")).c_str()); } void SetCameraTranslateBoostChannelId(AZStd::string_view cameraTranslateBoostId) { - SetRegistry(CameraTranslateBoostIdSetting, cameraTranslateBoostId); + AzToolsFramework::SetRegistry(CameraTranslateBoostIdSetting, cameraTranslateBoostId); } AzFramework::InputChannelId CameraOrbitChannelId() { - return AzFramework::InputChannelId(GetRegistry(CameraOrbitIdSetting, AZStd::string("keyboard_key_modifier_alt_l")).c_str()); + return AzFramework::InputChannelId( + AzToolsFramework::GetRegistry(CameraOrbitIdSetting, AZStd::string("keyboard_key_modifier_alt_l")).c_str()); } void SetCameraOrbitChannelId(AZStd::string_view cameraOrbitId) { - SetRegistry(CameraOrbitIdSetting, cameraOrbitId); + AzToolsFramework::SetRegistry(CameraOrbitIdSetting, cameraOrbitId); } AzFramework::InputChannelId CameraFreeLookChannelId() { - return AzFramework::InputChannelId(GetRegistry(CameraFreeLookIdSetting, AZStd::string("mouse_button_right")).c_str()); + return AzFramework::InputChannelId( + AzToolsFramework::GetRegistry(CameraFreeLookIdSetting, AZStd::string("mouse_button_right")).c_str()); } void SetCameraFreeLookChannelId(AZStd::string_view cameraFreeLookId) { - SetRegistry(CameraFreeLookIdSetting, cameraFreeLookId); + AzToolsFramework::SetRegistry(CameraFreeLookIdSetting, cameraFreeLookId); } AzFramework::InputChannelId CameraFreePanChannelId() { - return AzFramework::InputChannelId(GetRegistry(CameraFreePanIdSetting, AZStd::string("mouse_button_middle")).c_str()); + return AzFramework::InputChannelId( + AzToolsFramework::GetRegistry(CameraFreePanIdSetting, AZStd::string("mouse_button_middle")).c_str()); } void SetCameraFreePanChannelId(AZStd::string_view cameraFreePanId) { - SetRegistry(CameraFreePanIdSetting, cameraFreePanId); + AzToolsFramework::SetRegistry(CameraFreePanIdSetting, cameraFreePanId); } AzFramework::InputChannelId CameraOrbitLookChannelId() { - return AzFramework::InputChannelId(GetRegistry(CameraOrbitLookIdSetting, AZStd::string("mouse_button_left")).c_str()); + return AzFramework::InputChannelId( + AzToolsFramework::GetRegistry(CameraOrbitLookIdSetting, AZStd::string("mouse_button_left")).c_str()); } void SetCameraOrbitLookChannelId(AZStd::string_view cameraOrbitLookId) { - SetRegistry(CameraOrbitLookIdSetting, cameraOrbitLookId); + AzToolsFramework::SetRegistry(CameraOrbitLookIdSetting, cameraOrbitLookId); } AzFramework::InputChannelId CameraOrbitDollyChannelId() { - return AzFramework::InputChannelId(GetRegistry(CameraOrbitDollyIdSetting, AZStd::string("mouse_button_right")).c_str()); + return AzFramework::InputChannelId( + AzToolsFramework::GetRegistry(CameraOrbitDollyIdSetting, AZStd::string("mouse_button_right")).c_str()); } void SetCameraOrbitDollyChannelId(AZStd::string_view cameraOrbitDollyId) { - SetRegistry(CameraOrbitDollyIdSetting, cameraOrbitDollyId); + AzToolsFramework::SetRegistry(CameraOrbitDollyIdSetting, cameraOrbitDollyId); } AzFramework::InputChannelId CameraOrbitPanChannelId() { - return AzFramework::InputChannelId(GetRegistry(CameraOrbitPanIdSetting, AZStd::string("mouse_button_middle")).c_str()); + return AzFramework::InputChannelId( + AzToolsFramework::GetRegistry(CameraOrbitPanIdSetting, AZStd::string("mouse_button_middle")).c_str()); } void SetCameraOrbitPanChannelId(AZStd::string_view cameraOrbitPanId) { - SetRegistry(CameraOrbitPanIdSetting, cameraOrbitPanId); + AzToolsFramework::SetRegistry(CameraOrbitPanIdSetting, cameraOrbitPanId); } AzFramework::InputChannelId CameraFocusChannelId() { - return AzFramework::InputChannelId(GetRegistry(CameraFocusIdSetting, AZStd::string("keyboard_key_alphanumeric_X")).c_str()); + return AzFramework::InputChannelId( + AzToolsFramework::GetRegistry(CameraFocusIdSetting, AZStd::string("keyboard_key_alphanumeric_X")).c_str()); } void SetCameraFocusChannelId(AZStd::string_view cameraFocusId) { - SetRegistry(CameraFocusIdSetting, cameraFocusId); + AzToolsFramework::SetRegistry(CameraFocusIdSetting, cameraFocusId); } } // namespace SandboxEditor diff --git a/Code/Editor/GameEngine.cpp b/Code/Editor/GameEngine.cpp index ed8f30af93..e82832fc21 100644 --- a/Code/Editor/GameEngine.cpp +++ b/Code/Editor/GameEngine.cpp @@ -35,7 +35,6 @@ // CryCommon #include -#include #include // Editor @@ -595,13 +594,6 @@ void CGameEngine::SwitchToInEditor() // Enable accelerators. GetIEditor()->EnableAcceleratos(true); - - // reset UI system - if (gEnv->pLyShine) - { - gEnv->pLyShine->Reset(); - } - // [Anton] - order changed, see comments for CGameEngine::SetSimulationMode //! Send event to switch out of game. GetIEditor()->GetObjectManager()->SendEvent(EVENT_OUTOFGAME); diff --git a/Code/Editor/Lib/Tests/test_ClickableLabel.cpp b/Code/Editor/Lib/Tests/test_ClickableLabel.cpp index 905e91b64c..a676714992 100644 --- a/Code/Editor/Lib/Tests/test_ClickableLabel.cpp +++ b/Code/Editor/Lib/Tests/test_ClickableLabel.cpp @@ -19,7 +19,7 @@ using namespace ::testing; namespace UnitTest { class TestingClickableLabel - : public testing::Test + : public ScopedAllocatorSetupFixture { public: ClickableLabel m_clickableLabel; diff --git a/Code/Editor/Lib/Tests/test_CryEditDocPythonBindings.cpp b/Code/Editor/Lib/Tests/test_CryEditDocPythonBindings.cpp index f4e029cb7a..5bab9cb24b 100644 --- a/Code/Editor/Lib/Tests/test_CryEditDocPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_CryEditDocPythonBindings.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -22,7 +23,7 @@ namespace CryEditDocPythonBindingsUnitTests { class CryEditDocPythonBindingsFixture - : public testing::Test + : public ::UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -30,7 +31,6 @@ namespace CryEditDocPythonBindingsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_CryEditPythonBindings.cpp b/Code/Editor/Lib/Tests/test_CryEditPythonBindings.cpp index 30afa07304..5246fcdee5 100644 --- a/Code/Editor/Lib/Tests/test_CryEditPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_CryEditPythonBindings.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -24,7 +25,7 @@ namespace CryEditPythonBindingsUnitTests { class CryEditPythonBindingsFixture - : public testing::Test + : public ::UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -32,7 +33,6 @@ namespace CryEditPythonBindingsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_DisplaySettingsPythonBindings.cpp b/Code/Editor/Lib/Tests/test_DisplaySettingsPythonBindings.cpp index e6af0bdeff..1fd70cb88c 100644 --- a/Code/Editor/Lib/Tests/test_DisplaySettingsPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_DisplaySettingsPythonBindings.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -22,7 +23,7 @@ namespace DisplaySettingsPythonBindingsUnitTests { class DisplaySettingsPythonBindingsFixture - : public testing::Test + : public ::UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -30,7 +31,6 @@ namespace DisplaySettingsPythonBindingsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); m_app.RegisterComponentDescriptor(AzToolsFramework::DisplaySettingsPythonFuncsHandler::CreateDescriptor()); @@ -52,7 +52,7 @@ namespace DisplaySettingsPythonBindingsUnitTests } class DisplaySettingsComponentFixture - : public testing::Test + : public ::UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -60,7 +60,6 @@ namespace DisplaySettingsPythonBindingsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); m_app.RegisterComponentDescriptor(AzToolsFramework::DisplaySettingsComponent::CreateDescriptor()); diff --git a/Code/Editor/Lib/Tests/test_EditorPythonBindings.cpp b/Code/Editor/Lib/Tests/test_EditorPythonBindings.cpp index de0eb5df6f..49b65f7ffc 100644 --- a/Code/Editor/Lib/Tests/test_EditorPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_EditorPythonBindings.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -79,7 +80,7 @@ namespace EditorPythonBindingsUnitTests }; class EditorPythonBindingsFixture - : public testing::Test + : public ::UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -87,7 +88,6 @@ namespace EditorPythonBindingsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_EditorUtils.cpp b/Code/Editor/Lib/Tests/test_EditorUtils.cpp index 3556757ae3..c0515a77ad 100644 --- a/Code/Editor/Lib/Tests/test_EditorUtils.cpp +++ b/Code/Editor/Lib/Tests/test_EditorUtils.cpp @@ -11,6 +11,7 @@ #include #include #include +#include namespace EditorUtilsTest { @@ -39,7 +40,7 @@ namespace EditorUtilsTest class TestWarningAbsorber - : public testing::Test + : public ::UnitTest::ScopedAllocatorSetupFixture { }; diff --git a/Code/Editor/Lib/Tests/test_MainWindowPythonBindings.cpp b/Code/Editor/Lib/Tests/test_MainWindowPythonBindings.cpp index 3963ae990f..e3268704bc 100644 --- a/Code/Editor/Lib/Tests/test_MainWindowPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_MainWindowPythonBindings.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -22,7 +23,7 @@ namespace MainWindowPythonBindingsUnitTests { class MainWindowPythonBindingsFixture - : public testing::Test + : public ::UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -30,7 +31,6 @@ namespace MainWindowPythonBindingsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_ObjectManagerPythonBindings.cpp b/Code/Editor/Lib/Tests/test_ObjectManagerPythonBindings.cpp index 64b7d36d30..6766b6a1fa 100644 --- a/Code/Editor/Lib/Tests/test_ObjectManagerPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_ObjectManagerPythonBindings.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -22,7 +23,7 @@ namespace ObjectManagerPythonBindingsUnitTests { class ObjectManagerPythonBindingsFixture - : public testing::Test + : public ::UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -30,7 +31,6 @@ namespace ObjectManagerPythonBindingsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_TerrainHoleToolPythonBindings.cpp b/Code/Editor/Lib/Tests/test_TerrainHoleToolPythonBindings.cpp index e163004d75..fc292b1f52 100644 --- a/Code/Editor/Lib/Tests/test_TerrainHoleToolPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_TerrainHoleToolPythonBindings.cpp @@ -23,7 +23,7 @@ namespace TerrainFuncsUnitTests { class TerrainHoleToolPythonBindingsFixture - : public testing::Test + : public UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -31,7 +31,6 @@ namespace TerrainFuncsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_TerrainLayerPythonBindings.cpp b/Code/Editor/Lib/Tests/test_TerrainLayerPythonBindings.cpp index ad7baa44a5..3296572ed2 100644 --- a/Code/Editor/Lib/Tests/test_TerrainLayerPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_TerrainLayerPythonBindings.cpp @@ -23,7 +23,7 @@ namespace TerrainFuncsUnitTests { class TerrainLayerPythonBindingsFixture - : public testing::Test + : public UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -31,7 +31,6 @@ namespace TerrainFuncsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_TerrainModifyPythonBindings.cpp b/Code/Editor/Lib/Tests/test_TerrainModifyPythonBindings.cpp index 166e4c0be5..37afbe5f37 100644 --- a/Code/Editor/Lib/Tests/test_TerrainModifyPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_TerrainModifyPythonBindings.cpp @@ -22,7 +22,7 @@ namespace TerrainModifyPythonBindingsUnitTests { class TerrainModifyPythonBindingsFixture - : public testing::Test + : public UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -30,7 +30,6 @@ namespace TerrainModifyPythonBindingsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_TerrainPainterPythonBindings.cpp b/Code/Editor/Lib/Tests/test_TerrainPainterPythonBindings.cpp index 7a2cf786cd..3281da8078 100644 --- a/Code/Editor/Lib/Tests/test_TerrainPainterPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_TerrainPainterPythonBindings.cpp @@ -23,7 +23,7 @@ namespace TerrainFuncsUnitTests { class TerrainPainterPythonBindingsFixture - : public testing::Test + : public UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -31,7 +31,6 @@ namespace TerrainFuncsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_TerrainPythonBindings.cpp b/Code/Editor/Lib/Tests/test_TerrainPythonBindings.cpp index 6a0df6b62a..786158afb3 100644 --- a/Code/Editor/Lib/Tests/test_TerrainPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_TerrainPythonBindings.cpp @@ -23,7 +23,7 @@ namespace TerrainFuncsUnitTests { class TerrainPythonBindingsFixture - : public testing::Test + : public UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -31,7 +31,6 @@ namespace TerrainFuncsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_TerrainTexturePythonBindings.cpp b/Code/Editor/Lib/Tests/test_TerrainTexturePythonBindings.cpp index 23d30c0b82..7bd81772e1 100644 --- a/Code/Editor/Lib/Tests/test_TerrainTexturePythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_TerrainTexturePythonBindings.cpp @@ -23,7 +23,7 @@ namespace TerrainFuncsUnitTests { class TerrainTexturePythonBindingsFixture - : public testing::Test + : public UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -31,7 +31,6 @@ namespace TerrainFuncsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_TrackViewPythonBindings.cpp b/Code/Editor/Lib/Tests/test_TrackViewPythonBindings.cpp index 88a4b4f63f..558bdaaabc 100644 --- a/Code/Editor/Lib/Tests/test_TrackViewPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_TrackViewPythonBindings.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -22,7 +23,7 @@ namespace TrackViewPythonBindingsUnitTests { class TrackViewPythonBindingsFixture - : public testing::Test + : public UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -30,7 +31,6 @@ namespace TrackViewPythonBindingsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is @@ -82,7 +82,7 @@ namespace TrackViewPythonBindingsUnitTests } class TrackViewComponentFixture - : public testing::Test + : public UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -90,7 +90,6 @@ namespace TrackViewPythonBindingsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); m_app.RegisterComponentDescriptor(AzToolsFramework::TrackViewComponent::CreateDescriptor()); diff --git a/Code/Editor/Lib/Tests/test_ViewPanePythonBindings.cpp b/Code/Editor/Lib/Tests/test_ViewPanePythonBindings.cpp index 88ce6d5767..047cea3aad 100644 --- a/Code/Editor/Lib/Tests/test_ViewPanePythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_ViewPanePythonBindings.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -22,7 +23,7 @@ namespace ViewPaneFuncsUnitTests { class ViewPanePythonBindingsFixture - : public testing::Test + : public ::UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -30,7 +31,6 @@ namespace ViewPaneFuncsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_ViewportTitleDlgPythonBindings.cpp b/Code/Editor/Lib/Tests/test_ViewportTitleDlgPythonBindings.cpp index c3d6be1fdd..c3f7fe35f5 100644 --- a/Code/Editor/Lib/Tests/test_ViewportTitleDlgPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_ViewportTitleDlgPythonBindings.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -22,7 +23,7 @@ namespace ViewportTitleDlgFuncsUnitTests { class ViewportTitleDlgPythonBindingsFixture - : public testing::Test + : public UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -30,7 +31,6 @@ namespace ViewportTitleDlgFuncsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Plugins/EditorCommon/editorcommon_files.cmake b/Code/Editor/Plugins/EditorCommon/editorcommon_files.cmake index c1f1a531e8..1c6efbdf2c 100644 --- a/Code/Editor/Plugins/EditorCommon/editorcommon_files.cmake +++ b/Code/Editor/Plugins/EditorCommon/editorcommon_files.cmake @@ -13,7 +13,6 @@ set(FILES EditorCommonAPI.h ActionOutput.h ActionOutput.cpp - UiEditorDLLBus.h DockTitleBarWidget.cpp DockTitleBarWidget.h SaveUtilities/AsyncSaveRunner.h diff --git a/Code/Editor/Util/Image.cpp b/Code/Editor/Util/Image.cpp index 773bfa93d2..8b26f54075 100644 --- a/Code/Editor/Util/Image.cpp +++ b/Code/Editor/Util/Image.cpp @@ -75,17 +75,16 @@ void CImageEx::ReverseUpDown() } uint32* pPixData = GetData(); - uint32* pReversePix = new uint32[GetWidth() * GetHeight()]; - - for (int i = GetHeight() - 1, i2 = 0; i >= 0; i--, i2++) + const int height = GetHeight(); + const int width = GetWidth(); + for (int i = 0; i < height / 2; i++) { - for (int k = 0; k < GetWidth(); k++) + for (int j = 0; j < width; j++) { - pReversePix[i2 * GetWidth() + k] = pPixData[i * GetWidth() + k]; + AZStd::swap(pPixData[i * width + j], pPixData[(height - 1 - i) * width + j]); } } - Attach(pReversePix, GetWidth(), GetHeight()); } void CImageEx::FillAlpha(unsigned char value) diff --git a/Code/Framework/AtomCore/Tests/Main.cpp b/Code/Framework/AtomCore/Tests/Main.cpp index eb4c6bc835..728624d427 100644 --- a/Code/Framework/AtomCore/Tests/Main.cpp +++ b/Code/Framework/AtomCore/Tests/Main.cpp @@ -37,7 +37,7 @@ namespace AZ using namespace AZ; // Handle asserts -class TraceDrillerHook +class TestEnvironmentHook : public AZ::Test::ITestEnvironment , public UnitTest::TraceBusRedirector { @@ -57,5 +57,5 @@ public: } }; -AZ_UNIT_TEST_HOOK(new TraceDrillerHook()); +AZ_UNIT_TEST_HOOK(new TestEnvironmentHook()); diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetCommon.h b/Code/Framework/AzCore/AzCore/Asset/AssetCommon.h index c45bb21c6d..2459764e52 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetCommon.h +++ b/Code/Framework/AzCore/AzCore/Asset/AssetCommon.h @@ -19,7 +19,6 @@ #include #include #include -#include #include namespace AZ @@ -325,13 +324,13 @@ namespace AZ T& operator*() const { - AZ_Assert(m_assetData, "Asset is not loaded"); + AZ_Assert(m_assetData, "Asset %s (%s) is not loaded", m_assetId.ToString().c_str(), m_assetHint.c_str()); return *Get(); } T* operator->() const { - AZ_Assert(m_assetData, "Asset is not loaded"); + AZ_Assert(m_assetData, "Asset %s (%s) is not loaded", m_assetId.ToString().c_str(), m_assetHint.c_str()); return Get(); } @@ -581,7 +580,6 @@ namespace AZ template using ConnectionPolicy = AssetConnectionPolicy; - using EventProcessingPolicy = Debug::AssetTrackingEventProcessingPolicy<>; ////////////////////////////////////////////////////////////////////////// virtual ~AssetEvents() {} diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetManager.cpp b/Code/Framework/AzCore/AzCore/Asset/AssetManager.cpp index e419666a32..afe3330bd3 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetManager.cpp +++ b/Code/Framework/AzCore/AzCore/Asset/AssetManager.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -164,8 +163,6 @@ namespace AZ::Data AZ_PROFILE_SCOPE(AzCore, "AZ::Data::LoadAssetJob::Process: %s", asset.GetHint().c_str()); - AZ_ASSET_ATTACH_TO_SCOPE(this); - if (m_owner->ValidateAndRegisterAssetLoading(asset)) { LoadAndSignal(asset); @@ -200,7 +197,6 @@ namespace AZ::Data AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(cl_assetLoadDelay)); } - AZ_ASSET_NAMED_SCOPE(asset.GetHint().c_str()); bool loadedSuccessfully = false; if (!cl_assetLoadError && m_requestState == AZ::IO::IStreamerTypes::RequestStatus::Completed) @@ -982,7 +978,6 @@ namespace AZ::Data } AZ_PROFILE_SCOPE(AzCore, "GetAsset: %s", assetInfo.m_relativePath.c_str()); - AZ_ASSET_NAMED_SCOPE("GetAsset: %s", assetInfo.m_relativePath.c_str()); AZStd::shared_ptr dataStream; AssetStreamInfo loadInfo; diff --git a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp index fb0e4b82b8..693b2f1648 100644 --- a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp +++ b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp @@ -48,10 +48,6 @@ #include #include -#include -#include -#include -#include #include #include @@ -156,7 +152,6 @@ namespace AZ m_reservedDebug = 0; m_recordingMode = Debug::AllocationRecords::RECORD_STACK_IF_NO_FILE_LINE; m_stackRecordLevels = 5; - m_enableDrilling = false; m_useOverrunDetection = false; m_useMalloc = false; } @@ -328,7 +323,6 @@ namespace AZ ->Field("blockSize", &Descriptor::m_memoryBlocksByteSize) ->Field("reservedOS", &Descriptor::m_reservedOS) ->Field("reservedDebug", &Descriptor::m_reservedDebug) - ->Field("enableDrilling", &Descriptor::m_enableDrilling) ->Field("useOverrunDetection", &Descriptor::m_useOverrunDetection) ->Field("useMalloc", &Descriptor::m_useMalloc) ->Field("allocatorRemappings", &Descriptor::m_allocatorRemappings) @@ -367,7 +361,6 @@ namespace AZ ->Attribute(Edit::Attributes::Step, &Descriptor::m_pageSize) ->DataElement(Edit::UIHandlers::SpinBox, &Descriptor::m_reservedOS, "OS reserved memory", "System memory reserved for OS (used only when 'Allocate all memory at startup' is true)") ->DataElement(Edit::UIHandlers::SpinBox, &Descriptor::m_reservedDebug, "Memory reserved for debugger", "System memory reserved for Debug allocator, like memory tracking (used only when 'Allocate all memory at startup' is true)") - ->DataElement(Edit::UIHandlers::CheckBox, &Descriptor::m_enableDrilling, "Enable Driller", "Enable Drilling support for the application (ignored in Release builds)") ->DataElement(Edit::UIHandlers::CheckBox, &Descriptor::m_useOverrunDetection, "Use Overrun Detection", "Use the overrun detection memory manager (only available on some platforms, ignored in Release builds)") ->DataElement(Edit::UIHandlers::CheckBox, &Descriptor::m_useMalloc, "Use Malloc", "Use malloc for memory allocations (for memory debugging only, ignored in Release builds)") ; @@ -486,9 +479,11 @@ namespace AZ // Merge Command Line arguments constexpr bool executeRegDumpCommands = false; - SettingsRegistryMergeUtils::MergeSettingsToRegistry_CommandLine(*m_settingsRegistry, m_commandLine, executeRegDumpCommands); +#if defined(AZ_DEBUG_BUILD) || defined(AZ_PROFILE_BUILD) + // Skip over merging the User Registry in non-debug and profile configurations SettingsRegistryMergeUtils::MergeSettingsToRegistry_O3deUserRegistry(*m_settingsRegistry, AZ_TRAIT_OS_PLATFORM_CODENAME, {}); +#endif SettingsRegistryMergeUtils::MergeSettingsToRegistry_CommandLine(*m_settingsRegistry, m_commandLine, executeRegDumpCommands); SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*m_settingsRegistry); diff --git a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h index f245b5f5da..d53b8e1a4e 100644 --- a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h +++ b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h @@ -41,7 +41,6 @@ namespace AZ } namespace AZ::Debug { - class DrillerManager; class LocalFileEventLogger; } @@ -143,7 +142,6 @@ namespace AZ AZ::u64 m_reservedDebug; //!< Reserved memory for Debugging (allocation,etc.). Used only when m_grabAllMemory is set to true. (default: 0) Debug::AllocationRecords::Mode m_recordingMode; //!< When to record stack traces (default: AZ::Debug::AllocationRecords::RECORD_STACK_IF_NO_FILE_LINE) AZ::u64 m_stackRecordLevels; //!< If stack recording is enabled, how many stack levels to record. (default: 5) - bool m_enableDrilling; //!< True to enabled drilling support for the application. RegisterDrillers will be called. Ignored in release. (default: true) bool m_useOverrunDetection; //!< True to use the overrun detection memory management scheme. Only available on some platforms; greatly increases memory consumption. bool m_useMalloc; //!< True to use malloc instead of the internal memory manager. Intended for debugging purposes only. diff --git a/Code/Framework/AzCore/AzCore/Component/ComponentApplicationBus.h b/Code/Framework/AzCore/AzCore/Component/ComponentApplicationBus.h index feefa95973..10f35d6e00 100644 --- a/Code/Framework/AzCore/AzCore/Component/ComponentApplicationBus.h +++ b/Code/Framework/AzCore/AzCore/Component/ComponentApplicationBus.h @@ -37,11 +37,6 @@ namespace AZ class ComponentFactoryInterface; } - namespace Debug - { - class DrillerManager; - } - struct ApplicationTypeQuery { bool IsEditor() const; diff --git a/Code/Framework/AzCore/AzCore/Component/TickBus.h b/Code/Framework/AzCore/AzCore/Component/TickBus.h index e65efb93f2..1b588f41cc 100644 --- a/Code/Framework/AzCore/AzCore/Component/TickBus.h +++ b/Code/Framework/AzCore/AzCore/Component/TickBus.h @@ -16,7 +16,6 @@ #define AZCORE_COMPONENT_TICK_BUS_H #include -#include #include #include // For TickBus thread events. #include @@ -112,10 +111,6 @@ namespace AZ AZ_FORCE_INLINE bool operator()(TickEvents* left, TickEvents* right) const { return left->GetTickOrder() < right->GetTickOrder(); } }; - /** - * Enable tick bus to work with the AssetTracking - */ - using EventProcessingPolicy = Debug::AssetTrackingEventProcessingPolicy<>; ////////////////////////////////////////////////////////////////////////// /** @@ -217,10 +212,6 @@ namespace AZ */ typedef AZStd::mutex EventQueueMutexType; - /** - * Enable tick bus to work with the AssetTracking - */ - using EventProcessingPolicy = Debug::AssetTrackingEventProcessingPolicy<>; ////////////////////////////////////////////////////////////////////////// /** diff --git a/Code/Framework/AzCore/AzCore/DOM/Backends/JSON/JsonBackend.h b/Code/Framework/AzCore/AzCore/DOM/Backends/JSON/JsonBackend.h new file mode 100644 index 0000000000..1023796f61 --- /dev/null +++ b/Code/Framework/AzCore/AzCore/DOM/Backends/JSON/JsonBackend.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include +#include + +namespace AZ::Dom +{ + //! A DOM backend for serializing and deserializing JSON <=> UTF-8 text + //! \param ParseFlags Controls how deserialized JSON is parsed. + //! \param WriteFormat Controls how serialized JSON is formatted. + template< + Json::ParseFlags ParseFlags = Json::ParseFlags::ParseComments, + Json::OutputFormatting WriteFormat = Json::OutputFormatting::PrettyPrintedJson> + class JsonBackend final : public Backend + { + public: + Visitor::Result ReadFromBuffer(const char* buffer, size_t size, AZ::Dom::Lifetime lifetime, Visitor& visitor) override + { + return Json::VisitSerializedJson({ buffer, size }, lifetime, visitor); + } + + Visitor::Result ReadFromBufferInPlace(char* buffer, [[maybe_unused]] AZStd::optional size, Visitor& visitor) override + { + return Json::VisitSerializedJsonInPlace(buffer, visitor); + } + + Visitor::Result WriteToBuffer(AZStd::string& buffer, WriteCallback callback) + { + AZ::IO::ByteContainerStream stream{ &buffer }; + AZStd::unique_ptr visitor = Json::CreateJsonStreamWriter(stream, WriteFormat); + return callback(*visitor); + } + }; +} // namespace AZ::Dom diff --git a/Code/Framework/AzCore/AzCore/DOM/Backends/JSON/JsonSerializationUtils.cpp b/Code/Framework/AzCore/AzCore/DOM/Backends/JSON/JsonSerializationUtils.cpp new file mode 100644 index 0000000000..17f9bfea54 --- /dev/null +++ b/Code/Framework/AzCore/AzCore/DOM/Backends/JSON/JsonSerializationUtils.cpp @@ -0,0 +1,582 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace AZ::Dom::Json +{ + // + // class RapidJsonValueWriter + // + RapidJsonValueWriter::RapidJsonValueWriter(rapidjson::Value& outputValue, rapidjson::Value::AllocatorType& allocator) + : m_result(outputValue) + , m_allocator(allocator) + { + } + + VisitorFlags RapidJsonValueWriter::GetVisitorFlags() const + { + return VisitorFlags::SupportsRawKeys | VisitorFlags::SupportsArrays | VisitorFlags::SupportsObjects; + } + + Visitor::Result RapidJsonValueWriter::Null() + { + CurrentValue().SetNull(); + return FinishWrite(); + } + + Visitor::Result RapidJsonValueWriter::Bool(bool value) + { + CurrentValue().SetBool(value); + return FinishWrite(); + } + + Visitor::Result RapidJsonValueWriter::Int64(AZ::s64 value) + { + CurrentValue().SetInt64(value); + return FinishWrite(); + } + + Visitor::Result RapidJsonValueWriter::Uint64(AZ::u64 value) + { + CurrentValue().SetUint64(value); + return FinishWrite(); + } + + Visitor::Result RapidJsonValueWriter::Double(double value) + { + CurrentValue().SetDouble(value); + return FinishWrite(); + } + + Visitor::Result RapidJsonValueWriter::String(AZStd::string_view value, Lifetime lifetime) + { + if (lifetime == Lifetime::Temporary) + { + CurrentValue().SetString(value.data(), aznumeric_cast(value.length()), m_allocator); + } + else + { + CurrentValue().SetString(value.data(), aznumeric_cast(value.length())); + } + return FinishWrite(); + } + + Visitor::Result RapidJsonValueWriter::StartObject() + { + CurrentValue().SetObject(); + + const bool isObject = true; + m_entryStack.emplace_front(isObject, CurrentValue()); + return VisitorSuccess(); + } + + Visitor::Result RapidJsonValueWriter::EndObject(AZ::u64 attributeCount) + { + if (m_entryStack.empty()) + { + return VisitorFailure(VisitorErrorCode::InternalError, "EndObject called without a matching BeginObject call"); + } + + const ValueInfo& frontEntry = m_entryStack.front(); + if (!frontEntry.m_isObject) + { + return VisitorFailure(VisitorErrorCode::InternalError, "Expected EndArray and received EndObject instead"); + } + + if (frontEntry.m_entryCount != attributeCount) + { + return VisitorFailure( + VisitorErrorCode::InternalError, + AZStd::string::format( + "EndObject: Expected %llu attributes but received %llu attributes instead", attributeCount, + frontEntry.m_entryCount)); + } + + m_entryStack.pop_front(); + return FinishWrite(); + } + + Visitor::Result RapidJsonValueWriter::Key(AZ::Name key) + { + return RawKey(key.GetStringView(), Lifetime::Persistent); + } + + Visitor::Result RapidJsonValueWriter::RawKey(AZStd::string_view key, Lifetime lifetime) + { + AZ_Assert(!m_entryStack.empty(), "Attempmted to push a key with no object"); + AZ_Assert(m_entryStack.front().m_isObject, "Attempted to push a key to an array"); + if (lifetime == Lifetime::Persistent) + { + m_entryStack.front().m_key.SetString(key.data(), aznumeric_cast(key.size())); + } + else + { + m_entryStack.front().m_key.SetString(key.data(), aznumeric_cast(key.size()), m_allocator); + } + return VisitorSuccess(); + } + + Visitor::Result RapidJsonValueWriter::StartArray() + { + CurrentValue().SetArray(); + + const bool isObject = false; + m_entryStack.emplace_front(isObject, CurrentValue()); + return VisitorSuccess(); + } + + Visitor::Result RapidJsonValueWriter::EndArray(AZ::u64 elementCount) + { + if (m_entryStack.empty()) + { + return VisitorFailure(VisitorErrorCode::InternalError, "EndArray called without a matching BeginArray call"); + } + + const ValueInfo& frontEntry = m_entryStack.front(); + if (frontEntry.m_isObject) + { + return VisitorFailure(VisitorErrorCode::InternalError, "Expected EndObject and received EndArray instead"); + } + + if (frontEntry.m_entryCount != elementCount) + { + return VisitorFailure( + VisitorErrorCode::InternalError, + AZStd::string::format( + "EndArray: Expected %llu elements but received %llu elements instead", elementCount, frontEntry.m_entryCount)); + } + + m_entryStack.pop_front(); + return FinishWrite(); + } + + Visitor::Result RapidJsonValueWriter::FinishWrite() + { + if (m_entryStack.empty()) + { + return VisitorSuccess(); + } + + // Retrieve the top value of the stack and replace it with a null value + rapidjson::Value value; + m_entryStack.front().m_value.Swap(value); + ValueInfo& newEntry = m_entryStack.front(); + ++newEntry.m_entryCount; + + if (newEntry.m_key.IsString()) + { + newEntry.m_container.AddMember(m_entryStack.front().m_key.Move(), AZStd::move(value), m_allocator); + newEntry.m_key.SetNull(); + } + else + { + newEntry.m_container.PushBack(AZStd::move(value), m_allocator); + } + + return VisitorSuccess(); + } + + rapidjson::Value& RapidJsonValueWriter::CurrentValue() + { + if (m_entryStack.empty()) + { + return m_result; + } + return m_entryStack.front().m_value; + } + + RapidJsonValueWriter::ValueInfo::ValueInfo(bool isObject, rapidjson::Value& container) + : m_isObject(isObject) + , m_container(container) + { + } + + // + // class StreamWriter + // + // Visitor that writes to a rapidjson::Writer + template + class StreamWriter : public Visitor + { + public: + StreamWriter(AZ::IO::GenericStream* stream) + : m_streamWriter(stream) + , m_writer(Writer(m_streamWriter)) + { + } + + VisitorFlags GetVisitorFlags() const override + { + return VisitorFlags::SupportsRawKeys | VisitorFlags::SupportsArrays | VisitorFlags::SupportsObjects; + } + + Result Null() override + { + return CheckWrite(m_writer.Null()); + } + + Result Bool(bool value) override + { + return CheckWrite(m_writer.Bool(value)); + } + + Result Int64(AZ::s64 value) override + { + return CheckWrite(m_writer.Int64(value)); + } + + Result Uint64(AZ::u64 value) override + { + return CheckWrite(m_writer.Uint64(value)); + } + + Result Double(double value) override + { + return CheckWrite(m_writer.Double(value)); + } + + Result String(AZStd::string_view value, Lifetime lifetime) override + { + const bool shouldCopy = lifetime == Lifetime::Temporary; + return CheckWrite(m_writer.String(value.data(), aznumeric_cast(value.size()), shouldCopy)); + } + + Result StartObject() override + { + return CheckWrite(m_writer.StartObject()); + } + + Result EndObject(AZ::u64 attributeCount) override + { + return CheckWrite(m_writer.EndObject(aznumeric_cast(attributeCount))); + } + + Result Key(AZ::Name key) override + { + return RawKey(key.GetStringView(), Lifetime::Persistent); + } + + Result RawKey(AZStd::string_view key, Lifetime lifetime) override + { + const bool shouldCopy = lifetime == Lifetime::Temporary; + return CheckWrite(m_writer.Key(key.data(), aznumeric_cast(key.size()), shouldCopy)); + } + + Result StartArray() override + { + return CheckWrite(m_writer.StartArray()); + } + + Result EndArray(AZ::u64 elementCount) override + { + return CheckWrite(m_writer.EndArray(aznumeric_cast(elementCount))); + } + + private: + Result CheckWrite(bool writeSucceeded) + { + if (writeSucceeded) + { + return VisitorSuccess(); + } + else + { + return VisitorFailure(VisitorErrorCode::InternalError, "Failed to write JSON"); + } + } + + AZ::IO::RapidJSONStreamWriter m_streamWriter; + Writer m_writer; + }; + + // + // struct JsonReadHandler + // + RapidJsonReadHandler::RapidJsonReadHandler(Visitor* visitor, Lifetime stringLifetime) + : m_visitor(visitor) + , m_stringLifetime(stringLifetime) + , m_outcome(AZ::Success()) + { + } + + bool RapidJsonReadHandler::Null() + { + return CheckResult(m_visitor->Null()); + } + + bool RapidJsonReadHandler::Bool(bool b) + { + return CheckResult(m_visitor->Bool(b)); + } + + bool RapidJsonReadHandler::Int(int i) + { + return CheckResult(m_visitor->Int64(aznumeric_cast(i))); + } + + bool RapidJsonReadHandler::Uint(unsigned i) + { + return CheckResult(m_visitor->Uint64(aznumeric_cast(i))); + } + + bool RapidJsonReadHandler::Int64(int64_t i) + { + return CheckResult(m_visitor->Int64(i)); + } + + bool RapidJsonReadHandler::Uint64(uint64_t i) + { + return CheckResult(m_visitor->Uint64(i)); + } + + bool RapidJsonReadHandler::Double(double d) + { + return CheckResult(m_visitor->Double(d)); + } + + bool RapidJsonReadHandler::RawNumber( + [[maybe_unused]] const char* str, [[maybe_unused]] rapidjson::SizeType length, [[maybe_unused]] bool copy) + { + AZ_Assert(false, "Raw numbers are unsupported in the rapidjson DOM backend"); + return false; + } + + bool RapidJsonReadHandler::String(const char* str, rapidjson::SizeType length, bool copy) + { + const Lifetime lifetime = copy ? m_stringLifetime : Lifetime::Temporary; + return CheckResult(m_visitor->String(AZStd::string_view(str, length), lifetime)); + } + + bool RapidJsonReadHandler::StartObject() + { + return CheckResult(m_visitor->StartObject()); + } + + bool RapidJsonReadHandler::Key(const char* str, rapidjson::SizeType length, [[maybe_unused]] bool copy) + { + AZStd::string_view key = AZStd::string_view(str, length); + if (!m_visitor->SupportsRawKeys()) + { + m_visitor->Key(AZ::Name(key)); + } + const Lifetime lifetime = copy ? m_stringLifetime : Lifetime::Temporary; + return CheckResult(m_visitor->RawKey(key, lifetime)); + } + + bool RapidJsonReadHandler::EndObject([[maybe_unused]] rapidjson::SizeType memberCount) + { + return CheckResult(m_visitor->EndObject(memberCount)); + } + + bool RapidJsonReadHandler::StartArray() + { + return CheckResult(m_visitor->StartArray()); + } + + bool RapidJsonReadHandler::EndArray([[maybe_unused]] rapidjson::SizeType elementCount) + { + return CheckResult(m_visitor->EndArray(elementCount)); + } + + Visitor::Result&& RapidJsonReadHandler::TakeOutcome() + { + return AZStd::move(m_outcome); + } + + bool RapidJsonReadHandler::CheckResult(Visitor::Result result) + { + if (result.IsSuccess()) + { + return true; + } + else + { + m_outcome = AZStd::move(result); + return false; + } + } + + // + // Serialized JSON util functions + // + AZStd::unique_ptr CreateJsonStreamWriter(AZ::IO::GenericStream& stream, OutputFormatting format) + { + if (format == OutputFormatting::MinifiedJson) + { + using WriterType = rapidjson::Writer; + return AZStd::make_unique>(&stream); + } + else + { + using WriterType = rapidjson::PrettyWriter; + return AZStd::make_unique>(&stream); + } + } + + // + // In-memory rapidjson util functions + // + AZ::Outcome WriteToRapidJsonDocument(Backend::WriteCallback writeCallback) + { + rapidjson::Document document; + RapidJsonValueWriter writer(document, document.GetAllocator()); + auto result = writeCallback(writer); + if (!result.IsSuccess()) + { + return AZ::Failure(result.TakeError().FormatVisitorErrorMessage()); + } + return AZ::Success(AZStd::move(document)); + } + + Visitor::Result WriteToRapidJsonValue( + rapidjson::Value& value, rapidjson::Value::AllocatorType& allocator, Backend::WriteCallback writeCallback) + { + RapidJsonValueWriter writer(value, allocator); + return writeCallback(writer); + } + + Visitor::Result VisitRapidJsonValue(const rapidjson::Value& value, Visitor& visitor, Lifetime lifetime) + { + struct EndArrayMarker + { + }; + struct EndObjectMarker + { + }; + + // Processing stack consists of values comprised of one of a: + // - rapidjson::Value to process + // - EndArrayMarker or EndObjectMarker denoting the end of an array or object + // - string denoting a key at the beginning of a key/value pair + using Entry = AZStd::variant; + AZStd::stack entryStack; + AZStd::stack entryCountStack; + entryStack.push(&value); + + while (!entryStack.empty()) + { + const Entry currentEntry = entryStack.top(); + entryStack.pop(); + + Visitor::Result result = AZ::Success(); + + AZStd::visit( + [&visitor, &entryStack, &entryCountStack, &result, lifetime](auto&& arg) + { + using Alternative = AZStd::decay_t; + if constexpr (AZStd::is_same_v) + { + const rapidjson::Value& currentValue = *arg; + if (!entryCountStack.empty()) + { + ++entryCountStack.top(); + } + + switch (currentValue.GetType()) + { + case rapidjson::kNullType: + result = visitor.Null(); + break; + case rapidjson::kFalseType: + result = visitor.Bool(false); + break; + case rapidjson::kTrueType: + result = visitor.Bool(true); + break; + case rapidjson::kObjectType: + entryStack.push(EndObjectMarker{}); + entryCountStack.push(0); + result = visitor.StartObject(); + for (auto it = currentValue.MemberEnd(); it != currentValue.MemberBegin(); --it) + { + auto entry = (it - 1); + const AZStd::string_view key( + entry->name.GetString(), aznumeric_cast(entry->name.GetStringLength())); + entryStack.push(&entry->value); + entryStack.push(key); + } + break; + case rapidjson::kArrayType: + entryStack.push(EndArrayMarker{}); + entryCountStack.push(0); + result = visitor.StartArray(); + for (auto it = currentValue.End(); it != currentValue.Begin(); --it) + { + auto entry = (it - 1); + entryStack.push(entry); + } + break; + case rapidjson::kStringType: + result = visitor.String( + AZStd::string_view(currentValue.GetString(), aznumeric_cast(currentValue.GetStringLength())), + lifetime); + break; + case rapidjson::kNumberType: + if (currentValue.IsFloat() || currentValue.IsDouble()) + { + result = visitor.Double(currentValue.GetDouble()); + } + else if (currentValue.IsInt64() || currentValue.IsInt()) + { + result = visitor.Int64(currentValue.GetInt64()); + } + else + { + result = visitor.Uint64(currentValue.GetUint64()); + } + break; + default: + result = AZ::Failure(VisitorError(VisitorErrorCode::InvalidData, "Value with invalid type specified")); + } + } + else if constexpr (AZStd::is_same_v) + { + result = visitor.EndArray(entryCountStack.top()); + entryCountStack.pop(); + } + else if constexpr (AZStd::is_same_v) + { + result = visitor.EndObject(entryCountStack.top()); + entryCountStack.pop(); + } + else if constexpr (AZStd::is_same_v) + { + if (visitor.SupportsRawKeys()) + { + visitor.RawKey(arg, lifetime); + } + else + { + visitor.Key(AZ::Name(arg)); + } + } + }, + currentEntry); + + if (!result.IsSuccess()) + { + return result; + } + } + + return AZ::Success(); + } +} // namespace AZ::Dom::Json diff --git a/Code/Framework/AzCore/AzCore/DOM/Backends/JSON/JsonSerializationUtils.h b/Code/Framework/AzCore/AzCore/DOM/Backends/JSON/JsonSerializationUtils.h new file mode 100644 index 0000000000..af0955dcfe --- /dev/null +++ b/Code/Framework/AzCore/AzCore/DOM/Backends/JSON/JsonSerializationUtils.h @@ -0,0 +1,256 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace AZ::Dom::Json +{ + //! Specifies how JSON should be formatted when serialized. + enum class OutputFormatting + { + MinifiedJson, //!< Formats JSON in compact minified form, focusing on minimizing output size. + PrettyPrintedJson, //!< Formats JSON in a pretty printed form, focusing on legibility to readers. + }; + + //! Specifies parsing behavior when deserializing JSON. + enum class ParseFlags : int + { + Null = 0, + StopWhenDone = rapidjson::kParseStopWhenDoneFlag, + FullFloatingPointPrecision = rapidjson::kParseFullPrecisionFlag, + ParseComments = rapidjson::kParseCommentsFlag, + ParseNumbersAsStrings = rapidjson::kParseNumbersAsStringsFlag, + ParseTrailingCommas = rapidjson::kParseTrailingCommasFlag, + ParseNanAndInfinity = rapidjson::kParseNanAndInfFlag, + ParseEscapedApostrophies = rapidjson::kParseEscapedApostropheFlag, + }; + + AZ_DEFINE_ENUM_BITWISE_OPERATORS(ParseFlags); + + //! Visitor that feeds into a rapidjson::Value + class RapidJsonValueWriter final : public Visitor + { + public: + RapidJsonValueWriter(rapidjson::Value& outputValue, rapidjson::Value::AllocatorType& allocator); + + VisitorFlags GetVisitorFlags() const override; + Result Null() override; + Result Bool(bool value) override; + Result Int64(AZ::s64 value) override; + Result Uint64(AZ::u64 value) override; + Result Double(double value) override; + + Result String(AZStd::string_view value, Lifetime lifetime) override; + Result StartObject() override; + Result EndObject(AZ::u64 attributeCount) override; + Result Key(AZ::Name key) override; + Result RawKey(AZStd::string_view key, Lifetime lifetime) override; + Result StartArray() override; + Result EndArray(AZ::u64 elementCount) override; + + private: + Result FinishWrite(); + rapidjson::Value& CurrentValue(); + + struct ValueInfo + { + ValueInfo(bool isObject, rapidjson::Value& container); + + rapidjson::Value m_key; + rapidjson::Value m_value; + rapidjson::Value& m_container; + AZ::u64 m_entryCount = 0; + bool m_isObject; + }; + + rapidjson::Value& m_result; + rapidjson::Value::AllocatorType& m_allocator; + AZStd::deque m_entryStack; + }; + + //! Handler for a rapidjson::Reader that translates reads into an AZ::Dom::Visitor + struct RapidJsonReadHandler + { + public: + RapidJsonReadHandler(Visitor* visitor, Lifetime stringLifetime); + + bool Null(); + bool Bool(bool b); + bool Int(int i); + bool Uint(unsigned i); + bool Int64(int64_t i); + bool Uint64(uint64_t i); + bool Double(double d); + bool RawNumber(const char* str, rapidjson::SizeType length, bool copy); + bool String(const char* str, rapidjson::SizeType length, bool copy); + bool StartObject(); + bool Key(const char* str, rapidjson::SizeType length, bool copy); + bool EndObject(rapidjson::SizeType memberCount); + bool StartArray(); + bool EndArray(rapidjson::SizeType elementCount); + Visitor::Result&& TakeOutcome(); + + private: + bool CheckResult(Visitor::Result result); + + Visitor::Result m_outcome; + Visitor* m_visitor; + Lifetime m_stringLifetime; + }; + + //! rapidjson stream wrapper for AZStd::string suitable for in-situ parsing + //! Faster than rapidjson::MemoryStream for reading from AZStd::string / AZStd::string_view (because it requires a null terminator) + //! \note This needs to be inlined for performance reasons. + struct NullDelimitedStringStream + { + using Ch = char; //(buffer.data()); + m_begin = m_cursor; + } + + AZ_FORCE_INLINE char Peek() const + { + return *m_cursor; + } + + AZ_FORCE_INLINE char Take() + { + return *m_cursor++; + } + + AZ_FORCE_INLINE size_t Tell() const + { + return static_cast(m_cursor - m_begin); + } + + AZ_FORCE_INLINE char* PutBegin() + { + m_write = m_cursor; + return m_cursor; + } + + AZ_FORCE_INLINE void Put(char c) + { + (*m_write++) = c; + } + + AZ_FORCE_INLINE void Flush() + { + } + + AZ_FORCE_INLINE size_t PutEnd(char* begin) + { + return m_write - begin; + } + + AZ_FORCE_INLINE const char* Peek4() const + { + AZ_Assert(false, "Not implemented, encoding is hard-coded to UTF-8"); + return m_cursor; + } + + char* m_cursor; //!< Current read position. + char* m_write; //!< Current write position. + const char* m_begin; //!< Head of string. + }; + + //! Creates a Visitor that will write serialized JSON to the specified stream. + //! \param stream The stream the visitor will write to. + //! \param format The format to write in. + //! \return A Visitor that will write to stream when visited. + AZStd::unique_ptr CreateJsonStreamWriter( + AZ::IO::GenericStream& stream, OutputFormatting format = OutputFormatting::PrettyPrintedJson); + //! Reads serialized JSON from a string and applies it to a visitor. + //! \param buffer The UTF-8 serialized JSON to read. + //! \param lifetime Specifies the lifetime of the specified buffer. If the string specified by buffer might be deallocated, + //! ensure Lifetime::Temporary is specified. + //! \param visitor The visitor to visit with the JSON buffer's contents. + //! \param parseFlags (template) Settings for adjusting parser behavior. + //! \return The aggregate result specifying whether the visitor operations were successful. + template + Visitor::Result VisitSerializedJson(AZStd::string_view buffer, Lifetime lifetime, Visitor& visitor); + + //! Reads serialized JSON from a string in-place and applies it to a visitor. + //! \param buffer The UTF-8 serialized JSON to read. This buffer will be modified as part of the deserialization process to + //! apply null terminators. + //! \param visitor The visitor to visit with the JSON buffer's contents. The strings provided to the visitor will only + //! be valid for the lifetime of buffer. + //! \param parseFlags (template) Settings for adjusting parser behavior. + //! \return The aggregate result specifying whether the visitor operations were successful. + template + Visitor::Result VisitSerializedJsonInPlace(char* buffer, Visitor& visitor); + + //! Takes a visitor specified by a callback and produces a rapidjson::Document. + //! \param writeCallback A callback specifying a visitor to accept to build the resulting document. + //! \return An outcome with either the rapidjson::Document or an error message. + AZ::Outcome WriteToRapidJsonDocument(Backend::WriteCallback writeCallback); + //! Takes a visitor specified by a callback and reads them into a rapidjson::Value. + //! \param value The value to read into, its contents will be overridden. + //! \param allocator The allocator to use when performing rapidjson allocations (generally provded by the rapidjson::Document). + //! \param writeCallback A callback specifying a visitor to accept to build the resulting document. + //! \return An outcome with either the rapidjson::Document or an error message. + Visitor::Result WriteToRapidJsonValue( + rapidjson::Value& value, rapidjson::Value::AllocatorType& allocator, Backend::WriteCallback writeCallback); + //! Accepts a visitor with the contents of a rapidjson::Value. + //! \param value The rapidjson::Value to apply to visitor. + //! \param visitor The visitor to receive the contents of value. + //! \param lifetime The lifetime to specify for visiting strings. If the rapidjson::Value might be destroyed or changed + //! before the visitor is finished using these values, Lifetime::Temporary should be specified. + //! \return The aggregate result specifying whether the visitor operations were successful. + Visitor::Result VisitRapidJsonValue(const rapidjson::Value& value, Visitor& visitor, Lifetime lifetime); + + template + Visitor::Result VisitSerializedJson(AZStd::string_view buffer, Lifetime lifetime, Visitor& visitor) + { + rapidjson::Reader reader; + RapidJsonReadHandler handler(&visitor, lifetime); + + // If the string is null terminated, we can use the faster AzStringStream path - otherwise we fall back on rapidjson::MemoryStream + if (buffer.data()[buffer.size()] == '\0') + { + NullDelimitedStringStream stream(buffer); + reader.Parse(parseFlags)>(stream, handler); + } + else + { + rapidjson::MemoryStream stream(buffer.data(), buffer.size()); + reader.Parse(parseFlags)>(stream, handler); + } + return handler.TakeOutcome(); + } + + template + Visitor::Result VisitSerializedJsonInPlace(char* buffer, Visitor& visitor) + { + rapidjson::Reader reader; + NullDelimitedStringStream stream(buffer); + RapidJsonReadHandler handler(&visitor, Lifetime::Persistent); + + reader.Parse(parseFlags) | rapidjson::kParseInsituFlag>(stream, handler); + return handler.TakeOutcome(); + } +} // namespace AZ::Dom::Json diff --git a/Code/Framework/AzCore/AzCore/DOM/DomBackend.cpp b/Code/Framework/AzCore/AzCore/DOM/DomBackend.cpp new file mode 100644 index 0000000000..b29c0be231 --- /dev/null +++ b/Code/Framework/AzCore/AzCore/DOM/DomBackend.cpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +namespace AZ::Dom +{ + Visitor::Result Backend::ReadFromBufferInPlace(char* buffer, AZStd::optional size, Visitor& visitor) + { + return ReadFromBuffer(buffer, size.value_or(strlen(buffer)), AZ::Dom::Lifetime::Persistent, visitor); + } +} // namespace AZ::Dom diff --git a/Code/Framework/AzCore/AzCore/DOM/DomBackend.h b/Code/Framework/AzCore/AzCore/DOM/DomBackend.h new file mode 100644 index 0000000000..2e4ccf8f3e --- /dev/null +++ b/Code/Framework/AzCore/AzCore/DOM/DomBackend.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace AZ::Dom +{ + //! Backends are registered centrally and used to transition DOM formats to and from a textual format. + class Backend + { + public: + virtual ~Backend() = default; + + //! Attempt to read this format from the given buffer into the target Visitor. + virtual Visitor::Result ReadFromBuffer( + const char* buffer, size_t size, AZ::Dom::Lifetime lifetime, Visitor& visitor) = 0; + //! Attempt to read this format from a mutable string into the target Visitor. This enables some backends to + //! parse without making additional string allocations. + //! This string must be null terminated. + //! This string may be modified and read in place without being copied, so when calling this please ensure that: + //! - The string won't be deallocated until the visitor no longer needs the values and + //! - The string is safe to modify in place. + //! The base implementation simply calls ReadFromBuffer. + virtual Visitor::Result ReadFromBufferInPlace(char* buffer, AZStd::optional size, Visitor& visitor); + + //! A callback that accepts a Visitor, making DOM calls to inform the serializer, and returns an + //! aggregate error code to indicate whether or not the operation succeeded. + using WriteCallback = AZStd::function; + //! Attempt to write a value to the specified string using a write callback. + virtual Visitor::Result WriteToBuffer(AZStd::string& buffer, WriteCallback callback) = 0; + }; +} // namespace AZ::Dom diff --git a/Code/Framework/AzCore/AzCore/DOM/DomUtils.cpp b/Code/Framework/AzCore/AzCore/DOM/DomUtils.cpp new file mode 100644 index 0000000000..9751b9cecc --- /dev/null +++ b/Code/Framework/AzCore/AzCore/DOM/DomUtils.cpp @@ -0,0 +1,24 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +#include + +namespace AZ::Dom::Utils +{ + Visitor::Result ReadFromString(Backend& backend, AZStd::string_view string, AZ::Dom::Lifetime lifetime, Visitor& visitor) + { + return backend.ReadFromBuffer(string.data(), string.length(), lifetime, visitor); + } + + Visitor::Result ReadFromStringInPlace(Backend& backend, AZStd::string& string, Visitor& visitor) + { + return backend.ReadFromBufferInPlace(string.data(), string.size(), visitor); + } +} diff --git a/Code/Framework/AzCore/AzCore/DOM/DomUtils.h b/Code/Framework/AzCore/AzCore/DOM/DomUtils.h new file mode 100644 index 0000000000..84a6eb5687 --- /dev/null +++ b/Code/Framework/AzCore/AzCore/DOM/DomUtils.h @@ -0,0 +1,17 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include + +namespace AZ::Dom::Utils +{ + Visitor::Result ReadFromString(Backend& backend, AZStd::string_view string, AZ::Dom::Lifetime lifetime, Visitor& visitor); + Visitor::Result ReadFromStringInPlace(Backend& backend, AZStd::string& string, Visitor& visitor); +} // namespace AZ::Dom::Utils diff --git a/Code/Framework/AzCore/AzCore/DOM/DomVisitor.cpp b/Code/Framework/AzCore/AzCore/DOM/DomVisitor.cpp index 5d66bb6ac5..ad314da385 100644 --- a/Code/Framework/AzCore/AzCore/DOM/DomVisitor.cpp +++ b/Code/Framework/AzCore/AzCore/DOM/DomVisitor.cpp @@ -8,7 +8,7 @@ #include -namespace AZ::DOM +namespace AZ::Dom { const char* VisitorError::CodeToString(VisitorErrorCode code) { @@ -236,4 +236,4 @@ namespace AZ::DOM { return (GetVisitorFlags() & VisitorFlags::SupportsOpaqueValues) != VisitorFlags::Null; } -} // namespace AZ::DOM +} // namespace AZ::Dom diff --git a/Code/Framework/AzCore/AzCore/DOM/DomVisitor.h b/Code/Framework/AzCore/AzCore/DOM/DomVisitor.h index 584cfce4ed..bbe78131c3 100644 --- a/Code/Framework/AzCore/AzCore/DOM/DomVisitor.h +++ b/Code/Framework/AzCore/AzCore/DOM/DomVisitor.h @@ -13,11 +13,11 @@ #include #include -namespace AZ::DOM +namespace AZ::Dom { // // Lifetime enum - // + // //! Specifies the period in which a reference value will still be alive and safe to read. enum class Lifetime { @@ -30,7 +30,7 @@ namespace AZ::DOM // // VisitorErrorCode enum - // + // //! Error code specifying the reason a Visitor operation failed. enum class VisitorErrorCode { @@ -75,7 +75,7 @@ namespace AZ::DOM }; //! A type alias for opaque DOM types that aren't meant to be serializable. - //! /see VisitorInterface::OpaqueValue + //! \see VisitorInterface::OpaqueValue using OpaqueType = AZStd::any; // @@ -116,7 +116,7 @@ namespace AZ::DOM //! - \ref Double: 64 bit double precision float //! - \ref Null: sentinel "empty" type with no value representation //! - \ref String: UTF8 encoded string - //! - \ref Object: an ordered container of key/value pairs where keys are AZ::Names and values may be any DOM type + //! - \ref Object: an ordered container of key/value pairs where keys are \ref AZ::Name and values may be any DOM type //! (including Object) //! - \ref Array: an ordered container of values, in which values are any DOM value type (including Array) //! - \ref Node: a container @@ -144,17 +144,17 @@ namespace AZ::DOM //! Raw (\see VisitorFlags::SupportsRawValues) and opaque values (\see VisitorFlags::SupportsOpaqueValues) //! are disallowed by default, as their handling is intended to be implementation-specific. virtual VisitorFlags GetVisitorFlags() const; - //! /see VisitorFlags::SupportsRawValues + //! \see VisitorFlags::SupportsRawValues bool SupportsRawValues() const; - //! /see VisitorFlags::SupportsRawKeys + //! \see VisitorFlags::SupportsRawKeys bool SupportsRawKeys() const; - //! /see VisitorFlags::SupportsObjects + //! \see VisitorFlags::SupportsObjects bool SupportsObjects() const; - //! /see VisitorFlags::SupportsArrays + //! \see VisitorFlags::SupportsArrays bool SupportsArrays() const; - //! /see VisitorFlags::SupportsNodes + //! \see VisitorFlags::SupportsNodes bool SupportsNodes() const; - //! /see VisitorFlags::SupportsOpaqueValues + //! \see VisitorFlags::SupportsOpaqueValues bool SupportsOpaqueValues() const; //! Operates on an empty null value. @@ -231,7 +231,8 @@ namespace AZ::DOM static Result VisitorFailure(VisitorErrorCode code, AZStd::string additionalInfo); //! Helper method, constructs a failure \ref Result with the specified error. static Result VisitorFailure(VisitorError error); + //! Helper method, constructs a success \ref Result. static Result VisitorSuccess(); }; -} // namespace AZ::DOM +} // namespace AZ::Dom diff --git a/Code/Framework/AzCore/AzCore/Debug/AssetTracking.cpp b/Code/Framework/AzCore/AzCore/Debug/AssetTracking.cpp deleted file mode 100644 index c03b75d118..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/AssetTracking.cpp +++ /dev/null @@ -1,326 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "AssetTracking.h" - -#include -#include -#include -#include -#include - -namespace AZ::Debug -{ - namespace - { - struct AssetTreeNode; - - // Per-thread data that needs to be stored. - struct ThreadData - { - AZStd::vector m_currentAssetStack; - }; - - // Access thread data through a virtual function to ensure that the same thread-local data is being shared across DLLs. - // Otherwise, the thread_local variables are replicated across DLLs that link the AzCore library, and you'll get a - // different version in each module. - class ThreadDataProvider - { - public: - virtual ThreadData& GetThreadData() = 0; - }; - } - - class AssetTrackingImpl final : - public ThreadDataProvider - { - public: - AZ_TYPE_INFO(AssetTrackingImpl, "{01E2A099-3523-40BE-80E0-E0ADD861BEE1}"); - AZ_CLASS_ALLOCATOR(AssetTrackingImpl, OSAllocator, 0); - - AssetTrackingImpl(AssetTreeBase* assetTree, AssetAllocationTableBase* allocationTable); - ~AssetTrackingImpl(); - - void AssetBegin(const char* id, const char* file, int line); - void AssetAttach(void* otherAllocation, const char* file, int line); - void AssetEnd(); - - ThreadData& GetThreadData() override; - - private: - static EnvironmentVariable& GetEnvironmentVariable(); - static AssetTrackingImpl* GetSharedInstance(); - static ThreadData& GetSharedThreadData(); - - using PrimaryAssets = AZStd::unordered_map, AZStd::equal_to, AZStdAssetTrackingAllocator>; - using ThreadData = ThreadData; - using mutex_type = AZStd::mutex; - using lock_type = AZStd::lock_guard; - - mutex_type m_mutex; - PrimaryAssets m_primaryAssets; - AssetTreeNodeBase* m_assetRoot = nullptr; - AssetAllocationTableBase* m_allocationTable = nullptr; - bool m_performingAnalysis = false; - - friend class AssetTracking; - friend class AssetTracking::Scope; - }; - - -/////////////////////////////////////////////////////////////////////////////// -// AssetTrackingImpl methods -/////////////////////////////////////////////////////////////////////////////// - - AssetTrackingImpl::AssetTrackingImpl(AssetTreeBase* assetTree, AssetAllocationTableBase* allocationTable) : - m_assetRoot(&assetTree->GetRoot()), - m_allocationTable(allocationTable) - { - AZ_Assert(!GetSharedInstance(), "Only one AssetTrackingImpl can exist!"); - - GetEnvironmentVariable().Set(this); - AllocatorManager::Instance().EnterProfilingMode(); - } - - AssetTrackingImpl::~AssetTrackingImpl() - { - AllocatorManager::Instance().ExitProfilingMode(); - GetEnvironmentVariable().Reset(); - } - - void AssetTrackingImpl::AssetBegin(const char* id, const char* file, int line) - { - // In the future it may be desirable to organize assets based on where in code the asset was entered into. - // For now these are ignored. - AZ_UNUSED(file); - AZ_UNUSED(line); - - using namespace Internal; - - AssetTrackingId assetId(id); - auto& threadData = GetSharedThreadData(); - AssetTreeNodeBase* parentAsset = threadData.m_currentAssetStack.empty() ? nullptr : threadData.m_currentAssetStack.back(); - AssetTreeNodeBase* childAsset; - AssetPrimaryInfo* assetPrimaryInfo; - - if (!parentAsset) - { - parentAsset = m_assetRoot; - } - - { - lock_type lock(m_mutex); - - // Locate or create the primary record for this asset - auto primaryItr = m_primaryAssets.find(assetId); - - if (primaryItr != m_primaryAssets.end()) - { - assetPrimaryInfo = &primaryItr->second; - } - else - { - auto insertResult = m_primaryAssets.emplace(assetId, AssetPrimaryInfo()); - assetPrimaryInfo = &insertResult.first->second; - assetPrimaryInfo->m_id = &insertResult.first->first; - } - - // Add this asset to the stack for this thread's context - childAsset = parentAsset->FindOrAddChild(assetId, assetPrimaryInfo); - } - - threadData.m_currentAssetStack.push_back(childAsset); - } - - void AssetTrackingImpl::AssetAttach(void* otherAllocation, const char* file, int line) - { - AZ_UNUSED(file); - AZ_UNUSED(line); - - using namespace Internal; - - AssetTreeNodeBase* assetInfo = m_allocationTable->FindAllocation(otherAllocation); - - // We will push back a nullptr if there is no asset, this is necessary to balance the call to AssetEnd() - GetSharedThreadData().m_currentAssetStack.push_back(assetInfo); - } - - void AssetTrackingImpl::AssetEnd() - { - AZ_Assert(!GetSharedThreadData().m_currentAssetStack.empty(), "AssetEnd() called without matching AssetBegin() or AssetAttach. Use the AZ_ASSET_NAMED_SCOPE and AZ_ASSET_ATTACH_TO_SCOPE macros to avoid this!"); - GetSharedThreadData().m_currentAssetStack.pop_back(); - } - - AssetTrackingImpl* AssetTrackingImpl::GetSharedInstance() - { - auto environmentVariable = GetEnvironmentVariable(); - - if(environmentVariable) - { - return *environmentVariable; - } - - return nullptr; - } - - ThreadData& AssetTrackingImpl::GetSharedThreadData() - { - // Cast to the base type so our virtual call doesn't get optimized away. We require GetThreadData() to be executed in the same DLL every time. - return static_cast(GetSharedInstance())->GetThreadData(); - } - - AssetTrackingImpl::ThreadData& AssetTrackingImpl::GetThreadData() - { - static thread_local ThreadData* data = nullptr; - static thread_local typename AZStd::aligned_storage_t storage; - - if (!data) - { - data = new (&storage) ThreadData; - } - - return *data; - } - - EnvironmentVariable& AssetTrackingImpl::GetEnvironmentVariable() - { - static EnvironmentVariable assetTrackingImpl = Environment::CreateVariable(AzTypeInfo::Name()); - - return assetTrackingImpl; - } - - /////////////////////////////////////////////////////////////////////////////// - // AssetTracking::Scope functions - /////////////////////////////////////////////////////////////////////////////// - - AssetTracking::Scope AssetTracking::Scope::ScopeFromAssetId(const char* file, int line, const char* fmt, ...) - { - if (auto impl = AssetTrackingImpl::GetSharedInstance()) - { - static const int BUFFER_SIZE = 1024; - - char buffer[BUFFER_SIZE]; - va_list args; - va_start(args, fmt); - azvsnprintf(buffer, BUFFER_SIZE, fmt, args); - va_end(args); - - impl->AssetBegin(buffer, file, line); - } - - return Scope(); - } - - AssetTracking::Scope AssetTracking::Scope::ScopeFromAttachment(void* attachTo, const char* file, int line) - { - if (auto impl = AssetTrackingImpl::GetSharedInstance()) - { - impl->AssetAttach(attachTo, file, line); - } - - return Scope(); - } - - AssetTracking::Scope::~Scope() - { - if (auto impl = AssetTrackingImpl::GetSharedInstance()) - { - impl->AssetEnd(); - } - } - - AssetTracking::Scope::Scope() - { - } - - /////////////////////////////////////////////////////////////////////////////// - // AssetTracking functions - /////////////////////////////////////////////////////////////////////////////// - - void AssetTracking::EnterScopeByAssetId(const char* file, int line, const char* fmt, ...) - { - if (auto impl = AssetTrackingImpl::GetSharedInstance()) - { - static const int BUFFER_SIZE = 1024; - - char buffer[BUFFER_SIZE]; - va_list args; - va_start(args, fmt); - azvsnprintf(buffer, BUFFER_SIZE, fmt, args); - va_end(args); - - impl->AssetBegin(buffer, file, line); - } - } - - void AssetTracking::EnterScopeByAttachment(void* attachTo, const char* file, int line) - { - if (auto impl = AssetTrackingImpl::GetSharedInstance()) - { - impl->AssetAttach(attachTo, file, line); - } - } - - void AssetTracking::ExitScope() - { - if (auto impl = AssetTrackingImpl::GetSharedInstance()) - { - impl->AssetEnd(); - } - } - - const char* AssetTracking::GetDebugScope() - { - // Output debug information about the current asset scope in the current thread. - // Do not use in production code. -#ifndef RELEASE - static const int BUFFER_SIZE = 1024; - static char buffer[BUFFER_SIZE]; - const auto& assetStack = AssetTrackingImpl::GetSharedInstance()->GetThreadData().m_currentAssetStack; - - if (assetStack.empty()) - { - azsnprintf(buffer, BUFFER_SIZE, ""); - } - else - { - char* pos = buffer; - for (auto itr = assetStack.rbegin(); itr != assetStack.rend(); ++itr) - { - pos += azsnprintf(pos, BUFFER_SIZE - (pos - buffer), "%s\n", (*itr)->GetAssetPrimaryInfo()->m_id->m_id.c_str()); - - if (pos >= buffer + BUFFER_SIZE) - { - break; - } - } - } - - return buffer; -#else - return ""; -#endif - } - - AssetTracking::AssetTracking(AssetTreeBase* assetTree, AssetAllocationTableBase* allocationTable) - { - m_impl.reset(aznew AssetTrackingImpl(assetTree, allocationTable)); - } - - AssetTracking::~AssetTracking() - { - } - - AssetTreeNodeBase* AssetTracking::GetCurrentThreadAsset() const - { - const auto& assetStack = m_impl->GetThreadData().m_currentAssetStack; - AssetTreeNodeBase* result = assetStack.empty() ? nullptr : assetStack.back(); - - return result; - } -} // namespace AzFramework diff --git a/Code/Framework/AzCore/AzCore/Debug/AssetTracking.h b/Code/Framework/AzCore/AzCore/Debug/AssetTracking.h deleted file mode 100644 index 615634c05a..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/AssetTracking.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include - -#ifndef AZ_TRACK_ASSET_SCOPES -// You may manually uncomment this to enable asset tracking. -//# define AZ_TRACK_ASSET_SCOPES -#endif - -#if !defined(AZ_TRACK_ASSET_SCOPES) -// Default to enabling asset tracking when memory tracking is enabled -# define AZ_TRACK_ASSET_SCOPES -#endif - - -#ifdef AZ_TRACK_ASSET_SCOPES -#define AZ_ASSET_SCOPE_VARIABLE_NAME(line) AZ_JOIN(_az_assettracking_scope_, line) - -/////////////////////////////////////////////////////////////////////////////// -// Preferred macros to use at the top of a scope you want to to track asset memory for. -/////////////////////////////////////////////////////////////////////////////// - -// Creates a new scope with a name, usually the name of an asset being loaded. (This may be a format-string, e.g. "Foo: %s", bar.c_str()) -# define AZ_ASSET_NAMED_SCOPE(...) AZ::Debug::AssetTracking::Scope AZ_ASSET_SCOPE_VARIABLE_NAME(__LINE__) (AZ::Debug::AssetTracking::Scope::ScopeFromAssetId(__FILE__, __LINE__, __VA_ARGS__)) - -// Attempts to enter an existing scope that already owns some other allocation. -# define AZ_ASSET_ATTACH_TO_SCOPE(other) AZ::Debug::AssetTracking::Scope AZ_ASSET_SCOPE_VARIABLE_NAME(__LINE__) (AZ::Debug::AssetTracking::Scope::ScopeFromAttachment((other), __FILE__, __LINE__)) - -/////////////////////////////////////////////////////////////////////////////// -// Optional macros to manually enter and exit a scope. -// It is the responsibility of the user to make sure every call to AZ_ASSET_ENTER_SCOPE_* is matched by a corresponding call to AZ_ASSET_EXIT_SCOPE. -/////////////////////////////////////////////////////////////////////////////// -# define AZ_ASSET_ENTER_SCOPE_BY_ASSET_ID(...) AZ::Debug::AssetTracking::EnterScopeByAssetId(__FILE__, __LINE__, __VA_ARGS__) -# define AZ_ASSET_ENTER_SCOPE_BY_ATTACHMENT(other) AZ::Debug::AssetTracking::EnterScopeByAttachment((other), __FILE__, __LINE__) -# define AZ_ASSET_EXIT_SCOPE AZ::Debug::AssetTracking::ExitScope() - -#else -# define AZ_ASSET_NAMED_SCOPE(...) (void)0 -# define AZ_ASSET_ATTACH_TO_SCOPE(other) (void)0 - -# define AZ_ASSET_ENTER_SCOPE_BY_ASSET_ID(...) (void)0 -# define AZ_ASSET_ENTER_SCOPE_BY_ATTACHMENT(other) (void)0 -# define AZ_ASSET_EXIT_SCOPE (void)0 - -#endif - -namespace AZ -{ - class ReflectContext; - - namespace Debug - { - class AssetTrackingImpl; - class AssetTreeBase; - class AssetTreeNodeBase; - class AssetAllocationTableBase; - - class AssetTracking - { - public: - AZ_TYPE_INFO(AssetTracking, "{D4335180-09A2-415A-8B50-9B734E7CE1E6}"); - AZ_CLASS_ALLOCATOR(AssetTracking, OSAllocator, 0); - - // Provide RAII method for entering and exiting scopes. - // Generally you will want to use the macros at the top of this file rather than instantiating this object directly. - class Scope - { - public: - static Scope ScopeFromAssetId(const char* file, int line, const char* fmt, ...); - static Scope ScopeFromAttachment(void* attachTo, const char* file, int line); - - Scope(Scope&&) = default; - ~Scope(); - - private: - Scope(); - }; - - // Generally you will want to use the macros at the top of this file rather than calling these functions directly. - static void EnterScopeByAssetId(const char* file, int line, const char* fmt, ...); - static void EnterScopeByAttachment(void* attachTo, const char* file, int line); - static void ExitScope(); - static const char* GetDebugScope(); - - AssetTracking(AssetTreeBase* assetTree, AssetAllocationTableBase* allocationTable); - ~AssetTracking(); - - AssetTreeNodeBase* GetCurrentThreadAsset() const; - - private: - AZStd::unique_ptr m_impl; - }; - - // An EBus processing policy that attempts to attach to an existing scope before calling a handler. - // - // Use this on EBuses where you want the callees to track asset memory during their event handlers. - // This will work so long as the callees were themselves allocated inside an existing asset scope. - // - // May be added to an existing EBus with the following code: - // using EventProcessingPolicy = Debug::AssetTrackingEventProcessingPolicy; - // - template - struct AssetTrackingEventProcessingPolicy - { - template - static void CallResult(Results& results, Function&& func, Interface&& iface, InputArgs&&... args) - { - AZ_ASSET_ATTACH_TO_SCOPE(iface); - Parent::CallResult(results, AZStd::forward(func), AZStd::forward(iface), AZStd::forward(args)...); - } - - template - static void Call(Function&& func, Interface&& iface, InputArgs&&... args) - { - AZ_ASSET_ATTACH_TO_SCOPE(iface); - Parent::Call(AZStd::forward(func), AZStd::forward(iface), AZStd::forward(args)...); - } - }; - } - -} // namespace AzFramework diff --git a/Code/Framework/AzCore/AzCore/Debug/AssetTrackingTypes.h b/Code/Framework/AzCore/AzCore/Debug/AssetTrackingTypes.h deleted file mode 100644 index f538c516c3..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/AssetTrackingTypes.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include - -namespace AZ -{ - namespace Debug - { - struct AssetTrackingId; - } -} - -namespace AZStd -{ - // Declare hash specializations for types that need them; implementations will have to come after the classes are fully defined - template<> - struct hash - { - size_t operator()(const AZ::Debug::AssetTrackingId& id) const; - }; -} - -namespace AZ -{ - namespace Debug - { - class AssetTrackingImpl; - - // Custom allocator for the Analyzer that doesn't go through profiling tools and cannot be overridden - class AssetTrackingAllocator : public AZ::SimpleSchemaAllocator - { - public: - AZ_TYPE_INFO(AssetTrackingAllocator, "{F6C08E92-559C-4153-9620-6A8491F78F10}"); - - using Base = AZ::SimpleSchemaAllocator; - using Descriptor = Base::Descriptor; - - AssetTrackingAllocator() - : Base("AssetTrackingAllocator", "Allocator for the AssetTracking") - { - DisableOverriding(); - } - }; - - using AZStdAssetTrackingAllocator = AZ::AZStdAlloc; - using AssetTrackingString = AZStd::basic_string, AZStdAssetTrackingAllocator>; - - template - using AssetTrackingMap = AZStd::unordered_map, AZStd::equal_to, AZStdAssetTrackingAllocator>; - - - // ID for an asset that is hashable. - // Currently only contains one string identifier, but we may want to store a more sophisticated ID in the future. - struct AssetTrackingId - { - AssetTrackingId(const char* id) : m_id(id) - { - } - - bool operator==(const AssetTrackingId& other) const - { - return m_id == other.m_id; - } - - AssetTrackingString m_id; - }; - - // Primary information about an asset. - // Currently just contains the ID of the asset, but in the future may carry additional information about that asset (such as where in code it was initialized). - struct AssetPrimaryInfo - { - const AssetTrackingId* m_id; - }; - - // Base class for a node in the asset tree. Implemented by the template AssetTreeNode<>. - class AssetTreeNodeBase - { - public: - virtual ~AssetTreeNodeBase() = default; - virtual const AssetPrimaryInfo* GetAssetPrimaryInfo() const = 0; - virtual AssetTreeNodeBase* FindOrAddChild(const AssetTrackingId& id, const AssetPrimaryInfo* info) = 0; - }; - - // Base class for an asset tree. Implemented by the template AssetTree<>. - class AssetTreeBase - { - public: - virtual ~AssetTreeBase() = default; - virtual AssetTreeNodeBase& GetRoot() = 0; - }; - - // Base class for an asset allocation table. Implemented by the template AssetAllocationTable<>. - class AssetAllocationTableBase - { - public: - virtual ~AssetAllocationTableBase() = default; - virtual AssetTreeNodeBase* FindAllocation(void* ptr) const = 0; - }; - } -} - -/////////////////////////////////////////////////////////////////////////////// -// Hash functions for map support -/////////////////////////////////////////////////////////////////////////////// - -inline size_t AZStd::hash::operator()(const AZ::Debug::AssetTrackingId& info) const -{ - return AZStd::hash()(info.m_id); -} - diff --git a/Code/Framework/AzCore/AzCore/Debug/AssetTrackingTypesImpl.h b/Code/Framework/AzCore/AzCore/Debug/AssetTrackingTypesImpl.h deleted file mode 100644 index eac809c406..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/AssetTrackingTypesImpl.h +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -#include - -namespace AZ -{ - namespace Debug - { - // A node in the current asset state tree. - // Each thread maintains a stack of currently in-scope assets. As this stack changes the asset tree forms. - // The same asset may appear in multiple places in the tree, e.g. if asset A is a common asset loaded by both asset B and asset C, the tree may look like: - // Root -> B -> A - // \--> C -> A - template - class AssetTreeNode : public AssetTreeNodeBase - { - public: - AssetTreeNode(const AssetPrimaryInfo* primaryInfo = nullptr, AssetTreeNode* parent = nullptr) : - m_primaryinfo(primaryInfo), - m_parent(parent) - { - } - - ~AssetTreeNode() override = default; - - const AssetPrimaryInfo* GetAssetPrimaryInfo() const override - { - return m_primaryinfo; - } - - AssetTreeNodeBase* FindOrAddChild(const AssetTrackingId& id, const AssetPrimaryInfo* info) override - { - AssetTreeNodeBase* result = nullptr; - auto childItr = m_children.find(id); - - if (childItr != m_children.end()) - { - result = &childItr->second; - } - else - { - auto childResult = m_children.emplace(id, AssetTreeNode(info, this)); - result = &childResult.first->second; - } - - return result; - } - - - using AssetMap = AssetTrackingMap; - - const AssetPrimaryInfo* m_primaryinfo; - AssetTreeNode* m_parent; - AssetMap m_children; - AssetDataT m_data; - }; - - template - class AssetTree : public AssetTreeBase - { - public: - ~AssetTree() override = default; - - AssetTreeNodeBase& GetRoot() override - { - return m_rootAssets; - } - - using NodeType = AssetTreeNode; - - NodeType m_rootAssets; - }; - - - template - struct AllocationRecord - { - AssetTreeNodeBase* m_asset; - uint32_t m_size; - AllocationDataT m_data; - }; - - - template - class AllocationTable : public AssetAllocationTableBase - { - public: - using RecordType = AllocationRecord; - using AllocationReverseMap = AZStd::map, AZStdAssetTrackingAllocator>; - using mutex_type = AZStd::mutex; - using lock_type = AZStd::lock_guard; - - AllocationTable(mutex_type& mutex) : m_mutex(mutex) - { - } - ~AllocationTable() override = default; - - AssetTreeNodeBase* FindAllocation(void* ptr) const override - { - // Note that ptr is not guaranteed to have an exact entry in the map. For instance, ptr may point to a member of the original object that was allocated, or - // ptr may be a different "this" pointer in the case of multiple inheritance. - // - // To solve this, we use lower_bound() and check to see if ptr falls in the range of the nearest allocation. Our map uses AZStd::greater instead of - // AZStd::less as its sorting function, and thus sorts largest-to-smallest instead of smallest-to-largest. This causes lower_bound() to return the first - // iterator that is not greater than otherAllocation, i.e. less than or equal to ptr. - lock_type lock(m_mutex); - auto itr = m_allocationTable.lower_bound(ptr); - AssetTreeNodeBase* result = nullptr; - - if (itr != m_allocationTable.end()) - { - // Check if otherAllocation is within the size range of the allocation we found - if (reinterpret_cast(ptr) <= reinterpret_cast(itr->first) + itr->second.m_size) - { - result = itr->second.m_asset; - } - } - - return result; - } - - void ReallocateAllocation(void* prevAddress, void* newAddress, size_t newByteSize) - { - lock_type lock(m_mutex); - auto itr = m_allocationTable.find(prevAddress); - - if (itr != m_allocationTable.end()) - { - RecordType newAllocation = itr->second; - newAllocation.m_size = (uint32_t)newByteSize; - - m_allocationTable.erase(itr); - m_allocationTable.emplace(newAddress, AZStd::move(newAllocation)); - } - } - - void ResizeAllocation(void* address, size_t newSize) - { - // Resize an existing allocation if we can find it - lock_type lock(m_mutex); - auto itr = m_allocationTable.find(address); - - if (itr != m_allocationTable.end()) - { - itr->second.m_size = (uint32_t)newSize; - } - } - - AllocationReverseMap& Get() - { - return m_allocationTable; - } - - const AllocationReverseMap& Get() const - { - return m_allocationTable; - } - - private: - AllocationReverseMap m_allocationTable; - mutex_type& m_mutex; - }; - } -} diff --git a/Code/Framework/AzCore/AzCore/Debug/EventTrace.cpp b/Code/Framework/AzCore/AzCore/Debug/EventTrace.cpp deleted file mode 100644 index 58fa1f6cca..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/EventTrace.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include -#include -#include - -namespace AZ::Debug -{ - EventTrace::ScopedSlice::ScopedSlice(const char* name, const char* category) - : m_Name(name) - , m_Category(category) - , m_Time(AZStd::GetTimeNowMicroSecond()) - { - } - - EventTrace::ScopedSlice::~ScopedSlice() - { - EventTraceDrillerBus::TryQueueBroadcast( - &EventTraceDrillerInterface::RecordSlice, m_Name, m_Category, AZStd::this_thread::get_id(), m_Time, - (uint32_t)(AZStd::GetTimeNowMicroSecond() - m_Time)); - } -} // namespace AZ::Debug diff --git a/Code/Framework/AzCore/AzCore/Debug/EventTrace.h b/Code/Framework/AzCore/AzCore/Debug/EventTrace.h deleted file mode 100644 index 1bc7ee20a6..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/EventTrace.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include - -namespace AZStd -{ - struct thread_id; -} - -namespace AZ -{ - namespace Debug - { - namespace EventTrace - { - class ScopedSlice - { - public: - ScopedSlice(const char* name, const char* category); - ~ScopedSlice(); - - private: - const char* m_Name; - const char* m_Category; - u64 m_Time; - }; - } - } -} - -#define AZ_TRACE_METHOD_NAME_CATEGORY(name, category) -#define AZ_TRACE_METHOD_NAME(name) AZ_TRACE_METHOD_NAME_CATEGORY(name, "") -#define AZ_TRACE_METHOD() AZ_TRACE_METHOD_NAME(AZ_FUNCTION_SIGNATURE) diff --git a/Code/Framework/AzCore/AzCore/Debug/EventTraceDriller.cpp b/Code/Framework/AzCore/AzCore/Debug/EventTraceDriller.cpp deleted file mode 100644 index d0722616f3..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/EventTraceDriller.cpp +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include -#include -#include - -namespace AZ::Debug -{ - namespace Crc - { - constexpr u32 EventTraceDriller = AZ_CRC_CE("EventTraceDriller"); - constexpr u32 Slice = AZ_CRC_CE("Slice"); - constexpr u32 ThreadInfo = AZ_CRC_CE("ThreadInfo"); - constexpr u32 Name = AZ_CRC_CE("Name"); - constexpr u32 Category = AZ_CRC_CE("Category"); - constexpr u32 ThreadId = AZ_CRC_CE("ThreadId"); - constexpr u32 Timestamp = AZ_CRC_CE("Timestamp"); - constexpr u32 Duration = AZ_CRC_CE("Duration"); - constexpr u32 Instant = AZ_CRC_CE("Instant"); - } - - EventTraceDriller::EventTraceDriller() - { - EventTraceDrillerSetupBus::Handler::BusConnect(); - AZStd::ThreadDrillerEventBus::Handler::BusConnect(); - } - - EventTraceDriller::~EventTraceDriller() - { - AZStd::ThreadDrillerEventBus::Handler::BusDisconnect(); - EventTraceDrillerSetupBus::Handler::BusDisconnect(); - } - - void EventTraceDriller::Start(const Param* params, int numParams) - { - (void)params; - (void)numParams; - - EventTraceDrillerBus::Handler::BusConnect(); - TickBus::Handler::BusConnect(); - - EventTraceDrillerBus::AllowFunctionQueuing(true); - } - - void EventTraceDriller::Stop() - { - EventTraceDrillerBus::AllowFunctionQueuing(false); - EventTraceDrillerBus::ClearQueuedEvents(); - - EventTraceDrillerBus::Handler::BusDisconnect(); - TickBus::Handler::BusDisconnect(); - } - - void EventTraceDriller::OnTick(float deltaTime, ScriptTimePoint time) - { - (void)deltaTime; - (void)time; - - AZ_TRACE_METHOD(); - RecordThreads(); - EventTraceDrillerBus::ExecuteQueuedEvents(); - } - - void EventTraceDriller::SetThreadName(const AZStd::thread_id& id, const char* name) - { - AZStd::lock_guard lock(m_ThreadMutex); - m_Threads[(size_t)id.m_id] = ThreadData{ name }; - } - - void EventTraceDriller::OnThreadEnter(const AZStd::thread::id& id, const AZStd::thread_desc* desc) - { - if (desc && desc->m_name) - { - SetThreadName(id, desc->m_name); - } - } - - void EventTraceDriller::OnThreadExit(const AZStd::thread::id& id) - { - AZStd::lock_guard lock(m_ThreadMutex); - m_Threads.erase((size_t)id.m_id); - } - - void EventTraceDriller::RecordThreads() - { - if (!m_output || m_Threads.empty()) - { - return; - } - // Main bus mutex guards m_output. - auto& context = EventTraceDrillerBus::GetOrCreateContext(); - - AZStd::scoped_lock lock(context.m_contextMutex, m_ThreadMutex); - for (const auto& keyValue : m_Threads) - { - m_output->BeginTag(Crc::EventTraceDriller); - m_output->BeginTag(Crc::ThreadInfo); - m_output->Write(Crc::ThreadId, keyValue.first); - m_output->Write(Crc::Name, keyValue.second.name); - m_output->EndTag(Crc::ThreadInfo); - m_output->EndTag(Crc::EventTraceDriller); - } - } - - void EventTraceDriller::RecordSlice( - const char* name, - const char* category, - const AZStd::thread_id threadId, - AZ::u64 timestamp, - AZ::u32 duration) - { - m_output->BeginTag(Crc::EventTraceDriller); - m_output->BeginTag(Crc::Slice); - m_output->Write(Crc::Name, name); - m_output->Write(Crc::Category, category); - m_output->Write(Crc::ThreadId, (size_t)threadId.m_id); - m_output->Write(Crc::Timestamp, timestamp); - m_output->Write(Crc::Duration, std::max(duration, 1u)); - m_output->EndTag(Crc::Slice); - m_output->EndTag(Crc::EventTraceDriller); - } - - void EventTraceDriller::RecordInstantGlobal( - const char* name, - const char* category, - AZ::u64 timestamp) - { - m_output->BeginTag(Crc::EventTraceDriller); - m_output->BeginTag(Crc::Instant); - m_output->Write(Crc::Name, name); - m_output->Write(Crc::Category, category); - m_output->Write(Crc::Timestamp, timestamp); - m_output->EndTag(Crc::Instant); - m_output->EndTag(Crc::EventTraceDriller); - } - - void EventTraceDriller::RecordInstantThread( - const char* name, - const char* category, - const AZStd::thread_id threadId, - AZ::u64 timestamp) - { - m_output->BeginTag(Crc::EventTraceDriller); - m_output->BeginTag(Crc::Instant); - m_output->Write(Crc::Name, name); - m_output->Write(Crc::Category, category); - m_output->Write(Crc::ThreadId, (size_t)threadId.m_id); - m_output->Write(Crc::Timestamp, timestamp); - m_output->EndTag(Crc::Instant); - m_output->EndTag(Crc::EventTraceDriller); - } -} // namespace AZ::Debug diff --git a/Code/Framework/AzCore/AzCore/Debug/EventTraceDriller.h b/Code/Framework/AzCore/AzCore/Debug/EventTraceDriller.h deleted file mode 100644 index fee71147ca..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/EventTraceDriller.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include -#include -#include - -namespace AZ -{ - namespace Debug - { - class EventTraceDriller - : public Driller - , public EventTraceDrillerBus::Handler - , public EventTraceDrillerSetupBus::Handler - , public AZStd::ThreadDrillerEventBus::Handler - , public AZ::TickBus::Handler - { - public: - AZ_CLASS_ALLOCATOR(EventTraceDriller, OSAllocator, 0) - - EventTraceDriller(); - virtual ~EventTraceDriller(); - - private: - // Driller - ////////////////////////////////////////////////////////////////////////// - const char* GroupName() const override { return "SystemDrillers"; } - const char* GetName() const override { return "EventTraceDriller"; } - const char* GetDescription() const override { return "Handles timed events for a Chrome Tracing."; } - void Start(const Param* params = NULL, int numParams = 0) override; - void Stop() override; - - // ThreadBus - ////////////////////////////////////////////////////////////////////////// - void OnThreadEnter(const AZStd::thread::id& id, const AZStd::thread_desc* desc) override; - void OnThreadExit(const AZStd::thread::id& id) override; - - // TickBus - ////////////////////////////////////////////////////////////////////////// - void OnTick(float deltaTime, ScriptTimePoint time) override; - - // EventTraceDrillerSetupBus - ////////////////////////////////////////////////////////////////////////// - void SetThreadName(const AZStd::thread_id& threadId, const char* name) override; - - // EventTraceDrillerBus - ////////////////////////////////////////////////////////////////////////// - void RecordSlice( - const char* name, - const char* category, - const AZStd::thread_id threadId, - AZ::u64 timestamp, - AZ::u32 duration) override; - - void RecordInstantGlobal( - const char* name, - const char* category, - AZ::u64 timestamp) override; - - void RecordInstantThread( - const char* name, - const char* category, - const AZStd::thread_id threadId, - AZ::u64 timestamp) override; - - void RecordThreads(); - - struct ThreadData - { - AZStd::string name; - }; - - AZStd::recursive_mutex m_ThreadMutex; - AZStd::unordered_map, AZStd::equal_to, OSStdAllocator> m_Threads; - }; - } -} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Debug/EventTraceDrillerBus.h b/Code/Framework/AzCore/AzCore/Debug/EventTraceDrillerBus.h deleted file mode 100644 index c588559088..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/EventTraceDrillerBus.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include -#include -#include - -namespace AZStd -{ - struct thread_id; -} - -namespace AZ -{ - namespace Debug - { - class EventTraceDrillerInterface - : public DrillerEBusTraits - { - public: - ////////////////////////////////////////////////////////////////////////// - // EBusTraits overrides - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - static const bool EnableEventQueue = true; - static const bool EventQueueingActiveByDefault = false; - ////////////////////////////////////////////////////////////////////////// - - virtual ~EventTraceDrillerInterface() {} - - virtual void RecordSlice( - const char* name, - const char* category, - const AZStd::thread_id threadId, - AZ::u64 timestamp, - AZ::u32 duration) = 0; - - virtual void RecordInstantThread( - const char* name, - const char* category, - const AZStd::thread_id threadId, - AZ::u64 timestamp) = 0; - - virtual void RecordInstantGlobal( - const char* name, - const char* category, - AZ::u64 timestamp) = 0; - }; - - typedef AZ::EBus EventTraceDrillerBus; - - class EventTraceDrillerSetupInterface - : public DrillerEBusTraits - { - public: - ////////////////////////////////////////////////////////////////////////// - // EBusTraits overrides - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - ////////////////////////////////////////////////////////////////////////// - - virtual ~EventTraceDrillerSetupInterface() {} - - virtual void SetThreadName(const AZStd::thread_id& threadId, const char* name) = 0; - }; - - typedef AZ::EBus EventTraceDrillerSetupBus; - } -} - -#define AZ_TRACE_INSTANT_GLOBAL_CATEGORY(name, category) \ - EBUS_QUEUE_EVENT(AZ::Debug::EventTraceDrillerBus, RecordInstantGlobal, name, category, AZStd::GetTimeNowMicroSecond()) -#define AZ_TRACE_INSTANT_GLOBAL(name) AZ_TRACE_INSTANT_GLOBAL_CATEGORY(name, "") - -#define AZ_TRACE_INSTANT_THREAD_CATEGORY(name, category) \ - EBUS_QUEUE_EVENT(AZ::Debug::EventTraceDrillerBus, RecordInstantThread, name, category, AZStd::this_thread::get_id(), AZStd::GetTimeNowMicroSecond()) -#define AZ_TRACE_INSTANT_THREAD(name) AZ_TRACE_INSTANT_THREAD_CATEGORY(name, "") diff --git a/Code/Framework/AzCore/AzCore/Debug/MemoryProfiler.h b/Code/Framework/AzCore/AzCore/Debug/MemoryProfiler.h index 5b22e20c60..827f00134d 100644 --- a/Code/Framework/AzCore/AzCore/Debug/MemoryProfiler.h +++ b/Code/Framework/AzCore/AzCore/Debug/MemoryProfiler.h @@ -8,7 +8,7 @@ #pragma once #ifndef AZ_PROFILE_MEMORY_ALLOC -// No other profiler has defined the performance markers AZ_PROFILE_MEMORY_ALLOC (and friends), fall back to a Driller implementation (currently empty) +// No other profiler has defined the performance markers AZ_PROFILE_MEMORY_ALLOC (and friends), fall back to current implementation (empty) # define AZ_PROFILE_MEMORY_ALLOC(category, address, size, context) # define AZ_PROFILE_MEMORY_ALLOC_EX(category, filename, lineNumber, address, size, context) # define AZ_PROFILE_MEMORY_FREE(category, address) diff --git a/Code/Framework/AzCore/AzCore/Debug/Trace.cpp b/Code/Framework/AzCore/AzCore/Debug/Trace.cpp index 2c2b8215c0..74f27481c1 100644 --- a/Code/Framework/AzCore/AzCore/Debug/Trace.cpp +++ b/Code/Framework/AzCore/AzCore/Debug/Trace.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include @@ -276,8 +275,6 @@ namespace AZ::Debug logger->Flush(); // Flush as an assert may indicate a crash is imminent. } - EBUS_EVENT(TraceMessageDrillerBus, OnPreAssert, fileName, line, funcName, message); - TraceMessageResult result; EBUS_EVENT_RESULT(result, TraceMessageBus, OnPreAssert, fileName, line, funcName, message); @@ -302,7 +299,6 @@ namespace AZ::Debug azstrcat(message, g_maxMessageLength, "\n"); Output(g_dbgSystemWnd, message); - EBUS_EVENT(TraceMessageDrillerBus, OnAssert, message); EBUS_EVENT_RESULT(result, TraceMessageBus, OnAssert, message); if (result.m_value) { @@ -405,8 +401,6 @@ namespace AZ::Debug logger->RecordStringEvent(ErrorEventId, message); } - EBUS_EVENT(TraceMessageDrillerBus, OnPreError, window, fileName, line, funcName, message); - TraceMessageResult result; EBUS_EVENT_RESULT(result, TraceMessageBus, OnPreError, window, fileName, line, funcName, message); if (result.m_value) @@ -421,7 +415,6 @@ namespace AZ::Debug azstrcat(message, g_maxMessageLength, "\n"); Output(window, message); - EBUS_EVENT(TraceMessageDrillerBus, OnError, window, message); EBUS_EVENT_RESULT(result, TraceMessageBus, OnError, window, message); Output(window, "==================================================================\n"); if (result.m_value) @@ -457,8 +450,6 @@ namespace AZ::Debug logger->RecordStringEvent(WarningEventId, message); } - EBUS_EVENT(TraceMessageDrillerBus, OnPreWarning, window, fileName, line, funcName, message); - TraceMessageResult result; EBUS_EVENT_RESULT(result, TraceMessageBus, OnPreWarning, window, fileName, line, funcName, message); if (result.m_value) @@ -472,7 +463,6 @@ namespace AZ::Debug azstrcat(message, g_maxMessageLength, "\n"); Output(window, message); - EBUS_EVENT(TraceMessageDrillerBus, OnWarning, window, message); EBUS_EVENT_RESULT(result, TraceMessageBus, OnWarning, window, message); Output(window, "==================================================================\n"); } @@ -501,8 +491,6 @@ namespace AZ::Debug logger->RecordStringEvent(PrintfEventId, message); } - EBUS_EVENT(TraceMessageDrillerBus, OnPrintf, window, message); - TraceMessageResult result; EBUS_EVENT_RESULT(result, TraceMessageBus, OnPrintf, window, message); if (result.m_value) @@ -531,7 +519,6 @@ namespace AZ::Debug // only call into Ebusses if we are not in a recursive-exception situation as that // would likely just lead to even more exceptions. - EBUS_EVENT(TraceMessageDrillerBus, OnOutput, window, message); TraceMessageResult result; EBUS_EVENT_RESULT(result, TraceMessageBus, OnOutput, window, message); if (result.m_value) diff --git a/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDriller.cpp b/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDriller.cpp deleted file mode 100644 index dbe66838a4..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDriller.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include - -namespace AZ::Debug -{ - //========================================================================= - // Start - // [2/6/2013] - //========================================================================= - void TraceMessagesDriller::Start(const Param* params, int numParams) - { - (void)params; - (void)numParams; - BusConnect(); - } - - //========================================================================= - // Stop - // [2/6/2013] - //========================================================================= - void TraceMessagesDriller::Stop() - { - BusDisconnect(); - } - - //========================================================================= - // OnAssert - // [2/6/2013] - //========================================================================= - void TraceMessagesDriller::OnAssert(const char* message) - { - // Not sure if we can really capture assert since the code will stop executing very soon. - m_output->BeginTag(AZ_CRC_CE("TraceMessagesDriller")); - m_output->Write(AZ_CRC_CE("OnAssert"), message); - m_output->EndTag(AZ_CRC_CE("TraceMessagesDriller")); - } - - //========================================================================= - // OnException - // [2/6/2013] - //========================================================================= - void TraceMessagesDriller::OnException(const char* message) - { - // Not sure if we can really capture exception since the code will stop executing very soon. - m_output->BeginTag(AZ_CRC_CE("TraceMessagesDriller")); - m_output->Write(AZ_CRC_CE("OnException"), message); - m_output->EndTag(AZ_CRC_CE("TraceMessagesDriller")); - } - - //========================================================================= - // OnError - // [2/6/2013] - //========================================================================= - void TraceMessagesDriller::OnError(const char* window, const char* message) - { - m_output->BeginTag(AZ_CRC_CE("TraceMessagesDriller")); - m_output->BeginTag(AZ_CRC_CE("OnError")); - m_output->Write(AZ_CRC_CE("Window"), window); - m_output->Write(AZ_CRC_CE("Message"), message); - m_output->EndTag(AZ_CRC_CE("OnError")); - m_output->EndTag(AZ_CRC_CE("TraceMessagesDriller")); - } - - //========================================================================= - // OnWarning - // [2/6/2013] - //========================================================================= - void TraceMessagesDriller::OnWarning(const char* window, const char* message) - { - m_output->BeginTag(AZ_CRC_CE("TraceMessagesDriller")); - m_output->BeginTag(AZ_CRC_CE("OnWarning")); - m_output->Write(AZ_CRC_CE("Window"), window); - m_output->Write(AZ_CRC_CE("Message"), message); - m_output->EndTag(AZ_CRC_CE("OnWarning")); - m_output->EndTag(AZ_CRC_CE("TraceMessagesDriller")); - } - - //========================================================================= - // OnPrintf - // [2/6/2013] - //========================================================================= - void TraceMessagesDriller::OnPrintf(const char* window, const char* message) - { - m_output->BeginTag(AZ_CRC_CE("TraceMessagesDriller")); - m_output->BeginTag(AZ_CRC_CE("OnPrintf")); - m_output->Write(AZ_CRC_CE("Window"), window); - m_output->Write(AZ_CRC_CE("Message"), message); - m_output->EndTag(AZ_CRC_CE("OnPrintf")); - m_output->EndTag(AZ_CRC_CE("TraceMessagesDriller")); - } -} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDriller.h b/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDriller.h deleted file mode 100644 index 32726931fc..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDriller.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include - -namespace AZ -{ - namespace Debug - { - /** - * Trace messages driller class - */ - class TraceMessagesDriller - : public Driller - , public TraceMessageDrillerBus::Handler - { - public: - AZ_CLASS_ALLOCATOR(TraceMessagesDriller, OSAllocator, 0) - - protected: - ////////////////////////////////////////////////////////////////////////// - // Driller - const char* GroupName() const override { return "SystemDrillers"; } - const char* GetName() const override { return "TraceMessagesDriller"; } - const char* GetDescription() const override { return "Handles all system messages like Assert, Exception, Error, Warning, Printf, etc."; } - void Start(const Param* params = NULL, int numParams = 0) override; - void Stop() override; - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // TraceMessagesDrillerBus - /// Triggered when a AZ_Assert failed. This is terminating event! (the code will break, crash). - void OnAssert(const char* message) override; - void OnException(const char* message) override; - void OnError(const char* window, const char* message) override; - void OnWarning(const char* window, const char* message) override; - void OnPrintf(const char* window, const char* message) override; - ////////////////////////////////////////////////////////////////////////// - }; - } // namespace Debug -} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDrillerBus.h b/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDrillerBus.h deleted file mode 100644 index 6230f4af21..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDrillerBus.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace AZ -{ - namespace Debug - { - /** - * Trace messages event handle. - * All messages are optional (they have default implementation) and you can handle only one at a time. - * Driller messages are similar to TraceMessages, but do not provide a return value, - * as we only care about collecting driller messages, not operating on them. - * - * We use a driller bus so all messages are sending in exclusive matter no other driller messages - * can be triggered at that moment, so we already preserve the calling order. You can assume - * all access code in the driller framework in guarded. You can manually lock the driller mutex are you - * use by using \ref AZ::Debug::DrillerEBusMutex. - */ - class TraceMessageDrillerEvents - : public DrillerEBusTraits - { - public: - virtual ~TraceMessageDrillerEvents() {} - - /// Triggered when a AZ_Assert failed. This is terminating event! (the code will break, crash). - virtual void OnPreAssert(const char* /*fileName*/, int /*line*/, const char* /*func*/, const char* /*message*/) {} - virtual void OnAssert(const char* /*message*/) {} - virtual void OnException(const char* /*message*/) {} - virtual void OnPreError(const char* /*window*/, const char* /*fileName*/, int /*line*/, const char* /*func*/, const char* /*message*/) {} - virtual void OnError(const char* /*window*/, const char* /*message*/) {} - virtual void OnPreWarning(const char* /*window*/, const char* /*fileName*/, int /*line*/, const char* /*func*/, const char* /*message*/) {} - virtual void OnWarning(const char* /*window*/, const char* /*message*/) {} - virtual void OnPrintf(const char* /*window*/, const char* /*message*/) {} - /** - * All trace functions you output to anything. So if you want to handle all the output this is the place. - * You are not given the choice to disable the system output as if you listen at that level you can't make - * that decision. Otherwise we can trigger an assert without even one line of message send to the console/debugger. - */ - virtual void OnOutput(const char* /*window*/, const char* /*message*/) {} - }; - - typedef AZ::EBus TraceMessageDrillerBus; - } // namespace Debug -} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Driller/DefaultStringPool.h b/Code/Framework/AzCore/AzCore/Driller/DefaultStringPool.h deleted file mode 100644 index 630061f089..0000000000 --- a/Code/Framework/AzCore/AzCore/Driller/DefaultStringPool.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef AZCORE_DRILLER_DEFAULT_STRING_POOL_H -#define AZCORE_DRILLER_DEFAULT_STRING_POOL_H - -#include - -#include -#include - -namespace AZ -{ - namespace Debug - { - template - struct unordered_map - { - typedef AZStd::unordered_map, AZStd::equal_to, OSStdAllocator> type; - }; - - template - struct unordered_set - { - typedef AZStd::unordered_set, AZStd::equal_to, OSStdAllocator> type; - }; - - /** - * Default implementation of a string pool. - */ - class DrillerDefaultStringPool - : public DrillerStringPool - { - public: - virtual ~DrillerDefaultStringPool() - { - Reset(); - } - - typedef unordered_map::type CrcToStringMapType; - typedef unordered_set::type OwnedStringsMapType; - - /** - * Add a copy of the string to the pool. If we return true the string was added otherwise it was already in the bool. - * In both cases the crc32 of the string and the pointer to the shared copy is returned (optional for poolStringAddress)! - */ - virtual bool InsertCopy(const char* string, unsigned int length, AZ::u32& crc32, const char** poolStringAddress = nullptr) - { - crc32 = AZ::Crc32(string, length); - CrcToStringMapType::pair_iter_bool insertIt = m_crcToStringMap.insert_key(crc32); - if (insertIt.second) - { - char* newString = reinterpret_cast(azmalloc(length + 1, 1, AZ::OSAllocator)); - memcpy(newString, string, length); - newString[length] = '\0'; // terminate - m_ownedStrings.insert(newString); - insertIt.first->second = newString; - } - if (poolStringAddress) - { - *poolStringAddress = insertIt.first->second; - } - return insertIt.second; - } - - /** - * Same as the InsertCopy above without actually coping the string into the pool. The pool assumes that - * none of the strings added to the pool will be deleted. - */ - virtual bool Insert(const char* string, unsigned int length, AZ::u32& crc32) - { - crc32 = AZ::Crc32(string, length); - return m_crcToStringMap.insert(AZStd::make_pair(crc32, string)).second; - } - - /// Finds a string in the pool by crc32. - virtual const char* Find(AZ::u32 crc32) - { - CrcToStringMapType::iterator it = m_crcToStringMap.find(crc32); - if (it != m_crcToStringMap.end()) - { - return it->second; - } - return NULL; - } - - virtual void Erase(AZ::u32 crc32) - { - CrcToStringMapType::iterator it = m_crcToStringMap.find(crc32); - if (it != m_crcToStringMap.end()) - { - OwnedStringsMapType::iterator ownerIt = m_ownedStrings.find(it->second); - if (ownerIt != m_ownedStrings.end()) - { - azfree(const_cast(it->second), AZ::OSAllocator); - m_ownedStrings.erase(ownerIt); - } - m_crcToStringMap.erase(it); - } - } - - virtual void Reset() - { - for (OwnedStringsMapType::iterator it = m_ownedStrings.begin(); it != m_ownedStrings.end(); ++it) - { - azfree(const_cast(*it), AZ::OSAllocator); - } - m_crcToStringMap.clear(); - m_ownedStrings.clear(); - } - protected: - CrcToStringMapType m_crcToStringMap; - OwnedStringsMapType m_ownedStrings; - }; - } // namespace Debug -} // namespace AZ - -#endif // AZCORE_DRILLER_DEFAULT_STRING_POOL_H -#pragma once - - diff --git a/Code/Framework/AzCore/AzCore/Driller/Driller.cpp b/Code/Framework/AzCore/AzCore/Driller/Driller.cpp deleted file mode 100644 index 7e986be81e..0000000000 --- a/Code/Framework/AzCore/AzCore/Driller/Driller.cpp +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include - -#include -#include -#include - - -namespace AZ::Debug -{ - class DrillerManagerImpl - : public DrillerManager - { - public: - AZ_CLASS_ALLOCATOR(DrillerManagerImpl, OSAllocator, 0); - - using SessionListType = forward_list::type; - SessionListType m_sessions; - using DrillerArrayType = vector::type; - DrillerArrayType m_drillers; - - ~DrillerManagerImpl() override; - - void Register(Driller* factory) override; - void Unregister(Driller* factory) override; - - void FrameUpdate() override; - - DrillerSession* Start(DrillerOutputStream& output, const DrillerListType& drillerList, int numFrames = -1) override; - void Stop(DrillerSession* session) override; - - int GetNumDrillers() const override { return static_cast(m_drillers.size()); } - Driller* GetDriller(int index) override { return m_drillers[index]; } - }; - - ////////////////////////////////////////////////////////////////////////// - // Driller - - //========================================================================= - // Register - // [3/17/2011] - //========================================================================= - AZ::u32 Driller::GetId() const - { - return AZ::Crc32(GetName()); - } - - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // Driller Manager - - //========================================================================= - // Register - // [3/17/2011] - //========================================================================= - DrillerManager* DrillerManager::Create(/*const Descriptor& desc*/) - { - const bool createAllocator = !AZ::AllocatorInstance::IsReady(); - if (createAllocator) - { - AZ::AllocatorInstance::Create(); - } - - DrillerManagerImpl* impl = aznew DrillerManagerImpl; - impl->m_ownsOSAllocator = createAllocator; - return impl; - } - - //========================================================================= - // Register - // [3/17/2011] - //========================================================================= - void DrillerManager::Destroy(DrillerManager* manager) - { - const bool allocatorCreated = manager->m_ownsOSAllocator; - delete manager; - if (allocatorCreated) - { - AZ::AllocatorInstance::Destroy(); - } - } - - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // DrillerManagerImpl - - //========================================================================= - // ~DrillerManagerImpl - // [3/17/2011] - //========================================================================= - DrillerManagerImpl::~DrillerManagerImpl() - { - while (!m_sessions.empty()) - { - Stop(&m_sessions.front()); - } - - while (!m_drillers.empty()) - { - Driller* driller = m_drillers[0]; - Unregister(driller); - delete driller; - } - } - - //========================================================================= - // Register - // [3/17/2011] - //========================================================================= - void - DrillerManagerImpl::Register(Driller* driller) - { - AZ_Assert(driller, "You must provide a valid factory!"); - for (size_t i = 0; i < m_drillers.size(); ++i) - { - if (m_drillers[i]->GetId() == driller->GetId()) - { - AZ_Error("Debug", false, "Driller with id %08x has already been registered! You can't have two factory instances for the same driller type", driller->GetId()); - return; - } - } - m_drillers.push_back(driller); - } - - //========================================================================= - // Unregister - // [3/17/2011] - //========================================================================= - void - DrillerManagerImpl::Unregister(Driller* driller) - { - AZ_Assert(driller, "You must provide a valid factory!"); - for (DrillerArrayType::iterator iter = m_drillers.begin(); iter != m_drillers.end(); ++iter) - { - if ((*iter)->GetId() == driller->GetId()) - { - m_drillers.erase(iter); - return; - } - } - - AZ_Error("Debug", false, "Failed to find driller factory with id %08x", driller->GetId()); - } - - //========================================================================= - // FrameUpdate - // [3/17/2011] - //========================================================================= - void - DrillerManagerImpl::FrameUpdate() - { - if (m_sessions.empty()) - { - return; - } - - AZStd::lock_guard lock(DrillerEBusMutex::GetMutex()); ///< Make sure no driller is writing to the stream - for (SessionListType::iterator sessionIter = m_sessions.begin(); sessionIter != m_sessions.end(); ) - { - DrillerSession& s = *sessionIter; - - // tick the drillers directly if they care. - for (size_t i = 0; i < s.drillers.size(); ++i) - { - s.drillers[i]->Update(); - } - - s.output->EndTag(AZ_CRC("Frame", 0xb5f83ccd)); - - s.output->OnEndOfFrame(); - - s.curFrame++; - - if (s.numFrames != -1) - { - if (s.curFrame == s.numFrames) - { - Stop(&s); - continue; - } - } - - s.output->BeginTag(AZ_CRC("Frame", 0xb5f83ccd)); - s.output->Write(AZ_CRC("FrameNum", 0x85a1a919), s.curFrame); - - ++sessionIter; - } - } - - //========================================================================= - // Start - // [3/17/2011] - //========================================================================= - DrillerSession* - DrillerManagerImpl::Start(DrillerOutputStream& output, const DrillerListType& drillerList, int numFrames) - { - if (drillerList.empty()) - { - return nullptr; - } - - m_sessions.push_back(); - DrillerSession& s = m_sessions.back(); - s.curFrame = 0; - s.numFrames = numFrames; - s.output = &output; - - s.output->WriteHeader(); // first write the header in the stream - - s.output->BeginTag(AZ_CRC("StartData", 0xecf3f53f)); - s.output->Write(AZ_CRC("Platform", 0x3952d0cb), (unsigned int)g_currentPlatform); - for (DrillerListType::const_iterator iDriller = drillerList.begin(); iDriller != drillerList.end(); ++iDriller) - { - const DrillerInfo& di = *iDriller; - s.output->BeginTag(AZ_CRC("Driller", 0xa6e1fb73)); - s.output->Write(AZ_CRC("Name", 0x5e237e06), di.id); - for (int iParam = 0; iParam < (int)di.params.size(); ++iParam) - { - s.output->BeginTag(AZ_CRC("Param", 0xa4fa7c89)); - s.output->Write(AZ_CRC("Name", 0x5e237e06), di.params[iParam].name); - s.output->Write(AZ_CRC("Description", 0x6de44026), di.params[iParam].desc); - s.output->Write(AZ_CRC("Type", 0x8cde5729), di.params[iParam].type); - s.output->Write(AZ_CRC("Value", 0x1d775834), di.params[iParam].value); - s.output->EndTag(AZ_CRC("Param", 0xa4fa7c89)); - } - s.output->EndTag(AZ_CRC("Driller", 0xa6e1fb73)); - } - s.output->EndTag(AZ_CRC("StartData", 0xecf3f53f)); - - s.output->BeginTag(AZ_CRC("Frame", 0xb5f83ccd)); - s.output->Write(AZ_CRC("FrameNum", 0x85a1a919), s.curFrame); - - { - AZStd::lock_guard lock(DrillerEBusMutex::GetMutex()); ///< Make sure no driller is writing to the stream - for (DrillerListType::const_iterator iDriller = drillerList.begin(); iDriller != drillerList.end(); ++iDriller) - { - Driller* driller = nullptr; - const DrillerInfo& di = *iDriller; - for (size_t iDesc = 0; iDesc < m_drillers.size(); ++iDesc) - { - if (m_drillers[iDesc]->GetId() == di.id) - { - driller = m_drillers[iDesc]; - AZ_Assert(driller->m_output == nullptr, "Driller with id %08x is already have an output stream %p (currently we support only 1 at a time)", di.id, driller->m_output); - driller->m_output = &output; - driller->Start(di.params.data(), static_cast(di.params.size())); - s.drillers.push_back(driller); - break; - } - } - AZ_Warning("Driller", driller != nullptr, "We can't start a driller with id %d!", di.id); - } - } - return &s; - } - - - //========================================================================= - // Stop - // [3/17/2011] - //========================================================================= - void - DrillerManagerImpl::Stop(DrillerSession* session) - { - SessionListType::iterator iter; - for (iter = m_sessions.begin(); iter != m_sessions.end(); ++iter) - { - if (&*iter == session) - { - break; - } - } - - AZ_Assert(iter != m_sessions.end(), "We did not find session ID 0x%08x in the list!", session); - if (iter != m_sessions.end()) - { - DrillerSession& s = *session; - - { - AZStd::lock_guard lock(DrillerEBusMutex::GetMutex()); - for (size_t i = 0; i < s.drillers.size(); ++i) - { - s.drillers[i]->Stop(); - s.drillers[i]->m_output = nullptr; - } - } - s.output->EndTag(AZ_CRC("Frame", 0xb5f83ccd)); - m_sessions.erase(iter); - } - } -} // namespace AZ::Debug diff --git a/Code/Framework/AzCore/AzCore/Driller/Driller.h b/Code/Framework/AzCore/AzCore/Driller/Driller.h deleted file mode 100644 index bb2178e51f..0000000000 --- a/Code/Framework/AzCore/AzCore/Driller/Driller.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef AZCORE_DRILLER_H -#define AZCORE_DRILLER_H - -#include -namespace AZStd -{ - class mutex; -} -namespace AZ -{ - namespace Debug - { - class DrillerOutputStream; - - /** - * Driller base class. Every driller should inherit from this class. - * When a driller is need to start outputting data - * the DrillerManager will call Driller::Start() so the driller - * can output the initial state for all reported entities. - * The same applies for the Stop. - * Depending on the type of your driller you might choose to collect state - * even before the driller has started. This of course should be a fast as - * possible, as we don't want to burden engine systems and it's highly recommended - * that you use configuration parameters to change that behavior as not all drillers - * are used on a daily basis. - * All drillers should use DebugAllocators (AZ_CLASS_ALLOCATOR(Driller,OSAllocator,0)) - * and they should use 'aznew' to create one, as by default if you don't unregister a - * a driller, the manager will use "delete" to delete them. - * - * IMPORTANT: Driller systems works OUTSIDE engine systems, you should NOT use SystemAllocator or any other engine systems - * as they might be drilled or not available at the moment. - */ - class Driller - { - friend class DrillerManagerImpl; - - public: - struct Param - { - enum Type - { - PT_BOOL, - PT_INT, - PT_FLOAT - }; - const char* desc; - u32 name; - int type; - int value; - }; - - Driller() - : m_output(NULL) {} - virtual ~Driller() {} - - /// Returns the driller ID Crc32 of the name (Crc32(GetName()) - AZ::u32 GetId() const; - /// Driller group name, used only for organizational purpose - virtual const char* GroupName() const = 0; - /// Unique name of the Driller, driller ID is the Crc of the name - virtual const char* GetName() const = 0; - virtual const char* GetDescription() const = 0; - // @{ Managing the list of supported driller parameters. - virtual int GetNumParams() const { return 0; } - virtual const Param* GetParam(int index) const { (void)index; return NULL; } - - protected: - Driller& operator=(const Driller&); - - /// Called by DrillerManager - virtual void Start(const Param* params = NULL, int numParams = 0) { (void)params; (void)numParams; } - /// Called by DrillerManager - virtual void Stop() {} - /// Called every frame by DrillerManger (while the driller is started) - virtual void Update() {} - - DrillerOutputStream* m_output; ///< Session output stream. - }; - - /** - * Stores the information while an active - * driller(s) session is running. - */ - struct DrillerSession - { - int numFrames; - int curFrame; - typedef vector::type DrillerArrayType; - DrillerArrayType drillers; - DrillerOutputStream* output; - }; - - /** - * Driller manager will manage all active driller sessions and driller factories. Generally you will never - * need more than one driller manger. - * IMPORTANT: Driller systems works OUTSIDE engine systems, you should NOT use SystemAllocator or any other engine systems - * as they might be drilled or not available at the moment. - */ - class DrillerManager - { - friend class DrillerRemoteServer; - public: - struct DrillerInfo - { - AZ::u32 id; - vector::type params; - }; - typedef forward_list::type DrillerListType; - - virtual ~DrillerManager() {} - - static DrillerManager* Create(/*const Descriptor& desc*/); - static void Destroy(DrillerManager* manager); - - virtual void Register(Driller* driller) = 0; - virtual void Unregister(Driller* driller) = 0; - - virtual void FrameUpdate() = 0; - - virtual DrillerSession* Start(DrillerOutputStream& output, const DrillerListType& drillerList, int numFrames = -1) = 0; - virtual void Stop(DrillerSession* session) = 0; - - virtual int GetNumDrillers() const = 0; - virtual Driller* GetDriller(int index) = 0; - - private: - // If the manager created the allocator, it should destroy it when it gets destroyed - bool m_ownsOSAllocator = false; - }; - } -} - -#endif // AZCORE_DRILLER_H -#pragma once diff --git a/Code/Framework/AzCore/AzCore/Driller/DrillerBus.cpp b/Code/Framework/AzCore/AzCore/Driller/DrillerBus.cpp deleted file mode 100644 index a46736aa87..0000000000 --- a/Code/Framework/AzCore/AzCore/Driller/DrillerBus.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include - -#include -#include -#include - -namespace AZ::Debug -{ - ////////////////////////////////////////////////////////////////////////// - // Globals - // We need to synchronize all driller evens, so we have proper order, and access to the data - // We use a global mutex which should be used for all driller operations. - // The mutex is held in an environment variable so it works across DLLs. - EnvironmentVariable s_drillerGlobalMutex; - ////////////////////////////////////////////////////////////////////////// - - - //========================================================================= - // lock - // [4/11/2011] - //========================================================================= - void DrillerEBusMutex::lock() - { - GetMutex().lock(); - } - - //========================================================================= - // try_lock - // [4/11/2011] - //========================================================================= - bool DrillerEBusMutex::try_lock() - { - return GetMutex().try_lock(); - } - - //========================================================================= - // unlock - // [4/11/2011] - //========================================================================= - void DrillerEBusMutex::unlock() - { - GetMutex().unlock(); - } - - //========================================================================= - // unlock - // [4/11/2011] - //========================================================================= - AZStd::recursive_mutex& DrillerEBusMutex::GetMutex() - { - if (!s_drillerGlobalMutex) - { - s_drillerGlobalMutex = Environment::CreateVariable(AZ_FUNCTION_SIGNATURE); - } - return *s_drillerGlobalMutex; - } -} // namespace AZ::Debug diff --git a/Code/Framework/AzCore/AzCore/Driller/DrillerBus.h b/Code/Framework/AzCore/AzCore/Driller/DrillerBus.h deleted file mode 100644 index 4c625f007d..0000000000 --- a/Code/Framework/AzCore/AzCore/Driller/DrillerBus.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef AZCORE_DRILLER_BUS_H -#define AZCORE_DRILLER_BUS_H - -#include -#include -#include - -namespace AZStd -{ - class mutex; -} - -namespace AZ -{ - namespace Debug - { - class DrillerEBusMutex - { - public: - typedef AZStd::recursive_mutex MutexType; - - static MutexType& GetMutex(); - void lock(); - bool try_lock(); - void unlock(); - }; - - /** - * Specialization of the EBusTraits for a driller bus. We make sure - * all allocation are made using DebugAllocation (so no engine systems are involved). - * In addition we make sure all driller buses use the same Mutex to synchronize data across - * threads (so all events came in order all the time), they are still executed in the context of - * the thread. - */ - struct DrillerEBusTraits - : public AZ::EBusTraits - { - typedef DrillerEBusMutex MutexType; - typedef OSStdAllocator AllocatorType; - }; - } -} - -#endif // AZCORE_DRILLER_BUS_H -#pragma once diff --git a/Code/Framework/AzCore/AzCore/Driller/DrillerRootHandler.h b/Code/Framework/AzCore/AzCore/Driller/DrillerRootHandler.h deleted file mode 100644 index 6a12c0cb8b..0000000000 --- a/Code/Framework/AzCore/AzCore/Driller/DrillerRootHandler.h +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef AZCORE_DRILLER_ROOT_HANDLER_H -#define AZCORE_DRILLER_ROOT_HANDLER_H - -#include -#include - -namespace AZ -{ - namespace Debug - { - // Please check DrillerRootHandler class... this is the one for direct use. - - /** - * Handler for the tag. - */ - class DrillerDrillerdataHandler - : public DrillerHandlerParser - { - public: - class ParamHandler - : public DrillerHandlerParser - { - public: - virtual void OnData(const DrillerSAXParser::Data& dataNode) - { - if (dataNode.m_name == AZ_CRC("Name", 0x5e237e06)) - { - dataNode.Read(m_param->name); - } - else if (dataNode.m_name == AZ_CRC("Description", 0x6de44026)) - { - m_param->desc = NULL; // ignored - } - else if (dataNode.m_name == AZ_CRC("Type", 0x8cde5729)) - { - dataNode.Read(m_param->type); - } - else if (dataNode.m_name == AZ_CRC("Value", 0x1d775834)) - { - dataNode.Read(m_param->value); - } - } - Driller::Param* m_param; - }; - - virtual DrillerHandlerParser* OnEnterTag(u32 tagName) - { - if (tagName == AZ_CRC("Param", 0xa4fa7c89)) - { - m_drillerInfo->params.push_back(); - m_paramHandler.m_param = &m_drillerInfo->params.back(); - return &m_paramHandler; - } - return NULL; - } - - virtual void OnData(const DrillerSAXParser::Data& dataNode) - { - if (dataNode.m_name == AZ_CRC("Name", 0x5e237e06)) - { - dataNode.Read(m_drillerInfo->id); - } - } - - DrillerManager::DrillerInfo* m_drillerInfo; - ParamHandler m_paramHandler; - }; - - - /** - * Handler for the tag - */ - class DrillerStartdataHandler - : public DrillerHandlerParser - { - public: - virtual DrillerHandlerParser* OnEnterTag(u32 tagName) - { - if (tagName == AZ_CRC("Driller", 0xa6e1fb73)) - { - m_drillers.push_back(); - m_drillerDataHandler.m_drillerInfo = &m_drillers.back(); - return &m_drillerDataHandler; - } - return NULL; - } - virtual void OnData(const DrillerSAXParser::Data& dataNode) - { - if (dataNode.m_name == AZ_CRC("Platform", 0x3952d0cb)) - { - dataNode.Read(m_platform); - } - } - - unsigned int m_platform; - DrillerManager::DrillerListType m_drillers; - DrillerDrillerdataHandler m_drillerDataHandler; - }; - - /** - * Handler for the tag - */ - template - class FrameHandler - : public DrillerHandlerParser - { - public: - FrameHandler() - : DrillerHandlerParser(DrillerContainer::s_isWarnOnMissingDrillers) - , m_currentFrame(-1) {} - - virtual DrillerHandlerParser* OnEnterTag(u32 tagName) { return m_drillersContainer.FindDrillerHandler(tagName); } - virtual void OnData(const DrillerSAXParser::Data& dataNode) - { - if (dataNode.m_name == AZ_CRC("FrameNum", 0x85a1a919)) - { - dataNode.Read(m_currentFrame); - } - } - DrillerContainer m_drillersContainer; - int m_currentFrame; - }; - - /** - * Use this class a input parameter to DrillerSAXParserHandler::DrillerSAXParserHandler(). It will handle all root level - * tags for a standard driller input stream stream. - * - * DrillerContainer should comply to the following requirements: - * - default constructible - * - has a static const bool s_isWarnOnMissingDrillers member to indicate if you want to - * trigger a warning when a driller is not found in the class. - * - implement a function DrillerHandlerParser* DrillerContainer::FindDrillerHandler(u32 drillerName) - * - */ - template - class DrillerRootHandler - : public DrillerHandlerParser - { - public: - DrillerContainer* GetDrillerContainer() { return m_frameHandler.m_drillersContainer; } - - virtual DrillerHandlerParser* OnEnterTag(u32 tagName) - { - if (tagName == AZ_CRC("StartData", 0xecf3f53f)) - { - return &m_drillerSessionInfo; - } - if (tagName == AZ_CRC("Frame", 0xb5f83ccd)) - { - return &m_frameHandler; - } - return NULL; - } - DrillerStartdataHandler m_drillerSessionInfo; - FrameHandler m_frameHandler; - }; - } // namespace Debug -} // namespace AZ - -#endif // AZCORE_DRILLER_ROOT_HANDLER_H -#pragma once - - diff --git a/Code/Framework/AzCore/AzCore/Driller/Stream.cpp b/Code/Framework/AzCore/AzCore/Driller/Stream.cpp deleted file mode 100644 index c86755149c..0000000000 --- a/Code/Framework/AzCore/AzCore/Driller/Stream.cpp +++ /dev/null @@ -1,893 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include - -#include -#include -#include -#include -#include - -#include - -#if !defined(AZCORE_EXCLUDE_ZLIB) -# define AZ_FILE_STREAM_COMPRESSION -#endif // AZCORE_EXCLUDE_ZLIB - -#if defined(AZ_FILE_STREAM_COMPRESSION) -# include -#endif // AZ_FILE_STREAM_COMPRESSION - -namespace AZ::Debug -{ - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // Driller output stream - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - void DrillerOutputStream::Write(u32 name, const AZ::Vector3& v) - { - float data[4]; - unsigned int dataSize = 3 * sizeof(float); - v.StoreToFloat4(data); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Vector4& v) - { - float data[4]; - unsigned int dataSize = 4 * sizeof(float); - v.StoreToFloat4(data); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Aabb& aabb) - { - float data[7]; - unsigned int dataSize = 6 * sizeof(float); - aabb.GetMin().StoreToFloat4(data); - aabb.GetMax().StoreToFloat4(&data[3]); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Obb& obb) - { - float data[10]; - unsigned int dataSize = 10 * sizeof(float); // position (Vector3), rotation (Quaternion) and halfLengths (Vector3) - obb.GetPosition().StoreToFloat3(data); - obb.GetRotation().StoreToFloat4(&data[3]); - obb.GetHalfLengths().StoreToFloat3(&data[7]); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Transform& tm) - { - float data[12]; - unsigned int dataSize = 12 * sizeof(float); - const Matrix3x4 matrix3x4 = Matrix3x4::CreateFromTransform(tm); - matrix3x4.StoreToRowMajorFloat12(data); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Matrix3x3& tm) - { - float data[9]; - unsigned int dataSize = 9 * sizeof(float); - tm.StoreToRowMajorFloat9(data); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Matrix4x4& tm) - { - float data[16]; - unsigned int dataSize = 16 * sizeof(float); - tm.StoreToRowMajorFloat16(data); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Quaternion& tm) - { - float data[4]; - unsigned int dataSize = 4 * sizeof(float); - tm.StoreToFloat4(data); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Plane& plane) - { - Write(name, plane.GetPlaneEquationCoefficients()); - } - void DrillerOutputStream::WriteHeader() - { - StreamHeader sh; // StreamHeader should be endianess independent. - WriteBinary(&sh, sizeof(sh)); - } - - void DrillerOutputStream::WriteTimeUTC(u32 name) - { - AZStd::sys_time_t now = AZStd::GetTimeUTCMilliSecond(); - Write(name, now); - } - - void DrillerOutputStream::WriteTimeMicrosecond(u32 name) - { - AZStd::sys_time_t now = AZStd::GetTimeNowMicroSecond(); - Write(name, now); - } - - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // Driller Input Stream - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - bool DrillerInputStream::ReadHeader() - { - DrillerOutputStream::StreamHeader sh; // StreamHeader should be endianess independent. - unsigned int numRead = ReadBinary(&sh, sizeof(sh)); - (void)numRead; - AZ_Error("IO", numRead == sizeof(sh), "We should have atleast %d bytes in the stream to read the header!", sizeof(sh)); - if (numRead != sizeof(sh)) - { - return false; - } - m_isEndianSwap = AZ::IsBigEndian(static_cast(sh.platform)) != AZ::IsBigEndian(AZ::g_currentPlatform); - return true; - } - - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // Driller file stream - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - //========================================================================= - // DrillerOutputFileStream::DrillerOutputFileStream - // [3/23/2011] - //========================================================================= - DrillerOutputFileStream::DrillerOutputFileStream() - { -#if defined(AZ_FILE_STREAM_COMPRESSION) - m_zlib = azcreate(ZLib, (&AllocatorInstance::GetAllocator()), OSAllocator); - m_zlib->StartCompressor(2); -#endif - } - - //========================================================================= - // DrillerOutputFileStream::~DrillerOutputFileStream - // [3/23/2011] - //========================================================================= - DrillerOutputFileStream::~DrillerOutputFileStream() - { -#if defined(AZ_FILE_STREAM_COMPRESSION) - azdestroy(m_zlib, OSAllocator); -#endif - } - - //========================================================================= - // DrillerOutputFileStream::Open - // [3/23/2011] - //========================================================================= - bool DrillerOutputFileStream::Open(const char* fileName, int mode, int platformFlags) - { - if (IO::SystemFile::Open(fileName, mode, platformFlags)) - { - m_dataBuffer.reserve(100 * 1024); -#if defined(AZ_FILE_STREAM_COMPRESSION) - // // Enable optional: encode the file in the same format as the streamer so they are interchangeable - // IO::CompressorHeader ch; - // ch.SetAZCS(); - // ch.m_compressorId = IO::CompressorZLib::TypeId(); - // ch.m_uncompressedSize = 0; // will be updated later - // AZStd::endian_swap(ch.m_compressorId); - // AZStd::endian_swap(ch.m_uncompressedSize); - // IO::SystemFile::Write(&ch,sizeof(ch)); - // IO::CompressorZLibHeader zlibHdr; - // zlibHdr.m_numSeekPoints = 0; - // IO::SystemFile::Write(&zlibHdr,sizeof(zlibHdr)); -#endif - return true; - } - return false; - } - - //========================================================================= - // DrillerOutputFileStream::Close - // [3/23/2011] - //========================================================================= - void DrillerOutputFileStream::Close() - { - unsigned int dataSizeInBuffer = static_cast(m_dataBuffer.size()); - { -#if defined(AZ_FILE_STREAM_COMPRESSION) - unsigned int minCompressBufferSize = m_zlib->GetMinCompressedBufferSize(dataSizeInBuffer); - if (m_compressionBuffer.size() < minCompressBufferSize) // grow compression buffer if needed - { - m_compressionBuffer.clear(); - m_compressionBuffer.resize(minCompressBufferSize); - } - unsigned int compressedSize; - do - { - compressedSize = m_zlib->Compress(m_dataBuffer.data(), dataSizeInBuffer, m_compressionBuffer.data(), (unsigned)m_compressionBuffer.size(), ZLib::FT_FINISH); - if (compressedSize) - { - IO::SystemFile::Write(m_compressionBuffer.data(), compressedSize); - } - } while (compressedSize > 0); - m_zlib->ResetCompressor(); -#else - if (dataSizeInBuffer) - { - IO::SystemFile::Write(m_dataBuffer.data(), m_dataBuffer.size()); - } -#endif - m_dataBuffer.clear(); - } - IO::SystemFile::Close(); - } - //========================================================================= - // DrillerOutputFileStream::WriteBinary - // [3/23/2011] - //========================================================================= - void DrillerOutputFileStream::WriteBinary(const void* data, unsigned int dataSize) - { - size_t dataSizeInBuffer = m_dataBuffer.size(); - if (dataSizeInBuffer + dataSize > m_dataBuffer.capacity()) - { - if (dataSizeInBuffer > 0) - { -#if defined(AZ_FILE_STREAM_COMPRESSION) - // we need to flush the data - unsigned int dataToCompress = static_cast(dataSizeInBuffer); - unsigned int minCompressBufferSize = m_zlib->GetMinCompressedBufferSize(dataToCompress); - if (m_compressionBuffer.size() < minCompressBufferSize) // grow compression buffer if needed - { - m_compressionBuffer.clear(); - m_compressionBuffer.resize(minCompressBufferSize); - } - while (dataToCompress > 0) - { - unsigned int compressedSize = m_zlib->Compress(m_dataBuffer.data(), dataToCompress, m_compressionBuffer.data(), (unsigned)m_compressionBuffer.size()); - if (compressedSize) - { - IO::SystemFile::Write(m_compressionBuffer.data(), compressedSize); - } - } -#else - IO::SystemFile::Write(m_dataBuffer.data(), m_dataBuffer.size()); -#endif - m_dataBuffer.clear(); - } - } - m_dataBuffer.insert(m_dataBuffer.end(), reinterpret_cast(data), reinterpret_cast(data) + dataSize); - } - - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // Driller file input stream - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - - //========================================================================= - // DrillerInputFileStream::DrillerInputFileStream - // [3/23/2011] - //========================================================================= - DrillerInputFileStream::DrillerInputFileStream() - { -#if defined(AZ_FILE_STREAM_COMPRESSION) - m_zlib = azcreate(ZLib, (&AllocatorInstance::GetAllocator()), OSAllocator); - m_zlib->StartDecompressor(); -#endif - } - - //========================================================================= - // DrillerInputFileStream::DrillerInputFileStream - // [3/23/2011] - //========================================================================= - DrillerInputFileStream::~DrillerInputFileStream() - { -#if defined(AZ_FILE_STREAM_COMPRESSION) - azdestroy(m_zlib, OSAllocator); -#endif - } - - //========================================================================= - // DrillerInputFileStream::Open - // [3/23/2011] - //========================================================================= - bool DrillerInputFileStream::Open(const char* fileName, int mode, int platformFlags) - { - if (IO::SystemFile::Open(fileName, mode, platformFlags)) - { - DrillerOutputStream::StreamHeader sh; -#if defined(AZ_FILE_STREAM_COMPRESSION) - // TODO: optional encode the file in the same format as the streamer so they are interchangeable -#endif - // first read the header of the stream file. - return ReadHeader(); - } - return false; - } - //========================================================================= - // DrillerInputFileStream::ReadBinary - // [3/23/2011] - //========================================================================= - unsigned int DrillerInputFileStream::ReadBinary(void* data, unsigned int maxDataSize) - { - // make sure the compressed buffer if full enough... - size_t dataToLoad = maxDataSize * 2; - m_compressedData.reserve(dataToLoad); - while (m_compressedData.size() < dataToLoad) - { - unsigned char buffer[10 * 1024]; - IO::SystemFile::SizeType bytesRead = Read(AZ_ARRAY_SIZE(buffer), buffer); - if (bytesRead > 0) - { - m_compressedData.insert(m_compressedData.end(), (unsigned char*)buffer, buffer + bytesRead); - } - if (bytesRead < AZ_ARRAY_SIZE(buffer)) - { - break; - } - } -#if defined(AZ_FILE_STREAM_COMPRESSION) - unsigned int dataSize = maxDataSize; - unsigned int bytesProcessed = m_zlib->Decompress(m_compressedData.data(), (unsigned)m_compressedData.size(), data, dataSize); - unsigned int readSize = maxDataSize - dataSize; // Zlib::Decompress decrements the dataSize parameter by the amount uncompressed -#else - unsigned int bytesProcessed = AZStd::GetMin((unsigned int)m_compressedData.size(), maxDataSize); - unsigned int readSize = bytesProcessed; - memcpy(data, m_compressedData.data(), readSize); -#endif - m_compressedData.erase(m_compressedData.begin(), m_compressedData.begin() + bytesProcessed); - return readSize; - } - - //========================================================================= - // DrillerInputFileStream::Close - // [3/23/2011] - //========================================================================= - void DrillerInputFileStream::Close() - { -#if defined(AZ_FILE_STREAM_COMPRESSION) - if (m_zlib) - { - m_zlib->ResetDecompressor(); - } -#endif // AZ_FILE_STREAM_COMPRESSION - AZ::IO::SystemFile::Close(); - } - - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // DrillerSAXParser - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - //========================================================================= - // DrillerSAXParser - // [3/23/2011] - //========================================================================= - DrillerSAXParser::DrillerSAXParser(const TagCallbackType& tcb, const DataCallbackType& dcb) - : m_tagCallback(tcb) - , m_dataCallback(dcb) - { - } - - //========================================================================= - // ProcessStream - // [3/23/2011] - //========================================================================= - void - DrillerSAXParser::ProcessStream(DrillerInputStream& stream) - { - static const int processChunkSize = 15 * 1024; - char buffer[processChunkSize]; - unsigned int dataSize; - bool isEndianSwap = stream.IsEndianSwap(); - while ((dataSize = stream.ReadBinary(buffer, processChunkSize)) > 0) - { - char* dataStart = buffer; - char* dataEnd = dataStart + dataSize; - bool dataInBuffer = false; - if (!m_buffer.empty()) - { - m_buffer.insert(m_buffer.end(), dataStart, dataEnd); - dataStart = m_buffer.data(); - dataEnd = dataStart + m_buffer.size(); - dataInBuffer = true; - } - const int entrySize = sizeof(DrillerOutputStream::StreamEntry); - while (dataStart != dataEnd) - { - if ((dataEnd - dataStart) < entrySize) // we need at least one entry to proceed - { - // not enough data to process, buffer it. - if (!dataInBuffer) - { - m_buffer.insert(m_buffer.end(), dataStart, dataEnd); - } - break; - } - - DrillerOutputStream::StreamEntry* se = reinterpret_cast(dataStart); - if (isEndianSwap) - { - // endian swap - AZStd::endian_swap(se->name); - AZStd::endian_swap(se->sizeAndFlags); - } - - u32 dataType = (se->sizeAndFlags & DrillerOutputStream::StreamEntry::dataInternalMask) >> DrillerOutputStream::StreamEntry::dataInternalShift; - u32 value = se->sizeAndFlags & DrillerOutputStream::StreamEntry::dataSizeMask; - Data de; - de.m_name = se->name; - de.m_stringPool = stream.GetStringPool(); - de.m_isPooledString = false; - de.m_isPooledStringCrc32 = false; - switch (dataType) - { - case DrillerOutputStream::StreamEntry::INT_TAG: - { - bool isStart = (value != 0); - m_tagCallback(se->name, isStart); - dataStart += entrySize; - } break; - case DrillerOutputStream::StreamEntry::INT_DATA_U8: - { - u8 value8 = static_cast(value); - de.m_data = &value8; - de.m_dataSize = 1; - de.m_isEndianSwap = false; - m_dataCallback(de); - dataStart += entrySize; - } break; - case DrillerOutputStream::StreamEntry::INT_DATA_U16: - { - u16 value16 = static_cast(value); - de.m_data = &value16; - de.m_dataSize = 2; - de.m_isEndianSwap = false; - m_dataCallback(de); - dataStart += entrySize; - } break; - case DrillerOutputStream::StreamEntry::INT_DATA_U29: - { - de.m_data = &value; - de.m_dataSize = 4; - de.m_isEndianSwap = false; - m_dataCallback(de); - dataStart += entrySize; - } break; - case DrillerOutputStream::StreamEntry::INT_POOLED_STRING: - { - unsigned int userDataSize = value; - if ((userDataSize + entrySize) <= (unsigned)(dataEnd - dataStart)) - { - // Add string to the pool - AZ_Assert(de.m_stringPool != nullptr, "We require a string pool to parse this stream"); - AZ::u32 crc32; - const char* stringPtr; - dataStart += entrySize; - de.m_stringPool->InsertCopy(reinterpret_cast(dataStart), userDataSize, crc32, &stringPtr); - de.m_dataSize = userDataSize; - de.m_isEndianSwap = isEndianSwap; - de.m_isPooledString = true; - de.m_data = const_cast(static_cast(stringPtr)); - m_dataCallback(de); - dataStart += userDataSize; - } - else - { - // we can't process data right now add it to the buffer (if we have not done that already) - if (!dataInBuffer) - { - m_buffer.insert(m_buffer.end(), dataStart, dataEnd); - } - dataEnd = dataStart; // exit the loop - } - } break; - case DrillerOutputStream::StreamEntry::INT_POOLED_STRING_CRC32: - { - de.m_isPooledStringCrc32 = true; - AZ_Assert(value == 4, "The data size for a pooled string crc32 should be 4 bytes!"); - } // continue to INT_SIZE - case DrillerOutputStream::StreamEntry::INT_SIZE: - { - unsigned int userDataSize = value; - if ((userDataSize + entrySize) <= (unsigned)(dataEnd - dataStart)) // do we have all the date we need to process... - { - dataStart += entrySize; - de.m_data = dataStart; - de.m_dataSize = userDataSize; - de.m_isEndianSwap = isEndianSwap; - m_dataCallback(de); - dataStart += userDataSize; - } - else - { - // we can't process data right now add it to the buffer (if we have not done that already) - if (!dataInBuffer) - { - m_buffer.insert(m_buffer.end(), dataStart, dataEnd); - } - dataEnd = dataStart; // exit the loop - } - } break; - default: - { - AZ_Error("DrillerSAXParser",false,"Encounted unknown symbol (%i) while processing stream (%s). Aborting stream.\n",dataType, stream.GetIdentifier()); - - // If we can't process anything, we want to just escape the loop, to avoid spinning infinitely - dataEnd = dataStart; - } break; - } - } - if (dataInBuffer) // if the data was in the buffer remove the processed data! - { - m_buffer.erase(m_buffer.begin(), m_buffer.begin() + (dataStart - m_buffer.data())); - } - } - } - - void DrillerSAXParser::Data::Read(AZ::Vector3& v) const - { - AZ_Assert(m_dataSize == sizeof(float) * 3, "We are expecting 3 floats for Vector3 element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 3); - m_isEndianSwap = false; - } - v = Vector3::CreateFromFloat3(data); - } - void DrillerSAXParser::Data::Read(AZ::Vector4& v) const - { - AZ_Assert(m_dataSize == sizeof(float) * 4, "We are expecting 4 floats for Vector4 element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 4); - m_isEndianSwap = false; - } - v = Vector4::CreateFromFloat4(data); - } - void DrillerSAXParser::Data::Read(AZ::Aabb& aabb) const - { - AZ_Assert(m_dataSize == sizeof(float) * 6, "We are expecting 6 floats for Aabb element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 6); - m_isEndianSwap = false; - } - Vector3 min = Vector3::CreateFromFloat3(data); - Vector3 max = Vector3::CreateFromFloat3(&data[3]); - aabb = Aabb::CreateFromMinMax(min, max); - } - void DrillerSAXParser::Data::Read(AZ::Obb& obb) const - { - AZ_Assert(m_dataSize == sizeof(float) * 10, "We are expecting 10 floats for Obb element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 10); - m_isEndianSwap = false; - } - Vector3 position = Vector3::CreateFromFloat3(data); - Quaternion rotation = Quaternion::CreateFromFloat4(&data[3]); - Vector3 halfLengths = Vector3::CreateFromFloat3(&data[7]); - obb = Obb::CreateFromPositionRotationAndHalfLengths(position, rotation, halfLengths); - } - void DrillerSAXParser::Data::Read(AZ::Transform& tm) const - { - AZ_Assert(m_dataSize == sizeof(float) * 12, "We are expecting 12 floats for Transform element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 12); - m_isEndianSwap = false; - } - const Matrix3x4 matrix3x4 = Matrix3x4::CreateFromRowMajorFloat12(data); - tm = Transform::CreateFromMatrix3x4(matrix3x4); - } - void DrillerSAXParser::Data::Read(AZ::Matrix3x3& tm) const - { - AZ_Assert(m_dataSize == sizeof(float) * 9, "We are expecting 9 floats for Matrix3x3 element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 9); - m_isEndianSwap = false; - } - tm = Matrix3x3::CreateFromRowMajorFloat9(data); - } - void DrillerSAXParser::Data::Read(AZ::Matrix4x4& tm) const - { - AZ_Assert(m_dataSize == sizeof(float) * 16, "We are expecting 16 floats for Matrix4x4 element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 16); - m_isEndianSwap = false; - } - tm = Matrix4x4::CreateFromRowMajorFloat16(data); - } - void DrillerSAXParser::Data::Read(AZ::Quaternion& tm) const - { - AZ_Assert(m_dataSize == sizeof(float) * 4, "We are expecting 4 floats for Quaternion element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 4); - m_isEndianSwap = false; - } - tm = Quaternion::CreateFromFloat4(data); - } - void DrillerSAXParser::Data::Read(AZ::Plane& plane) const - { - AZ::Vector4 coeff; - Read(coeff); - plane = Plane::CreateFromCoefficients(coeff.GetX(), coeff.GetY(), coeff.GetZ(), coeff.GetW()); - } - - const char* DrillerSAXParser::Data::PrepareString(unsigned int& stringLength) const - { - const char* srcData = reinterpret_cast(m_data); - stringLength = m_dataSize; - if (m_stringPool) - { - AZ::u32 crc32; - const char* stringPtr; - if (m_isPooledStringCrc32) - { - crc32 = *reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(crc32); - } - stringPtr = m_stringPool->Find(crc32); - AZ_Assert(stringPtr != nullptr, "Failed to find string with id 0x%08x in the string pool, proper stream read is impossible!", crc32); - stringLength = static_cast(strlen(stringPtr)); - } - else if (m_isPooledString) - { - stringPtr = srcData; // already stored in the pool just transfer the pointer - } - else - { - // Store copy of the string in the pool to save memory (keep only one reference of the string). - m_stringPool->InsertCopy(reinterpret_cast(srcData), stringLength, crc32, &stringPtr); - } - srcData = stringPtr; - } - else - { - AZ_Assert(m_isPooledString == false && m_isPooledStringCrc32 == false, "This stream requires using of a string pool as the string is send only once and afterwards only the Crc32 is used!"); - } - return srcData; - } - - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // DrillerDOMParser - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - - //========================================================================= - // Node::GetTag - // [1/23/2013] - //========================================================================= - const DrillerDOMParser::Node* DrillerDOMParser::Node::GetTag(u32 tagName) const - { - const Node* tagNode = nullptr; - for (Node::NodeListType::const_iterator i = m_tags.begin(); i != m_tags.end(); ++i) - { - if ((*i).m_name == tagName) - { - tagNode = &*i; - break; - } - } - return tagNode; - } - - //========================================================================= - // Node::GetData - // [3/23/2011] - //========================================================================= - const DrillerDOMParser::Data* DrillerDOMParser::Node::GetData(u32 dataName) const - { - const Data* dataNode = nullptr; - for (Node::DataListType::const_iterator i = m_data.begin(); i != m_data.end(); ++i) - { - if (i->m_name == dataName) - { - dataNode = &*i; - break; - } - } - return dataNode; - } - - //========================================================================= - // DrillerDOMParser - // [3/23/2011] - //========================================================================= - DrillerDOMParser::DrillerDOMParser(bool isPersistentInputData) - : DrillerSAXParser(TagCallbackType(this, &DrillerDOMParser::OnTag), DataCallbackType(this, &DrillerDOMParser::OnData)) - , m_isPersistentInputData(isPersistentInputData) - { - m_root.m_name = 0; - m_root.m_parent = nullptr; - m_topNode = &m_root; - } - static int g_numFree = 0; - //========================================================================= - // ~DrillerDOMParser - // [3/23/2011] - //========================================================================= - DrillerDOMParser::~DrillerDOMParser() - { - DeleteNode(m_root); - } - - //========================================================================= - // OnTag - // [3/23/2011] - //========================================================================= - void - DrillerDOMParser::OnTag(AZ::u32 name, bool isOpen) - { - if (isOpen) - { - m_topNode->m_tags.push_back(); - Node& node = m_topNode->m_tags.back(); - node.m_name = name; - node.m_parent = m_topNode; - - m_topNode = &node; - } - else - { - AZ_Assert(m_topNode->m_name == name, "We have opened tag with name 0x%08x and closing with name 0x%08x", m_topNode->m_name, name); - m_topNode = m_topNode->m_parent; - } - } - //========================================================================= - // OnData - // [3/23/2011] - //========================================================================= - void - DrillerDOMParser::OnData(const Data& data) - { - Data de = data; - if (!m_isPersistentInputData) - { - de.m_data = azmalloc(data.m_dataSize, 1, OSAllocator); - memcpy(const_cast(de.m_data), data.m_data, data.m_dataSize); - } - m_topNode->m_data.push_back(de); - } - //========================================================================= - // DeleteNode - // [3/23/2011] - //========================================================================= - void - DrillerDOMParser::DeleteNode(Node& node) - { - if (!m_isPersistentInputData) - { - for (Node::DataListType::iterator iter = node.m_data.begin(); iter != node.m_data.end(); ++iter) - { - azfree(iter->m_data, OSAllocator, iter->m_dataSize); - ++g_numFree; - } - node.m_data.clear(); - } - for (Node::NodeListType::iterator iter = node.m_tags.begin(); iter != node.m_tags.end(); ++iter) - { - DeleteNode(*iter); - } - node.m_tags.clear(); - } - - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // DrillerSAXParserHandler - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - - //========================================================================= - // DrillerSAXParserHandler - // [3/14/2013] - //========================================================================= - DrillerSAXParserHandler::DrillerSAXParserHandler(DrillerHandlerParser* rootHandler) - : DrillerSAXParser(TagCallbackType(this, &DrillerSAXParserHandler::OnTag), DataCallbackType(this, &DrillerSAXParserHandler::OnData)) - { - // Push the root element - m_stack.push_back(rootHandler); - } - - //========================================================================= - // OnTag - // [3/14/2013] - //========================================================================= - void DrillerSAXParserHandler::OnTag(u32 name, bool isOpen) - { - if (m_stack.empty()) - { - return; - } - - DrillerHandlerParser* childHandler = nullptr; - DrillerHandlerParser* currentHandler = m_stack.back(); - if (isOpen) - { - if (currentHandler != nullptr) - { - childHandler = currentHandler->OnEnterTag(name); - AZ_Warning("Driller", !currentHandler->IsWarnOnUnsupportedTags() || childHandler != nullptr, "Could not find handler for tag 0x%08x", name); - } - m_stack.push_back(childHandler); - } - else - { - m_stack.pop_back(); - if (!m_stack.empty()) - { - DrillerHandlerParser* parentHandler = m_stack.back(); - if (parentHandler) - { - parentHandler->OnExitTag(currentHandler, name); - } - } - } - } - - //========================================================================= - // OnData - // [3/14/2013] - //========================================================================= - void DrillerSAXParserHandler::OnData(const DrillerSAXParser::Data& data) - { - if (m_stack.empty()) - { - return; - } - - DrillerHandlerParser* currentHandler = m_stack.back(); - if (currentHandler) - { - currentHandler->OnData(data); - } - } -} // namespace AZ::Debug diff --git a/Code/Framework/AzCore/AzCore/Driller/Stream.h b/Code/Framework/AzCore/AzCore/Driller/Stream.h deleted file mode 100644 index 5efa416ef4..0000000000 --- a/Code/Framework/AzCore/AzCore/Driller/Stream.h +++ /dev/null @@ -1,848 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef AZCORE_DRILLER_STREAM_H -#define AZCORE_DRILLER_STREAM_H - -#include - -#include -#include -#include -#include -#include - -#include // for the Driller direct file stream -#include -#include - -namespace AZ -{ - class Vector3; - class Vector4; - class Aabb; - class Obb; - class Transform; - class Matrix3x3; - class Matrix4x4; - class Quaternion; - class Plane; - class ZLib; - - namespace IO - { - class Stream; - } - - namespace Debug - { - template - struct vector - { - typedef AZStd::vector type; - }; - - template - struct forward_list - { - typedef AZStd::forward_list type; - }; - - /** - * Interface for a string pool which can be used by input/output streams to avoid storing multiple copies of the same - * string in the stream. Of course this comes at the bookkeeping cost of the table. - */ - class DrillerStringPool - { - public: - virtual ~DrillerStringPool() {} - - /** - * Add a copy of the string to the pool. If we return true the string was added otherwise it was already in the bool. - * In both cases the crc32 of the string and the pointer to the shared copy is returned (optional for poolStringAddress)! - */ - virtual bool InsertCopy(const char* string, unsigned int length, AZ::u32& crc32, const char** poolStringAddress = NULL) = 0; - - /** - * Same as the InsertCopy above without actually coping the string into the pool. The pool assumes that - * none of the strings added to the pool will be deleted. - */ - virtual bool Insert(const char* string, unsigned int length, AZ::u32& crc32) = 0; - - /// Finds a string in the pool by crc32. - virtual const char* Find(AZ::u32 crc32) = 0; - - virtual void Erase(AZ::u32 crc32) = 0; - - /// Clears all the strings in the pool, make sure you don't reference any strings before you call that function. - virtual void Reset() = 0; - }; - - /** - * - */ - class DrillerOutputStream - { - protected: - friend class DrillerManagerImpl; - friend class DrillerSAXParser; - struct StreamEntry - { - enum InternalDataSize // max 8 values as we use 3 bit to store them - { - INT_SIZE = 0, ///< No internal data, we store the data size. IMPORTANT: INT_SIZE should be 0 the code makes assumptions based on that - INT_TAG, ///< True if this entry is tag - INT_DATA_U8, ///< Internal data u8 stored (1 byte) - INT_DATA_U16, ///< Internal data u16 stored (2 bytes) - INT_DATA_U29, ///< Internal data u32 stored (4 bytes) for which we use only the first 29 bits. - INT_POOLED_STRING_CRC32, ///< Data size should be 4 bytes crc32 that a string CRC and it require string pool. - INT_POOLED_STRING, ///< This data contains a string which should be inserted in the string pool. - }; - static const u32 dataSizeMask = 0x1fffffff; - static const u32 dataInternalMask = 0xE0000000; - static const u32 dataInternalShift = 29; - - u32 name; ///< data or tag name - u32 sizeAndFlags; ///< - }; - - template - struct IntergralType; - - template - struct IntergralType - { - static void Write(DrillerOutputStream& stream, u32 name, const T& data) - { - StreamEntry de; - de.name = name; - de.sizeAndFlags = (u32)(StreamEntry::INT_DATA_U8) << StreamEntry::dataInternalShift; - de.sizeAndFlags |= *reinterpret_cast(&data); - stream.WriteBinary(de); - } - }; - template - struct IntergralType - { - static void Write(DrillerOutputStream& stream, u32 name, const T& data) - { - StreamEntry de; - de.name = name; - de.sizeAndFlags = (u32)(StreamEntry::INT_DATA_U16) << StreamEntry::dataInternalShift; - de.sizeAndFlags |= *reinterpret_cast(&data); - stream.WriteBinary(de); - } - }; - template - struct IntergralType - { - static void Write(DrillerOutputStream& stream, u32 name, const T& data) - { - StreamEntry de; - de.name = name; - const u32* uintData = reinterpret_cast(&data); - if (((*uintData) & StreamEntry::dataSizeMask) == *uintData) // check if we can store it internally - { - de.sizeAndFlags = (u32)(StreamEntry::INT_DATA_U29) << StreamEntry::dataInternalShift; - de.sizeAndFlags |= *uintData; - stream.WriteBinary(de); - } - else - { - de.sizeAndFlags = 4; - stream.WriteBinary(de); - stream.WriteBinary(&data, de.sizeAndFlags); - } - } - }; - template - struct IntergralType - { - static void Write(DrillerOutputStream& stream, u32 name, const T& data) - { - StreamEntry de; - de.name = name; - const u64* uintData = reinterpret_cast(&data); - if (((*uintData) & static_cast(StreamEntry::dataSizeMask)) == *uintData) // check if we can store it internally - { - de.sizeAndFlags = (u32)(StreamEntry::INT_DATA_U29) << StreamEntry::dataInternalShift; - de.sizeAndFlags |= static_cast(*uintData); - stream.WriteBinary(de); - } - else - { - de.sizeAndFlags = 8; - stream.WriteBinary(de); - stream.WriteBinary(&data, de.sizeAndFlags); - } - } - }; - template - struct IntergralType - { - static void Write(DrillerOutputStream& stream, u32 name, const T* pointer) - { - size_t id = reinterpret_cast(pointer); - IntergralType::Write(stream, name, id); - } - }; - - public: - /** - * Each stream with start with this header, before anything else. - */ - struct StreamHeader - { - StreamHeader() - : platform((u8)g_currentPlatform) {} - u8 platform; - }; - - DrillerOutputStream(DrillerStringPool* stringPool = NULL) - : m_stringPool(stringPool) { } - virtual ~DrillerOutputStream() {} - - ////////////////////////////////////////////////////////////////////////// - // Write - inline void BeginTag(u32 name) - { - StreamEntry de; - de.name = name; - de.sizeAndFlags = (u32)(StreamEntry::INT_TAG) << StreamEntry::dataInternalShift; - de.sizeAndFlags |= 1; // true - open tag - WriteBinary(de); - } - inline void EndTag(u32 name) - { - StreamEntry de; - de.name = name; - de.sizeAndFlags = (u32)(StreamEntry::INT_TAG) << StreamEntry::dataInternalShift; - WriteBinary(de); - } - - ////////////////////////////////////////////////////////////////////////// - // Generic - template - inline void Write(u32 name, const T& data) - { - // User should handle non specialized non integral types. - IntergralType::value || AZStd::is_enum::value>::Write(*this, name, data); - } - - ////////////////////////////////////////////////////////////////////////// - // Binary and strings - inline void Write(u32 name, const void* data, unsigned int dataSize) - { - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - inline void Write(u32 name, const char* string, bool isCopyString = true) - { - StreamEntry de; - de.name = name; - de.sizeAndFlags = static_cast(strlen(string)); - AZ_Assert(de.sizeAndFlags <= StreamEntry::dataSizeMask, "Invalid string length! String is too long, length is limited to %u bytes!", StreamEntry::dataSizeMask); - ; - if (m_stringPool) - { - AZ::u32 crc; - bool isInserted = isCopyString ? m_stringPool->InsertCopy(string, de.sizeAndFlags, crc) : m_stringPool->Insert(string, de.sizeAndFlags, crc); - if (!isInserted) // if already inserted, it means it's in the stream, so store the crc only. - { - de.sizeAndFlags = (u32)(StreamEntry::INT_POOLED_STRING_CRC32) << StreamEntry::dataInternalShift; - de.sizeAndFlags |= sizeof(crc); - WriteBinary(de); - WriteBinary(&crc, sizeof(crc)); - } - else - { - AZ::u32 stringSize = de.sizeAndFlags; - de.sizeAndFlags |= (u32)(StreamEntry::INT_POOLED_STRING) << StreamEntry::dataInternalShift; - WriteBinary(de); - WriteBinary(string, stringSize); - } - } - else - { - WriteBinary(de); - WriteBinary(string, de.sizeAndFlags); - } - } - template - inline void Write(u32 name, const AZStd::basic_string& str, bool isCopyString = true) - { - StreamEntry de; - de.name = name; - de.sizeAndFlags = static_cast(str.size()); - AZ_Assert(de.sizeAndFlags <= StreamEntry::dataSizeMask, "Invalid string length! String is too long, length is limited to %u bytes!", StreamEntry::dataSizeMask); - if (m_stringPool) - { - AZ::u32 crc; - bool isInserted = isCopyString ? m_stringPool->InsertCopy(str.c_str(), de.sizeAndFlags, crc) : m_stringPool->Insert(str.c_str(), de.sizeAndFlags, crc); - if (!isInserted) // if already inserted, it means it's in the stream, so store the crc only. - { - de.sizeAndFlags = (u32)(StreamEntry::INT_POOLED_STRING_CRC32) << StreamEntry::dataInternalShift; - de.sizeAndFlags |= sizeof(crc); - WriteBinary(de); - WriteBinary(&crc, sizeof(crc)); - } - else - { - AZ::u32 stringSize = de.sizeAndFlags; - de.sizeAndFlags |= (u32)(StreamEntry::INT_POOLED_STRING) << StreamEntry::dataInternalShift; - WriteBinary(de); - WriteBinary(str.data(), stringSize); - } - } - else - { - WriteBinary(de); - WriteBinary(str.data(), de.sizeAndFlags); - } - } - - template - inline void Write(u32 name, const AZStd::basic_string& str) - { - StreamEntry de; - de.name = name; - de.sizeAndFlags = static_cast(str.size()); - AZ_Assert(de.sizeAndFlags <= StreamEntry::dataSizeMask, "Invalid string length! String is too long, length is limited to %u bytes!", StreamEntry::dataSizeMask); - WriteBinary(de); - WriteBinary(str.data(), de.sizeAndFlags * sizeof(AZStd::wstring::value_type)); - } - - ////////////////////////////////////////////////////////////////////////// - // math types - inline void Write(u32 name, float f) - { - Write(name, &f, static_cast(sizeof(float))); - } - inline void Write(u32 name, double d) - { - Write(name, &d, static_cast(sizeof(double))); - } - - void Write(u32 name, const AZ::Vector3& v); - void Write(u32 name, const AZ::Vector4& v); - void Write(u32 name, const AZ::Aabb& aabb); - void Write(u32 name, const AZ::Obb& obb); - void Write(u32 name, const AZ::Transform& tm); - void Write(u32 name, const AZ::Matrix3x3& tm); - void Write(u32 name, const AZ::Matrix4x4& tm); - void Write(u32 name, const AZ::Quaternion& tm); - void Write(u32 name, const AZ::Plane& plane); - - ////////////////////////////////////////////////////////////////////////// - // containers - template - inline void Write(u32 name, InputIterator first, InputIterator last) - { - // we can specialize for contiguous_iterator_tag so have only 1 write for all elements - size_t numElements = AZStd::distance(first, last); - size_t elementSize = sizeof(typename AZStd::iterator_traits::value_type); - unsigned int dataSize = static_cast(numElements * elementSize); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - AZ_Assert(dataSize < StreamEntry::dataSizeMask, "Invalid data size, size is limited to %d bytes!", StreamEntry::dataSizeMask - 1); - WriteBinary(de); - //WriteBinary(data,dataSize); for contiguous_iterator_tag - for (; first != last; ++first) - { - WriteBinary(&*first, static_cast(elementSize)); - } - } - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // Raw data to the output - template - inline void WriteBinary(const T& data) - { - WriteBinary(&data, sizeof(T)); - } - - virtual void WriteBinary(const void* data, unsigned int dataSize) = 0; - ////////////////////////////////////////////////////////////////////////// - - /** - * Write a time stamp (AZStd::sys_time_t) in millisecond since 1970/01/01 00:00:00 UTC. - * On older windows this function can have ~15 ms resolution, in such cases use \ref GetTimeNowMicroSecond - */ - void WriteTimeUTC(u32 name); - - /** - * Write a time stamp (AZStd::sys_time_t) in micriseconds. This function is inaccurate for long periods but it has ms resolution. - * For long periods use \ref WriteTimeUTC. - */ - void WriteTimeMicrosecond(u32 name); - - /// Called when the driller is moving on the next frame, so you can flush you current buffer to network/disk. - virtual void OnEndOfFrame() {} - - /// Sets the string pool used for this stream. To disable the pool just set it to NULL. - void SetStringPool(DrillerStringPool* stringPool) { m_stringPool = stringPool; } - - protected: - /// Write the Stream header structure (should be endianess independent). - void WriteHeader(); - - DrillerStringPool* m_stringPool; ///< Optional pointer to a string pool. - }; - - /** - * For efficiency all data read functions are placed with the parsers. - */ - class DrillerInputStream - { - public: - DrillerInputStream(DrillerStringPool* stringPool = NULL) - : m_isEndianSwap(false) - , m_stringPool(stringPool) {} - virtual ~DrillerInputStream() {} - - bool IsEndianSwap() const { return m_isEndianSwap; } - /// Reads binary data from a stream to to maxDataSize. Returns 0 if no more data. - virtual unsigned int ReadBinary(void* data, unsigned int maxDataSize) = 0; - - /// Sets the string pool used for this stream. To disable the pool just set it to NULL. - void SetStringPool(DrillerStringPool* stringPool) { m_stringPool = stringPool; } - DrillerStringPool* GetStringPool() const { return m_stringPool; } - - void SetIdentifier(const char* identifier) { m_streamIdentifier = identifier; } - const char* GetIdentifier() const { return m_streamIdentifier.c_str(); } - - protected: - /// Read the Stream header structure - bool ReadHeader(); - - bool m_isEndianSwap; - DrillerStringPool* m_stringPool; ///< Optional pointer to a string pool. - AZStd::string m_streamIdentifier; - }; - - /** - * Outputs all stream data into a memory buffer. It will grow automatically. - */ - class DrillerOutputMemoryStream - : public DrillerOutputStream - { - protected: - vector::type m_data; - public: - AZ_CLASS_ALLOCATOR(DrillerOutputMemoryStream, OSAllocator, 0) - DrillerOutputMemoryStream(size_t memorySize = 2048) { m_data.reserve(memorySize); } - const unsigned char* GetData() const { return m_data.data(); } - unsigned int GetDataSize() const { return static_cast(m_data.size()); } - inline void Reset() { m_data.clear(); } - void WriteBinary(const void* data, unsigned int dataSize) override - { - m_data.insert(m_data.end(), reinterpret_cast(data), reinterpret_cast(data) + dataSize); - } - }; - /** - * Reads data from a memory stream. Data is NOT copied and must be persistent while we are using it. - */ - class DrillerInputMemoryStream - : public DrillerInputStream - { - const unsigned char* m_data; - const unsigned char* m_dataEnd; - - public: - AZ_CLASS_ALLOCATOR(DrillerInputMemoryStream, OSAllocator, 0) - DrillerInputMemoryStream(const char* streamIdentifier = "", const void* data = nullptr, unsigned int dataSize = 0) - : DrillerInputStream() - , m_data(nullptr) - , m_dataEnd(nullptr) - { - if (data != nullptr) - { - SetData(streamIdentifier, data, dataSize); - } - } - - void SetData(const char* streamIdentifier, const void* data, unsigned int dataSize) - { - SetIdentifier(streamIdentifier); - - AZ_Assert(data != nullptr && dataSize > 0, "We must have a valid pointer %p and data size %d !", data, dataSize); - if (m_data == nullptr) // this is the first data chuck, read the platform - { - m_data = reinterpret_cast(data); - m_dataEnd = m_data + dataSize; - ReadHeader(); - } - else - { - m_data = reinterpret_cast(data); - m_dataEnd = m_data + dataSize; - } - } - - unsigned int GetDataLeft() const { return static_cast(m_dataEnd - m_data); } - unsigned int ReadBinary(void* data, unsigned int maxDataSize) override - { - AZ_Assert(m_data != nullptr, "You must call SetData function, before you can read data!"); - AZ_Assert(data != nullptr && maxDataSize > 0, "We must have a valid pointer and max data size!"); - unsigned int dataToCopy = AZStd::GetMin(static_cast(m_dataEnd - m_data), maxDataSize); - if (dataToCopy) - { - memcpy(data, m_data, dataToCopy); - } - m_data += dataToCopy; - return dataToCopy; - } - }; - - /** - * Outputs driller data to a file (buffered) - * IMPORTANT: We provide direct IO classes (instead trough Streamer), because the driller - * framework should NOT use engine systems (for example imagine we are drilling the Streamer, using it to - * write the drilled data will invalidate all the results as the streamer is unaware which data is driller data and which not) - */ - class DrillerOutputFileStream - : public IO::SystemFile - , public DrillerOutputStream - { - ZLib* m_zlib; - vector::type m_compressionBuffer; - vector::type m_dataBuffer; - public: - AZ_CLASS_ALLOCATOR(DrillerOutputFileStream, OSAllocator, 0) - DrillerOutputFileStream(); - ~DrillerOutputFileStream(); - bool Open(const char* fileName, int mode, int platformFlags = 0); - void Close(); - - void WriteBinary(const void* data, unsigned int dataSize) override; - }; - - /** - * Reads driller data from a file. - */ - class DrillerInputFileStream - : public AZ::IO::SystemFile - , public DrillerInputStream - { - ZLib* m_zlib; - vector::type m_compressedData; - public: - AZ_CLASS_ALLOCATOR(DrillerInputFileStream, OSAllocator, 0) - DrillerInputFileStream(); - ~DrillerInputFileStream(); - bool Open(const char* fileName, int mode, int platformFlags = 0); - unsigned int ReadBinary(void* data, unsigned int maxDataSize) override; - void Close(); - }; - - /** - * SAX like stream parser for driller data. We can stream the data - * and we will trigger events as tags and data (attributes) arrive. We use less memory this way. - * \note SAX is used as reference name, we are NOT trying to compatible with - * any specs. (not that SAX has specs) - * IMPORTANT: All data callbacks (tag and data) are called in the order they were at store. You can - * use this order as event index. - */ - class DrillerSAXParser - { - public: - struct Data - { - u32 m_name; ///< Crc name of the data entry. - void* m_data; ///< Pointer to copy if the loaded data. - unsigned int m_dataSize; ///< Data size in bytes. - mutable bool m_isEndianSwap; ///< True if the user will need to swap the endian when he access the data. We swap the data is the storage so we can read it multiple times without swap. - DrillerStringPool* m_stringPool; ///< Pointer to optional data string pool. - bool m_isPooledString; ///< True if we have a pooled string (stored in the stringPool already). - bool m_isPooledStringCrc32; ///< True is we have stored a crc32 (4 bytes) which refers to a string from the String Pool. - - ////////////////////////////////////////////////////////////////////////// - // Generic - template - inline void Read(T& t) const - { - static_assert(AZStd::is_pod::value, "T must be plain-old-data"); - - AZ_Assert(sizeof(t) >= m_dataSize, "You are about to lose some data, this is wrong."); - if (m_dataSize == sizeof(t)) - { - // do a memcpy as alignment might be required for some data types! This is not performance critical as we usually load drill files on x86/x64 - // which doesn't care about alignment. - memcpy(&t, m_data, m_dataSize); - } - else - { - AZ_Assert(AZStd::is_pointer::value || AZStd::is_integral::value, "We support extending only for integral types, float and pointers up to 8 bytes!"); - - if (AZStd::is_signed::value) - { - switch (m_dataSize) - { - case 1: - t = static_cast(*reinterpret_cast(m_data)); - break; - case 2: - t = static_cast(*reinterpret_cast(m_data)); - break; - case 4: - t = static_cast(*reinterpret_cast(m_data)); - break; - default: - AZ_Assert(false, "Source data size unsupported... we can extend only 1,2,4 bytes into 2,4,8 bytes integrals"); - } - } - else - { - switch (m_dataSize) - { - case 1: - t = static_cast(*reinterpret_cast(m_data)); - break; - case 2: - t = static_cast(*reinterpret_cast(m_data)); - break; - case 4: - t = static_cast(*reinterpret_cast(m_data)); - break; - default: - AZ_Assert(false, "Source data size unsupported... we can extend only 1,2,4 bytes into 2,4,8 bytes integrals"); - } - } - } - if (m_isEndianSwap) - { - AZStd::endian_swap(t); - } - } - - inline void Read(bool& b) const - { - u8* data = reinterpret_cast(m_data); - b = false; - for (unsigned int i = 0; i < m_dataSize; ++i) - { - if (data[i] != 0) - { - b = true; - return; - } - } - } - ////////////////////////////////////////////////////////////////////////// - // Binary and strings - inline unsigned int Read(void* buffer, unsigned int bufferSize) const - { - unsigned int dataToCopy = AZStd::GetMin(m_dataSize, bufferSize); - memcpy(buffer, m_data, dataToCopy); - // no data swap - return dataToCopy; - } - // a call avilable only when we use a string pool, it will return the pointer of string in the pool, so you don't need to copy it or do any fancy procedures. - inline const char* ReadPooledString() const - { - AZ_Assert(m_stringPool != nullptr, "This read type is supported only when we use string pool!"); - unsigned int srcDataSize; - return PrepareString(srcDataSize); - } - inline unsigned int Read(char* string, unsigned int maxNumChars) const - { - unsigned int srcDataSize; - const char* srcData = PrepareString(srcDataSize); - unsigned int dataToCopy = AZStd::GetMin(maxNumChars - 1, srcDataSize); - memcpy(string, srcData, dataToCopy); - string[dataToCopy] = '\0'; - return dataToCopy; - } - template - inline unsigned int Read(AZStd::basic_string& str) const - { - unsigned int srcDataSize; - const char* srcData = PrepareString(srcDataSize); - str = AZStd::basic_string(static_cast(srcData), srcDataSize); - return m_dataSize; - } - template - inline unsigned int Read(AZStd::basic_string& str) const - { - // wstring pooling not supported yet - str = AZStd::basic_string(static_cast(m_data), m_dataSize / 2); - if (m_isEndianSwap) - { - AZStd::endian_swap(str.begin(), str.end()); - } - return m_dataSize; - } - - ////////////////////////////////////////////////////////////////////////// - // math types - void Read(AZ::Vector3& v) const; - void Read(AZ::Vector4& v) const; - void Read(AZ::Aabb& aabb) const; - void Read(AZ::Obb& obb) const; - void Read(AZ::Transform& tm) const; - void Read(AZ::Matrix3x3& tm) const; - void Read(AZ::Matrix4x4& tm) const; - void Read(AZ::Quaternion& tm) const; - void Read(AZ::Plane& plane) const; - - ////////////////////////////////////////////////////////////////////////// - // containers - template - inline void Read(AZStd::insert_iterator& iter) const - { - typedef typename AZStd::insert_iterator InsertIterator; - // we can specialize for contiguous_iterator_tag so have only 1 write for all elements - const size_t elementSize = sizeof(InsertIterator::container_type::value_type); - size_t numElements = m_dataSize / elementSize; - AZ_Assert(m_dataSize % elementSize == 0, "Stored elements size doesn't match the read parameters!"); - Data elementEntry = *this; - elementEntry.m_dataSize = elementSize; - char* dataPtr = reinterpret_cast(m_data); - for (size_t i = 0; i < numElements; ++i, ++iter) - { - typename InsertIterator::container_type::value_type value; - elementEntry.m_data = dataPtr; - Read(elementEntry, value); - iter = value; - dataPtr += elementSize; - } - } - ////////////////////////////////////////////////////////////////////////// - private: - const char* PrepareString(unsigned int& stringLength) const; - }; - - typedef AZStd::delegate TagCallbackType; - typedef AZStd::delegate DataCallbackType; - - AZ_CLASS_ALLOCATOR(DrillerSAXParser, OSAllocator, 0) - DrillerSAXParser(const TagCallbackType& tcb, const DataCallbackType& dcb); - /// Processes an input stream until all data is consumed (read returns 0 bytes). - void ProcessStream(DrillerInputStream& stream); - protected: - - typedef vector::type BufferType; - BufferType m_buffer; - TagCallbackType m_tagCallback; - DataCallbackType m_dataCallback; - }; - - /** - * DOM like parser, we will load the entire stream in memory (ProcessStream function). - * Depending on the data size this can be very memory consuming. - * \note DOM is used as reference we are NOT compliant with the DOM specs in any way. - * IMPORTANT: All data is stored (for parsing) in the same order the events occurred - * or the remote machine. Each next tad or data was recorded in the way. You can use - * this as an event index. - */ - class DrillerDOMParser - : public DrillerSAXParser - { - public: - struct Node - { - typedef forward_list::type DataListType; - typedef forward_list::type NodeListType; - - u32 m_name; - Node* m_parent; - DataListType m_data; - NodeListType m_tags; - - /// Return a pointer to the first tag with specific name. - const Node* GetTag(u32 tagName) const; - /// Returns pointer to the first data entry with specific name. NULL if not data has been found. - const Data* GetData(u32 dataName) const; - /// Returns pointer to the first data entry with specific name. If it can't be found it will assert - const Data* GetDataRequired(u32 dataName) const - { - const Data* dataNode = GetData(dataName); - AZ_Assert(dataNode != NULL, "Data node in tag 0x%08x with name 0x%08x is required but missing!", m_name, dataName); - return dataNode; - } - }; - - AZ_CLASS_ALLOCATOR(DrillerDOMParser, OSAllocator, 0) - - DrillerDOMParser(bool isPersistentInputData = false); - ~DrillerDOMParser(); - /// return true if we are at top level of the tree and we can parse the data safely (there may be still more data, but it's top level only). - bool CanParse() const { return m_topNode == &m_root; } - - const Node* GetRootNode() const { return &m_root; } - protected: - Node m_root; - Node* m_topNode; - bool m_isPersistentInputData; ///< true if data that we process is persistent so we don't need to copy it internally, false otherwise. - - void OnTag(u32 name, bool isOpen); - void OnData(const Data& data); - void DeleteNode(Node& node); - }; - - /** - * Base class for handling a Tag with a specific name. Handlers are kept in a hierarchy - * with one required by DrillerSAXParserHandler to be able to handle tags at a root - * level for the driller data stream. - */ - class DrillerHandlerParser - { - public: - DrillerHandlerParser(bool isWarnOnUnsupportedTags = true) - : m_isWarnOnUnsupportedTags(isWarnOnUnsupportedTags) {} - - virtual ~DrillerHandlerParser() {} - /// Enumerate all the child tags that we support for the tag we are handling. If the tag is not know you should return NULL - virtual DrillerHandlerParser* OnEnterTag(u32 tagName) { (void)tagName; return NULL; } - /// Exit tag you are not required to implement this, we always exist tags in order FILO. - virtual void OnExitTag(DrillerHandlerParser* handler, u32 tagName) { (void)handler; (void)tagName; } - /// Handle that data for the tag we are handling. - virtual void OnData(const DrillerSAXParser::Data& dataNode) { (void)dataNode; } - /// Return the warning state on unsupported tags (sometime you might want to warn usually) and sometimes not (if you load newer drills, etc.) - inline bool IsWarnOnUnsupportedTags() const { return m_isWarnOnUnsupportedTags; } - - protected: - bool m_isWarnOnUnsupportedTags; - }; - - /** - * Processes a driller driller and dispatches the data based on the - * the DrillerHandlerParser (handlers) and their ability to handle specific tags. - * If a tag is NOT found as a child of the current one it will display a warning with the tag name - * (useless it's allowed by DrillerHandlerParser::IsWarnOnUnsupportedTags) and process the stream - * is a safe manner by skipping all the data and tags we can't handle. - */ - class DrillerSAXParserHandler - : public DrillerSAXParser - { - public: - AZ_CLASS_ALLOCATOR(DrillerSAXParserHandler, OSAllocator, 0) - - DrillerSAXParserHandler(DrillerHandlerParser* rootHandler); - - protected: - - /// Called from DrillerSAXParser when we have an open tag. - void OnTag(u32 name, bool isOpen); - /// Called from DrillerSAXParser when we have data, which will be forwarded to the handler. - void OnData(const DrillerSAXParser::Data& data); - - typedef vector::type DrillerHandlerStackType; - DrillerHandlerStackType m_stack; - }; - } // namespace Debug -} // namespace AZ - -#endif // AZCORE_DRILLER_STREAM_H -#pragma once - - diff --git a/Code/Framework/AzCore/AzCore/IO/FileIOEventBus.h b/Code/Framework/AzCore/AzCore/IO/FileIOEventBus.h deleted file mode 100644 index ba8fef9a7b..0000000000 --- a/Code/Framework/AzCore/AzCore/IO/FileIOEventBus.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef AZCORE_SYSTEM_FILE_BUS_H -#define AZCORE_SYSTEM_FILE_BUS_H - -#include -#include -#include - -namespace AZ -{ - namespace IO - { - /** - * File IO interface. All events return true if we executed the - * specific operation and no other code will be executed. If we return false - * the normal code for the specific event will be executed. - * IMPORTANT: We support multiple listeners with the idea that many systems can listen - * for event. This interface allows to actually perform the operations, in such cases make - * sure only one of the listeners provides this service (otherwise depending on registration - * order service providers may change) - * IMPORTANT: We don't provide any sync for the FileIOBus. We do that for a couple of reasons. - * 1. If you will handle file IO youself or keeptrack of statistics you code will most likely already do that - * 2. It is NOT safe to BusConnect/BusDisconnect while the FileIO is in use (this is why you should connect in advance) - * otherwise if you provide service you can end up connecting in a middle of reads/writes/etc. - */ - class FileIO - : public AZ::EBusTraits - { - public: - virtual ~FileIO() {} - virtual bool OnOpen(SystemFile& file, const char* fileName, int mode, int platformFlags, bool& isFileOpened) = 0; - virtual bool OnClose(SystemFile& file) = 0; - virtual bool OnSeek(SystemFile& file, SystemFile::SizeType offset, SystemFile::SeekMode mode) = 0; - virtual bool OnRead(SystemFile& file, SystemFile::SizeType byteSize, void* buffer, SystemFile::SizeType& numRead) = 0; - virtual bool OnWrite(SystemFile& file, const void* buffer, SystemFile::SizeType byteSize, SystemFile::SizeType& numWritten) = 0; - }; - - typedef AZ::EBus FileIOBus; - - /** - * Interface for handling file io events. All events are syncronized - */ - class FileIOEvents - : public AZ::EBusTraits - { - public: - virtual ~FileIOEvents() {} - - ////////////////////////////////////////////////////////////////////////// - // EBusTraits overrides - //TODO rbbaklov or zolniery look into why a recursive lock was not needed previously - typedef AZStd::recursive_mutex MutexType; //< make sure all file events are thread safe as they will called from many threads - ////////////////////////////////////////////////////////////////////////// - - /** - * You will either have a file (SystemFile) pointer or fileName pointer to the file name. - * \param fileName is provided when there is NO SystemFile object (when you call static functions). - */ - virtual void OnError(const SystemFile* file, const char* fileName, int errorCode) = 0; - }; - - typedef AZ::EBus FileIOEventBus; - } -} -#endif // AZCORE_SYSTEM_FILE_BUS_H -#pragma once diff --git a/Code/Framework/AzCore/AzCore/IO/SystemFile.cpp b/Code/Framework/AzCore/AzCore/IO/SystemFile.cpp index ac12a59609..12f4003144 100644 --- a/Code/Framework/AzCore/AzCore/IO/SystemFile.cpp +++ b/Code/Framework/AzCore/AzCore/IO/SystemFile.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include @@ -101,7 +100,6 @@ bool SystemFile::Open(const char* fileName, int mode, int platformFlags) { if (strlen(fileName) > m_fileName.max_size()) { - EBUS_EVENT(FileIOEventBus, OnError, this, nullptr, 0); return false; } @@ -109,17 +107,6 @@ bool SystemFile::Open(const char* fileName, int mode, int platformFlags) m_fileName = fileName; } - if (FileIOBus::HasHandlers()) - { - bool isOpen = false; - bool isHandled = false; - EBUS_EVENT_RESULT(isHandled, FileIOBus, OnOpen, *this, m_fileName.c_str(), mode, platformFlags, isOpen); - if (isHandled) - { - return isOpen; - } - } - AZ_Assert(!IsOpen(), "This file (%s) is already open!", m_fileName.c_str()); return PlatformOpen(mode, platformFlags); @@ -133,31 +120,11 @@ bool SystemFile::ReOpen(int mode, int platformFlags) void SystemFile::Close() { - if (FileIOBus::HasHandlers()) - { - bool isHandled = false; - EBUS_EVENT_RESULT(isHandled, FileIOBus, OnClose, *this); - if (isHandled) - { - return; - } - } - PlatformClose(); } void SystemFile::Seek(SeekSizeType offset, SeekMode mode) { - if (FileIOBus::HasHandlers()) - { - bool isHandled = false; - EBUS_EVENT_RESULT(isHandled, FileIOBus, OnSeek, *this, offset, mode); - if (isHandled) - { - return; - } - } - Platform::Seek(m_handle, this, offset, mode); } @@ -178,33 +145,11 @@ AZ::u64 SystemFile::ModificationTime() SystemFile::SizeType SystemFile::Read(SizeType byteSize, void* buffer) { - if (FileIOBus::HasHandlers()) - { - SizeType numRead = 0; - bool isHandled = false; - EBUS_EVENT_RESULT(isHandled, FileIOBus, OnRead, *this, byteSize, buffer, numRead); - if (isHandled) - { - return numRead; - } - } - return Platform::Read(m_handle, this, byteSize, buffer); } SystemFile::SizeType SystemFile::Write(const void* buffer, SizeType byteSize) { - if (FileIOBus::HasHandlers()) - { - SizeType numWritten = 0; - bool isHandled = false; - EBUS_EVENT_RESULT(isHandled, FileIOBus, OnWrite, *this, buffer, byteSize, numWritten); - if (isHandled) - { - return numWritten; - } - } - return Platform::Write(m_handle, this, buffer, byteSize); } diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocationRecords.cpp b/Code/Framework/AzCore/AzCore/Memory/AllocationRecords.cpp index b55b2db768..680d93501a 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocationRecords.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/AllocationRecords.cpp @@ -9,10 +9,10 @@ #include #include #include -#include #include #include +#include #include @@ -26,30 +26,25 @@ using namespace AZ::Debug; // AllocationRecords // [9/16/2009] //========================================================================= -AllocationRecords::AllocationRecords(unsigned char stackRecordLevels, bool isMemoryGuard, bool isMarkUnallocatedMemory, const char* allocatorName) +AllocationRecords::AllocationRecords(unsigned char stackRecordLevels, [[maybe_unused]] bool isMemoryGuard, bool isMarkUnallocatedMemory, const char* allocatorName) : m_mode(AllocatorManager::Instance().m_defaultTrackingRecordMode) , m_isAutoIntegrityCheck(false) , m_isMarkUnallocatedMemory(isMarkUnallocatedMemory) , m_saveNames(false) , m_decodeImmediately(false) , m_numStackLevels(stackRecordLevels) +#if defined(ENABLE_MEMORY_GUARD) + , m_memoryGuardSize(isMemoryGuard ? sizeof(Debug::GuardValue) : 0) +#else + , m_memoryGuardSize(0) +#endif , m_requestedAllocs(0) , m_requestedBytes(0) , m_requestedBytesPeak(0) , m_allocatorName(allocatorName) { -#if defined(ENABLE_MEMORY_GUARD) - m_memoryGuardSize = isMemoryGuard ? sizeof(Debug::GuardValue) : 0; -#else - (void)isMemoryGuard; - m_memoryGuardSize = 0; -#endif -#if AZ_TRAIT_OS_HAS_CRITICAL_SECTION_SPIN_COUNT - SetCriticalSectionSpinCount(DrillerEBusMutex::GetMutex().native_handle(), 4000); -#endif - // preallocate some buckets - //m_records.rehash(20000); -}; + +} //========================================================================= // ~AllocationRecords @@ -73,7 +68,7 @@ AllocationRecords::~AllocationRecords() void AllocationRecords::lock() { - DrillerEBusMutex::GetMutex().lock(); + m_recordsMutex.lock(); } //========================================================================= @@ -82,7 +77,7 @@ AllocationRecords::lock() //========================================================================= bool AllocationRecords::try_lock() { - return DrillerEBusMutex::GetMutex().try_lock(); + return m_recordsMutex.try_lock(); } //========================================================================= @@ -92,7 +87,7 @@ bool AllocationRecords::try_lock() void AllocationRecords::unlock() { - DrillerEBusMutex::GetMutex().unlock(); + m_recordsMutex.unlock(); } //========================================================================= @@ -117,7 +112,7 @@ AllocationRecords::RegisterAllocation(void* address, size_t byteSize, size_t ali { if (m_isAutoIntegrityCheck) { - IntegrityCheckNoLock(); + IntegrityCheck(); } AZ_Assert(byteSize>sizeof(Debug::GuardValue), "Did you forget to add the extra MemoryGuardSize() bytes?"); @@ -125,7 +120,11 @@ AllocationRecords::RegisterAllocation(void* address, size_t byteSize, size_t ali new(reinterpret_cast(address)+byteSize) Debug::GuardValue(); } - Debug::AllocationRecordsType::pair_iter_bool iterBool = m_records.insert_key(address); + Debug::AllocationRecordsType::pair_iter_bool iterBool; + { + AZStd::scoped_lock lock(m_recordsMutex); + iterBool = m_records.insert_key(address); + } if (!iterBool.second) { @@ -210,7 +209,15 @@ AllocationRecords::RegisterAllocation(void* address, size_t byteSize, size_t ali // statistics m_requestedBytes += byteSize; - m_requestedBytesPeak = AZStd::GetMax(m_requestedBytesPeak, m_requestedBytes); + + size_t currentRequestedBytePeak; + size_t newRequestedBytePeak; + do + { + currentRequestedBytePeak = m_requestedBytesPeak.load(std::memory_order::memory_order_relaxed); + newRequestedBytePeak = AZStd::GetMax(currentRequestedBytePeak, m_requestedBytes.load(std::memory_order::memory_order_relaxed)); + } while (!m_requestedBytesPeak.compare_exchange_weak(currentRequestedBytePeak, newRequestedBytePeak)); + ++m_requestedAllocs; return &ai; @@ -220,8 +227,7 @@ AllocationRecords::RegisterAllocation(void* address, size_t byteSize, size_t ali // UnregisterAllocation // [9/11/2009] //========================================================================= -void -AllocationRecords::UnregisterAllocation(void* address, size_t byteSize, size_t alignment, AllocationInfo* info) +void AllocationRecords::UnregisterAllocation(void* address, size_t byteSize, size_t alignment, AllocationInfo* info) { if (m_mode == RECORD_NO_RECORDS) { @@ -232,24 +238,38 @@ AllocationRecords::UnregisterAllocation(void* address, size_t byteSize, size_t a return; } - Debug::AllocationRecordsType::iterator iter = m_records.find(address); - - // We cannot assert if an allocation does not exist because our allocators start up way before the driller is started and the Allocator Records would be created. - // It is currently impossible to actually track all allocations that happen before a certain point - //AZ_Assert(iter!=m_records.end(), "Could not find address 0x%p in the allocator!", address); - if (iter == m_records.end()) + AllocationInfo allocationInfo; { - return; + AZStd::scoped_lock lock(m_recordsMutex); + Debug::AllocationRecordsType::iterator iter = m_records.find(address); + // We cannot assert if an allocation does not exist because allocations may have been made before tracking was enabled. + // It is currently impossible to actually track all allocations that happen before a certain point + // AZ_Assert(iter!=m_records.end(), "Could not find address 0x%p in the allocator!", address); + if (iter == m_records.end()) + { + return; + } + allocationInfo = iter->second; + m_records.erase(iter); + + // try to be more aggressive and keep the memory footprint low. + // \todo store the load factor at the last rehash to avoid unnecessary rehash + if (m_records.load_factor() < 0.9f) + { + m_records.rehash(0); + } } - AllocatorManager::Instance().DebugBreak(address, iter->second); + + + AllocatorManager::Instance().DebugBreak(address, allocationInfo); (void)byteSize; (void)alignment; - AZ_Assert(byteSize==0||byteSize==iter->second.m_byteSize, "Mismatched byteSize at deallocation! You supplied an invalid value!"); - AZ_Assert(alignment==0||alignment==iter->second.m_alignment, "Mismatched alignment at deallocation! You supplied an invalid value!"); + AZ_Assert(byteSize==0||byteSize==allocationInfo.m_byteSize, "Mismatched byteSize at deallocation! You supplied an invalid value!"); + AZ_Assert(alignment==0||alignment==allocationInfo.m_alignment, "Mismatched alignment at deallocation! You supplied an invalid value!"); // statistics - m_requestedBytes -= iter->second.m_byteSize; + m_requestedBytes -= allocationInfo.m_byteSize; #if defined(ENABLE_MEMORY_GUARD) // memory guard @@ -258,18 +278,18 @@ AllocationRecords::UnregisterAllocation(void* address, size_t byteSize, size_t a if (m_isAutoIntegrityCheck) { // full integrity check - IntegrityCheckNoLock(); + IntegrityCheck(); } else { // check current allocation - char* guardAddress = reinterpret_cast(address)+iter->second.m_byteSize; + char* guardAddress = reinterpret_cast(address)+allocationInfo.m_byteSize; Debug::GuardValue* guard = reinterpret_cast(guardAddress); if (!guard->Validate()) { AZ_Printf("Memory", "Memory stomp located at address %p, part of allocation:", guardAddress); PrintAllocationsCB printAlloc(true); - printAlloc(address, iter->second, m_numStackLevels); + printAlloc(address, allocationInfo, m_numStackLevels); AZ_Assert(false, "MEMORY STOMP DETECTED!!!"); } guard->~GuardValue(); @@ -278,33 +298,26 @@ AllocationRecords::UnregisterAllocation(void* address, size_t byteSize, size_t a #endif // delete allocation record - if (iter->second.m_namesBlock) + if (allocationInfo.m_namesBlock) { - m_records.get_allocator().deallocate(iter->second.m_namesBlock, iter->second.m_namesBlockSize, 1); - iter->second.m_namesBlock = nullptr; - iter->second.m_namesBlockSize = 0; - iter->second.m_name = nullptr; - iter->second.m_fileName = nullptr; + m_records.get_allocator().deallocate(allocationInfo.m_namesBlock, allocationInfo.m_namesBlockSize, 1); + allocationInfo.m_namesBlock = nullptr; + allocationInfo.m_namesBlockSize = 0; + allocationInfo.m_name = nullptr; + allocationInfo.m_fileName = nullptr; } - if (iter->second.m_stackFrames) + if (allocationInfo.m_stackFrames) { - m_records.get_allocator().deallocate(iter->second.m_stackFrames, sizeof(AZ::Debug::StackFrame)*m_numStackLevels, 1); - iter->second.m_stackFrames = nullptr; + m_records.get_allocator().deallocate(allocationInfo.m_stackFrames, sizeof(AZ::Debug::StackFrame)*m_numStackLevels, 1); + allocationInfo.m_stackFrames = nullptr; } if (info) { - *info = iter->second; + *info = allocationInfo; } - m_records.erase(iter); - // try to be more aggressive and keep the memory footprint low. - // \todo store the load factor at the last rehash to avoid unnecessary rehash - if (m_records.load_factor()<0.9f) - { - m_records.rehash(0); - } // if requested set memory to a specific value. if (m_isMarkUnallocatedMemory) @@ -325,9 +338,14 @@ AllocationRecords::ResizeAllocation(void* address, size_t newSize) return; } - Debug::AllocationRecordsType::iterator iter = m_records.find(address); - AZ_Assert(iter!=m_records.end(), "Could not find address 0x%p in the allocator!", address); - AllocatorManager::Instance().DebugBreak(address, iter->second); + AllocationInfo* allocationInfo; + { + AZStd::scoped_lock lock(m_recordsMutex); + Debug::AllocationRecordsType::iterator iter = m_records.find(address); + AZ_Assert(iter != m_records.end(), "Could not find address 0x%p in the allocator!", address); + allocationInfo = &iter->second; + } + AllocatorManager::Instance().DebugBreak(address, *allocationInfo); #if defined(ENABLE_MEMORY_GUARD) if (m_memoryGuardSize == sizeof(Debug::GuardValue)) @@ -335,12 +353,12 @@ AllocationRecords::ResizeAllocation(void* address, size_t newSize) if (m_isAutoIntegrityCheck) { // full integrity check - IntegrityCheckNoLock(); + IntegrityCheck(); } else { // check memory guard - char* guardAddress = reinterpret_cast(address)+iter->second.m_byteSize; + char* guardAddress = reinterpret_cast(address) + allocationInfo->m_byteSize; Debug::GuardValue* guard = reinterpret_cast(guardAddress); if (!guard->Validate()) { @@ -358,13 +376,19 @@ AllocationRecords::ResizeAllocation(void* address, size_t newSize) #endif // statistics - m_requestedBytes -= iter->second.m_byteSize; + m_requestedBytes -= allocationInfo->m_byteSize; m_requestedBytes += newSize; - m_requestedBytesPeak = AZStd::GetMax(m_requestedBytesPeak, m_requestedBytes); + size_t currentRequestedBytePeak; + size_t newRequestedBytePeak; + do + { + currentRequestedBytePeak = m_requestedBytesPeak.load(std::memory_order::memory_order_relaxed); + newRequestedBytePeak = AZStd::GetMax(currentRequestedBytePeak, m_requestedBytes.load(std::memory_order::memory_order_relaxed)); + } while (!m_requestedBytesPeak.compare_exchange_weak(currentRequestedBytePeak, newRequestedBytePeak)); ++m_requestedAllocs; // update allocation size - iter->second.m_byteSize = newSize; + allocationInfo->m_byteSize = newSize; } //========================================================================= @@ -374,21 +398,20 @@ AllocationRecords::ResizeAllocation(void* address, size_t newSize) void AllocationRecords::SetMode(Mode mode) { - DrillerEBusMutex::GetMutex().lock(); - - if (mode==RECORD_NO_RECORDS) + if (mode == RECORD_NO_RECORDS) { - m_records.clear(); + { + AZStd::scoped_lock lock(m_recordsMutex); + m_records.clear(); + } m_requestedBytes = 0; m_requestedBytesPeak = 0; m_requestedAllocs = 0; } - AZ_Warning("Memory", m_mode!=RECORD_NO_RECORDS||mode==RECORD_NO_RECORDS, "Records recording was disabled and now it's enabled! You might get assert when you free memory, if a you have allocations which were not recorded!"); + AZ_Warning("Memory", m_mode != RECORD_NO_RECORDS || mode == RECORD_NO_RECORDS, "Records recording was disabled and now it's enabled! You might get assert when you free memory, if a you have allocations which were not recorded!"); m_mode = mode; - - DrillerEBusMutex::GetMutex().unlock(); } //========================================================================= @@ -398,11 +421,14 @@ AllocationRecords::SetMode(Mode mode) void AllocationRecords::EnumerateAllocations(AllocationInfoCBType cb) { - DrillerEBusMutex::GetMutex().lock(); // enumerate all allocations and stop if requested. // Since allocations can change during the iteration (code that prints out the records could allocate, which will // mutate m_records), we are going to make a copy and iterate the copy. - const Debug::AllocationRecordsType recordsCopy = m_records; + Debug::AllocationRecordsType recordsCopy; + { + AZStd::scoped_lock lock(m_recordsMutex); + recordsCopy = m_records; + } for (Debug::AllocationRecordsType::const_iterator iter = recordsCopy.begin(); iter != recordsCopy.end(); ++iter) { if (!cb(iter->first, iter->second, m_numStackLevels)) @@ -410,7 +436,6 @@ AllocationRecords::EnumerateAllocations(AllocationInfoCBType cb) break; } } - DrillerEBusMutex::GetMutex().unlock(); } //========================================================================= @@ -419,39 +444,30 @@ AllocationRecords::EnumerateAllocations(AllocationInfoCBType cb) //========================================================================= void AllocationRecords::IntegrityCheck() const -{ - if (m_memoryGuardSize == sizeof(Debug::GuardValue)) - { - DrillerEBusMutex::GetMutex().lock(); - - IntegrityCheckNoLock(); - - DrillerEBusMutex::GetMutex().unlock(); - } -} - -//========================================================================= -// IntegrityCheckNoLock -// [9/13/2011] -//========================================================================= -void -AllocationRecords::IntegrityCheckNoLock() const { #if defined(ENABLE_MEMORY_GUARD) - for (Debug::AllocationRecordsType::const_iterator iter = m_records.begin(); iter != m_records.end(); ++iter) + if (m_memoryGuardSize == sizeof(Debug::GuardValue)) { - // check memory guard - const char* guardAddress = reinterpret_cast(iter->first)+ iter->second.m_byteSize; - if (!reinterpret_cast(guardAddress)->Validate()) + Debug::AllocationRecordsType recordsCopy; { - // We have to turn off the integrity check at this point if we want to succesfully report the memory - // stomp we just found. If we don't turn this off, the printf just winds off the stack as each memory - // allocation done therein recurses this same code. - *const_cast(&m_isAutoIntegrityCheck) = false; - AZ_Printf("Memory", "Memory stomp located at address %p, part of allocation:", guardAddress); - PrintAllocationsCB printAlloc(true); - printAlloc(iter->first, iter->second, m_numStackLevels); - AZ_Error("Memory", false, "MEMORY STOMP DETECTED!!!"); + AZStd::scoped_lock lock(m_recordsMutex); + recordsCopy = m_records; + } + for (Debug::AllocationRecordsType::const_iterator iter = recordsCopy.begin(); iter != recordsCopy.end(); ++iter) + { + // check memory guard + const char* guardAddress = reinterpret_cast(iter->first)+ iter->second.m_byteSize; + if (!reinterpret_cast(guardAddress)->Validate()) + { + // We have to turn off the integrity check at this point if we want to succesfully report the memory + // stomp we just found. If we don't turn this off, the printf just winds off the stack as each memory + // allocation done therein recurses this same code. + *const_cast(&m_isAutoIntegrityCheck) = false; + AZ_Printf("Memory", "Memory stomp located at address %p, part of allocation:", guardAddress); + PrintAllocationsCB printAlloc(true); + printAlloc(iter->first, iter->second, m_numStackLevels); + AZ_Error("Memory", false, "MEMORY STOMP DETECTED!!!"); + } } } #endif diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocationRecords.h b/Code/Framework/AzCore/AzCore/Memory/AllocationRecords.h index 709e16174d..3f998b0bbd 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocationRecords.h +++ b/Code/Framework/AzCore/AzCore/Memory/AllocationRecords.h @@ -120,10 +120,9 @@ namespace AZ */ class AllocationRecords { - friend class MemoryDriller; + public: AZ_CLASS_ALLOCATOR(AllocationRecords, OSAllocator, 0); - public: enum Mode : int { RECORD_NO_RECORDS, ///< Never record any information. @@ -178,7 +177,7 @@ namespace AZ /// Returns peak of requested memory. IMPORTANT: This is user requested memory! Any allocator overhead is NOT included. size_t RequestedBytesPeak() const { return m_requestedBytesPeak; } /// Reset the peak allocation to the current requested memory. - void ResetPeakBytes() { m_requestedBytesPeak = m_requestedBytes; } + void ResetPeakBytes() { m_requestedBytesPeak.store(m_requestedBytes); } /// Return requested user bytes. IMPORTANT: This is user requested memory! Any allocator overhead is NOT included. size_t RequestedBytes() const { return m_requestedBytes; } /// Returns total number of requested allocations. @@ -186,8 +185,6 @@ namespace AZ const char* GetAllocatorName() const { return m_allocatorName; } - protected: - // @{ Allocation tracking management - we assume this functions are called with the lock locked. const AllocationInfo* RegisterAllocation(void* address, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, unsigned int stackSuppressCount); void UnregisterAllocation(void* address, size_t byteSize, size_t alignment, AllocationInfo* info); @@ -195,9 +192,9 @@ namespace AZ void ResizeAllocation(void* address, size_t newSize); // @} - void IntegrityCheckNoLock() const; - + protected: Debug::AllocationRecordsType m_records; + AZStd::spin_mutex m_recordsMutex; Mode m_mode; bool m_isAutoIntegrityCheck; bool m_isMarkUnallocatedMemory; ///< True if we want to set value 0xcd in unallocated memory. @@ -205,9 +202,9 @@ namespace AZ bool m_decodeImmediately; unsigned char m_numStackLevels; unsigned int m_memoryGuardSize; - size_t m_requestedAllocs; - size_t m_requestedBytes; - size_t m_requestedBytesPeak; + AZStd::atomic m_requestedAllocs; + AZStd::atomic m_requestedBytes; + AZStd::atomic m_requestedBytesPeak; const char* m_allocatorName; }; diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp b/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp index 40ddff0fc3..7bba1b1d20 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp @@ -8,7 +8,6 @@ #include #include -#include using namespace AZ; @@ -117,16 +116,24 @@ void AllocatorBase::PostCreate() } } -#if PLATFORM_MEMORY_INSTRUMENTATION_ENABLED - m_platformMemoryInstrumentationGroupId = AZ::PlatformMemoryInstrumentation::GetNextGroupId(); - AZ::PlatformMemoryInstrumentation::RegisterGroup(m_platformMemoryInstrumentationGroupId, GetDescription(), AZ::PlatformMemoryInstrumentation::m_groupRoot); -#endif + const auto debugConfig = GetDebugConfig(); + if (!debugConfig.m_excludeFromDebugging) + { + SetRecords(aznew Debug::AllocationRecords((unsigned char)debugConfig.m_stackRecordLevels, debugConfig.m_usesMemoryGuards, debugConfig.m_marksUnallocatedMemory, GetName())); + } m_isReady = true; } void AllocatorBase::PreDestroy() { + Debug::AllocationRecords* allocatorRecords = GetRecords(); + if(allocatorRecords) + { + delete allocatorRecords; + SetRecords(nullptr); + } + if (m_registrationEnabled && AZ::AllocatorManager::IsReady()) { AllocatorManager::Instance().UnRegisterAllocator(this); @@ -173,11 +180,11 @@ void AllocatorBase::ProfileAllocation(void* ptr, size_t byteSize, size_t alignme if (m_isProfilingActive) { -#if PLATFORM_MEMORY_INSTRUMENTATION_ENABLED - AZ::PlatformMemoryInstrumentation::Alloc(ptr, byteSize, 0, m_platformMemoryInstrumentationGroupId); -#else - EBUS_EVENT(AZ::Debug::MemoryDrillerBus, RegisterAllocation, this, ptr, byteSize, alignment, name, fileName, lineNum, suppressStackRecord); -#endif + auto records = GetRecords(); + if (records) + { + records->RegisterAllocation(ptr, byteSize, alignment, name, fileName, lineNum, suppressStackRecord + 1); + } } #if RECORDING_ENABLED @@ -195,11 +202,11 @@ void AllocatorBase::ProfileDeallocation(void* ptr, size_t byteSize, size_t align { if (m_isProfilingActive) { -#if PLATFORM_MEMORY_INSTRUMENTATION_ENABLED - AZ::PlatformMemoryInstrumentation::Free(ptr); -#else - EBUS_EVENT(AZ::Debug::MemoryDrillerBus, UnregisterAllocation, this, ptr, byteSize, alignment, info); -#endif + auto records = GetRecords(); + if (records) + { + records->UnregisterAllocation(ptr, byteSize, alignment, info); + } } #if RECORDING_ENABLED { @@ -212,29 +219,17 @@ void AllocatorBase::ProfileDeallocation(void* ptr, size_t byteSize, size_t align #endif } -void AllocatorBase::ProfileReallocationBegin(void* ptr, size_t newSize) +void AllocatorBase::ProfileReallocationBegin([[maybe_unused]] void* ptr, [[maybe_unused]] size_t newSize) { - if (m_isProfilingActive) - { -#if PLATFORM_MEMORY_INSTRUMENTATION_ENABLED - AZ::PlatformMemoryInstrumentation::ReallocBegin(ptr, newSize, m_platformMemoryInstrumentationGroupId); -#else - // Driller API intensionally not called, only End is required. - AZ_UNUSED(ptr); - AZ_UNUSED(newSize); -#endif - } } void AllocatorBase::ProfileReallocationEnd(void* ptr, void* newPtr, size_t newSize, size_t newAlignment) { if (m_isProfilingActive) { -#if PLATFORM_MEMORY_INSTRUMENTATION_ENABLED - AZ::PlatformMemoryInstrumentation::ReallocEnd(newPtr, newSize, 0); -#else - EBUS_EVENT(AZ::Debug::MemoryDrillerBus, ReallocateAllocation, this, ptr, newPtr, newSize, newAlignment); -#endif + Debug::AllocationInfo info; + ProfileDeallocation(ptr, 0, 0, &info); + ProfileAllocation(newPtr, newSize, newAlignment, info.m_name, info.m_fileName, info.m_lineNum, 0); } #if RECORDING_ENABLED { @@ -257,7 +252,11 @@ void AllocatorBase::ProfileResize(void* ptr, size_t newSize) { if (newSize && m_isProfilingActive) { - EBUS_EVENT(AZ::Debug::MemoryDrillerBus, ResizeAllocation, this, ptr, newSize); + auto records = GetRecords(); + if (records) + { + records->ResizeAllocation(ptr, newSize); + } } #if RECORDING_ENABLED { diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.h b/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.h index 0502c25e5d..8f8a17e470 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.h +++ b/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.h @@ -8,7 +8,6 @@ #pragma once #include -#include namespace AZ { @@ -103,16 +102,13 @@ namespace AZ const char* m_name = nullptr; const char* m_desc = nullptr; - Debug::AllocationRecords* m_records = nullptr; // Cached pointer to allocation records. Works together with the MemoryDriller. + Debug::AllocationRecords* m_records = nullptr; // Cached pointer to allocation records size_t m_memoryGuardSize = 0; bool m_isLazilyCreated = false; bool m_isProfilingActive = false; bool m_isReady = false; bool m_canBeOverridden = true; bool m_registrationEnabled = true; -#if PLATFORM_MEMORY_INSTRUMENTATION_ENABLED - uint16_t m_platformMemoryInstrumentationGroupId = 0; -#endif }; namespace Internal { diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.cpp b/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.cpp index 44ce08ebd9..70ac813972 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.cpp @@ -14,7 +14,6 @@ #include #include #include -#include #include #include @@ -215,8 +214,6 @@ AllocatorManager::RegisterAllocator(class IAllocator* alloc) #ifdef AZCORE_MEMORY_ENABLE_OVERRIDES ConfigureAllocatorOverrides(alloc); #endif - - EBUS_EVENT(Debug::MemoryDrillerBus, RegisterAllocator, alloc); } //========================================================================= @@ -319,11 +316,6 @@ AllocatorManager::UnRegisterAllocator(class IAllocator* alloc) { AZStd::lock_guard lock(m_allocatorListMutex); - if (alloc->GetRecords()) - { - EBUS_EVENT(Debug::MemoryDrillerBus, UnregisterAllocator, alloc); - } - for (int i = 0; i < m_numAllocators; ++i) { if (m_allocators[i] == alloc) diff --git a/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapAllocator.cpp b/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapAllocator.cpp index ca414df4b5..30b0b78fe5 100644 --- a/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapAllocator.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapAllocator.cpp @@ -10,7 +10,6 @@ #include #include -#include #include @@ -79,8 +78,14 @@ AllocatorDebugConfig BestFitExternalMapAllocator::GetDebugConfig() // Allocate // [1/28/2011] //========================================================================= -BestFitExternalMapAllocator::pointer_type -BestFitExternalMapAllocator::Allocate(size_type byteSize, size_type alignment, int flags, const char* name, const char* fileName, int lineNum, unsigned int suppressStackRecord) +BestFitExternalMapAllocator::pointer_type BestFitExternalMapAllocator::Allocate( + size_type byteSize, + size_type alignment, + int flags, + [[maybe_unused]] const char* name, + [[maybe_unused]] const char* fileName, + [[maybe_unused]] int lineNum, + unsigned int suppressStackRecord) { (void)suppressStackRecord; @@ -89,17 +94,6 @@ BestFitExternalMapAllocator::Allocate(size_type byteSize, size_type alignment, i byteSize = MemorySizeAdjustedUp(byteSize); BestFitExternalMapAllocator::pointer_type address = m_schema->Allocate(byteSize, alignment, flags); - if (address == nullptr) - { - if (!OnOutOfMemory(byteSize, alignment, flags, name, fileName, lineNum)) - { - if (GetRecords()) - { - EBUS_EVENT(Debug::MemoryDrillerBus, DumpAllAllocations); - } - } - } - AZ_Assert(address != nullptr, "BestFitExternalMapAllocator: Failed to allocate %d bytes aligned on %d (flags: 0x%08x) %s : %s (%d)!", byteSize, alignment, flags, name ? name : "(no name)", fileName ? fileName : "(no file name)", lineNum); AZ_MEMORY_PROFILE(ProfileAllocation(address, byteSize, alignment, name, fileName, lineNum, suppressStackRecord + 1)); diff --git a/Code/Framework/AzCore/AzCore/Memory/IAllocator.h b/Code/Framework/AzCore/AzCore/Memory/IAllocator.h index 1aa4cf70f5..532335e50b 100644 --- a/Code/Framework/AzCore/AzCore/Memory/IAllocator.h +++ b/Code/Framework/AzCore/AzCore/Memory/IAllocator.h @@ -14,7 +14,6 @@ namespace AZ namespace Debug { class AllocationRecords; - class MemoryDriller; } namespace AllocatorStorage @@ -83,7 +82,7 @@ namespace AZ /// Sets the number of entries to omit from the top of the callstack when recording stack traces. AllocatorDebugConfig& StackRecordLevels(int levels) { m_stackRecordLevels = levels; return *this; } - /// Set to true if this allocator should not have its records recorded and analyzed by systems like the MemoryDriller. + /// Set to true if this allocator should not have its records recorded and analyzed. AllocatorDebugConfig& ExcludeFromDebugging(bool exclude = true) { m_excludeFromDebugging = exclude; return *this; } /// Set to true if this allocator expands allocations with guard sections to detect overruns. @@ -207,8 +206,6 @@ namespace AZ template friend class AllocatorWrapper; - - friend class Debug::MemoryDriller; }; } diff --git a/Code/Framework/AzCore/AzCore/Memory/MemoryDriller.cpp b/Code/Framework/AzCore/AzCore/Memory/MemoryDriller.cpp deleted file mode 100644 index dc35c6322b..0000000000 --- a/Code/Framework/AzCore/AzCore/Memory/MemoryDriller.cpp +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include - -#include -#include - -#include -#include - -namespace AZ::Debug -{ - //========================================================================= - // MemoryDriller - // [2/6/2013] - //========================================================================= - MemoryDriller::MemoryDriller(const Descriptor& desc) - { - (void)desc; - BusConnect(); - - AllocatorManager::Instance().EnterProfilingMode(); - - { - // Register all allocators that were created before the driller existed - auto allocatorLock = AllocatorManager::Instance().LockAllocators(); - - for (int i = 0; i < AllocatorManager::Instance().GetNumAllocators(); ++i) - { - IAllocator* allocator = AllocatorManager::Instance().GetAllocator(i); - RegisterAllocator(allocator); - } - } - } - - //========================================================================= - // ~MemoryDriller - // [2/6/2013] - //========================================================================= - MemoryDriller::~MemoryDriller() - { - BusDisconnect(); - AllocatorManager::Instance().ExitProfilingMode(); - } - - //========================================================================= - // Start - // [2/6/2013] - //========================================================================= - void MemoryDriller::Start(const Param* params, int numParams) - { - (void)params; - (void)numParams; - - // dump current allocations for all allocators with tracking - auto allocatorLock = AllocatorManager::Instance().LockAllocators(); - for (int i = 0; i < AllocatorManager::Instance().GetNumAllocators(); ++i) - { - IAllocator* allocator = AllocatorManager::Instance().GetAllocator(i); - if (auto records = allocator->GetRecords()) - { - RegisterAllocatorOutput(allocator); - const AllocationRecordsType& allocMap = records->GetMap(); - for (AllocationRecordsType::const_iterator allocIt = allocMap.begin(); allocIt != allocMap.end(); ++allocIt) - { - RegisterAllocationOutput(allocator, allocIt->first, &allocIt->second); - } - } - } - } - - //========================================================================= - // Stop - // [2/6/2013] - //========================================================================= - void MemoryDriller::Stop() - { - } - - //========================================================================= - // RegisterAllocator - // [2/6/2013] - //========================================================================= - void MemoryDriller::RegisterAllocator(IAllocator* allocator) - { - // Ignore if our allocator is already registered - if (allocator->GetRecords() != nullptr) - { - return; - } - - auto debugConfig = allocator->GetDebugConfig(); - - if (!debugConfig.m_excludeFromDebugging) - { - allocator->SetRecords(aznew Debug::AllocationRecords((unsigned char)debugConfig.m_stackRecordLevels, debugConfig.m_usesMemoryGuards, debugConfig.m_marksUnallocatedMemory, allocator->GetName())); - - m_allAllocatorRecords.push_back(allocator->GetRecords()); - - if (m_output == nullptr) - { - return; // we have no active output - } - RegisterAllocatorOutput(allocator); - } - } - //========================================================================= - // RegisterAllocatorOutput - // [2/6/2013] - //========================================================================= - void MemoryDriller::RegisterAllocatorOutput(IAllocator* allocator) - { - auto records = allocator->GetRecords(); - m_output->BeginTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - m_output->BeginTag(AZ_CRC("RegisterAllocator", 0x19f08114)); - m_output->Write(AZ_CRC("Name", 0x5e237e06), allocator->GetName()); - m_output->Write(AZ_CRC("Id", 0xbf396750), allocator); - m_output->Write(AZ_CRC("Capacity", 0xb5e8b174), allocator->GetAllocationSource()->Capacity()); - m_output->Write(AZ_CRC("RecordsId", 0x7caaca88), records); - if (records) - { - m_output->Write(AZ_CRC("RecordsMode", 0x764c147a), (char)records->GetMode()); - m_output->Write(AZ_CRC("NumStackLevels", 0xad9cff15), records->GetNumStackLevels()); - } - m_output->EndTag(AZ_CRC("RegisterAllocator", 0x19f08114)); - m_output->EndTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - } - - //========================================================================= - // UnregisterAllocator - // [2/6/2013] - //========================================================================= - void MemoryDriller::UnregisterAllocator(IAllocator* allocator) - { - auto allocatorRecords = allocator->GetRecords(); - AZ_Assert(allocatorRecords, "This allocator is not registered with the memory driller!"); - for (auto records : m_allAllocatorRecords) - { - if (records == allocatorRecords) - { - m_allAllocatorRecords.remove(records); - break; - } - } - delete allocatorRecords; - allocator->SetRecords(nullptr); - - if (m_output == nullptr) - { - return; // we have no active output - } - m_output->BeginTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - m_output->Write(AZ_CRC("UnregisterAllocator", 0xb2b54f93), allocator); - m_output->EndTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - } - - //========================================================================= - // RegisterAllocation - // [2/6/2013] - //========================================================================= - void MemoryDriller::RegisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, unsigned int stackSuppressCount) - { - auto records = allocator->GetRecords(); - if (records) - { - const AllocationInfo* info = records->RegisterAllocation(address, byteSize, alignment, name, fileName, lineNum, stackSuppressCount + 1); - if (m_output == nullptr) - { - return; // we have no active output - } - RegisterAllocationOutput(allocator, address, info); - } - } - - //========================================================================= - // RegisterAllocationOutput - // [2/6/2013] - //========================================================================= - void MemoryDriller::RegisterAllocationOutput(IAllocator* allocator, void* address, const AllocationInfo* info) - { - auto records = allocator->GetRecords(); - m_output->BeginTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - m_output->BeginTag(AZ_CRC("RegisterAllocation", 0x992a9780)); - m_output->Write(AZ_CRC("RecordsId", 0x7caaca88), records); - m_output->Write(AZ_CRC("Address", 0x0d4e6f81), address); - if (info) - { - if (info->m_name) - { - m_output->Write(AZ_CRC("Name", 0x5e237e06), info->m_name); - } - m_output->Write(AZ_CRC("Alignment", 0x2cce1e5c), info->m_alignment); - m_output->Write(AZ_CRC("Size", 0xf7c0246a), info->m_byteSize); - if (info->m_fileName) - { - m_output->Write(AZ_CRC("FileName", 0x3c0be965), info->m_fileName); - m_output->Write(AZ_CRC("FileLine", 0xb33c2395), info->m_lineNum); - } - // copy the stack frames directly, resolving the stack should happen later as this is a SLOW procedure. - if (info->m_stackFrames) - { - m_output->Write(AZ_CRC("Stack", 0x41a87b6a), info->m_stackFrames, info->m_stackFrames + records->GetNumStackLevels()); - } - } - m_output->EndTag(AZ_CRC("RegisterAllocation", 0x992a9780)); - m_output->EndTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - } - - //========================================================================= - // UnRegisterAllocation - // [2/6/2013] - //========================================================================= - void MemoryDriller::UnregisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, AllocationInfo* info) - { - auto records = allocator->GetRecords(); - if (records) - { - records->UnregisterAllocation(address, byteSize, alignment, info); - - if (m_output == nullptr) - { - return; // we have no active output - } - m_output->BeginTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - m_output->BeginTag(AZ_CRC("UnRegisterAllocation", 0xea5dc4cd)); - m_output->Write(AZ_CRC("RecordsId", 0x7caaca88), records); - m_output->Write(AZ_CRC("Address", 0x0d4e6f81), address); - m_output->EndTag(AZ_CRC("UnRegisterAllocation", 0xea5dc4cd)); - m_output->EndTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - } - } - - //========================================================================= - // ReallocateAllocation - // [10/1/2018] - //========================================================================= - void MemoryDriller::ReallocateAllocation(IAllocator* allocator, void* prevAddress, void* newAddress, size_t newByteSize, size_t newAlignment) - { - AllocationInfo info; - UnregisterAllocation(allocator, prevAddress, 0, 0, &info); - RegisterAllocation(allocator, newAddress, newByteSize, newAlignment, info.m_name, info.m_fileName, info.m_lineNum, 0); - } - - //========================================================================= - // ResizeAllocation - // [2/6/2013] - //========================================================================= - void MemoryDriller::ResizeAllocation(IAllocator* allocator, void* address, size_t newSize) - { - auto records = allocator->GetRecords(); - if (records) - { - records->ResizeAllocation(address, newSize); - - if (m_output == nullptr) - { - return; // we have no active output - } - m_output->BeginTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - m_output->BeginTag(AZ_CRC("ResizeAllocation", 0x8a9c78dc)); - m_output->Write(AZ_CRC("RecordsId", 0x7caaca88), records); - m_output->Write(AZ_CRC("Address", 0x0d4e6f81), address); - m_output->Write(AZ_CRC("Size", 0xf7c0246a), newSize); - m_output->EndTag(AZ_CRC("ResizeAllocation", 0x8a9c78dc)); - m_output->EndTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - } - } - - void MemoryDriller::DumpAllAllocations() - { - // Create a copy so allocations done during the printing dont end up affecting the container - const AZStd::list allocationRecords = m_allAllocatorRecords; - - for (auto records : allocationRecords) - { - // Skip if we have had no allocations made - if (records->RequestedAllocs()) - { - records->EnumerateAllocations(AZ::Debug::PrintAllocationsCB(true, true)); - } - } - } - -} // namespace AZ::Debug diff --git a/Code/Framework/AzCore/AzCore/Memory/MemoryDriller.h b/Code/Framework/AzCore/AzCore/Memory/MemoryDriller.h deleted file mode 100644 index 9bcbc85217..0000000000 --- a/Code/Framework/AzCore/AzCore/Memory/MemoryDriller.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef AZCORE_MEMORY_DRILLER_H -#define AZCORE_MEMORY_DRILLER_H 1 - -#include -#include - -namespace AZ -{ - namespace Debug - { - struct StackFrame; - - /** - * Trace messages driller class - */ - class MemoryDriller - : public Driller - , public MemoryDrillerBus::Handler - { - public: - AZ_CLASS_ALLOCATOR(MemoryDriller, OSAllocator, 0) - - // TODO: Centralized settings for memory tracking. - struct Descriptor - { - }; - - MemoryDriller(const Descriptor& desc = Descriptor()); - ~MemoryDriller(); - - protected: - ////////////////////////////////////////////////////////////////////////// - // Driller - const char* GroupName() const override { return "SystemDrillers"; } - const char* GetName() const override { return "MemoryDriller"; } - const char* GetDescription() const override { return "Reports all allocators and memory allocations."; } - void Start(const Param* params = NULL, int numParams = 0) override; - void Stop() override; - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // MemoryDrillerBus - void RegisterAllocator(IAllocator* allocator) override; - void UnregisterAllocator(IAllocator* allocator) override; - - void RegisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, unsigned int stackSuppressCount) override; - void UnregisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, AllocationInfo* info) override; - void ReallocateAllocation(IAllocator* allocator, void* prevAddress, void* newAddress, size_t newByteSize, size_t newAlignment) override; - void ResizeAllocation(IAllocator* allocator, void* address, size_t newSize) override; - - void DumpAllAllocations() override; - ////////////////////////////////////////////////////////////////////////// - - void RegisterAllocatorOutput(IAllocator* allocator); - void RegisterAllocationOutput(IAllocator* allocator, void* address, const AllocationInfo* info); - private: - // Store a list of all of our allocator records so we can dump them all without having to know about the allocators - AZStd::list m_allAllocatorRecords; - }; - } // namespace Debug -} // namespace AZ - -#endif // AZCORE_MEMORY_DRILLER_H -#pragma once diff --git a/Code/Framework/AzCore/AzCore/Memory/MemoryDrillerBus.h b/Code/Framework/AzCore/AzCore/Memory/MemoryDrillerBus.h deleted file mode 100644 index 43a31af006..0000000000 --- a/Code/Framework/AzCore/AzCore/Memory/MemoryDrillerBus.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef AZCORE_MEMORY_DRILLER_BUS_H -#define AZCORE_MEMORY_DRILLER_BUS_H 1 - -#include - -namespace AZ -{ - class IAllocator; - namespace Debug - { - //class AllocationRecords; - struct AllocationInfo; - - /** - * Memory allocations driller message. - * - * We use a driller bus so all messages are sending in exclusive matter no other driller messages - * can be triggered at that moment, so we already preserve the calling order. You can assume - * all access code in the driller framework in guarded. You can manually lock the driller mutex are you - * use by using \ref AZ::Debug::DrillerEBusMutex. - */ - class MemoryDrillerMessages - : public AZ::Debug::DrillerEBusTraits - { - public: - virtual ~MemoryDrillerMessages() {} - - /// Register allocation (with customizable tracking settings - TODO: we should centralize this settings and remove them from here) - virtual void RegisterAllocator(IAllocator* allocator) = 0; - virtual void UnregisterAllocator(IAllocator* allocator) = 0; - - virtual void RegisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, unsigned int stackSuppressCount) = 0; - virtual void UnregisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, AllocationInfo* info) = 0; - virtual void ReallocateAllocation(IAllocator* allocator, void* prevAddress, void* newAddress, size_t newByteSize, size_t newAlignment) = 0; - virtual void ResizeAllocation(IAllocator* allocator, void* address, size_t newSize) = 0; - - virtual void DumpAllAllocations() = 0; - }; - - typedef AZ::EBus MemoryDrillerBus; - } // namespace Debug -} // namespace AZ - -#endif // AZCORE_MEMORY_DRILLER_BUS_H -#pragma once diff --git a/Code/Framework/AzCore/AzCore/Memory/OSAllocator.h b/Code/Framework/AzCore/AzCore/Memory/OSAllocator.h index b327cf6349..3a8080483b 100644 --- a/Code/Framework/AzCore/AzCore/Memory/OSAllocator.h +++ b/Code/Framework/AzCore/AzCore/Memory/OSAllocator.h @@ -20,7 +20,7 @@ namespace AZ * OS allocator should be used for direct OS allocations (C heap) * It's memory usage is NOT tracked. If you don't create this allocator, it will be implicitly * created by the SystemAllocator when it is needed. In addition this allocator is used for - * debug data (like drillers, memory trackng, etc.) + * debug data (like memory tracking, etc.) */ class OSAllocator : public AllocatorBase diff --git a/Code/Framework/AzCore/AzCore/Memory/PlatformMemoryInstrumentation.h b/Code/Framework/AzCore/AzCore/Memory/PlatformMemoryInstrumentation.h deleted file mode 100644 index bc6499566d..0000000000 --- a/Code/Framework/AzCore/AzCore/Memory/PlatformMemoryInstrumentation.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include - -#if AZ_TRAIT_OS_MEMORY_INSTRUMENTATION && !defined(_RELEASE) -#define PLATFORM_MEMORY_INSTRUMENTATION_ENABLED 1 -#else -#define PLATFORM_MEMORY_INSTRUMENTATION_ENABLED 0 -#endif - -#if PLATFORM_MEMORY_INSTRUMENTATION_ENABLED - -#include -#include - -namespace AZ -{ - /** - * PlatformMemoryInstrumentation - Abstraction layer for platform specific memory instrumentation. - */ - class PlatformMemoryInstrumentation - { - public: - static uint16_t GetNextGroupId() { return m_nextGroupId++; }; - static void RegisterGroup(uint16_t id, const char* name, uint16_t parentGroup); - static void Alloc(const void* ptr, uint64_t size, uint32_t padding, uint16_t group); - static void Free(const void* ptr); - static void ReallocBegin(const void* origPtr, uint64_t size, uint16_t group); - static void ReallocEnd(const void* newPtr, uint64_t size, uint32_t padding); - static const uint16_t m_groupRoot; - static uint16_t m_nextGroupId; - }; -} - -#endif // PLATFORM_MEMORY_INSTRUMENTATION_ENABLED diff --git a/Code/Framework/AzCore/AzCore/Memory/PoolAllocator.h b/Code/Framework/AzCore/AzCore/Memory/PoolAllocator.h index 72418b3d6e..a03f7b5b92 100644 --- a/Code/Framework/AzCore/AzCore/Memory/PoolAllocator.h +++ b/Code/Framework/AzCore/AzCore/Memory/PoolAllocator.h @@ -12,9 +12,6 @@ #include #include -#include - - namespace AZ { template diff --git a/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.cpp b/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.cpp index 9ce681ef2d..e56f4f045d 100644 --- a/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.cpp @@ -11,7 +11,6 @@ #include #include -#include #include @@ -232,14 +231,6 @@ SystemAllocator::Allocate(size_type byteSize, size_type alignment, int flags, co if (address == nullptr) { byteSize = MemorySizeAdjustedDown(byteSize); // restore original size - - if (!OnOutOfMemory(byteSize, alignment, flags, name, fileName, lineNum)) - { - if (GetRecords()) - { - EBUS_EVENT(Debug::MemoryDrillerBus, DumpAllAllocations); - } - } } AZ_Assert(address != nullptr, "SystemAllocator: Failed to allocate %d bytes aligned on %d (flags: 0x%08x) %s : %s (%d)!", byteSize, alignment, flags, name ? name : "(no name)", fileName ? fileName : "(no file name)", lineNum); diff --git a/Code/Framework/AzCore/AzCore/Script/ScriptContext.cpp b/Code/Framework/AzCore/AzCore/Script/ScriptContext.cpp index 45f7876993..841387f14d 100644 --- a/Code/Framework/AzCore/AzCore/Script/ScriptContext.cpp +++ b/Code/Framework/AzCore/AzCore/Script/ScriptContext.cpp @@ -5073,13 +5073,26 @@ LUA_API const Node* lua_getDummyNode() // Check all constructors if they have use ScriptDataContext and if so choose this one if (!customConstructorMethod) { + int overrideIndex = -1; + AZ::AttributeReader(nullptr, FindAttribute + ( Script::Attributes::DefaultConstructorOverrideIndex, behaviorClass->m_attributes)).Read(overrideIndex); + + int methodIndex = 0; for (BehaviorMethod* method : behaviorClass->m_constructors) { + if (methodIndex == overrideIndex) + { + customConstructorMethod = method; + break; + } + if (method->GetNumArguments() && method->GetArgument(method->GetNumArguments() - 1)->m_typeId == AZ::AzTypeInfo::Uuid()) { customConstructorMethod = method; break; } + + ++methodIndex; } } diff --git a/Code/Framework/AzCore/AzCore/Script/ScriptContextAttributes.h b/Code/Framework/AzCore/AzCore/Script/ScriptContextAttributes.h index 9807f0af39..e238289ef5 100644 --- a/Code/Framework/AzCore/AzCore/Script/ScriptContextAttributes.h +++ b/Code/Framework/AzCore/AzCore/Script/ScriptContextAttributes.h @@ -21,6 +21,7 @@ namespace AZ static constexpr AZ::Crc32 ClassNameOverride = AZ_CRC_CE("ScriptClassNameOverride"); ///< Provide a custom name for script reflection, that doesn't match the behavior Context name static constexpr AZ::Crc32 MethodOverride = AZ_CRC_CE("ScriptFunctionOverride"); ///< Use a custom function in the attribute instead of the function static constexpr AZ::Crc32 ConstructorOverride = AZ_CRC_CE("ConstructorOverride"); ///< You can provide a custom constructor to be called when created from Lua script + static constexpr AZ::Crc32 DefaultConstructorOverrideIndex = AZ_CRC_CE("DefaultConstructorOverrideIndex"); ///< Use a different class constructor as the default constructor in Lua static constexpr AZ::Crc32 EventHandlerCreationFunction = AZ_CRC_CE("EventHandlerCreationFunction"); ///< helps create a handler for any script target so that script functions can be used for AZ::Event signals static constexpr AZ::Crc32 GenericConstructorOverride = AZ_CRC_CE("GenericConstructorOverride"); ///< You can provide a custom constructor to be called when creating a script static constexpr AZ::Crc32 ReaderWriterOverride = AZ_CRC_CE("ReaderWriterOverride"); ///< paired with \ref ScriptContext::CustomReaderWriter allows you to customize read/write to Lua VM diff --git a/Code/Framework/AzCore/AzCore/Serialization/EditContextConstants.inl b/Code/Framework/AzCore/AzCore/Serialization/EditContextConstants.inl index 4f8c67f058..27f27dd6dd 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/EditContextConstants.inl +++ b/Code/Framework/AzCore/AzCore/Serialization/EditContextConstants.inl @@ -133,6 +133,8 @@ namespace AZ const static AZ::Crc32 AllowClearAsset = AZ_CRC("AllowClearAsset", 0x24827182); // Show the name of the asset that was produced from the source asset const static AZ::Crc32 ShowProductAssetFileName = AZ_CRC("ShowProductAssetFileName"); + //! Regular expression pattern filter for source files + const static AZ::Crc32 SourceAssetFilterPattern = AZ_CRC_CE("SourceAssetFilterPattern"); //! Component icon attributes const static AZ::Crc32 Icon = AZ_CRC("Icon", 0x659429db); diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/BaseJsonSerializer.cpp b/Code/Framework/AzCore/AzCore/Serialization/Json/BaseJsonSerializer.cpp index 7309955a1c..4f5657a328 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/BaseJsonSerializer.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/BaseJsonSerializer.cpp @@ -204,6 +204,22 @@ namespace AZ // BaseJsonSerializer // + JsonSerializationResult::Result BaseJsonSerializer::Load(void* outputValue, const Uuid& outputValueTypeId, const rapidjson::Value& inputValue, + JsonDeserializerContext& context) + { + JsonSerializationResult::ResultCode result(JsonSerializationResult::Tasks::ReadField); + result.Combine(ContinueLoading(outputValue, outputValueTypeId, inputValue, context, ContinuationFlags::IgnoreTypeSerializer)); + return context.Report(result, "Ignoring custom serialization during load"); + } + + JsonSerializationResult::Result BaseJsonSerializer::Store(rapidjson::Value& outputValue, const void* inputValue, const void* defaultValue, + const Uuid& valueTypeId, JsonSerializerContext& context) + { + JsonSerializationResult::ResultCode result(JsonSerializationResult::Tasks::WriteValue); + result.Combine(ContinueStoring(outputValue, inputValue, defaultValue, valueTypeId, context, ContinuationFlags::IgnoreTypeSerializer)); + return context.Report(result, "Ignoring custom serialization during store"); + } + BaseJsonSerializer::OperationFlags BaseJsonSerializer::GetOperationsFlags() const { return OperationFlags::None; diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/BaseJsonSerializer.h b/Code/Framework/AzCore/AzCore/Serialization/Json/BaseJsonSerializer.h index 7d2af01c16..4e8f545367 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/BaseJsonSerializer.h +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/BaseJsonSerializer.h @@ -180,13 +180,16 @@ namespace AZ //! Transforms the data from the rapidjson Value to outputValue, if the conversion is possible and supported. //! The serializer is responsible for casting to the proper type and safely writing to the outputValue memory. + //! \note The default implementation is to load the object ignoring a custom serializers for the type, which allows for custom serializers + //! to modify the object after all default loading has occurred. virtual JsonSerializationResult::Result Load(void* outputValue, const Uuid& outputValueTypeId, const rapidjson::Value& inputValue, - JsonDeserializerContext& context) = 0; + JsonDeserializerContext& context); //! Write the input value to a rapidjson value if the default value is not null and doesn't match the input value, otherwise //! an error is returned and sets the rapidjson value to a null value. + //! \note The default implementation is to store the object ignoring custom serializers. virtual JsonSerializationResult::Result Store(rapidjson::Value& outputValue, const void* inputValue, const void* defaultValue, - const Uuid& valueTypeId, JsonSerializerContext& context) = 0; + const Uuid& valueTypeId, JsonSerializerContext& context); //! Returns the operation flags which tells the Json Serialization how this custom json serializer can be used. virtual OperationFlags GetOperationsFlags() const; diff --git a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryConsoleUtils.h b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryConsoleUtils.h index 1807a27604..2e37431839 100644 --- a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryConsoleUtils.h +++ b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryConsoleUtils.h @@ -23,7 +23,7 @@ namespace AZ::SettingsRegistryConsoleUtils inline constexpr const char* SettingsRegistryRemove = "sr_regremove"; inline constexpr const char* SettingsRegistryDump = "sr_regdump"; inline constexpr const char* SettingsRegistryDumpAll = "sr_regdumpall"; - inline constexpr const char* SettingsRegistryMergeFile = "sr_regset-file"; + inline constexpr const char* SettingsRegistryMergeFile = "sr_regset_file"; // RAII structure which owns the instances of the Settings Registry Console commands // registered with an AZ Console @@ -53,7 +53,7 @@ namespace AZ::SettingsRegistryConsoleUtils //! "sr_regdumpall" accepts 0 arguments and dumps the entire settings registry //! NOTE: this might result in a large amount of output to the console //! - //! "sr_regset-file" accepts 1 or 2 arguments - [] + //! "sr_regset_file" accepts 1 or 2 arguments - [] //! Merges the json formatted file into the settings registry underneath the root anchor "" //! or if supplied [[nodiscard]] ConsoleFunctorHandle RegisterAzConsoleCommands(SettingsRegistryInterface& registry, AZ::IConsole& azConsole); diff --git a/Code/Framework/AzCore/AzCore/Slice/SliceAssetHandler.cpp b/Code/Framework/AzCore/AzCore/Slice/SliceAssetHandler.cpp index 551ca1258d..a942d0c9f1 100644 --- a/Code/Framework/AzCore/AzCore/Slice/SliceAssetHandler.cpp +++ b/Code/Framework/AzCore/AzCore/Slice/SliceAssetHandler.cpp @@ -13,7 +13,6 @@ #include #include #include -#include namespace AZ { diff --git a/Code/Framework/AzCore/AzCore/Task/TaskGraph.h b/Code/Framework/AzCore/AzCore/Task/TaskGraph.h index fa6f5dbe94..ffe3ea6caf 100644 --- a/Code/Framework/AzCore/AzCore/Task/TaskGraph.h +++ b/Code/Framework/AzCore/AzCore/Task/TaskGraph.h @@ -16,6 +16,7 @@ #include #include #include +#include namespace AZ { diff --git a/Code/Framework/AzCore/AzCore/UnitTest/TestTypes.h b/Code/Framework/AzCore/AzCore/UnitTest/TestTypes.h index e5dcb32d9d..afa6898944 100644 --- a/Code/Framework/AzCore/AzCore/UnitTest/TestTypes.h +++ b/Code/Framework/AzCore/AzCore/UnitTest/TestTypes.h @@ -13,8 +13,6 @@ #include #include -#include -#include #include #if defined(HAVE_BENCHMARK) @@ -39,7 +37,6 @@ namespace UnitTest */ class AllocatorsBase { - AZ::Debug::DrillerManager* m_drillerManager; bool m_ownsAllocator{}; public: @@ -47,8 +44,7 @@ namespace UnitTest void SetupAllocator(const AZ::SystemAllocator::Descriptor& allocatorDesc = {}) { - m_drillerManager = AZ::Debug::DrillerManager::Create(); - m_drillerManager->Register(aznew AZ::Debug::MemoryDriller); + AZ::AllocatorManager::Instance().EnterProfilingMode(); AZ::AllocatorManager::Instance().SetDefaultTrackingMode(AZ::Debug::AllocationRecords::RECORD_FULL); // Only create the SystemAllocator if it s not ready @@ -68,9 +64,9 @@ namespace UnitTest AZ::AllocatorInstance::Destroy(); } m_ownsAllocator = false; - AZ::Debug::DrillerManager::Destroy(m_drillerManager); AZ::AllocatorManager::Instance().SetDefaultTrackingMode(AZ::Debug::AllocationRecords::RECORD_NO_RECORDS); + AZ::AllocatorManager::Instance().ExitProfilingMode(); } }; @@ -93,8 +89,7 @@ namespace UnitTest * Helper class to handle the boiler plate of setting up a test fixture that uses the system allocators * If you wish to do additional setup and tear down be sure to call the base class SetUp first and TearDown * last. - * By default memory tracking through driller is enabled. - * Defaults to a heap size of 15 MB + * By default memory tracking is enabled. */ class AllocatorsTestFixture @@ -123,8 +118,7 @@ namespace UnitTest * Helper class to handle the boiler plate of setting up a benchmark fixture that uses the system allocators * If you wish to do additional setup and tear down be sure to call the base class SetUp first and TearDown * last. - * By default memory tracking through driller is disabled. - * Defaults to a heap size of 15 MB + * By default memory tracking is enabled. */ class AllocatorsBenchmarkFixture : public ::benchmark::Fixture diff --git a/Code/Framework/AzCore/AzCore/Utils/Utils.cpp b/Code/Framework/AzCore/AzCore/Utils/Utils.cpp index 12c6473905..1623aca56b 100644 --- a/Code/Framework/AzCore/AzCore/Utils/Utils.cpp +++ b/Code/Framework/AzCore/AzCore/Utils/Utils.cpp @@ -165,13 +165,12 @@ namespace AZ::Utils } Container fileContent; - fileContent.resize(length); + fileContent.resize_no_construct(length); AZ::IO::SizeType bytesRead = file.Read(length, fileContent.data()); file.Close(); // Resize again just in case bytesRead is less than length for some reason - fileContent.resize(bytesRead); - + fileContent.resize_no_construct(bytesRead); return AZ::Success(AZStd::move(fileContent)); } diff --git a/Code/Framework/AzCore/AzCore/azcore_files.cmake b/Code/Framework/AzCore/AzCore/azcore_files.cmake index 0c381c9850..e8001f7215 100644 --- a/Code/Framework/AzCore/AzCore/azcore_files.cmake +++ b/Code/Framework/AzCore/AzCore/azcore_files.cmake @@ -92,10 +92,6 @@ set(FILES Compression/Compression.h Compression/zstd_compression.cpp Compression/zstd_compression.h - Debug/AssetTracking.cpp - Debug/AssetTracking.h - Debug/AssetTrackingTypesImpl.h - Debug/AssetTrackingTypes.h Debug/Budget.h Debug/Budget.cpp Debug/BudgetTracker.h @@ -111,30 +107,21 @@ set(FILES Debug/ProfilerReflection.cpp Debug/ProfilerReflection.h Debug/StackTracer.h - Debug/EventTrace.h - Debug/EventTrace.cpp - Debug/EventTraceDriller.h - Debug/EventTraceDriller.cpp - Debug/EventTraceDrillerBus.h Debug/Timer.h Debug/Trace.cpp Debug/Trace.h Debug/TraceMessageBus.h - Debug/TraceMessagesDriller.cpp - Debug/TraceMessagesDriller.h - Debug/TraceMessagesDrillerBus.h Debug/TraceReflection.cpp Debug/TraceReflection.h + DOM/DomBackend.cpp + DOM/DomBackend.h + DOM/DomUtils.cpp + DOM/DomUtils.h DOM/DomVisitor.cpp DOM/DomVisitor.h - Driller/DefaultStringPool.h - Driller/Driller.cpp - Driller/Driller.h - Driller/DrillerBus.cpp - Driller/DrillerBus.h - Driller/DrillerRootHandler.h - Driller/Stream.cpp - Driller/Stream.h + DOM/Backends/JSON/JsonBackend.h + DOM/Backends/JSON/JsonSerializationUtils.cpp + DOM/Backends/JSON/JsonSerializationUtils.h EBus/BusImpl.h EBus/EBus.h EBus/EBusEnvironment.cpp @@ -171,7 +158,6 @@ set(FILES IO/CompressorZStd.h IO/FileIO.cpp IO/FileIO.h - IO/FileIOEventBus.h IO/FileReader.cpp IO/FileReader.h IO/IOUtils.h @@ -397,16 +383,12 @@ set(FILES Memory/Memory.h Memory/MemoryComponent.cpp Memory/MemoryComponent.h - Memory/MemoryDriller.cpp - Memory/MemoryDriller.h - Memory/MemoryDrillerBus.h Memory/nedmalloc.inl Memory/NewAndDelete.inl Memory/OSAllocator.cpp Memory/OSAllocator.h Memory/OverrunDetectionAllocator.cpp Memory/OverrunDetectionAllocator.h - Memory/PlatformMemoryInstrumentation.h Memory/PoolAllocator.h Memory/PoolSchema.cpp Memory/PoolSchema.h diff --git a/Code/Framework/AzCore/AzCore/std/parallel/threadbus.h b/Code/Framework/AzCore/AzCore/std/parallel/threadbus.h index 26c2f92edb..85b716a6fa 100644 --- a/Code/Framework/AzCore/AzCore/std/parallel/threadbus.h +++ b/Code/Framework/AzCore/AzCore/std/parallel/threadbus.h @@ -8,9 +8,9 @@ #ifndef AZSTD_THREAD_BUS_H #define AZSTD_THREAD_BUS_H 1 -#include #include #include +#include namespace AZStd { @@ -32,24 +32,7 @@ namespace AZStd virtual void OnThreadExit(const AZStd::thread::id& id) = 0; }; - //! Thread events driller bus - only "drillers" (profilers) should connect to this. - //! A global mutex that includes a lock on the memory manager and other driller busses - //! is held during dispatch, and listeners are expected to do no allocation - //! or thread workloads or blocking or mutex operations of their own - only dump the data to - //! network or file ASAP. - //! DO NOT USE this bus unless you are a profiler capture system, use the ThreadEvents / ThreadBus instead - class ThreadDrillerEvents - : public AZ::Debug::DrillerEBusTraits - { - public: - /// Called when we enter a thread, optional thread_desc is provided when the use provides one. - virtual void OnThreadEnter(const AZStd::thread::id& id, const AZStd::thread_desc* desc) = 0; - /// Called when we exit a thread. - virtual void OnThreadExit(const AZStd::thread::id& id) = 0; - }; - typedef AZ::EBus ThreadEventBus; - typedef AZ::EBus ThreadDrillerEventBus; } #endif // AZSTD_THREAD_BUS_H diff --git a/Code/Framework/AzCore/Platform/Android/AzCore/IO/SystemFile_Android.cpp b/Code/Framework/AzCore/Platform/Android/AzCore/IO/SystemFile_Android.cpp index b9a6cfef9a..a0b95960ed 100644 --- a/Code/Framework/AzCore/Platform/Android/AzCore/IO/SystemFile_Android.cpp +++ b/Code/Framework/AzCore/Platform/Android/AzCore/IO/SystemFile_Android.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include @@ -87,7 +86,6 @@ bool SystemFile::PlatformOpen(int mode, int platformFlags) } else { - EBUS_EVENT(FileIOEventBus, OnError, this, nullptr, EINVAL); return false; } @@ -103,7 +101,6 @@ bool SystemFile::PlatformOpen(int mode, int platformFlags) { if (isApkFile) { - EBUS_EVENT(FileIOEventBus, OnError, this, nullptr, ENOSPC); return false; } @@ -125,7 +122,6 @@ bool SystemFile::PlatformOpen(int mode, int platformFlags) if (m_handle == PlatformSpecificInvalidHandle) { - EBUS_EVENT(FileIOEventBus, OnError, this, nullptr, errorCode); return false; } @@ -168,22 +164,8 @@ namespace Platform::Internal entry = readdir(dir); } - int lastError = errno; - if (lastError != 0) - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, filter, lastError); - } - closedir(dir); } - else - { - int lastError = errno; - if (lastError != ENOENT) - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, filter, 0); - } - } } void FindFilesInApk(const char* filter, const SystemFile::FindFileCB& cb) @@ -233,11 +215,7 @@ namespace Platform { if (handle != PlatformSpecificInvalidHandle) { - off_t result = fseeko(handle, static_cast(offset), mode); - if (result != 0) - { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, errno); - } + fseeko(handle, static_cast(offset), mode); } } @@ -248,7 +226,6 @@ namespace Platform off_t result = ftello(handle); if (result == (off_t)-1) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, errno); return 0; } return aznumeric_cast(result); @@ -292,7 +269,6 @@ namespace Platform if (bytesRead != bytesToRead && ferror(handle)) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, errno); return 0; } @@ -311,7 +287,6 @@ namespace Platform if (bytesWritten != bytesToWrite && ferror(handle)) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, errno); return 0; } @@ -325,10 +300,7 @@ namespace Platform { if (handle != PlatformSpecificInvalidHandle) { - if (fflush(handle) != 0) - { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, errno); - } + fflush(handle); } } @@ -347,7 +319,6 @@ namespace Platform struct stat fileStat; if (stat(fileName, &fileStat) < 0) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, 0); return 0; } return static_cast(fileStat.st_size); diff --git a/Code/Framework/AzCore/Platform/Common/Apple/AzCore/IO/SystemFile_Apple.cpp b/Code/Framework/AzCore/Platform/Common/Apple/AzCore/IO/SystemFile_Apple.cpp index be5cbc3859..deb2d49516 100644 --- a/Code/Framework/AzCore/Platform/Common/Apple/AzCore/IO/SystemFile_Apple.cpp +++ b/Code/Framework/AzCore/Platform/Common/Apple/AzCore/IO/SystemFile_Apple.cpp @@ -7,9 +7,9 @@ */ #include -#include #include #include +#include #include #include <../Common/UnixLike/AzCore/IO/Internal/SystemFileUtils_UnixLike.h> @@ -44,21 +44,7 @@ namespace AZ::IO::Platform entry = readdir(dir); } - int lastError = errno; - if (lastError != 0) - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, filter, lastError); - } - closedir(dir); } - else - { - int lastError = errno; - if (lastError != ENOENT) - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, filter, 0); - } - } } } diff --git a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/IO/SystemFile_UnixLike.cpp b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/IO/SystemFile_UnixLike.cpp index 8f651a9559..2bf7fdc5f2 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/IO/SystemFile_UnixLike.cpp +++ b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/IO/SystemFile_UnixLike.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include @@ -130,7 +129,6 @@ namespace Platform int result = remove(fileName); if (result != 0) { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, fileName, result); return false; } @@ -142,7 +140,6 @@ namespace Platform int result = rename(sourceFileName, targetFileName); if (result) { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, sourceFileName, result); return false; } @@ -198,10 +195,6 @@ namespace Platform } azstrcpy(dirPath, AZ_MAX_PATH_LEN, dirName); bool success = CreateDirRecursive(dirPath); - if (!success) - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, dirName, errno); - } return success; } return false; diff --git a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/std/parallel/internal/thread_UnixLike.cpp b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/std/parallel/internal/thread_UnixLike.cpp index b615f677f1..da5d95b9a4 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/std/parallel/internal/thread_UnixLike.cpp +++ b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/std/parallel/internal/thread_UnixLike.cpp @@ -35,7 +35,6 @@ namespace AZStd destroy_thread_info(ti); ThreadEventBus::Broadcast(&ThreadEventBus::Events::OnThreadExit, this_thread::get_id()); - ThreadDrillerEventBus::Broadcast(&ThreadDrillerEventBus::Events::OnThreadExit, this_thread::get_id()); pthread_exit(nullptr); return nullptr; } @@ -88,7 +87,6 @@ namespace AZStd Platform::PostCreateThread(tId, name, cpuId); ThreadEventBus::Broadcast(&ThreadEventBus::Events::OnThreadEnter, thread::id(tId), desc); - ThreadDrillerEventBus::Broadcast(&ThreadDrillerEventBus::Events::OnThreadEnter, thread::id(tId), desc); return tId; } } diff --git a/Code/Framework/AzCore/Platform/Common/UnixLikeDefault/AzCore/IO/SystemFile_UnixLikeDefault.cpp b/Code/Framework/AzCore/Platform/Common/UnixLikeDefault/AzCore/IO/SystemFile_UnixLikeDefault.cpp index 88c47ed142..7302232a49 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLikeDefault/AzCore/IO/SystemFile_UnixLikeDefault.cpp +++ b/Code/Framework/AzCore/Platform/Common/UnixLikeDefault/AzCore/IO/SystemFile_UnixLikeDefault.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include @@ -61,7 +60,6 @@ bool SystemFile::PlatformOpen(int mode, int platformFlags) } else { - EBUS_EVENT(FileIOEventBus, OnError, this, nullptr, 0); return false; } @@ -88,7 +86,6 @@ bool SystemFile::PlatformOpen(int mode, int platformFlags) if (m_handle == PlatformSpecificInvalidHandle) { - EBUS_EVENT(FileIOEventBus, OnError, this, nullptr, errno); return false; } else @@ -119,11 +116,7 @@ namespace Platform { if (handle != PlatformSpecificInvalidHandle) { - int result = lseek(handle, offset, mode); - if (result == -1) - { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, errno); - } + lseek(handle, offset, mode); } } @@ -132,10 +125,6 @@ namespace Platform if (handle != PlatformSpecificInvalidHandle) { off_t result = lseek(handle, 0, SEEK_CUR); - if (result == (off_t)-1) - { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, errno); - } return aznumeric_cast(result); } @@ -149,14 +138,12 @@ namespace Platform off_t current = lseek(handle, 0, SEEK_CUR); if (current == (off_t)-1) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, current); return false; } off_t end = lseek(handle, 0, SEEK_END); if (end == (off_t)-1) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, end); return false; } @@ -191,7 +178,6 @@ namespace Platform ssize_t bytesRead = read(handle, buffer, byteSize); if (bytesRead == -1) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, errno); return 0; } return bytesRead; @@ -207,7 +193,6 @@ namespace Platform ssize_t result = write(handle, buffer, byteSize); if (result == -1) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, errno); return 0; } return result; @@ -221,10 +206,7 @@ namespace Platform if (handle != PlatformSpecificInvalidHandle) { #if AZ_TRAIT_SYSTEMFILE_FSYNC_IS_DEFINED - if (fsync(handle) != 0) - { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, errno); - } + fsync(handle); #endif } } @@ -236,7 +218,6 @@ namespace Platform struct stat stat; if (fstat(handle, &stat) < 0) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, 0); return 0; } return stat.st_size; diff --git a/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/Debug/Trace_WinAPI.cpp b/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/Debug/Trace_WinAPI.cpp index 4535387902..d090971359 100644 --- a/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/Debug/Trace_WinAPI.cpp +++ b/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/Debug/Trace_WinAPI.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include #include @@ -186,8 +185,6 @@ namespace AZ::Debug Debug::Trace::Instance().PrintCallstack(nullptr, 0, ExceptionInfo->ContextRecord); - EBUS_EVENT(Debug::TraceMessageDrillerBus, OnException, message); - bool result = false; EBUS_EVENT_RESULT(result, Debug::TraceMessageBus, OnException, message); if (result) diff --git a/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/IO/SystemFile_WinAPI.cpp b/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/IO/SystemFile_WinAPI.cpp index 0fe32dcd4a..d608d67a85 100644 --- a/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/IO/SystemFile_WinAPI.cpp +++ b/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/IO/SystemFile_WinAPI.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include @@ -142,7 +141,6 @@ bool SystemFile::PlatformOpen(int mode, int platformFlags) if (m_handle == INVALID_HANDLE_VALUE) { - EBUS_EVENT(FileIOEventBus, OnError, this, nullptr, (int)GetLastError()); return false; } else @@ -160,10 +158,7 @@ void SystemFile::PlatformClose() { if (m_handle != PlatformSpecificInvalidHandle) { - if (!CloseHandle(m_handle)) - { - EBUS_EVENT(FileIOEventBus, OnError, this, nullptr, (int)GetLastError()); - } + CloseHandle(m_handle); m_handle = INVALID_HANDLE_VALUE; } } @@ -177,7 +172,7 @@ namespace Platform { using FileHandleType = AZ::IO::SystemFile::FileHandleType; - void Seek(FileHandleType handle, const SystemFile* systemFile, SystemFile::SeekSizeType offset, SystemFile::SeekMode mode) + void Seek(FileHandleType handle, [[maybe_unused]] const SystemFile* systemFile, SystemFile::SeekSizeType offset, SystemFile::SeekMode mode) { if (handle != PlatformSpecificInvalidHandle) { @@ -185,14 +180,11 @@ namespace Platform LARGE_INTEGER distToMove; distToMove.QuadPart = offset; - if (!SetFilePointerEx(handle, distToMove, 0, dwMoveMethod)) - { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, (int)GetLastError()); - } + SetFilePointerEx(handle, distToMove, 0, dwMoveMethod); } } - SystemFile::SizeType Tell(FileHandleType handle, const SystemFile* systemFile) + SystemFile::SizeType Tell(FileHandleType handle, [[maybe_unused]] const SystemFile* systemFile) { if (handle != PlatformSpecificInvalidHandle) { @@ -202,7 +194,6 @@ namespace Platform LARGE_INTEGER newFilePtr; if (!SetFilePointerEx(handle, distToMove, &newFilePtr, FILE_CURRENT)) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, (int)GetLastError()); return 0; } @@ -212,7 +203,7 @@ namespace Platform return 0; } - bool Eof(FileHandleType handle, const SystemFile* systemFile) + bool Eof(FileHandleType handle, [[maybe_unused]] const SystemFile* systemFile) { if (handle != PlatformSpecificInvalidHandle) { @@ -222,14 +213,12 @@ namespace Platform LARGE_INTEGER currentFilePtr; if (!SetFilePointerEx(handle, zero, ¤tFilePtr, FILE_CURRENT)) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, (int)GetLastError()); return false; } FILE_STANDARD_INFO fileInfo; if (!GetFileInformationByHandleEx(handle, FileStandardInfo, &fileInfo, sizeof(fileInfo))) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, (int)GetLastError()); return false; } @@ -239,14 +228,13 @@ namespace Platform return false; } - AZ::u64 ModificationTime(FileHandleType handle, const SystemFile* systemFile) + AZ::u64 ModificationTime(FileHandleType handle, [[maybe_unused]] const SystemFile* systemFile) { if (handle != PlatformSpecificInvalidHandle) { FILE_BASIC_INFO fileInfo; if (!GetFileInformationByHandleEx(handle, FileBasicInfo, &fileInfo, sizeof(fileInfo))) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, (int)GetLastError()); return 0; } @@ -263,7 +251,7 @@ namespace Platform return 0; } - SystemFile::SizeType Read(FileHandleType handle, const SystemFile* systemFile, SizeType byteSize, void* buffer) + SystemFile::SizeType Read(FileHandleType handle, [[maybe_unused]] const SystemFile* systemFile, SizeType byteSize, void* buffer) { if (handle != PlatformSpecificInvalidHandle) { @@ -271,7 +259,6 @@ namespace Platform DWORD nNumberOfBytesToRead = (DWORD)byteSize; if (!ReadFile(handle, buffer, nNumberOfBytesToRead, &dwNumBytesRead, 0)) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, (int)GetLastError()); return 0; } return static_cast(dwNumBytesRead); @@ -280,7 +267,7 @@ namespace Platform return 0; } - SystemFile::SizeType Write(FileHandleType handle, const SystemFile* systemFile, const void* buffer, SizeType byteSize) + SystemFile::SizeType Write(FileHandleType handle, [[maybe_unused]] const SystemFile* systemFile, const void* buffer, SizeType byteSize) { if (handle != PlatformSpecificInvalidHandle) { @@ -288,7 +275,6 @@ namespace Platform DWORD nNumberOfBytesToWrite = (DWORD)byteSize; if (!WriteFile(handle, buffer, nNumberOfBytesToWrite, &dwNumBytesWritten, 0)) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, (int)GetLastError()); return 0; } return static_cast(dwNumBytesWritten); @@ -297,25 +283,21 @@ namespace Platform return 0; } - void Flush(FileHandleType handle, const SystemFile* systemFile) + void Flush(FileHandleType handle, [[maybe_unused]] const SystemFile* systemFile) { if (handle != PlatformSpecificInvalidHandle) { - if (!FlushFileBuffers(handle)) - { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, (int)GetLastError()); - } + FlushFileBuffers(handle); } } - SystemFile::SizeType Length(FileHandleType handle, const SystemFile* systemFile) + SystemFile::SizeType Length(FileHandleType handle, [[maybe_unused]] const SystemFile* systemFile) { if (handle != PlatformSpecificInvalidHandle) { LARGE_INTEGER size; if (!GetFileSizeEx(handle, &size)) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, (int)GetLastError()); return 0; } @@ -341,7 +323,6 @@ namespace Platform { WIN32_FIND_DATA fd; HANDLE hFile; - int lastError; AZ::IO::FixedMaxPathWString filterW; AZStd::to_wstring(filterW, filter); @@ -367,20 +348,7 @@ namespace Platform cb(fileName, (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0); } - lastError = (int)GetLastError(); FindClose(hFile); - if (lastError != ERROR_NO_MORE_FILES) - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, fileName, lastError); - } - } - else - { - lastError = (int)GetLastError(); - if (lastError != ERROR_FILE_NOT_FOUND) - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, filter, lastError); - } } } @@ -394,15 +362,11 @@ namespace Platform if (handle == INVALID_HANDLE_VALUE) { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, fileName, (int)GetLastError()); return 0; } FILE_BASIC_INFO fileInfo{}; - if (!GetFileInformationByHandleEx(handle, FileBasicInfo, &fileInfo, sizeof(fileInfo))) - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, fileName, (int)GetLastError()); - } + GetFileInformationByHandleEx(handle, FileBasicInfo, &fileInfo, sizeof(fileInfo)); CloseHandle(handle); @@ -434,10 +398,6 @@ namespace Platform fileSize.HighPart = data.nFileSizeHigh; len = aznumeric_cast(fileSize.QuadPart); } - else - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, fileName, (int)GetLastError()); - } return len; } @@ -448,7 +408,6 @@ namespace Platform AZStd::to_wstring(fileNameW, fileName); if (DeleteFileW(fileNameW.c_str()) == 0) { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, fileName, (int)GetLastError()); return false; } @@ -463,7 +422,6 @@ namespace Platform AZStd::to_wstring(targetFileNameW, targetFileName); if (MoveFileExW(sourceFileNameW.c_str(), targetFileNameW.c_str(), overwrite ? MOVEFILE_REPLACE_EXISTING : 0) == 0) { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, sourceFileName, (int)GetLastError()); return false; } @@ -503,10 +461,6 @@ namespace Platform AZ::IO::FixedMaxPathWString dirNameW; AZStd::to_wstring(dirNameW, dirName); bool success = CreateDirRecursive(dirNameW); - if (!success) - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, dirName, (int)GetLastError()); - } return success; } return false; diff --git a/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/std/parallel/internal/thread_WinAPI.cpp b/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/std/parallel/internal/thread_WinAPI.cpp index c84b4ecd98..cd638a34fa 100644 --- a/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/std/parallel/internal/thread_WinAPI.cpp +++ b/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/std/parallel/internal/thread_WinAPI.cpp @@ -38,7 +38,6 @@ namespace AZStd destroy_thread_info(ti); ThreadEventBus::Broadcast(&ThreadEventBus::Events::OnThreadExit, this_thread::get_id()); // goes to client listeners - ThreadDrillerEventBus::Broadcast(&ThreadDrillerEventBus::Events::OnThreadExit, this_thread::get_id()); // goes to the profiler. return Platform::PostThreadRun(); } @@ -73,7 +72,6 @@ namespace AZStd } ThreadEventBus::Broadcast(&ThreadEventBus::Events::OnThreadEnter, thread::id(*id), desc); - ThreadDrillerEventBus::Broadcast(&ThreadDrillerEventBus::Events::OnThreadEnter, thread::id(*id), desc); ::ResumeThread(hThread); diff --git a/Code/Framework/AzCore/Platform/Linux/AzCore/IO/SystemFile_Linux.cpp b/Code/Framework/AzCore/Platform/Linux/AzCore/IO/SystemFile_Linux.cpp index be5cbc3859..deb2d49516 100644 --- a/Code/Framework/AzCore/Platform/Linux/AzCore/IO/SystemFile_Linux.cpp +++ b/Code/Framework/AzCore/Platform/Linux/AzCore/IO/SystemFile_Linux.cpp @@ -7,9 +7,9 @@ */ #include -#include #include #include +#include #include #include <../Common/UnixLike/AzCore/IO/Internal/SystemFileUtils_UnixLike.h> @@ -44,21 +44,7 @@ namespace AZ::IO::Platform entry = readdir(dir); } - int lastError = errno; - if (lastError != 0) - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, filter, lastError); - } - closedir(dir); } - else - { - int lastError = errno; - if (lastError != ENOENT) - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, filter, 0); - } - } } } diff --git a/Code/Framework/AzCore/Tests/AZStd/Parallel.cpp b/Code/Framework/AzCore/Tests/AZStd/Parallel.cpp index 6b9202133c..362560c7be 100644 --- a/Code/Framework/AzCore/Tests/AZStd/Parallel.cpp +++ b/Code/Framework/AzCore/Tests/AZStd/Parallel.cpp @@ -1392,7 +1392,7 @@ namespace UnitTest EXPECT_TRUE(done); } - // Fixture for thread-driller-bus related calls + // Fixture for thread-event-bus related calls // exists only to categorize the tests. class ThreadEventsBus : public AllocatorsFixture @@ -1438,44 +1438,33 @@ namespace UnitTest TEST_F(ThreadEventsBus, Broadcasts_BothBusses) { ThreadEventCounter eventBusCounter; - ThreadEventCounter drillerBusCounter; auto thread_function = [&]() { ; // intentionally left blank }; eventBusCounter.Connect(); - drillerBusCounter.Connect(); AZStd::thread starter = AZStd::thread(thread_function); starter.join(); - EXPECT_EQ(drillerBusCounter.m_enterCount, 1); - EXPECT_EQ(drillerBusCounter.m_exitCount, 1); EXPECT_EQ(eventBusCounter.m_enterCount, 1); EXPECT_EQ(eventBusCounter.m_exitCount, 1); eventBusCounter.Disconnect(); - drillerBusCounter.Disconnect(); } - // this class tests for deadlocks caused by interactions between the thread - // driller bus and the other driller busses. - // Client code (ie, not part of the driller system) can connec to the - // ThreadEventBus and be told when threads are started and stopped - // However, if they instead listen to the ThreadDrillerEventBus, a deadlock condition - // could be caused if they lock a mutex that another thread needs in order to proceed. - // This test makes sure that using the ThreadEventBus (ie, the one meant for client code) - // instead of the ThreadDrillerEventBus (the one meant only for profilers) does NOT cause - // a deadlock. + // This class tests for deadlocks caused by multiple threads interacting with the ThreadEventBus. + // Client code can connect to the ThreadEventBus and be told when threads are started and stopped. + // A deadlock condition could be caused if they lock a mutex that another thread needs in order to proceed. + // This test makes sure that using the ThreadEventBus does NOT cause a deadlock. // We will simulate this series of events by doing the following // 1. Main thread listens on the ThreadEventBus // 2. OnThreadExit will lock a mutex, perform an allocation, unlock a mutex // 3. The thread itself will lock the mutex, perform an allocation, unlock the mutex. - // As long as there is no cross talk between the client and the driller busses, the - // above operation should not deadlock. - // but if there is, then a deadlock can occur where one thread will be unable to perform - // its allocation because the other is in OnThreadExit() - // and the other will not be able to perform OnThreadExit() because it cannot lock the mutex. + // As long as there is no cross talk between threads, the above operation should not deadlock. + // If there is, then a deadlock can occur where one thread will be unable to perform + // its allocation because the other is in OnThreadExit() and the other will not be able to perform + // OnThreadExit() because it cannot lock the mutex. class ThreadEventsDeathTest : public AllocatorsFixture diff --git a/Code/Framework/AzCore/Tests/AZStd/TypeTraits.cpp b/Code/Framework/AzCore/Tests/AZStd/TypeTraits.cpp index da3aae1387..aeba048d69 100644 --- a/Code/Framework/AzCore/Tests/AZStd/TypeTraits.cpp +++ b/Code/Framework/AzCore/Tests/AZStd/TypeTraits.cpp @@ -8,6 +8,7 @@ #include "UserTypes.h" #include +#include #include #include #include diff --git a/Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp b/Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp index fe38451101..c3be9b886a 100644 --- a/Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp +++ b/Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -131,8 +132,8 @@ namespace UnitTest * This will test the aspect of the system where ObjectStreams and asset jobs loading dependent * assets will do the work in their own thread. */ - class AssetJobsFloodTest - : public BaseAssetManagerTest + + class AssetJobsFloodTest : public DisklessAssetManagerBase { public: TestAssetManager* m_testAssetManager{ nullptr }; @@ -183,15 +184,14 @@ namespace UnitTest void SetUp() override { - BaseAssetManagerTest::SetUp(); + DisklessAssetManagerBase::SetUp(); SetupTest(); } void TearDown() override { - TearDownTest(); AssetManager::Destroy(); - BaseAssetManagerTest::TearDown(); + DisklessAssetManagerBase::TearDown(); } void SetupAssets() @@ -257,9 +257,9 @@ namespace UnitTest AssetWithSerializedData ap2; AssetWithSerializedData ap3; - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset4.txt", AZ::DataStream::ST_XML, &ap1, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset5.txt", AZ::DataStream::ST_XML, &ap2, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset6.txt", AZ::DataStream::ST_XML, &ap3, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset4.txt", &ap1, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset5.txt", &ap2, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset6.txt", &ap3, m_serializeContext)); AssetWithAssetReference assetWithPreload1; AssetWithAssetReference assetWithPreload2; @@ -273,11 +273,11 @@ namespace UnitTest noLoadAsset.m_asset = m_testAssetManager->CreateAsset(MyAsset2Id, AssetLoadBehavior::NoLoad); EXPECT_EQ(m_assetHandlerAndCatalog->m_numCreations, 4); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset1.txt", AZ::DataStream::ST_XML, &assetWithPreload1, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset2.txt", AZ::DataStream::ST_XML, &assetWithPreload2, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset3.txt", AZ::DataStream::ST_XML, &assetWithPreload3, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "DelayLoadAsset.txt", AZ::DataStream::ST_XML, &delayedAsset, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "NoLoadAsset.txt", AZ::DataStream::ST_XML, &noLoadAsset, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset1.txt", &assetWithPreload1, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset2.txt", &assetWithPreload2, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset3.txt", &assetWithPreload3, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("DelayLoadAsset.txt", &delayedAsset, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("NoLoadAsset.txt", &noLoadAsset, m_serializeContext)); AssetWithQueueAndPreLoadReferences preLoadRoot; AssetWithQueueAndPreLoadReferences preLoadA; @@ -297,16 +297,16 @@ namespace UnitTest preLoadBrokenA.m_preLoad = m_testAssetManager->CreateAsset(PreloadBrokenDepBId, AssetLoadBehavior::PreLoad); preLoadBrokenB.m_preLoad = m_testAssetManager->CreateAsset(PreloadAssetNoDataId, AssetLoadBehavior::PreLoad); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "PreLoadRoot.txt", AZ::DataStream::ST_XML, &preLoadRoot, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "PreLoadA.txt", AZ::DataStream::ST_XML, &preLoadA, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "PreLoadB.txt", AZ::DataStream::ST_XML, &noRefs, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "PreLoadC.txt", AZ::DataStream::ST_XML, &noRefs, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "QueueLoadA.txt", AZ::DataStream::ST_XML, &queueLoadA, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "QueueLoadB.txt", AZ::DataStream::ST_XML, &noRefs, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "QueueLoadC.txt", AZ::DataStream::ST_XML, &noRefs, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "PreLoadBrokenA.txt", AZ::DataStream::ST_XML, &preLoadBrokenA, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "PreLoadBrokenB.txt", AZ::DataStream::ST_XML, &preLoadBrokenB, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "PreLoadNoData.txt", AZ::DataStream::ST_XML, &noRefs, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("PreLoadRoot.txt", &preLoadRoot, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("PreLoadA.txt", &preLoadA, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("PreLoadB.txt", &noRefs, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("PreLoadC.txt", &noRefs, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("QueueLoadA.txt", &queueLoadA, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("QueueLoadB.txt", &noRefs, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("QueueLoadC.txt", &noRefs, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("PreLoadBrokenA.txt", &preLoadBrokenA, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("PreLoadBrokenB.txt", &preLoadBrokenB, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("PreLoadNoData.txt", &noRefs, m_serializeContext)); AssetWithQueueAndPreLoadReferences circularA; AssetWithQueueAndPreLoadReferences circularB; @@ -318,43 +318,15 @@ namespace UnitTest circularC.m_preLoad = m_testAssetManager->CreateAsset(CircularBId, AssetLoadBehavior::PreLoad); circularD.m_preLoad = circularC.m_preLoad; - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "CircularA.txt", AZ::DataStream::ST_XML, &circularA, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "CircularB.txt", AZ::DataStream::ST_XML, &circularB, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "CircularC.txt", AZ::DataStream::ST_XML, &circularC, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "CircularD.txt", AZ::DataStream::ST_XML, &circularD, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("CircularA.txt", &circularA, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("CircularB.txt", &circularB, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("CircularC.txt", &circularC, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("CircularD.txt", &circularD, m_serializeContext)); + m_assetHandlerAndCatalog->m_numCreations = 0; } } - void TearDownTest() - { - DeleteAssetFromDisk(GetTestFolderPath() + "TestAsset4.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "TestAsset5.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "TestAsset6.txt"); - - DeleteAssetFromDisk(GetTestFolderPath() + "TestAsset1.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "TestAsset2.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "TestAsset3.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "DelayLoadAsset.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "NoLoadAsset.txt"); - - DeleteAssetFromDisk(GetTestFolderPath() + "PreLoadRoot.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "PreLoadA.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "PreLoadB.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "PreLoadC.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "QueueLoadA.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "QueueLoadB.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "QueueLoadC.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "PreLoadBrokenA.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "PreLoadBrokenB.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "PreLoadNoData.txt"); - - DeleteAssetFromDisk(GetTestFolderPath() + "CircularA.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "CircularB.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "CircularC.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "CircularD.txt"); - } - void CheckFinishedCreationsAndDestructions() { // Make sure asset jobs have finished before validating the number of destroyed assets, because it's possible that the asset job @@ -367,7 +339,7 @@ namespace UnitTest }; static constexpr AZStd::chrono::seconds MaxDispatchTimeoutSeconds = BaseAssetManagerTest::DefaultTimeoutSeconds * 12; - + template bool DispatchEventsUntilCondition(AZ::Data::AssetManager& assetManager, Pred&& conditionPredicate, AZStd::chrono::seconds logIntervalSeconds = BaseAssetManagerTest::DefaultTimeoutSeconds, @@ -608,7 +580,7 @@ namespace UnitTest AZ::Data::AssetData::AssetStatus expected_base_status = AZ::Data::AssetData::AssetStatus::Ready; EXPECT_EQ(baseStatus, expected_base_status); } - + TEST_F(AssetJobsFloodTest, RapidAcquireAndRelease) { auto assetUuids = { @@ -641,7 +613,7 @@ namespace UnitTest { Asset asset1 = m_testAssetManager->GetAsset(assetUuid, azrtti_typeid(), AZ::Data::AssetLoadBehavior::PreLoad); - + if (checkLoaded) { asset1.BlockUntilLoadComplete(); @@ -714,8 +686,8 @@ namespace UnitTest AssetWithSerializedData ap; - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "a.txt", AZ::DataStream::ST_XML, &ap, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "b.txt", AZ::DataStream::ST_XML, &ap, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("a.txt", &ap, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("b.txt", &ap, m_serializeContext)); } auto& assetManager = AssetManager::Instance(); @@ -778,7 +750,7 @@ namespace UnitTest * Verify that loads without using the Asset Container still work correctly */ class AssetContainerDisableTest - : public BaseAssetManagerTest + : public DisklessAssetManagerBase { public: static inline const AZ::Uuid MyAsset1Id{ "{5B29FE2B-6B41-48C9-826A-C723951B0560}" }; @@ -797,7 +769,7 @@ namespace UnitTest void SetUp() override { - BaseAssetManagerTest::SetUp(); + DisklessAssetManagerBase::SetUp(); SetupTest(); } @@ -807,7 +779,7 @@ namespace UnitTest AssetManager::Instance().UnregisterHandler(m_assetHandlerAndCatalog); delete m_assetHandlerAndCatalog; AssetManager::Destroy(); - BaseAssetManagerTest::TearDown(); + DisklessAssetManagerBase::TearDown(); } void SetupAssets() @@ -849,9 +821,9 @@ namespace UnitTest AssetWithSerializedData ap2; AssetWithSerializedData ap3; - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset4.txt", AZ::DataStream::ST_XML, &ap1, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset5.txt", AZ::DataStream::ST_XML, &ap2, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset6.txt", AZ::DataStream::ST_XML, &ap3, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset4.txt", &ap1, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset5.txt", &ap2, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset6.txt", &ap3, m_serializeContext)); AssetWithAssetReference assetWithPreload1; AssetWithAssetReference assetWithPreload2; @@ -862,9 +834,9 @@ namespace UnitTest assetWithPreload3.m_asset = m_testAssetManager->CreateAsset(MyAsset6Id, AssetLoadBehavior::PreLoad); EXPECT_EQ(m_assetHandlerAndCatalog->m_numCreations, 3); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset1.txt", AZ::DataStream::ST_XML, &assetWithPreload1, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset2.txt", AZ::DataStream::ST_XML, &assetWithPreload2, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset3.txt", AZ::DataStream::ST_XML, &assetWithPreload3, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset1.txt", &assetWithPreload1, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset2.txt", &assetWithPreload2, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset3.txt", &assetWithPreload3, m_serializeContext)); m_assetHandlerAndCatalog->m_numCreations = 0; } @@ -942,11 +914,11 @@ namespace UnitTest m_testAssetManager->SetParallelDependentLoadingEnabled(true); } -#if AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS || AZ_TRAIT_DISABLE_FAILED_ASSET_LOAD_TESTS +#if AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS TEST_F(AssetJobsFloodTest, DISABLED_LoadTest_SameAsset_DifferentFilters) #else TEST_F(AssetJobsFloodTest, LoadTest_SameAsset_DifferentFilters) -#endif // AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS || AZ_TRAIT_DISABLE_FAILED_ASSET_LOAD_TESTS +#endif // AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS { m_assetHandlerAndCatalog->AssetCatalogRequestBus::Handler::BusConnect(); @@ -1291,11 +1263,11 @@ namespace UnitTest m_assetHandlerAndCatalog->AssetCatalogRequestBus::Handler::BusDisconnect(); } -#if AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS || AZ_TRAIT_DISABLE_FAILED_ASSET_LOAD_TESTS +#if AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS TEST_F(AssetJobsFloodTest, DISABLED_AssetWithNoLoadReference_LoadDependencies_NoLoadNotLoaded) #else TEST_F(AssetJobsFloodTest, AssetWithNoLoadReference_LoadDependencies_NoLoadNotLoaded) -#endif // AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS || AZ_TRAIT_DISABLE_FAILED_ASSET_LOAD_TESTS +#endif // AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS { m_assetHandlerAndCatalog->AssetCatalogRequestBus::Handler::BusConnect(); // Setup has already created/destroyed assets @@ -1332,11 +1304,11 @@ namespace UnitTest m_assetHandlerAndCatalog->AssetCatalogRequestBus::Handler::BusDisconnect(); } -#if AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS || AZ_TRAIT_DISABLE_FAILED_ASSET_LOAD_TESTS +#if AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS TEST_F(AssetJobsFloodTest, DISABLED_AssetWithNoLoadReference_LoadContainerDependencies_LoadAllLoadsNoLoad) #else TEST_F(AssetJobsFloodTest, AssetWithNoLoadReference_LoadContainerDependencies_LoadAllLoadsNoLoad) -#endif // AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS || AZ_TRAIT_DISABLE_FAILED_ASSET_LOAD_TESTS +#endif // AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS { m_assetHandlerAndCatalog->AssetCatalogRequestBus::Handler::BusConnect(); // Setup has already created/destroyed assets @@ -1371,11 +1343,11 @@ namespace UnitTest m_assetHandlerAndCatalog->AssetCatalogRequestBus::Handler::BusDisconnect(); } -#if AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS || AZ_TRAIT_DISABLE_FAILED_ASSET_LOAD_TESTS +#if AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS TEST_F(AssetJobsFloodTest, DISABLED_AssetWithNoLoadReference_LoadDependencies_BehaviorObeyed) #else TEST_F(AssetJobsFloodTest, AssetWithNoLoadReference_LoadDependencies_BehaviorObeyed) -#endif // AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS || AZ_TRAIT_DISABLE_FAILED_ASSET_LOAD_TESTS +#endif // AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS { m_assetHandlerAndCatalog->AssetCatalogRequestBus::Handler::BusConnect(); // Setup has already created/destroyed assets @@ -2014,11 +1986,12 @@ namespace UnitTest CheckFinishedCreationsAndDestructions(); m_assetHandlerAndCatalog->AssetCatalogRequestBus::Handler::BusDisconnect(); } + /** * Run multiple threads that get and release assets simultaneously to test AssetManager's thread safety */ class AssetJobsMultithreadedTest - : public BaseAssetManagerTest + : public DisklessAssetManagerBase { public: static inline const AZ::Uuid MyAsset1Id{ "{5B29FE2B-6B41-48C9-826A-C723951B0560}" }; @@ -2028,6 +2001,7 @@ namespace UnitTest static inline const AZ::Uuid MyAsset5Id{ "{D9CDAB04-D206-431E-BDC0-1DD615D56197}" }; static inline const AZ::Uuid MyAsset6Id{ "{B2F139C3-5032-4B52-ADCA-D52A8F88E043}" }; + // Initialize the Job Manager with 2 threads for the Asset Manager to use. size_t GetNumJobManagerThreads() const override { return 2; } @@ -2078,9 +2052,9 @@ namespace UnitTest AssetWithSerializedData ap2; AssetWithSerializedData ap3; - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset4.txt", AZ::DataStream::ST_XML, &ap1, &context)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset5.txt", AZ::DataStream::ST_XML, &ap2, &context)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset6.txt", AZ::DataStream::ST_XML, &ap3, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset4.txt", &ap1, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset5.txt", &ap2, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset6.txt", &ap3, &context)); AssetWithAssetReference assetWithPreload1; AssetWithAssetReference assetWithPreload2; @@ -2089,9 +2063,9 @@ namespace UnitTest assetWithPreload2.m_asset = AssetManager::Instance().CreateAsset(MyAsset5Id, AssetLoadBehavior::PreLoad); assetWithPreload3.m_asset = AssetManager::Instance().CreateAsset(MyAsset6Id, AssetLoadBehavior::PreLoad); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset1.txt", AZ::DataStream::ST_XML, &assetWithPreload1, &context)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset2.txt", AZ::DataStream::ST_XML, &assetWithPreload2, &context)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset3.txt", AZ::DataStream::ST_XML, &assetWithPreload3, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset1.txt", &assetWithPreload1, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset2.txt", &assetWithPreload2, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset3.txt", &assetWithPreload3, &context)); EXPECT_TRUE(assetHandlerAndCatalog->m_numCreations == 3); assetHandlerAndCatalog->m_numCreations = 0; @@ -2191,22 +2165,22 @@ namespace UnitTest // A will be saved to disk with MyAsset1Id AssetWithAssetReference a; a.m_asset = AssetManager::Instance().CreateAsset(MyAsset2Id); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset1.txt", AZ::DataStream::ST_XML, &a, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset1.txt", &a, &context)); AssetWithAssetReference b; b.m_asset = AssetManager::Instance().CreateAsset(MyAsset3Id); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset2.txt", AZ::DataStream::ST_XML, &b, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset2.txt", &b, &context)); AssetWithAssetReference c; c.m_asset = AssetManager::Instance().CreateAsset(MyAsset4Id); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset3.txt", AZ::DataStream::ST_XML, &c, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset3.txt", &c, &context)); AssetWithAssetReference d; d.m_asset = AssetManager::Instance().CreateAsset(MyAsset5Id); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset4.txt", AZ::DataStream::ST_XML, &d, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset4.txt", &d, &context)); AssetWithAssetReference e; e.m_asset = AssetManager::Instance().CreateAsset(MyAsset6Id); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset5.txt", AZ::DataStream::ST_XML, &e, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset5.txt", &e, &context)); AssetWithAssetReference f; f.m_asset = AssetManager::Instance().CreateAsset(MyAsset1Id); // refer back to asset1 - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset6.txt", AZ::DataStream::ST_XML, &f, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset6.txt", &f, &context)); EXPECT_TRUE(assetHandlerAndCatalog->m_numCreations == 6); assetHandlerAndCatalog->m_numCreations = 0; @@ -2347,26 +2321,26 @@ namespace UnitTest // AssetD is MYASSETD AssetWithSerializedData d; d.m_data = 42; - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset4.txt", AZ::DataStream::ST_XML, &d, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset4.txt", &d, &context)); // AssetC is MYASSETC AssetWithAssetReference c; c.m_asset = db.CreateAsset(AssetId(MyAssetDId)); // point at D - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset3.txt", AZ::DataStream::ST_XML, &c, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset3.txt", &c, &context)); // AssetB is MYASSETB AssetWithAssetReference b; b.m_asset = db.CreateAsset(AssetId(MyAssetCId)); // point at C - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset2.txt", AZ::DataStream::ST_XML, &b, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset2.txt", &b, &context)); // AssetA will be written to disk as MYASSETA AssetWithAssetReference a; a.m_asset = db.CreateAsset(AssetId(MyAssetBId)); // point at B - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset1.txt", AZ::DataStream::ST_XML, &a, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset1.txt", &a, &context)); } - const size_t numThreads = 4; - AZStd::atomic_int threadCount(numThreads); + constexpr size_t NumThreads = 4; + AZStd::atomic_int threadCount(NumThreads); AZStd::condition_variable cv; AZStd::vector threads; AZStd::atomic_bool keepDispatching(true); @@ -2381,7 +2355,7 @@ namespace UnitTest AZStd::thread dispatchThread(dispatch); - for (size_t threadIdx = 0; threadIdx < numThreads; ++threadIdx) + for (size_t threadIdx = 0; threadIdx < NumThreads; ++threadIdx) { threads.emplace_back([&threadCount, &db, &cv]() { @@ -2569,7 +2543,6 @@ namespace UnitTest #if AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS TEST_F(AssetJobsMultithreadedTest, DISABLED_ParallelDeepAssetReferences) #else - // temporarily disabled until sporadic failures can be root caused TEST_F(AssetJobsMultithreadedTest, ParallelDeepAssetReferences) #endif // AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS { @@ -2577,7 +2550,7 @@ namespace UnitTest } class AssetManagerTests - : public BaseAssetManagerTest + : public DisklessAssetManagerBase { protected: static inline const AZ::Uuid MyAsset1Id{ "{5B29FE2B-6B41-48C9-826A-C723951B0560}" }; @@ -2592,7 +2565,7 @@ namespace UnitTest void SetUp() override { - BaseAssetManagerTest::SetUp(); + DisklessAssetManagerBase::SetUp(); m_console = AZStd::make_unique(); AZ::Interface::Register(m_console.get()); @@ -2631,7 +2604,7 @@ namespace UnitTest AssetManager::Destroy(); AZ::Interface::Unregister(m_console.get()); m_console = nullptr; - BaseAssetManagerTest::TearDown(); + DisklessAssetManagerBase::TearDown(); } }; @@ -2982,7 +2955,7 @@ namespace UnitTest * the middle of loading. The tests help ensure that assets can't get stuck in perpetual loading states. **/ class AssetManagerClearAssetReferenceTests - : public BaseAssetManagerTest + : public DisklessAssetManagerBase { protected: static inline const AZ::Uuid RootAssetId{ "{AB13F568-C676-41FE-A7E9-341F71A78104}" }; @@ -3001,7 +2974,7 @@ namespace UnitTest void SetUp() override { - BaseAssetManagerTest::SetUp(); + DisklessAssetManagerBase::SetUp(); // create the database AssetManager::Descriptor desc; @@ -3039,21 +3012,18 @@ namespace UnitTest // Create and save the dependent asset first, so that we can get a reference to it. AssetWithSerializedData dependentBlockingAsset; - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "DependentPreloadBlockingAsset.txt", - AZ::DataStream::ST_XML, &dependentBlockingAsset, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("DependentPreloadBlockingAsset.txt", &dependentBlockingAsset, m_serializeContext)); AssetWithAssetReference dependentAsset; dependentAsset.m_asset = AssetManager::Instance().CreateAsset( NestedDependentPreloadBlockingAssetId, AssetLoadBehavior::PreLoad); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "DependentPreloadAsset.txt", - AZ::DataStream::ST_XML, &dependentAsset, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("DependentPreloadAsset.txt", &dependentAsset, m_serializeContext)); // Create and save the top-level asset. AssetWithAssetReference rootAsset; rootAsset.m_asset = AssetManager::Instance().CreateAsset( DependentPreloadAssetId, AssetLoadBehavior::PreLoad); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "RootAsset.txt", - AZ::DataStream::ST_XML, &rootAsset, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("RootAsset.txt", &rootAsset, m_serializeContext)); } void TearDown() override @@ -3065,7 +3035,7 @@ namespace UnitTest delete m_assetHandlerAndCatalog; AssetManager::Destroy(); - BaseAssetManagerTest::TearDown(); + DisklessAssetManagerBase::TearDown(); } }; diff --git a/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.cpp b/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.cpp index c6fa296cbc..532cb0a1d8 100644 --- a/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.cpp +++ b/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.cpp @@ -165,4 +165,254 @@ namespace UnitTest EXPECT_FALSE(AssetManager::Instance().HasActiveJobsOrStreamerRequests()); } + + MemoryStreamerWrapper::MemoryStreamerWrapper() + { + using ::testing::_; + using ::testing::NiceMock; + using ::testing::Return; + + ON_CALL(m_mockStreamer, SuspendProcessing()).WillByDefault([this]() + { + m_suspended = true; + }); + + ON_CALL(m_mockStreamer, ResumeProcessing()).WillByDefault([this]() + { + AZStd::unique_lock lock(m_mutex); + + m_suspended = false; + + while (!m_processingQueue.empty()) + { + FileRequestHandle requestHandle = m_processingQueue.front(); + m_processingQueue.pop(); + + const auto& onCompleteCallback = GetReadRequest(requestHandle)->m_callback; + + if (onCompleteCallback) + { + onCompleteCallback(requestHandle); + } + } + }); + + ON_CALL(m_mockStreamer, Read(_, ::testing::An(), _, _, _, _)) + .WillByDefault( + [this]( + [[maybe_unused]] AZStd::string_view relativePath, IStreamerTypes::RequestMemoryAllocator& allocator, size_t size, + AZStd::chrono::microseconds deadline, IStreamerTypes::Priority priority, [[maybe_unused]] size_t offset) + { + AZStd::unique_lock lock(m_mutex); + + ReadRequest request; + + // Save off the requested deadline and priority + request.m_deadline = deadline; + request.m_priority = priority; + request.m_data = allocator.Allocate(size, size, 8); + + const auto* virtualFile = FindFile(relativePath); + + AZ_Assert( + virtualFile->size() == size, "Streamer read request size did not match size of saved file: %d vs %d (%.*s)", + virtualFile->size(), size, + relativePath.size(), relativePath.data()); + AZ_Assert(size > 0, "Size is zero %.*s", relativePath.size(), relativePath.data()); + + memcpy(request.m_data.m_address, virtualFile->data(), size); + + // Create a real file request result and return it + request.m_request = m_context.GetNewExternalRequest(); + + m_readRequests.push_back(request); + + return request.m_request; + }); + + ON_CALL(m_mockStreamer, SetRequestCompleteCallback(_, _)) + .WillByDefault([this](FileRequestPtr& request, AZ::IO::IStreamer::OnCompleteCallback callback) -> FileRequestPtr& + { + // Save off the callback just so that we can call it when the request is "done" + AZStd::unique_lock lock(m_mutex); + ReadRequest* readRequest = GetReadRequest(request); + readRequest->m_callback = callback; + + return request; + }); + + ON_CALL(m_mockStreamer, QueueRequest(_)) + .WillByDefault([this](const auto& fileRequest) + { + if (!m_suspended) + { + decltype(ReadRequest::m_callback) onCompleteCallback; + + AZStd::unique_lock lock(m_mutex); + ReadRequest* readRequest = GetReadRequest(fileRequest); + onCompleteCallback = readRequest->m_callback; + + if (onCompleteCallback) + { + onCompleteCallback(fileRequest); + + m_readRequests.erase(readRequest); + } + } + else + { + AZStd::unique_lock lock(m_mutex); + + m_processingQueue.push(fileRequest); + } + }); + + ON_CALL(m_mockStreamer, GetRequestStatus(_)) + .WillByDefault([]([[maybe_unused]] FileRequestHandle request) + { + // Return whatever request status has been set in this class + return IO::IStreamerTypes::RequestStatus::Completed; + }); + + ON_CALL(m_mockStreamer, GetReadRequestResult(_, _, _, _)) + .WillByDefault([this]( + [[maybe_unused]] FileRequestHandle request, void*& buffer, AZ::u64& numBytesRead, + IStreamerTypes::ClaimMemory claimMemory) + { + // Make sure the requestor plans to free the data buffer we allocated. + EXPECT_EQ(claimMemory, IStreamerTypes::ClaimMemory::Yes); + + AZStd::unique_lock lock(m_mutex); + + ReadRequest* readRequest = GetReadRequest(request); + + // Provide valid data buffer results. + numBytesRead = readRequest->m_data.m_size; + buffer = readRequest->m_data.m_address; + + return true; + }); + + ON_CALL(m_mockStreamer, RescheduleRequest(_, _, _)) + .WillByDefault([this](IO::FileRequestPtr target, AZStd::chrono::microseconds newDeadline, IO::IStreamerTypes::Priority newPriority) + { + AZStd::unique_lock lock(m_mutex); + ReadRequest* readRequest = GetReadRequest(target); + + readRequest->m_deadline = newDeadline; + readRequest->m_priority = newPriority; + + return target; + }); + } + + ReadRequest* MemoryStreamerWrapper::GetReadRequest(FileRequestHandle request) + { + auto itr = AZStd::find_if( + m_readRequests.begin(), m_readRequests.end(), + [request](const ReadRequest& searchItem) -> bool + { + return (searchItem.m_request == request); + }); + + return itr; + } + + AZStd::vector* MemoryStreamerWrapper::FindFile(AZStd::string_view path) + { + auto itr = m_virtualFiles.find(path); + + if (itr == m_virtualFiles.end()) + { + // Path didn't work as-is, does it have the test folder prefixed? If so try removing it + if (AZ::StringFunc::StartsWith(path, GetTestFolderPath())) + { + AZStd::string_view pathWithoutFolder = path; + + pathWithoutFolder = AZ::StringFunc::LStrip(pathWithoutFolder, GetTestFolderPath().c_str()); + itr = m_virtualFiles.find(pathWithoutFolder); + } + else // Path isn't prefixed, so try adding it + { + itr = m_virtualFiles.find(GetTestFolderPath().append(path)); + } + } + + if (itr != m_virtualFiles.end()) + { + return &itr->second; + } + + // Currently no test expects a file not to exist so we assert to make it easy to quickly find where something went wrong + // If we ever need to test for a non-existent file this assert should just be conditionally disabled for that specific test + AZ_Assert(false, "Failed to find virtual file %*.s", path.size(), path.data()) + + return nullptr; + } + + void DisklessAssetManagerBase::SetUp() + { + using ::testing::_; + using ::testing::NiceMock; + using ::testing::Return; + + BaseAssetManagerTest::SetUp(); + + ON_CALL(m_fileIO, Size(::testing::Matcher(::testing::_), _)) + .WillByDefault( + [this](const char* path, u64& size) + { + AZStd::scoped_lock lock(m_streamerWrapper->m_mutex); + + const auto* file = m_streamerWrapper->FindFile(path); + + if (file) + { + size = file->size(); + return ResultCode::Success; + } + + AZ_Error("DisklessAssetManagerBase", false, "Failed to find virtual file %.*s", path); + + return ResultCode::Error; + }); + + m_prevFileIO = IO::FileIOBase::GetInstance(); + IO::FileIOBase::SetInstance(nullptr); + IO::FileIOBase::SetInstance(&m_fileIO); + } + + void DisklessAssetManagerBase::TearDown() + { + IO::FileIOBase::SetInstance(nullptr); + IO::FileIOBase::SetInstance(m_prevFileIO); + + BaseAssetManagerTest::TearDown(); + } + + IO::IStreamer* DisklessAssetManagerBase::CreateStreamer() + { + m_streamerWrapper = AZStd::make_unique(); + + return &(m_streamerWrapper->m_mockStreamer); + } + + void DisklessAssetManagerBase::DestroyStreamer(IO::IStreamer*) + { + m_streamerWrapper = nullptr; + } + + void DisklessAssetManagerBase::WriteAssetToDisk(const AZStd::string& assetName, const AZStd::string&) + { + AZStd::string assetFileName = GetTestFolderPath() + assetName; + + AssetWithCustomData asset; + + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile(assetFileName, &asset, m_serializeContext)); + } + + void DisklessAssetManagerBase::DeleteAssetFromDisk(const AZStd::string&) + { + + } } diff --git a/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.h b/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.h index 29c2c124cd..af48c74a60 100644 --- a/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.h +++ b/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.h @@ -20,7 +20,8 @@ #include #include #include - +#include +#include namespace UnitTest { @@ -58,7 +59,11 @@ namespace UnitTest // Subclasses can optionally override the streamer creation and destruction virtual IO::IStreamer* CreateStreamer() { return aznew IO::Streamer(AZStd::thread_desc{}, StreamerComponent::CreateStreamerStack()); } - virtual void DestroyStreamer(IO::IStreamer* streamer) { delete streamer; } + virtual void DestroyStreamer(IO::IStreamer* streamer) + { + delete streamer; + streamer = nullptr; + } void SetUp() override; void TearDown() override; @@ -66,8 +71,8 @@ namespace UnitTest static void SuppressTraceOutput(bool suppress); // Helper methods to create and destroy actual assets on the disk for true end-to-end asset loading. - void WriteAssetToDisk(const AZStd::string& assetName, const AZStd::string& assetIdGuid); - void DeleteAssetFromDisk(const AZStd::string& assetName); + virtual void WriteAssetToDisk(const AZStd::string& assetName, const AZStd::string& assetIdGuid); + virtual void DeleteAssetFromDisk(const AZStd::string& assetName); void BlockUntilAssetJobsAreComplete(); @@ -82,4 +87,57 @@ namespace UnitTest AZStd::vector m_assetsWritten; }; + + struct ReadRequest + { + AZStd::chrono::milliseconds m_deadline{}; + AZ::IO::IStreamerTypes::Priority m_priority{}; + IO::IStreamerTypes::RequestMemoryAllocatorResult m_data{ nullptr, 0, IO::IStreamerTypes::MemoryType::ReadWrite }; + AZ::IO::IStreamer::OnCompleteCallback m_callback; + IO::FileRequestPtr m_request; + }; + + struct MemoryStreamerWrapper + { + MemoryStreamerWrapper(); + ~MemoryStreamerWrapper() = default; + + ReadRequest* GetReadRequest(IO::FileRequestHandle request); + + template + bool WriteMemoryFile(const AZStd::string& filePath, TObject* object, AZ::SerializeContext* context) + { + auto& buffer = m_virtualFiles[filePath]; + ByteContainerStream stream(&buffer); + + return AZ::Utils::SaveObjectToStream(stream, DataStream::StreamType::ST_XML, object, context); + } + + AZStd::vector* FindFile(AZStd::string_view path); + + ::testing::NiceMock m_mockStreamer; + IO::StreamerContext m_context; + AZStd::atomic_bool m_suspended{ false }; + + AZStd::recursive_mutex m_mutex; + AZStd::queue m_processingQueue; // Keeps tracks of requests that have been queued while processing is suspended + AZStd::vector m_readRequests; + AZStd::unordered_map> m_virtualFiles; + }; + + struct DisklessAssetManagerBase : BaseAssetManagerTest + { + void SetUp() override; + void TearDown() override; + IO::IStreamer* CreateStreamer() override; + void DestroyStreamer(IO::IStreamer*) override; + + void WriteAssetToDisk(const AZStd::string& assetName, const AZStd::string& assetIdGuid) override; + void DeleteAssetFromDisk(const AZStd::string& assetName) override; + + AZStd::unique_ptr m_streamerWrapper; + ::testing::NiceMock m_fileIO; + IO::FileIOBase* m_prevFileIO{}; + }; + } diff --git a/Code/Framework/AzCore/Tests/Components.cpp b/Code/Framework/AzCore/Tests/Components.cpp index 013d998c52..159d55e948 100644 --- a/Code/Framework/AzCore/Tests/Components.cpp +++ b/Code/Framework/AzCore/Tests/Components.cpp @@ -175,7 +175,6 @@ namespace UnitTest ComponentApplication componentApp; ComponentApplication::Descriptor desc; desc.m_useExistingAllocator = true; - desc.m_enableDrilling = false; // we already created a memory driller for the test (AllocatorsFixture) ComponentApplication::StartupParameters startupParams; startupParams.m_allocator = &AZ::AllocatorInstance::Get(); Entity* systemEntity = componentApp.Create(desc, startupParams); @@ -631,7 +630,6 @@ namespace UnitTest ComponentApplication::Descriptor desc; desc.m_useExistingAllocator = true; - desc.m_enableDrilling = false; // we already created a memory driller for the test (AllocatorsFixture in Components) ComponentApplication::StartupParameters startupParams; startupParams.m_allocator = &AZ::AllocatorInstance::Get(); diff --git a/Code/Framework/AzCore/Tests/DOM/DomJsonBenchmarks.cpp b/Code/Framework/AzCore/Tests/DOM/DomJsonBenchmarks.cpp new file mode 100644 index 0000000000..0baa4aeb53 --- /dev/null +++ b/Code/Framework/AzCore/Tests/DOM/DomJsonBenchmarks.cpp @@ -0,0 +1,185 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#if defined(HAVE_BENCHMARK) + +#include +#include +#include +#include +#include +#include +#include + +namespace Benchmark +{ + class DomJsonBenchmark : public UnitTest::AllocatorsBenchmarkFixture + { + public: + void SetUp(const ::benchmark::State& st) override + { + UnitTest::AllocatorsBenchmarkFixture::SetUp(st); + AZ::NameDictionary::Create(); + } + + void SetUp(::benchmark::State& st) override + { + UnitTest::AllocatorsBenchmarkFixture::SetUp(st); + AZ::NameDictionary::Create(); + } + + void TearDown(::benchmark::State& st) override + { + AZ::NameDictionary::Destroy(); + UnitTest::AllocatorsBenchmarkFixture::TearDown(st); + } + + void TearDown(const ::benchmark::State& st) override + { + AZ::NameDictionary::Destroy(); + UnitTest::AllocatorsBenchmarkFixture::TearDown(st); + } + + AZStd::string GenerateDomJsonBenchmarkPayload(int64_t entryCount, int64_t stringTemplateLength) + { + rapidjson::Document document; + document.SetObject(); + + AZStd::string entryTemplate; + while (entryTemplate.size() < static_cast(stringTemplateLength)) + { + entryTemplate += "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor "; + } + entryTemplate.resize(stringTemplateLength); + AZStd::string buffer; + + auto createString = [&](int n) -> rapidjson::Value + { + buffer = AZStd::string::format("#%i %s", n, entryTemplate.c_str()); + return rapidjson::Value(buffer.data(), static_cast(buffer.size()), document.GetAllocator()); + }; + + auto createEntry = [&](int n) -> rapidjson::Value + { + rapidjson::Value entry(rapidjson::kObjectType); + entry.AddMember("string", createString(n), document.GetAllocator()); + entry.AddMember("int", rapidjson::Value(n), document.GetAllocator()); + entry.AddMember("double", rapidjson::Value(static_cast(n) * 0.5), document.GetAllocator()); + entry.AddMember("bool", rapidjson::Value(n % 2 == 0), document.GetAllocator()); + entry.AddMember("null", rapidjson::Value(rapidjson::kNullType), document.GetAllocator()); + return entry; + }; + + auto createArray = [&]() -> rapidjson::Value + { + rapidjson::Value array; + array.SetArray(); + for (int i = 0; i < entryCount; ++i) + { + array.PushBack(createEntry(i), document.GetAllocator()); + } + return array; + }; + + auto createObject = [&]() -> rapidjson::Value + { + rapidjson::Value object; + object.SetObject(); + for (int i = 0; i < entryCount; ++i) + { + buffer = AZStd::string::format("Key%i", i); + rapidjson::Value key; + key.SetString(buffer.data(), static_cast(buffer.length()), document.GetAllocator()); + object.AddMember(key.Move(), createArray(), document.GetAllocator()); + } + return object; + }; + + document.SetObject(); + document.AddMember("entries", createObject(), document.GetAllocator()); + + AZStd::string serializedJson; + auto result = AZ::JsonSerializationUtils::WriteJsonString(document, serializedJson); + AZ_Assert(result.IsSuccess(), "Failed to serialize generated JSON"); + return serializedJson; + } + }; + +// Helper macro for registering JSON benchmarks +#define BENCHMARK_REGISTER_JSON(BaseClass, Method) \ + BENCHMARK_REGISTER_F(BaseClass, Method) \ + ->Args({ 10, 5 }) \ + ->Args({ 10, 500 }) \ + ->Args({ 100, 5 }) \ + ->Args({ 100, 500 }) \ + ->Unit(benchmark::kMillisecond); + + BENCHMARK_DEFINE_F(DomJsonBenchmark, DomDeserializeToDocumentInPlace)(benchmark::State& state) + { + AZ::Dom::JsonBackend backend; + AZStd::string serializedPayload = GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1)); + + for (auto _ : state) + { + state.PauseTiming(); + AZStd::string payloadCopy = serializedPayload; + state.ResumeTiming(); + + auto result = AZ::Dom::Json::WriteToRapidJsonDocument( + [&](AZ::Dom::Visitor& visitor) + { + return AZ::Dom::Utils::ReadFromStringInPlace(backend, payloadCopy, visitor); + }); + + benchmark::DoNotOptimize(result.GetValue()); + } + + state.SetBytesProcessed(serializedPayload.size() * state.iterations()); + } + BENCHMARK_REGISTER_JSON(DomJsonBenchmark, DomDeserializeToDocumentInPlace) + + BENCHMARK_DEFINE_F(DomJsonBenchmark, DomDeserializeToDocument)(benchmark::State& state) + { + AZ::Dom::JsonBackend backend; + AZStd::string serializedPayload = GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1)); + + for (auto _ : state) + { + auto result = AZ::Dom::Json::WriteToRapidJsonDocument( + [&](AZ::Dom::Visitor& visitor) + { + return AZ::Dom::Utils::ReadFromString(backend, serializedPayload, AZ::Dom::Lifetime::Temporary, visitor); + }); + + benchmark::DoNotOptimize(result.GetValue()); + } + + state.SetBytesProcessed(serializedPayload.size() * state.iterations()); + } + BENCHMARK_REGISTER_JSON(DomJsonBenchmark, DomDeserializeToDocument) + + BENCHMARK_DEFINE_F(DomJsonBenchmark, JsonUtilsDeserializeToDocument)(benchmark::State& state) + { + AZ::Dom::JsonBackend backend; + AZStd::string serializedPayload = GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1)); + + for (auto _ : state) + { + auto result = AZ::JsonSerializationUtils::ReadJsonString(serializedPayload); + + benchmark::DoNotOptimize(result.GetValue()); + } + + state.SetBytesProcessed(serializedPayload.size() * state.iterations()); + } + BENCHMARK_REGISTER_JSON(DomJsonBenchmark, JsonUtilsDeserializeToDocument) + +#undef BENCHMARK_REGISTER_JSON +} // namespace Benchmark + +#endif // defined(HAVE_BENCHMARK) diff --git a/Code/Framework/AzCore/Tests/DOM/DomJsonTests.cpp b/Code/Framework/AzCore/Tests/DOM/DomJsonTests.cpp new file mode 100644 index 0000000000..c7af6438cf --- /dev/null +++ b/Code/Framework/AzCore/Tests/DOM/DomJsonTests.cpp @@ -0,0 +1,219 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include +#include +#include + +namespace AZ::Dom::Tests +{ + class DomJsonTests : public UnitTest::AllocatorsFixture + { + public: + void SetUp() override + { + UnitTest::AllocatorsFixture::SetUp(); + NameDictionary::Create(); + m_document = AZStd::make_unique(); + } + + void TearDown() override + { + m_document.reset(); + NameDictionary::Destroy(); + UnitTest::AllocatorsFixture::TearDown(); + } + + rapidjson::Value CreateString(const AZStd::string& text) + { + rapidjson::Value key; + key.SetString(text.c_str(), static_cast(text.length()), m_document->GetAllocator()); + return key; + } + + template + void AddValue(const AZStd::string& key, T value) + { + m_document->AddMember(CreateString(key), rapidjson::Value(value), m_document->GetAllocator()); + } + + // Validate round-trip serialization to and from rapidjson::Document and a UTF-8 encoded string + void PerformSerializationChecks() + { + // Generate a canonical serializaed representation of this document using rapidjson + // This will be pretty-printed using the same rapidjson pretty printer we use, so should be binary identical + // to any output generated by the visitor API + AZStd::string canonicalSerializedDocument; + AZ::JsonSerializationUtils::WriteJsonString(*m_document, canonicalSerializedDocument); + + auto visitDocumentFn = [this](AZ::Dom::Visitor& visitor) + { + return Json::VisitRapidJsonValue(*m_document, visitor, Lifetime::Temporary); + }; + + // Document -> Document + { + auto result = Json::WriteToRapidJsonDocument(visitDocumentFn); + EXPECT_TRUE(result.IsSuccess()); + EXPECT_EQ(AZ::JsonSerialization::Compare(*m_document, result.GetValue()), AZ::JsonSerializerCompareResult::Equal); + } + + // Document -> string + { + AZStd::string serializedDocument; + JsonBackend backend; + auto result = backend.WriteToBuffer(serializedDocument, visitDocumentFn); + EXPECT_TRUE(result.IsSuccess()); + EXPECT_EQ(canonicalSerializedDocument, serializedDocument); + } + + // string -> Document + { + auto result = Json::WriteToRapidJsonDocument( + [&canonicalSerializedDocument](AZ::Dom::Visitor& visitor) + { + JsonBackend backend; + return Dom::Utils::ReadFromString(backend, canonicalSerializedDocument, Lifetime::Temporary, visitor); + }); + EXPECT_TRUE(result.IsSuccess()); + EXPECT_EQ(AZ::JsonSerialization::Compare(*m_document, result.GetValue()), JsonSerializerCompareResult::Equal); + } + + // string -> string + { + AZStd::string serializedDocument; + JsonBackend backend; + auto result = backend.WriteToBuffer( + serializedDocument, + [&backend, &canonicalSerializedDocument](AZ::Dom::Visitor& visitor) + { + return Dom::Utils::ReadFromString(backend, canonicalSerializedDocument, Lifetime::Temporary, visitor); + }); + EXPECT_TRUE(result.IsSuccess()); + EXPECT_EQ(canonicalSerializedDocument, serializedDocument); + } + } + + AZStd::unique_ptr m_document; + }; + + TEST_F(DomJsonTests, EmptyArray) + { + m_document->SetArray(); + PerformSerializationChecks(); + } + + TEST_F(DomJsonTests, SimpleArray) + { + m_document->SetArray(); + for (int i = 0; i < 5; ++i) + { + m_document->PushBack(i, m_document->GetAllocator()); + } + PerformSerializationChecks(); + } + + TEST_F(DomJsonTests, NestedArrays) + { + m_document->SetArray(); + for (int j = 0; j < 7; ++j) + { + rapidjson::Value nestedArray(rapidjson::kArrayType); + for (int i = 0; i < 5; ++i) + { + nestedArray.PushBack(i, m_document->GetAllocator()); + } + m_document->PushBack(nestedArray.Move(), m_document->GetAllocator()); + } + PerformSerializationChecks(); + } + + TEST_F(DomJsonTests, EmptyObject) + { + m_document->SetObject(); + PerformSerializationChecks(); + } + + TEST_F(DomJsonTests, SimpleObject) + { + m_document->SetObject(); + for (int i = 0; i < 5; ++i) + { + m_document->AddMember(CreateString(AZStd::string::format("Key%i", i)), rapidjson::Value(i), m_document->GetAllocator()); + } + PerformSerializationChecks(); + } + + TEST_F(DomJsonTests, NestedObjects) + { + m_document->SetObject(); + for (int j = 0; j < 7; ++j) + { + rapidjson::Value nestedObject(rapidjson::kObjectType); + for (int i = 0; i < 5; ++i) + { + nestedObject.AddMember(CreateString(AZStd::string::format("Key%i", i)), rapidjson::Value(i), m_document->GetAllocator()); + } + m_document->AddMember(CreateString(AZStd::string::format("Obj%i", j)), nestedObject.Move(), m_document->GetAllocator()); + } + PerformSerializationChecks(); + } + + TEST_F(DomJsonTests, Int64) + { + m_document->SetObject(); + AddValue("int64_min", AZStd::numeric_limits::min()); + AddValue("int64_max", AZStd::numeric_limits::max()); + PerformSerializationChecks(); + } + + TEST_F(DomJsonTests, Uint64) + { + m_document->SetObject(); + AddValue("uint64_min", AZStd::numeric_limits::min()); + AddValue("uint64_max", AZStd::numeric_limits::max()); + PerformSerializationChecks(); + } + + TEST_F(DomJsonTests, Double) + { + m_document->SetObject(); + AddValue("double_min", AZStd::numeric_limits::min()); + AddValue("double_max", AZStd::numeric_limits::max()); + PerformSerializationChecks(); + } + + TEST_F(DomJsonTests, Null) + { + m_document->SetObject(); + m_document->AddMember(CreateString("null_value"), rapidjson::Value(rapidjson::kNullType), m_document->GetAllocator()); + PerformSerializationChecks(); + } + + TEST_F(DomJsonTests, Bool) + { + m_document->SetObject(); + AddValue("true_value", true); + AddValue("false_value", false); + PerformSerializationChecks(); + } + + TEST_F(DomJsonTests, String) + { + m_document->SetObject(); + m_document->AddMember(CreateString("empty_string"), CreateString(""), m_document->GetAllocator()); + m_document->AddMember(CreateString("short_string"), CreateString("test"), m_document->GetAllocator()); + m_document->AddMember( + CreateString("long_string"), CreateString("abcdefghijklmnopqrstuvwxyz0123456789"), m_document->GetAllocator()); + PerformSerializationChecks(); + } +} // namespace AZ::Dom::Tests diff --git a/Code/Framework/AzCore/Tests/Debug.cpp b/Code/Framework/AzCore/Tests/Debug.cpp index bd90611af3..e27cdcd27e 100644 --- a/Code/Framework/AzCore/Tests/Debug.cpp +++ b/Code/Framework/AzCore/Tests/Debug.cpp @@ -7,7 +7,7 @@ */ #include -#include +#include #include #include #include @@ -104,7 +104,7 @@ namespace UnitTest } class TraceTest - : public AZ::Debug::TraceMessageDrillerBus::Handler + : public AZ::Debug::TraceMessageBus::Handler , public ::testing::Test { int m_numTracePrintfs; @@ -113,12 +113,13 @@ namespace UnitTest : m_numTracePrintfs(0) {} ////////////////////////////////////////////////////////////////////////// - // TraceMessagesDrillerBus - void OnPrintf(const char* windowName, const char* message) override + // TraceMessageBus + bool OnPrintf(const char* windowName, const char* message) override { (void)windowName; (void)message; ++m_numTracePrintfs; + return false; } ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Framework/AzCore/Tests/Debug/AssetTracking.cpp b/Code/Framework/AzCore/Tests/Debug/AssetTracking.cpp deleted file mode 100644 index 89968406c7..0000000000 --- a/Code/Framework/AzCore/Tests/Debug/AssetTracking.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include -#include -#include - -using namespace AZ; - -namespace UnitTest -{ - namespace - { - struct TestData - { - }; - - using AssetTree = AZ::Debug::AssetTree; - using AllocationTable = AZ::Debug::AllocationTable; - - struct AssetTrackingTestEnvironment - { - AssetTrackingTestEnvironment() : m_table(m_mutex) - { - } - - AZStd::mutex m_mutex; - AssetTree m_tree; - AllocationTable m_table; - AZStd::unique_ptr m_assetTracking; - }; - } - - class AssetTrackingTests - : public ::testing::Test - { - public: - void SetUp() override - { - AZ::AllocatorInstance::Create(); - m_env.reset(new AssetTrackingTestEnvironment); - m_env->m_assetTracking.reset(aznew AZ::Debug::AssetTracking(&m_env->m_tree, &m_env->m_table)); - } - - void TearDown() override - { - m_env.reset(); - AZ::AllocatorInstance::Destroy(); - } - - void RunTests() - { - TestAssetScopes(); - TestScopedAllocation(); - TestScopeAttach(); - } - - private: - void TestAssetScopes() - { - const char* debugScopeText; - { - AZ_ASSET_NAMED_SCOPE("TestAssetScopes.1"); - { - AZ_ASSET_NAMED_SCOPE("TestAssetScopes.2"); - { - AZ_ASSET_NAMED_SCOPE("TestAssetScopes.3"); - debugScopeText = AZ::Debug::AssetTracking::GetDebugScope(); - EXPECT_STREQ(debugScopeText, "TestAssetScopes.3\nTestAssetScopes.2\nTestAssetScopes.1\n"); - } - - debugScopeText = AZ::Debug::AssetTracking::GetDebugScope(); - EXPECT_STREQ(debugScopeText, "TestAssetScopes.2\nTestAssetScopes.1\n"); - } - - - debugScopeText = AZ::Debug::AssetTracking::GetDebugScope(); - EXPECT_STREQ(debugScopeText, "TestAssetScopes.1\n"); - } - } - - void TestScopedAllocation() - { - void* TEST_POINTER = (void*)0xDEADBEEFull; - static const size_t TEST_SIZE = 32; - - { - AZ_ASSET_NAMED_SCOPE("TestScopedAllocation.1"); - AZ::Debug::AssetTreeNodeBase* activeAsset = m_env->m_assetTracking->GetCurrentThreadAsset(); - m_env->m_table.Get().emplace(TEST_POINTER, AllocationTable::RecordType{ activeAsset, (uint32_t)TEST_SIZE, TestData() }); - } - - auto& rootAsset = m_env->m_tree.m_rootAssets; - auto itr = rootAsset.m_children.find("TestScopedAllocation.1"); - - EXPECT_EQ(&rootAsset, &m_env->m_tree.GetRoot()); - ASSERT_NE(itr, rootAsset.m_children.end()); - EXPECT_EQ(itr->second.m_primaryinfo->m_id->m_id, "TestScopedAllocation.1"); - - EXPECT_EQ(&itr->second, m_env->m_table.FindAllocation(TEST_POINTER)); - - auto allocationRecord = m_env->m_table.Get().find(TEST_POINTER); - ASSERT_NE(allocationRecord, m_env->m_table.Get().end()); - EXPECT_EQ(allocationRecord->second.m_asset, &itr->second); - EXPECT_EQ(allocationRecord->second.m_size, TEST_SIZE); - - // Test realocation - void* TEST_REALLOC_POINTER = (void*)0xDEADC0DEull; - static const size_t TEST_REALLOC_SIZE = 128; - - m_env->m_table.ReallocateAllocation(TEST_POINTER, TEST_REALLOC_POINTER, TEST_REALLOC_SIZE); - allocationRecord = m_env->m_table.Get().find(TEST_POINTER); - EXPECT_EQ(allocationRecord, m_env->m_table.Get().end()); - allocationRecord = m_env->m_table.Get().find(TEST_REALLOC_POINTER); - ASSERT_NE(allocationRecord, m_env->m_table.Get().end()); - EXPECT_EQ(allocationRecord->second.m_asset, &itr->second); - EXPECT_EQ(allocationRecord->second.m_size, TEST_REALLOC_SIZE); - - // Test resize - static const size_t TEST_RESIZE_SIZE = 1024; - m_env->m_table.ResizeAllocation(TEST_REALLOC_POINTER, TEST_RESIZE_SIZE); - EXPECT_EQ(allocationRecord->second.m_size, TEST_RESIZE_SIZE); - } - - void TestScopeAttach() - { - void* TEST_POINTER = (void*)0xDEADBEEFull; - static const size_t TEST_SIZE = 32; - AZ::Debug::AssetTreeNodeBase* originatingAsset; - - { - AZ_ASSET_ATTACH_TO_SCOPE(TEST_POINTER); - EXPECT_EQ(m_env->m_assetTracking->GetCurrentThreadAsset(), nullptr); - } - - { - AZ_ASSET_NAMED_SCOPE("TestScopeAttach.1"); - { - AZ_ASSET_NAMED_SCOPE("TestScopeAttach.2"); - { - originatingAsset = m_env->m_assetTracking->GetCurrentThreadAsset(); - EXPECT_NE(originatingAsset, nullptr); - m_env->m_table.Get().emplace(TEST_POINTER, AllocationTable::RecordType{ originatingAsset, (uint32_t)TEST_SIZE, TestData() }); - } - } - } - - EXPECT_EQ(m_env->m_assetTracking->GetCurrentThreadAsset(), nullptr); - - { - AZ_ASSET_ATTACH_TO_SCOPE(TEST_POINTER); - EXPECT_EQ(m_env->m_assetTracking->GetCurrentThreadAsset(), originatingAsset); - } - } - - AZStd::unique_ptr m_env; - }; - - TEST_F(AssetTrackingTests, Test) - { - RunTests(); - } -} diff --git a/Code/Framework/AzCore/Tests/EBus.cpp b/Code/Framework/AzCore/Tests/EBus.cpp index 9acf0f8a05..470a95435b 100644 --- a/Code/Framework/AzCore/Tests/EBus.cpp +++ b/Code/Framework/AzCore/Tests/EBus.cpp @@ -2500,7 +2500,7 @@ namespace UnitTest namespace RoutingTest { - class DrillerInterceptor : public EBusVersion1::Router + class EBusInterceptor : public EBusVersion1::Router { public: void OnEvent(int a) override @@ -2555,20 +2555,20 @@ namespace UnitTest TEST_F(EBus, Routing) { using namespace RoutingTest; - DrillerInterceptor driller; + EBusInterceptor interceptor; EBusVersion1Handler v1Handler; v1Handler.BusConnect(); - driller.BusRouterConnect(); + interceptor.BusRouterConnect(); EBusVersion1::Broadcast(&EBusVersion1::Events::OnEvent, 1020); - EXPECT_EQ(1, driller.m_numOnEvent); + EXPECT_EQ(1, interceptor.m_numOnEvent); EXPECT_EQ(1, v1Handler.m_numOnEvent); - driller.BusRouterDisconnect(); + interceptor.BusRouterDisconnect(); EBusVersion1::Broadcast(&EBusVersion1::Events::OnEvent, 1020); - EXPECT_EQ(1, driller.m_numOnEvent); + EXPECT_EQ(1, interceptor.m_numOnEvent); EXPECT_EQ(2, v1Handler.m_numOnEvent); // routing events diff --git a/Code/Framework/AzCore/Tests/Math/TransformTests.cpp b/Code/Framework/AzCore/Tests/Math/TransformTests.cpp index 0138d32376..752c622ae8 100644 --- a/Code/Framework/AzCore/Tests/Math/TransformTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/TransformTests.cpp @@ -402,17 +402,18 @@ namespace UnitTest AllocatorsFixture::SetUp(); AZ::ComponentApplication::Descriptor desc; desc.m_useExistingAllocator = true; - desc.m_enableDrilling = false; // we already created a memory driller for the test (AllocatorsFixture) - m_app.Create(desc); + m_app.reset(aznew AZ::ComponentApplication); + m_app->Create(desc); } void TearDown() override { - m_app.Destroy(); + m_app->Destroy(); + m_app.reset(); AllocatorsFixture::TearDown(); } - AZ::ComponentApplication m_app; + AZStd::unique_ptr m_app; }; TEST_F(MATH_TransformApplicationFixture, DeserializingOldFormat) diff --git a/Code/Framework/AzCore/Tests/Memory.cpp b/Code/Framework/AzCore/Tests/Memory.cpp index 5a483c1ed1..5287167c8b 100644 --- a/Code/Framework/AzCore/Tests/Memory.cpp +++ b/Code/Framework/AzCore/Tests/Memory.cpp @@ -12,8 +12,6 @@ #include #include -#include -#include #include #include #include @@ -44,16 +42,13 @@ namespace UnitTest void SetUp() override { AZ::AllocatorManager::Instance().SetDefaultTrackingMode(AZ::Debug::AllocationRecords::RECORD_FULL); - m_drillerManager = Debug::DrillerManager::Create(); - m_drillerManager->Register(aznew MemoryDriller); + AZ::AllocatorManager::Instance().EnterProfilingMode(); } void TearDown() override { - Debug::DrillerManager::Destroy(m_drillerManager); + AZ::AllocatorManager::Instance().ExitProfilingMode(); AZ::AllocatorManager::Instance().SetDefaultTrackingMode(AZ::Debug::AllocationRecords::RECORD_NO_RECORDS); } - protected: - Debug::DrillerManager* m_drillerManager = nullptr; }; class SystemAllocatorTest diff --git a/Code/Framework/AzCore/Tests/Memory/LeakDetection.cpp b/Code/Framework/AzCore/Tests/Memory/LeakDetection.cpp index 09255ce16f..dcfc931141 100644 --- a/Code/Framework/AzCore/Tests/Memory/LeakDetection.cpp +++ b/Code/Framework/AzCore/Tests/Memory/LeakDetection.cpp @@ -270,8 +270,7 @@ namespace UnitTest void SetUp() override { - m_drillerManager = AZ::Debug::DrillerManager::Create(); - m_drillerManager->Register(aznew AZ::Debug::MemoryDriller); + AZ::AllocatorManager::Instance().EnterProfilingMode(); AZ::AllocatorManager::Instance().SetDefaultTrackingMode(AZ::Debug::AllocationRecords::RECORD_FULL); if (azrtti_typeid() != azrtti_typeid()) // simplifies instead of template specialization @@ -292,7 +291,7 @@ namespace UnitTest // Other allocators need the SystemAllocator in order to work AZ::AllocatorInstance::Destroy(); } - AZ::Debug::DrillerManager::Destroy(m_drillerManager); + AZ::AllocatorManager::Instance().ExitProfilingMode(); m_busRedirector.BusDisconnect(); EXPECT_EQ(m_leakExpected, m_leakDetected); @@ -352,7 +351,6 @@ namespace UnitTest }; BusRedirector m_busRedirector; - AZ::Debug::DrillerManager* m_drillerManager = nullptr; bool m_leakDetected = false; bool m_leakExpected = false; }; diff --git a/Code/Framework/AzCore/Tests/Rtti.cpp b/Code/Framework/AzCore/Tests/Rtti.cpp index 935df848c2..85089b0602 100644 --- a/Code/Framework/AzCore/Tests/Rtti.cpp +++ b/Code/Framework/AzCore/Tests/Rtti.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/BasicContainerSerializerTests.cpp b/Code/Framework/AzCore/Tests/Serialization/Json/BasicContainerSerializerTests.cpp index 4a6a8e9e8a..17a4cfbc7f 100644 --- a/Code/Framework/AzCore/Tests/Serialization/Json/BasicContainerSerializerTests.cpp +++ b/Code/Framework/AzCore/Tests/Serialization/Json/BasicContainerSerializerTests.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/Code/Framework/AzCore/Tests/StatisticalProfiler.cpp b/Code/Framework/AzCore/Tests/StatisticalProfiler.cpp index fc5fe66c4b..291f2a8110 100644 --- a/Code/Framework/AzCore/Tests/StatisticalProfiler.cpp +++ b/Code/Framework/AzCore/Tests/StatisticalProfiler.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include @@ -468,28 +468,29 @@ namespace UnitTest /** Trace message handler to track messages during tests */ struct MyTraceMessageSink final - : public AZ::Debug::TraceMessageDrillerBus::Handler + : public AZ::Debug::TraceMessageBus::Handler { MyTraceMessageSink() { - AZ::Debug::TraceMessageDrillerBus::Handler::BusConnect(); + AZ::Debug::TraceMessageBus::Handler::BusConnect(); } ~MyTraceMessageSink() { - AZ::Debug::TraceMessageDrillerBus::Handler::BusDisconnect(); + AZ::Debug::TraceMessageBus::Handler::BusDisconnect(); } ////////////////////////////////////////////////////////////////////////// - // TraceMessageDrillerBus - void OnPrintf(const char* window, const char* message) override + // TraceMessageBus + bool OnPrintf(const char* window, const char* message) override { - OnOutput(window, message); + return OnOutput(window, message); } - void OnOutput(const char* window, const char* message) override + bool OnOutput(const char* window, const char* message) override { printf("%s: %s\n", window, message); + return false; } }; //struct MyTraceMessageSink diff --git a/Code/Framework/AzCore/Tests/StreamerTests.cpp b/Code/Framework/AzCore/Tests/StreamerTests.cpp index fec81a9031..9007e94ce4 100644 --- a/Code/Framework/AzCore/Tests/StreamerTests.cpp +++ b/Code/Framework/AzCore/Tests/StreamerTests.cpp @@ -258,7 +258,6 @@ namespace AZ m_application = aznew GemTestApplication(); AZ::ComponentApplication::Descriptor appDesc; appDesc.m_useExistingAllocator = true; - appDesc.m_enableDrilling = false; auto m_systemEntity = m_application->Create(appDesc); m_systemEntity->AddComponent(aznew AZ::StreamerComponent()); m_systemEntity->Init(); diff --git a/Code/Framework/AzCore/Tests/TestCatalog.cpp b/Code/Framework/AzCore/Tests/TestCatalog.cpp index c633c6391b..cb8fa11c72 100644 --- a/Code/Framework/AzCore/Tests/TestCatalog.cpp +++ b/Code/Framework/AzCore/Tests/TestCatalog.cpp @@ -167,7 +167,8 @@ namespace UnitTest if (!info.m_streamName.empty()) { AZStd::string fullName = GetTestFolderPath() + info.m_streamName; - info.m_dataLen = static_cast(IO::SystemFile::Length(fullName.c_str())); + IO::FileIOBase* io = IO::FileIOBase::GetInstance(); + io->Size(fullName.c_str(), info.m_dataLen); } else { @@ -187,8 +188,11 @@ namespace UnitTest if (!info.m_streamName.empty()) { + IO::FileIOBase* io = AZ::IO::FileIOBase::GetInstance(); + AZStd::string fullName = GetTestFolderPath() + info.m_streamName; - info.m_dataLen = static_cast(IO::SystemFile::Length(fullName.c_str())); + + io->Size(fullName.c_str(), info.m_dataLen); } else { diff --git a/Code/Framework/AzCore/Tests/azcoretests_files.cmake b/Code/Framework/AzCore/Tests/azcoretests_files.cmake index 6762e07d0a..523c69141a 100644 --- a/Code/Framework/AzCore/Tests/azcoretests_files.cmake +++ b/Code/Framework/AzCore/Tests/azcoretests_files.cmake @@ -69,7 +69,6 @@ set(FILES TickBusTest.cpp UUIDTests.cpp XML.cpp - Debug/AssetTracking.cpp Debug/LocalFileEventLoggerTests.cpp Debug/Trace.cpp Debug/UnhandledExceptions.cpp @@ -214,6 +213,8 @@ set(FILES AZStd/Variant.cpp AZStd/VariantSerialization.cpp AZStd/VectorAndArray.cpp + DOM/DomJsonTests.cpp + DOM/DomJsonBenchmarks.cpp ) # Prevent the following files from being grouped in UNITY builds diff --git a/Code/Framework/AzFramework/AzFramework/Asset/AssetSystemComponent.cpp b/Code/Framework/AzFramework/AzFramework/Asset/AssetSystemComponent.cpp index 3db19c53ee..bb361e56de 100644 --- a/Code/Framework/AzFramework/AzFramework/Asset/AssetSystemComponent.cpp +++ b/Code/Framework/AzFramework/AzFramework/Asset/AssetSystemComponent.cpp @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -17,7 +18,6 @@ #include #include #include -#include #include #include @@ -28,6 +28,8 @@ #include #include +AZ_DECLARE_BUDGET(AzFramework); + namespace AzFramework { namespace AssetBenchmark @@ -302,7 +304,7 @@ namespace AzFramework // SystemTickBus overrides void AssetSystemComponent::OnSystemTick() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(AzFramework); LegacyAssetEventBus::ExecuteQueuedEvents(); } diff --git a/Code/Framework/AzFramework/AzFramework/Entity/EntityContext.cpp b/Code/Framework/AzFramework/AzFramework/Entity/EntityContext.cpp index c1283c9379..2faed93ab7 100644 --- a/Code/Framework/AzFramework/AzFramework/Entity/EntityContext.cpp +++ b/Code/Framework/AzFramework/AzFramework/Entity/EntityContext.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include #include @@ -243,8 +242,6 @@ namespace AzFramework //========================================================================= void EntityContext::ActivateEntity(AZ::EntityId entityId) { - AZ_ASSET_ATTACH_TO_SCOPE(this); - // Verify that this context has the right to perform operations on the entity bool validEntity = IsOwnedByThisContext(entityId); AZ_Warning("GameEntityContext", validEntity, "Entity with id %llu does not belong to the game context.", entityId); diff --git a/Code/Framework/AzFramework/AzFramework/Entity/SliceEntityOwnershipService.cpp b/Code/Framework/AzFramework/AzFramework/Entity/SliceEntityOwnershipService.cpp index 9a077cd611..ab14dfeb7f 100644 --- a/Code/Framework/AzFramework/AzFramework/Entity/SliceEntityOwnershipService.cpp +++ b/Code/Framework/AzFramework/AzFramework/Entity/SliceEntityOwnershipService.cpp @@ -386,7 +386,6 @@ namespace AzFramework void SliceEntityOwnershipService::OnAssetReady(AZ::Data::Asset readyAsset) { AZ_PROFILE_FUNCTION(AzFramework); - AZ_ASSET_ATTACH_TO_SCOPE(readyAsset.Get()); AZ_Assert(readyAsset.GetAs(), "Asset is not a slice!"); @@ -400,7 +399,6 @@ namespace AzFramework // we intentionally capture readyAsset by value here, so that its refcount doesn't hit 0 by the time this call happens. AZStd::function instantiateCallback = [this, readyAsset]() { - AZ_ASSET_ATTACH_TO_SCOPE(readyAsset.Get()); const AZ::Data::AssetId readyAssetId = readyAsset.GetId(); for (auto iter = m_queuedSliceInstantiations.begin(); iter != m_queuedSliceInstantiations.end(); ) { diff --git a/Code/Tools/AssetProcessor/native/utilities/CommunicatorTracePrinter.cpp b/Code/Framework/AzFramework/AzFramework/Process/ProcessCommunicatorTracePrinter.cpp similarity index 82% rename from Code/Tools/AssetProcessor/native/utilities/CommunicatorTracePrinter.cpp rename to Code/Framework/AzFramework/AzFramework/Process/ProcessCommunicatorTracePrinter.cpp index c6008deb34..51674bb32c 100644 --- a/Code/Tools/AssetProcessor/native/utilities/CommunicatorTracePrinter.cpp +++ b/Code/Framework/AzFramework/AzFramework/Process/ProcessCommunicatorTracePrinter.cpp @@ -6,16 +6,17 @@ * */ -#include "CommunicatorTracePrinter.h" +#include "ProcessCommunicatorTracePrinter.h" -CommunicatorTracePrinter::CommunicatorTracePrinter(AzFramework::ProcessCommunicator* communicator, const char* window) : + +ProcessCommunicatorTracePrinter::ProcessCommunicatorTracePrinter(AzFramework::ProcessCommunicator* communicator, const char* window) : m_communicator(communicator), m_window(window) { m_stringBeingConcatenated.reserve(1024); } -CommunicatorTracePrinter::~CommunicatorTracePrinter() +ProcessCommunicatorTracePrinter::~ProcessCommunicatorTracePrinter() { // flush stdout WriteCurrentString(false); @@ -24,7 +25,7 @@ CommunicatorTracePrinter::~CommunicatorTracePrinter() WriteCurrentString(true); } -void CommunicatorTracePrinter::Pump() +void ProcessCommunicatorTracePrinter::Pump() { if (m_communicator->IsValid()) { @@ -42,7 +43,7 @@ void CommunicatorTracePrinter::Pump() } } -void CommunicatorTracePrinter::ParseDataBuffer(AZ::u32 readSize, bool isFromStdErr) +void ProcessCommunicatorTracePrinter::ParseDataBuffer(AZ::u32 readSize, bool isFromStdErr) { if (readSize > AZ_ARRAY_SIZE(m_streamBuffer)) { @@ -67,7 +68,7 @@ void CommunicatorTracePrinter::ParseDataBuffer(AZ::u32 readSize, bool isFromStdE } } -void CommunicatorTracePrinter::WriteCurrentString(bool isFromStdErr) +void ProcessCommunicatorTracePrinter::WriteCurrentString(bool isFromStdErr) { AZStd::string& bufferToUse = isFromStdErr ? m_errorStringBeingConcatenated : m_stringBeingConcatenated; diff --git a/Code/Tools/AssetProcessor/native/utilities/CommunicatorTracePrinter.h b/Code/Framework/AzFramework/AzFramework/Process/ProcessCommunicatorTracePrinter.h similarity index 54% rename from Code/Tools/AssetProcessor/native/utilities/CommunicatorTracePrinter.h rename to Code/Framework/AzFramework/AzFramework/Process/ProcessCommunicatorTracePrinter.h index c2e4da32af..5e14fa290d 100644 --- a/Code/Tools/AssetProcessor/native/utilities/CommunicatorTracePrinter.h +++ b/Code/Framework/AzFramework/AzFramework/Process/ProcessCommunicatorTracePrinter.h @@ -10,20 +10,21 @@ #include -//! CommunicatorTracePrinter listens to stderr and stdout of a running process and writes its output to the AZ_Trace system +//! ProcessCommunicatorTracePrinter listens to stderr and stdout of a running process and writes its output to the AZ_Trace system //! Importantly, it does not do any blocking operations. -class CommunicatorTracePrinter +class ProcessCommunicatorTracePrinter { public: - CommunicatorTracePrinter(AzFramework::ProcessCommunicator* communicator, const char* window); - ~CommunicatorTracePrinter(); + ProcessCommunicatorTracePrinter(AzFramework::ProcessCommunicator* communicator, const char* window); + ~ProcessCommunicatorTracePrinter(); - // call this periodically to drain the buffers and write them. + //! Call this periodically to drain the buffers and write them. void Pump(); - // drains the buffer into the string thats being built, then traces the string when it hits a newline. + //! Drains the buffer into the string that's being built, then traces the string when it hits a newline. void ParseDataBuffer(AZ::u32 readSize, bool isFromStdErr); + //! Prints the current buffer to AZ_Error or AZ_TracePrintf so that it can be picked up by AZ::Debug::Trace void WriteCurrentString(bool isFromStdError); private: diff --git a/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.cpp b/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.cpp index f803e73462..60c730291f 100644 --- a/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.cpp +++ b/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.cpp @@ -12,13 +12,57 @@ namespace AzFramework::Terrain { + // Create a handler that can be accessed from Python scripts to receive terrain change notifications. + class TerrainDataNotificationHandler final + : public AzFramework::Terrain::TerrainDataNotificationBus::Handler + , public AZ::BehaviorEBusHandler + { + public: + AZ_EBUS_BEHAVIOR_BINDER( + TerrainDataNotificationHandler, + "{A83EF103-295A-4653-8279-F30FBF3F9037}", + AZ::SystemAllocator, + OnTerrainDataCreateBegin, + OnTerrainDataCreateEnd, + OnTerrainDataDestroyBegin, + OnTerrainDataDestroyEnd, + OnTerrainDataChanged); + + void OnTerrainDataCreateBegin() override + { + Call(FN_OnTerrainDataCreateBegin); + } + + void OnTerrainDataCreateEnd() override + { + Call(FN_OnTerrainDataCreateEnd); + } + + void OnTerrainDataDestroyBegin() override + { + Call(FN_OnTerrainDataDestroyBegin); + } + + void OnTerrainDataDestroyEnd() override + { + Call(FN_OnTerrainDataDestroyEnd); + } + + void OnTerrainDataChanged( + const AZ::Aabb& dirtyRegion, AzFramework::Terrain::TerrainDataNotifications::TerrainDataChangedMask dataChangedMask) override + { + Call(FN_OnTerrainDataChanged, dirtyRegion, dataChangedMask); + } + }; + void TerrainDataRequests::Reflect(AZ::ReflectContext* context) { if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) { behaviorContext->EBus("TerrainDataRequestBus") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) ->Attribute(AZ::Script::Attributes::Category, "Terrain") - ->Event("GetHeight", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetHeight) + ->Attribute(AZ::Script::Attributes::Module, "terrain") ->Event("GetNormal", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetNormal) ->Event("GetMaxSurfaceWeight", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetMaxSurfaceWeight) ->Event("GetMaxSurfaceWeightFromVector2", @@ -34,8 +78,24 @@ namespace AzFramework::Terrain ->Event("GetTerrainAabb", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetTerrainAabb) ->Event("GetTerrainHeightQueryResolution", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetTerrainHeightQueryResolution) + ->Event("GetHeight", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetHeightVal) + ->Event("GetHeightFromVector2", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetHeightValFromVector2) + ->Event("GetHeightFromFloats", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetHeightValFromFloats) ; + + behaviorContext->EBus("TerrainDataNotificationBus") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Attribute(AZ::Script::Attributes::Category, "Terrain") + ->Attribute(AZ::Script::Attributes::Module, "terrain") + ->Event("OnTerrainDataCreateBegin", &AzFramework::Terrain::TerrainDataNotifications::OnTerrainDataCreateBegin) + ->Event("OnTerrainDataCreateEnd", &AzFramework::Terrain::TerrainDataNotifications::OnTerrainDataCreateEnd) + ->Event("OnTerrainDataDestroyBegin", &AzFramework::Terrain::TerrainDataNotifications::OnTerrainDataDestroyBegin) + ->Event("OnTerrainDataDestroyEnd", &AzFramework::Terrain::TerrainDataNotifications::OnTerrainDataDestroyEnd) + ->Event("OnTerrainDataChanged", &AzFramework::Terrain::TerrainDataNotifications::OnTerrainDataChanged) + ->Handler() + ; } + //TerrainDataNotificationHandler::Reflect(context); } } // namespace AzFramework::Terrain diff --git a/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.h b/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.h index 4c73ddd770..0da1beba77 100644 --- a/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.h +++ b/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.h @@ -144,13 +144,31 @@ namespace AzFramework return result; } SurfaceData::SurfacePoint BehaviorContextGetSurfacePointFromVector2( - const AZ::Vector2& inPosition, - Sampler sampleFilter = Sampler::DEFAULT) const + const AZ::Vector2& inPosition, Sampler sampleFilter = Sampler::DEFAULT) const { SurfaceData::SurfacePoint result; GetSurfacePointFromVector2(inPosition, result, sampleFilter); return result; } + + // Functions without the optional bool* parameter that can be used from Python tests. + float GetHeightVal(AZ::Vector3 position, Sampler sampler = Sampler::BILINEAR) const + { + bool terrainExists; + return GetHeight(position, sampler, &terrainExists); + } + + float GetHeightValFromVector2(AZ::Vector2 position, Sampler sampler = Sampler::BILINEAR) const + { + bool terrainExists; + return GetHeightFromVector2(position, sampler, &terrainExists); + } + + float GetHeightValFromFloats(float x, float y, Sampler sampler = Sampler::BILINEAR) const + { + bool terrainExists; + return GetHeightFromFloats(x, y, sampler, &terrainExists); + } }; using TerrainDataRequestBus = AZ::EBus; diff --git a/Code/Framework/AzFramework/AzFramework/UnitTest/TestDebugDisplayRequests.h b/Code/Framework/AzFramework/AzFramework/UnitTest/TestDebugDisplayRequests.h index 72b15c1a69..b71d10c751 100644 --- a/Code/Framework/AzFramework/AzFramework/UnitTest/TestDebugDisplayRequests.h +++ b/Code/Framework/AzFramework/AzFramework/UnitTest/TestDebugDisplayRequests.h @@ -13,6 +13,13 @@ namespace UnitTest { + //! Null implementation of DebugDisplayRequests for dummy draw calls. + class NullDebugDisplayRequests : public AzFramework::DebugDisplayRequests + { + public: + virtual ~NullDebugDisplayRequests() = default; + }; + //! Minimal implementation of DebugDisplayRequests to support testing shapes. //! Stores a list of points based on received draw calls to delineate the exterior of the object requested to be drawn. class TestDebugDisplayRequests : public AzFramework::DebugDisplayRequests diff --git a/Code/Framework/AzFramework/AzFramework/azframework_files.cmake b/Code/Framework/AzFramework/AzFramework/azframework_files.cmake index b8d428ab82..aac7bd8f14 100644 --- a/Code/Framework/AzFramework/AzFramework/azframework_files.cmake +++ b/Code/Framework/AzFramework/AzFramework/azframework_files.cmake @@ -277,6 +277,8 @@ set(FILES Process/ProcessWatcher.cpp Process/ProcessWatcher.h Process/ProcessCommon_fwd.h + Process/ProcessCommunicatorTracePrinter.cpp + Process/ProcessCommunicatorTracePrinter.h ProjectManager/ProjectManager.h ProjectManager/ProjectManager.cpp Render/GameIntersectorComponent.h diff --git a/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbInputDeviceKeyboard.h b/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbInputDeviceKeyboard.h index 00383abf6c..a6d3029a57 100644 --- a/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbInputDeviceKeyboard.h +++ b/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbInputDeviceKeyboard.h @@ -5,6 +5,9 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ +#pragma once + +#pragma once #include #include diff --git a/Code/Framework/AzFramework/Tests/BinToTextEncode.cpp b/Code/Framework/AzFramework/Tests/BinToTextEncode.cpp index a1ebdfd945..a4055db33c 100644 --- a/Code/Framework/AzFramework/Tests/BinToTextEncode.cpp +++ b/Code/Framework/AzFramework/Tests/BinToTextEncode.cpp @@ -34,24 +34,20 @@ namespace UnitTest AllocatorInstance::Create(); ComponentApplication::Descriptor desc; desc.m_useExistingAllocator = true; - desc.m_enableDrilling = false; // we already created a memory driller for the test (AllocatorsFixture) - m_app.Create(desc); + m_app.reset(aznew ComponentApplication); + m_app->Create(desc); } void TearDown() override { - m_app.Destroy(); + m_app->Destroy(); + m_app.reset(); AllocatorInstance::Destroy(); AllocatorInstance::Destroy(); AllocatorsFixture::TearDown(); } - ~Base64Test() override - { - - } - - ComponentApplication m_app; + AZStd::unique_ptr m_app; }; TEST_F(Base64Test, EmptyStringEncodeTest) diff --git a/Code/Framework/AzFramework/Tests/EntityContext.cpp b/Code/Framework/AzFramework/Tests/EntityContext.cpp index 74a4948e04..520067a9a6 100644 --- a/Code/Framework/AzFramework/Tests/EntityContext.cpp +++ b/Code/Framework/AzFramework/Tests/EntityContext.cpp @@ -58,7 +58,6 @@ namespace UnitTest ComponentApplication app; ComponentApplication::Descriptor desc; desc.m_useExistingAllocator = true; - desc.m_enableDrilling = false; // we already created a memory driller for the test (AllocatorsFixture) app.Create(desc); Data::AssetManager::Instance().RegisterHandler(aznew SliceAssetHandler(app.GetSerializeContext()), AZ::AzTypeInfo::Uuid()); diff --git a/Code/Framework/AzFramework/Tests/FileTagTests.cpp b/Code/Framework/AzFramework/Tests/FileTagTests.cpp index 2b09a5638c..5005ab6ef9 100644 --- a/Code/Framework/AzFramework/Tests/FileTagTests.cpp +++ b/Code/Framework/AzFramework/Tests/FileTagTests.cpp @@ -83,7 +83,6 @@ namespace UnitTest m_data = AZStd::make_unique(); using namespace AzFramework::FileTag; AZ::ComponentApplication::Descriptor desc; - desc.m_enableDrilling = false; m_data->m_application.Start(desc); const char* testAssetRoot = m_tempDirectory.GetDirectory(); diff --git a/Code/Framework/AzFramework/Tests/InputTests.cpp b/Code/Framework/AzFramework/Tests/InputTests.cpp index 5fba7f5796..31558250b5 100644 --- a/Code/Framework/AzFramework/Tests/InputTests.cpp +++ b/Code/Framework/AzFramework/Tests/InputTests.cpp @@ -29,6 +29,13 @@ namespace InputUnitTests //////////////////////////////////////////////////////////////////////////////////////////////// class InputTest : public ScopedAllocatorSetupFixture { + public: + InputTest() : ScopedAllocatorSetupFixture() + { + // Many input tests are only valid if the GamePad device is supported on this platform. + m_gamepadSupported = InputDeviceGamepad::GetMaxSupportedGamepads() > 0; + } + protected: //////////////////////////////////////////////////////////////////////////////////////////// void SetUp() override @@ -46,6 +53,7 @@ namespace InputUnitTests //////////////////////////////////////////////////////////////////////////////////////////// AZStd::unique_ptr m_inputSystemComponent; + bool m_gamepadSupported; }; //////////////////////////////////////////////////////////////////////////////////////////////// @@ -78,12 +86,17 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputContext_ActivateDeactivate_Successfull) -#else TEST_F(InputTest, InputContext_ActivateDeactivate_Successfull) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputContext_ActivateDeactivate_Successfull"; + #else + SUCCEED() << "Skipping test InputContext_ActivateDeactivate_Successfull"; + #endif + return; + } // Create an input context (they are inactive by default). InputContext inputContext("TestInputContext"); @@ -148,12 +161,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputContext_AddRemoveInputMapping_Successfull) -#else TEST_F(InputTest, InputContext_AddRemoveInputMapping_Successfull) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputContext_AddRemoveInputMapping_Successfull"; + #else + SUCCEED() << "Skipping test InputContext_AddRemoveInputMapping_Successfull"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -256,12 +275,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputContext_ConsumeProcessedInput_Consumed) -#else TEST_F(InputTest, InputContext_ConsumeProcessedInput_Consumed) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputContext_ConsumeProcessedInput_Consumed"; + #else + SUCCEED() << "Skipping test InputContext_ConsumeProcessedInput_Consumed"; + #endif + return; + } + InputContext::InitData initData; // Create a high priority input context that consumes input processed by any of its mappings. @@ -340,12 +365,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputContext_FilteredInput_Mapped) -#else TEST_F(InputTest, InputContext_FilteredInput_Mapped) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputContext_FilteredInput_Mapped"; + #else + SUCCEED() << "Skipping test InputContext_FilteredInput_Mapped"; + #endif + return; + } + // Create an input context that initially only listens for keyboard input. InputContext::InitData initData; initData.autoActivate = true; @@ -413,12 +444,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingOr_AddRemoveSourceInput_Successful) -#else TEST_F(InputTest, InputMappingOr_AddRemoveSourceInput_Successful) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingOr_AddRemoveSourceInput_Successful"; + #else + SUCCEED() << "Skipping test InputMappingOr_AddRemoveSourceInput_Successful"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -491,12 +528,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingOr_SingleSourceInput_Mapped) -#else TEST_F(InputTest, InputMappingOr_SingleSourceInput_Mapped) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingOr_SingleSourceInput_Mapped"; + #else + SUCCEED() << "Skipping test InputMappingOr_SingleSourceInput_Mapped"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -558,12 +601,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingOr_MultipleSourceInputs_Mapped) -#else TEST_F(InputTest, InputMappingOr_MultipleSourceInputs_Mapped) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingOr_MultipleSourceInputs_Mapped"; + #else + SUCCEED() << "Skipping test InputMappingOr_MultipleSourceInputs_Mapped"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -650,12 +699,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingAnd_AddRemoveSourceInput_Successful) -#else TEST_F(InputTest, InputMappingAnd_AddRemoveSourceInput_Successful) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingAnd_AddRemoveSourceInput_Successful"; + #else + SUCCEED() << "Skipping test InputMappingAnd_AddRemoveSourceInput_Successful"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -728,12 +783,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingAnd_SingleSourceInput_Mapped) -#else TEST_F(InputTest, InputMappingAnd_SingleSourceInput_Mapped) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingAnd_SingleSourceInput_Mapped"; + #else + SUCCEED() << "Skipping test InputMappingAnd_SingleSourceInput_Mapped"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -795,12 +856,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingAnd_MultipleSourceInputs_Mapped) -#else TEST_F(InputTest, InputMappingAnd_MultipleSourceInputs_Mapped) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingAnd_MultipleSourceInputs_Mapped"; + #else + SUCCEED() << "Skipping test InputMappingAnd_MultipleSourceInputs_Mapped"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -909,12 +976,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingAnd_MultipleSourceInputsWithDifferentValues_ValuesAveraged) -#else TEST_F(InputTest, InputMappingAnd_MultipleSourceInputsWithDifferentValues_ValuesAveraged) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingAnd_MultipleSourceInputsWithDifferentValues_ValuesAveraged"; + #else + SUCCEED() << "Skipping test InputMappingAnd_MultipleSourceInputsWithDifferentValues_ValuesAveraged"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -969,12 +1042,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingAnd_MultipleSourceInputsFromTheSameInputDeviceTypeWithDifferentIndicies_NotMapped) -#else TEST_F(InputTest, InputMappingAnd_MultipleSourceInputsFromTheSameInputDeviceTypeWithDifferentIndicies_NotMapped) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingAnd_MultipleSourceInputsFromTheSameInputDeviceTypeWithDifferentIndicies_NotMapped"; + #else + SUCCEED() << "Skipping test InputMappingAnd_MultipleSourceInputsFromTheSameInputDeviceTypeWithDifferentIndicies_NotMapped"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); diff --git a/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/XcbBaseTestFixture.h b/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/XcbBaseTestFixture.h index 2a63a5f158..524df3e436 100644 --- a/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/XcbBaseTestFixture.h +++ b/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/XcbBaseTestFixture.h @@ -10,6 +10,7 @@ #include #include +#include #include "MockXcbInterface.h" @@ -17,7 +18,7 @@ namespace AzFramework { // Sets up mock behavior for the xcb library, providing an xcb_connection_t that is returned from a call to xcb_connect class XcbBaseTestFixture - : public testing::Test + : public ::UnitTest::ScopedAllocatorSetupFixture { public: void SetUp() override; diff --git a/Code/Framework/AzFramework/Tests/Scene.cpp b/Code/Framework/AzFramework/Tests/Scene.cpp index 31df6e6774..a7325cc810 100644 --- a/Code/Framework/AzFramework/Tests/Scene.cpp +++ b/Code/Framework/AzFramework/Tests/Scene.cpp @@ -113,7 +113,6 @@ namespace SceneUnitTest m_app.RegisterComponentDescriptor(AZ::StreamerComponent::CreateDescriptor()); AZ::ComponentApplication::Descriptor desc; - desc.m_enableDrilling = false; // the unit test framework already adds a driller m_systemEntity = m_app.Create(desc); m_systemEntity->Init(); diff --git a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFrameworkTestHelpers.h b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFrameworkTestHelpers.h index f87f83c1b2..63392eb82f 100644 --- a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFrameworkTestHelpers.h +++ b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFrameworkTestHelpers.h @@ -29,7 +29,8 @@ namespace UnitTest void SetUpEditorFixtureImpl() override { ToolsApplicationFixtureT::SetUpEditorFixtureImpl(); - m_viewportManipulatorInteraction = AZStd::make_unique(); + m_viewportManipulatorInteraction = + AZStd::make_unique(ToolsApplicationFixtureT::CreateDebugDisplayRequests()); m_actionDispatcher = AZStd::make_unique(*m_viewportManipulatorInteraction); m_cameraState = AzFramework::CreateIdentityDefaultCamera(AZ::Vector3::CreateZero(), AzManipulatorTestFramework::DefaultViewportSize); diff --git a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/DirectManipulatorViewportInteraction.h b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/DirectManipulatorViewportInteraction.h index 7cef7b635d..33afee695b 100644 --- a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/DirectManipulatorViewportInteraction.h +++ b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/DirectManipulatorViewportInteraction.h @@ -17,11 +17,10 @@ namespace AzManipulatorTestFramework class ViewportInteraction; //! Implementation of manipulator viewport interaction that manipulates the manager directly. - class DirectCallManipulatorViewportInteraction - : public ManipulatorViewportInteraction + class DirectCallManipulatorViewportInteraction : public ManipulatorViewportInteraction { public: - DirectCallManipulatorViewportInteraction(); + explicit DirectCallManipulatorViewportInteraction(AZStd::shared_ptr debugDisplayRequests); ~DirectCallManipulatorViewportInteraction(); // ManipulatorViewportInteractionInterface ... diff --git a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/IndirectManipulatorViewportInteraction.h b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/IndirectManipulatorViewportInteraction.h index a7b1be2c7d..da2804dfd5 100644 --- a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/IndirectManipulatorViewportInteraction.h +++ b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/IndirectManipulatorViewportInteraction.h @@ -21,7 +21,7 @@ namespace AzManipulatorTestFramework class IndirectCallManipulatorViewportInteraction : public ManipulatorViewportInteraction { public: - IndirectCallManipulatorViewportInteraction(); + explicit IndirectCallManipulatorViewportInteraction(AZStd::shared_ptr debugDisplayRequests); ~IndirectCallManipulatorViewportInteraction(); // ManipulatorViewportInteractionInterface ... diff --git a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h index a353140d4c..1568c1a931 100644 --- a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h +++ b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h @@ -11,10 +11,13 @@ #include #include -namespace AzManipulatorTestFramework +namespace AzFramework { - class NullDebugDisplayRequests; + class DebugDisplayRequests; +} +namespace AzManipulatorTestFramework +{ //! Implementation of the viewport interaction model to handle viewport interaction requests. class ViewportInteraction : public ViewportInteractionInterface @@ -23,7 +26,7 @@ namespace AzManipulatorTestFramework , private AzToolsFramework::ViewportInteraction::EditorEntityViewportInteractionRequestBus::Handler { public: - ViewportInteraction(); + explicit ViewportInteraction(AZStd::shared_ptr debugDisplayRequests); ~ViewportInteraction(); // ViewportInteractionInterface overrides ... @@ -63,7 +66,7 @@ namespace AzManipulatorTestFramework static constexpr AzFramework::ViewportId m_viewportId = 1234; //!< Arbitrary viewport id for manipulator tests. AzFramework::EntityVisibilityQuery m_entityVisibilityQuery; - AZStd::unique_ptr m_nullDebugDisplayRequests; + AZStd::shared_ptr m_debugDisplayRequests; AzFramework::CameraState m_cameraState; bool m_gridSnapping = false; bool m_angularSnapping = false; diff --git a/Code/Framework/AzManipulatorTestFramework/Source/DirectManipulatorViewportInteraction.cpp b/Code/Framework/AzManipulatorTestFramework/Source/DirectManipulatorViewportInteraction.cpp index c9234fe488..c96840e4c9 100644 --- a/Code/Framework/AzManipulatorTestFramework/Source/DirectManipulatorViewportInteraction.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Source/DirectManipulatorViewportInteraction.cpp @@ -118,10 +118,11 @@ namespace AzManipulatorTestFramework return m_manipulatorManager->Interacting(); } - DirectCallManipulatorViewportInteraction::DirectCallManipulatorViewportInteraction() + DirectCallManipulatorViewportInteraction::DirectCallManipulatorViewportInteraction( + AZStd::shared_ptr debugDisplayRequests) : m_customManager( AZStd::make_unique(AzToolsFramework::ManipulatorManagerId(AZ::Crc32("TestManipulatorManagerId")))) - , m_viewportInteraction(AZStd::make_unique()) + , m_viewportInteraction(AZStd::make_unique(AZStd::move(debugDisplayRequests))) , m_manipulatorManager(AZStd::make_unique(m_viewportInteraction.get(), m_customManager)) { } diff --git a/Code/Framework/AzManipulatorTestFramework/Source/IndirectManipulatorViewportInteraction.cpp b/Code/Framework/AzManipulatorTestFramework/Source/IndirectManipulatorViewportInteraction.cpp index 9bcb8986d5..9c5f84196f 100644 --- a/Code/Framework/AzManipulatorTestFramework/Source/IndirectManipulatorViewportInteraction.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Source/IndirectManipulatorViewportInteraction.cpp @@ -76,8 +76,9 @@ namespace AzManipulatorTestFramework return manipulatorInteracting; } - IndirectCallManipulatorViewportInteraction::IndirectCallManipulatorViewportInteraction() - : m_viewportInteraction(AZStd::make_unique()) + IndirectCallManipulatorViewportInteraction::IndirectCallManipulatorViewportInteraction( + AZStd::shared_ptr debugDisplayRequests) + : m_viewportInteraction(AZStd::make_unique(AZStd::move(debugDisplayRequests))) , m_manipulatorManager(AZStd::make_unique(*m_viewportInteraction)) { } diff --git a/Code/Framework/AzManipulatorTestFramework/Source/ViewportInteraction.cpp b/Code/Framework/AzManipulatorTestFramework/Source/ViewportInteraction.cpp index e56f7d6d72..1a28c8cad1 100644 --- a/Code/Framework/AzManipulatorTestFramework/Source/ViewportInteraction.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Source/ViewportInteraction.cpp @@ -13,15 +13,8 @@ namespace AzManipulatorTestFramework { - // Null debug display for dummy draw calls - class NullDebugDisplayRequests : public AzFramework::DebugDisplayRequests - { - public: - virtual ~NullDebugDisplayRequests() = default; - }; - - ViewportInteraction::ViewportInteraction() - : m_nullDebugDisplayRequests(AZStd::make_unique()) + ViewportInteraction::ViewportInteraction(AZStd::shared_ptr debugDisplayRequests) + : m_debugDisplayRequests(AZStd::move(debugDisplayRequests)) { AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Handler::BusConnect(m_viewportId); AzToolsFramework::ViewportInteraction::ViewportSettingsRequestBus::Handler::BusConnect(m_viewportId); @@ -102,7 +95,7 @@ namespace AzManipulatorTestFramework AzFramework::DebugDisplayRequests& ViewportInteraction::GetDebugDisplay() { - return *m_nullDebugDisplayRequests; + return *m_debugDisplayRequests; } void ViewportInteraction::SetGridSnapping(const bool enabled) diff --git a/Code/Framework/AzManipulatorTestFramework/Tests/GridSnappingTest.cpp b/Code/Framework/AzManipulatorTestFramework/Tests/GridSnappingTest.cpp index 4af66edc0a..8707d08bb3 100644 --- a/Code/Framework/AzManipulatorTestFramework/Tests/GridSnappingTest.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Tests/GridSnappingTest.cpp @@ -26,7 +26,8 @@ namespace UnitTest { public: GridSnappingFixture() - : m_viewportManipulatorInteraction(AZStd::make_unique()) + : m_viewportManipulatorInteraction(AZStd::make_unique( + AZStd::make_shared())) , m_actionDispatcher( AZStd::make_unique(*m_viewportManipulatorInteraction)) { diff --git a/Code/Framework/AzManipulatorTestFramework/Tests/ViewportInteractionTest.cpp b/Code/Framework/AzManipulatorTestFramework/Tests/ViewportInteractionTest.cpp index 38c3e33977..481647f960 100644 --- a/Code/Framework/AzManipulatorTestFramework/Tests/ViewportInteractionTest.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Tests/ViewportInteractionTest.cpp @@ -15,7 +15,8 @@ namespace UnitTest { public: AValidViewportInteraction() - : m_viewportInteraction(AZStd::make_unique()) + : m_viewportInteraction( + AZStd::make_unique(AZStd::make_shared())) { } diff --git a/Code/Framework/AzManipulatorTestFramework/Tests/WorldSpaceBuilderTest.cpp b/Code/Framework/AzManipulatorTestFramework/Tests/WorldSpaceBuilderTest.cpp index 376c18072e..95afe0e47d 100644 --- a/Code/Framework/AzManipulatorTestFramework/Tests/WorldSpaceBuilderTest.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Tests/WorldSpaceBuilderTest.cpp @@ -75,9 +75,11 @@ namespace UnitTest void SetUpEditorFixtureImpl() override { m_directState = - AZStd::make_unique(AZStd::make_unique()); + AZStd::make_unique(AZStd::make_unique( + AZStd::make_shared())); m_busState = - AZStd::make_unique(AZStd::make_unique()); + AZStd::make_unique(AZStd::make_unique( + AZStd::make_shared())); m_cameraState = AzFramework::CreateIdentityDefaultCamera(AZ::Vector3::CreateZero(), AzManipulatorTestFramework::DefaultViewportSize); } diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp index af902f97a0..7e78f64778 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp @@ -53,7 +53,6 @@ static void OptimizedSetParent(QWidget* widget, QWidget* parent) namespace AzQtComponents { - static const FancyDockingDropZoneConstants g_FancyDockingConstants; // Constant for the threshold in pixels for snapping to edges while dragging for docking static const int g_snapThresholdInPixels = 15; @@ -155,7 +154,7 @@ namespace AzQtComponents // Timer for updating our hovered drop zone opacity QObject::connect(m_dropZoneHoverFadeInTimer, &QTimer::timeout, this, &FancyDocking::onDropZoneHoverFadeInUpdate); - m_dropZoneHoverFadeInTimer->setInterval(g_FancyDockingConstants.dropZoneHoverFadeUpdateIntervalMS); + m_dropZoneHoverFadeInTimer->setInterval(FancyDockingDropZoneConstants::dropZoneHoverFadeUpdateIntervalMS); QIcon dragIcon = QIcon(QStringLiteral(":/Cursors/Grabbing.svg")); m_dragCursor = QCursor(dragIcon.pixmap(16), 5, 2); } @@ -333,13 +332,13 @@ namespace AzQtComponents */ void FancyDocking::onDropZoneHoverFadeInUpdate() { - const qreal dropZoneHoverOpacity = g_FancyDockingConstants.dropZoneHoverFadeIncrement + m_dropZoneState.dropZoneHoverOpacity(); + const qreal dropZoneHoverOpacity = FancyDockingDropZoneConstants::dropZoneHoverFadeIncrement + m_dropZoneState.dropZoneHoverOpacity(); // Once we've reached the full drop zone opacity, cut it off in case we // went over and stop the timer - if (dropZoneHoverOpacity >= g_FancyDockingConstants.dropZoneOpacity) + if (dropZoneHoverOpacity >= FancyDockingDropZoneConstants::dropZoneOpacity) { - m_dropZoneState.setDropZoneHoverOpacity(g_FancyDockingConstants.dropZoneOpacity); + m_dropZoneState.setDropZoneHoverOpacity(FancyDockingDropZoneConstants::dropZoneOpacity); m_dropZoneHoverFadeInTimer->stop(); } else @@ -792,12 +791,12 @@ namespace AzQtComponents QPoint mainWindowTopLeft = multiscreenMapFromGlobal(mainWindow->mapToGlobal(mainWindowRect.topLeft())); QPoint mainWindowTopRight = multiscreenMapFromGlobal(mainWindow->mapToGlobal(mainWindowRect.topRight())); QPoint mainWindowBottomLeft = multiscreenMapFromGlobal(mainWindow->mapToGlobal(mainWindowRect.bottomLeft())); - QSize absoluteLeftRightSize(g_FancyDockingConstants.absoluteDropZoneSizeInPixels, mainWindowRect.height()); + QSize absoluteLeftRightSize(FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels, mainWindowRect.height()); QRect absoluteLeftDropZone(mainWindowTopLeft, absoluteLeftRightSize); - QRect absoluteRightDropZone(mainWindowTopRight - QPoint(g_FancyDockingConstants.absoluteDropZoneSizeInPixels, 0), absoluteLeftRightSize); - QSize absoluteTopBottomSize(mainWindowRect.width(), g_FancyDockingConstants.absoluteDropZoneSizeInPixels); + QRect absoluteRightDropZone(mainWindowTopRight - QPoint(FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels, 0), absoluteLeftRightSize); + QSize absoluteTopBottomSize(mainWindowRect.width(), FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels); QRect absoluteTopDropZone(mainWindowTopLeft, absoluteTopBottomSize); - QRect absoluteBottomDropZone(mainWindowBottomLeft - QPoint(0, g_FancyDockingConstants.absoluteDropZoneSizeInPixels), absoluteTopBottomSize); + QRect absoluteBottomDropZone(mainWindowBottomLeft - QPoint(0, FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels), absoluteTopBottomSize); // If the drop target is a main window, then we will only show the absolute // drop zone if the cursor is in that zone already @@ -986,16 +985,16 @@ namespace AzQtComponents switch (m_dropZoneState.absoluteDropZoneArea()) { case Qt::LeftDockWidgetArea: - dockRect.setX(dockRect.x() + g_FancyDockingConstants.absoluteDropZoneSizeInPixels); + dockRect.setX(dockRect.x() + FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels); break; case Qt::RightDockWidgetArea: - dockRect.setWidth(dockRect.width() - g_FancyDockingConstants.absoluteDropZoneSizeInPixels); + dockRect.setWidth(dockRect.width() - FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels); break; case Qt::TopDockWidgetArea: - dockRect.setY(dockRect.y() + g_FancyDockingConstants.absoluteDropZoneSizeInPixels); + dockRect.setY(dockRect.y() + FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels); break; case Qt::BottomDockWidgetArea: - dockRect.setHeight(dockRect.height() - g_FancyDockingConstants.absoluteDropZoneSizeInPixels); + dockRect.setHeight(dockRect.height() - FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels); break; } @@ -1034,15 +1033,15 @@ namespace AzQtComponents // Set the drop zone width/height to the default, but if the dock widget // width and/or height is below the threshold, then switch to scaling them // down accordingly - int dropZoneWidth = g_FancyDockingConstants.dropZoneSizeInPixels; - if (dockWidth < g_FancyDockingConstants.minDockSizeBeforeDropZoneScalingInPixels) + int dropZoneWidth = FancyDockingDropZoneConstants::dropZoneSizeInPixels; + if (dockWidth < FancyDockingDropZoneConstants::minDockSizeBeforeDropZoneScalingInPixels) { - dropZoneWidth = aznumeric_cast(dockWidth * g_FancyDockingConstants.dropZoneScaleFactor); + dropZoneWidth = aznumeric_cast(dockWidth * FancyDockingDropZoneConstants::dropZoneScaleFactor); } - int dropZoneHeight = g_FancyDockingConstants.dropZoneSizeInPixels; - if (dockHeight < g_FancyDockingConstants.minDockSizeBeforeDropZoneScalingInPixels) + int dropZoneHeight = FancyDockingDropZoneConstants::dropZoneSizeInPixels; + if (dockHeight < FancyDockingDropZoneConstants::minDockSizeBeforeDropZoneScalingInPixels) { - dropZoneHeight = aznumeric_cast(dockHeight * g_FancyDockingConstants.dropZoneScaleFactor); + dropZoneHeight = aznumeric_cast(dockHeight * FancyDockingDropZoneConstants::dropZoneScaleFactor); } // Calculate the inner corners to be used when constructing the drop zone polygons @@ -1078,7 +1077,7 @@ namespace AzQtComponents int innerDropZoneWidth = m_dropZoneState.innerDropZoneRect().width(); int innerDropZoneHeight = m_dropZoneState.innerDropZoneRect().height(); int centerDropZoneDiameter = (innerDropZoneWidth < innerDropZoneHeight) ? innerDropZoneWidth : innerDropZoneHeight; - centerDropZoneDiameter = aznumeric_cast(centerDropZoneDiameter * g_FancyDockingConstants.centerTabDropZoneScale); + centerDropZoneDiameter = aznumeric_cast(centerDropZoneDiameter * FancyDockingDropZoneConstants::centerTabDropZoneScale); // Setup our center tab drop zone const QSize centerDropZoneSize(centerDropZoneDiameter, centerDropZoneDiameter); @@ -1986,7 +1985,7 @@ namespace AzQtComponents // hasn't faded in all the way yet, then ignore the drop zone area // which will make the widget floating bool modifiedKeyPressed = FancyDockingDropZoneWidget::CheckModifierKey(); - if (modifiedKeyPressed || m_dropZoneState.dropZoneHoverOpacity() != g_FancyDockingConstants.dropZoneOpacity) + if (modifiedKeyPressed || m_dropZoneState.dropZoneHoverOpacity() != FancyDockingDropZoneConstants::dropZoneOpacity) { area = Qt::NoDockWidgetArea; } @@ -3026,7 +3025,7 @@ namespace AzQtComponents { bool modifiedKeyPressed = FancyDockingDropZoneWidget::CheckModifierKey(); - m_ghostWidget->setWindowOpacity(modifiedKeyPressed ? 1.0f : g_FancyDockingConstants.draggingDockWidgetOpacity); + m_ghostWidget->setWindowOpacity(modifiedKeyPressed ? 1.0f : FancyDockingDropZoneConstants::draggingDockWidgetOpacity); m_ghostWidget->setPixmap(m_state.dockWidgetScreenGrab.screenGrab, m_state.placeholder(), m_state.placeholderScreen()); } } diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.cpp index 1451094ea1..3873f0389b 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.cpp @@ -19,26 +19,6 @@ namespace AzQtComponents { - static const FancyDockingDropZoneConstants g_Constants; - - FancyDockingDropZoneConstants::FancyDockingDropZoneConstants() - { - draggingDockWidgetOpacity = 0.6; - dropZoneOpacity = 0.4; - dropZoneSizeInPixels = 40; - minDockSizeBeforeDropZoneScalingInPixels = dropZoneSizeInPixels * 3; - dropZoneScaleFactor = 0.25; - centerTabDropZoneScale = 0.5; - centerTabIconScale = 0.5; - dropZoneColor = QColor(155, 155, 155); - dropZoneBorderColor = Qt::black; - dropZoneBorderInPixels = 1; - absoluteDropZoneSizeInPixels = 25; - dockingTargetDelayMS = 110; - dropZoneHoverFadeUpdateIntervalMS = 20; - dropZoneHoverFadeIncrement = dropZoneOpacity / (dockingTargetDelayMS / dropZoneHoverFadeUpdateIntervalMS); - centerDropZoneIconPath = QString(":/stylesheet/img/UI20/docking/tabs_icon.svg"); - } FancyDockingDropZoneWidget::FancyDockingDropZoneWidget(QMainWindow* mainWindow, QWidget* coordinatesRelativeTo, QScreen* screen, FancyDockingDropZoneState* dropZoneState) // NOTE: this will not work with multiple monitors if this widget has a parent. The floating drop zone @@ -154,7 +134,7 @@ namespace AzQtComponents // Draw all of the normal drop zones if they exist (if a dock widget is hovered over) painter.setPen(Qt::NoPen); - painter.setOpacity(g_Constants.dropZoneOpacity); + painter.setOpacity(FancyDockingDropZoneConstants::dropZoneOpacity); auto dropZones = m_dropZoneState->dropZones(); for (auto it = dropZones.cbegin(); it != dropZones.cend(); ++it) { @@ -189,7 +169,7 @@ namespace AzQtComponents // Otherwise, set the normal color else { - painter.setBrush(g_Constants.dropZoneColor); + painter.setBrush(FancyDockingDropZoneConstants::dropZoneColor); } // negate the window position to offset everything by that much @@ -214,8 +194,8 @@ namespace AzQtComponents // Scale the tabs icon based on the drop zone size and our specified offset // Doing this through QIcon to make sure that SVG is rendered already in desired resolution const QSize& dropZoneSize = dropZoneRect.size(); - const QSize requestedIconSize = dropZoneSize * g_Constants.centerTabIconScale; - const QIcon dropZoneIcon = QIcon(g_Constants.centerDropZoneIconPath); + const QSize requestedIconSize = dropZoneSize * FancyDockingDropZoneConstants::centerTabIconScale; + const QIcon dropZoneIcon = QIcon(FancyDockingDropZoneConstants::centerDropZoneIconPath); const QPixmap dropZonePixmap = dropZoneIcon.pixmap(requestedIconSize); const QSize receivedIconSize = dropZoneIcon.actualSize(requestedIconSize); @@ -264,7 +244,7 @@ namespace AzQtComponents } else { - painter.setBrush(g_Constants.dropZoneColor); + painter.setBrush(FancyDockingDropZoneConstants::dropZoneColor); } painter.drawRect(absoluteDropZoneRect); @@ -313,8 +293,8 @@ namespace AzQtComponents const QPoint innerBottomRight = innerDropZoneRect.bottomRight(); // Draw the lines using the appropriate pen - QPen dropZoneBorderPen(g_Constants.dropZoneBorderColor); - dropZoneBorderPen.setWidth(g_Constants.dropZoneBorderInPixels); + QPen dropZoneBorderPen(FancyDockingDropZoneConstants::dropZoneBorderColor); + dropZoneBorderPen.setWidth(FancyDockingDropZoneConstants::dropZoneBorderInPixels); painter.setPen(dropZoneBorderPen); painter.setOpacity(1); painter.drawLine(topLeft, innerTopLeft); diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.h b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.h index 94a6792833..865adcea59 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.h +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.h @@ -28,63 +28,58 @@ class QPainter; namespace AzQtComponents { - struct AZ_QT_COMPONENTS_API FancyDockingDropZoneConstants + namespace FancyDockingDropZoneConstants { // Constant for the opacity of the screen grab for the dock widget being dragged - qreal draggingDockWidgetOpacity; + static constexpr qreal draggingDockWidgetOpacity = 0.6; // Constant for the opacity of the normal drop zones - qreal dropZoneOpacity; + static constexpr qreal dropZoneOpacity = 0.4; // Constant for the default drop zone size (in pixels) - int dropZoneSizeInPixels; + static constexpr int dropZoneSizeInPixels = 40; // Constant for the dock width/height size (in pixels) before we need to start // scaling down the drop zone sizes, or else they will overlap with the center // tab icon or each other - int minDockSizeBeforeDropZoneScalingInPixels; + static constexpr int minDockSizeBeforeDropZoneScalingInPixels = dropZoneSizeInPixels * 3; // Constant for the factor by which we must scale down the drop zone sizes once // the dock width/height size is too small - qreal dropZoneScaleFactor; + static constexpr qreal dropZoneScaleFactor = 0.25; // Constant for the percentage to scale down the inner drop zone rectangle for the center tab drop zone - qreal centerTabDropZoneScale; + static constexpr qreal centerTabDropZoneScale = 0.5; // Constant for the percentage to scale down the center tab drop zone for the center tab icon - qreal centerTabIconScale; + static constexpr qreal centerTabIconScale = 0.5; // Constant for the drop zone hotspot default color - QColor dropZoneColor; + static const QColor dropZoneColor = QColor(155, 155, 155); // Constant for the drop zone border color - QColor dropZoneBorderColor; + static const QColor dropZoneBorderColor = Qt::black; // Constant for the border width in pixels separating the drop zones - int dropZoneBorderInPixels; + static constexpr int dropZoneBorderInPixels = 1; // Constant for the border width in pixels separating the drop zones - int absoluteDropZoneSizeInPixels; + static constexpr int absoluteDropZoneSizeInPixels = 25; // Constant for the delay (in milliseconds) before a drop zone becomes active // once it is hovered over - int dockingTargetDelayMS; + static constexpr int dockingTargetDelayMS = 110; // Constant for the rate at which we will update (fade in) the drop zone opacity // when hovered over (in milliseconds) - int dropZoneHoverFadeUpdateIntervalMS; + static constexpr int dropZoneHoverFadeUpdateIntervalMS = 20; // Constant for the incremental opacity increase for the hovered drop zone // that will fade in to the full drop zone opacity in the desired time - qreal dropZoneHoverFadeIncrement; + static constexpr qreal dropZoneHoverFadeIncrement = dropZoneOpacity / (dockingTargetDelayMS / dropZoneHoverFadeUpdateIntervalMS); // Constant for the path to the center drop zone tabs icon - QString centerDropZoneIconPath; - - FancyDockingDropZoneConstants(); - - FancyDockingDropZoneConstants(const FancyDockingDropZoneConstants&) = delete; - FancyDockingDropZoneConstants& operator=(const FancyDockingDropZoneConstants&) = delete; + static const QString centerDropZoneIconPath = QStringLiteral(":/stylesheet/img/UI20/docking/tabs_icon.svg"); }; class FancyDockingDropZoneState diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/ColorController.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/ColorController.cpp index 176443c0cd..4e8e86bc5a 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/ColorController.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/ColorController.cpp @@ -323,7 +323,7 @@ namespace AzQtComponents saturation *= 2.0 - lightness; } double value = (lightness + saturation) / 2.0; - saturation = (2.0 * saturation) / (lightness + saturation); + saturation = qFuzzyIsNull(lightness + saturation) ? 0 : (2.0 * saturation) / (lightness + saturation); m_hsv.saturation = AZ::GetClamp(saturation, 0.0, 1.0); m_hsv.value = AZ::GetClamp(value, 0.0, 12.5); @@ -341,11 +341,12 @@ namespace AzQtComponents double saturation = m_hsv.saturation * m_hsv.value; if (lightness <= 1.0) { - saturation /= lightness; + saturation = (qFuzzyIsNull(lightness)) ? 0.0 : saturation / lightness; } else { - saturation /= 2.0 - lightness; + double two_minus_lightness = 2.0 - lightness; + saturation = (qFuzzyIsNull(two_minus_lightness)) ? 0.0 : saturation / two_minus_lightness; } lightness /= 2.0; diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Images/Entity/prefab_edit_open_readonly.svg b/Code/Framework/AzQtComponents/AzQtComponents/Images/Entity/prefab_edit_open_readonly.svg new file mode 100644 index 0000000000..9f16c88211 --- /dev/null +++ b/Code/Framework/AzQtComponents/AzQtComponents/Images/Entity/prefab_edit_open_readonly.svg @@ -0,0 +1,3 @@ + + + diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Images/Entity/readonly.svg b/Code/Framework/AzQtComponents/AzQtComponents/Images/Entity/readonly.svg new file mode 100644 index 0000000000..2e942e87f8 --- /dev/null +++ b/Code/Framework/AzQtComponents/AzQtComponents/Images/Entity/readonly.svg @@ -0,0 +1,3 @@ + + + diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Images/resources.qrc b/Code/Framework/AzQtComponents/AzQtComponents/Images/resources.qrc index 15049aeb69..7e7fafc9ee 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Images/resources.qrc +++ b/Code/Framework/AzQtComponents/AzQtComponents/Images/resources.qrc @@ -7,7 +7,9 @@ Entity/prefab.svg Entity/prefab_edit.svg Entity/prefab_edit_open.svg + Entity/prefab_edit_open_readonly.svg Entity/prefab_edit_close.svg + Entity/readonly.svg Level/level.svg diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Tests/ColorControllerTests.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Tests/ColorControllerTests.cpp index fbd58dcac7..9e9bb92737 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Tests/ColorControllerTests.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Tests/ColorControllerTests.cpp @@ -164,11 +164,7 @@ namespace } } -#if AZ_TRAIT_DISABLE_FAILED_ZERO_COLOR_CONVERSION_TEST -TEST(AzQtComponents, DISABLED_ColorConversionsTestAllZeros) -#else TEST(AzQtComponents, ColorConversionsTestAllZeros) -#endif // AZ_TRAIT_DISABLE_FAILED_ZERO_COLOR_CONVERSION_TEST { TestConversions({ 0.0, 0.0, 0.0 }, { 0.0, 0.0, 0.0 }, { 0.0, 0.0, 0.0 }); } diff --git a/Code/Framework/AzTest/AzTest/GemTestEnvironment.cpp b/Code/Framework/AzTest/AzTest/GemTestEnvironment.cpp index de7f8f17c2..e862cdfa94 100644 --- a/Code/Framework/AzTest/AzTest/GemTestEnvironment.cpp +++ b/Code/Framework/AzTest/AzTest/GemTestEnvironment.cpp @@ -91,7 +91,6 @@ namespace AZ m_application = CreateApplicationInstance(); AZ::ComponentApplication::Descriptor appDesc; appDesc.m_useExistingAllocator = true; - appDesc.m_enableDrilling = false; // Set up gems for loading. for (const AZStd::string& dynamicModulePath : m_parameters->m_dynamicModulePaths) diff --git a/Code/Framework/AzTest/AzTest/Platform/Linux/AzTest_Traits_Linux.h b/Code/Framework/AzTest/AzTest/Platform/Linux/AzTest_Traits_Linux.h index 755888e1d9..94f3dd004a 100644 --- a/Code/Framework/AzTest/AzTest/Platform/Linux/AzTest_Traits_Linux.h +++ b/Code/Framework/AzTest/AzTest/Platform/Linux/AzTest_Traits_Linux.h @@ -14,16 +14,14 @@ #define AZ_TRAIT_UNIT_TEST_DILLER_TRIGGER_EVENT_COUNT 100000 #define AZ_TRAIT_DISABLE_FAILED_AP_CONNECTION_TESTS true -#define AZ_TRAIT_DISABLE_FAILED_ASSET_LOAD_TESTS true #define AZ_TRAIT_DISABLE_FAILED_ATOM_RPI_TESTS true #define AZ_TRAIT_DISABLE_FAILED_ARCHIVE_TESTS true -#define AZ_TRAIT_DISABLE_FAILED_ZERO_COLOR_CONVERSION_TEST true + #define AZ_TRAIT_DISABLE_FAILED_FRAMEPROFILER_TEST true #define AZ_TRAIT_DISABLE_FAILED_FRAMEWORK_TESTS true #define AZ_TRAIT_DISABLE_FAILED_GRADIENT_SIGNAL_TESTS true #define AZ_TRAIT_DISABLE_FAILED_MULTIPLAYER_GRIDMATE_TESTS true -#define AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS true #define AZ_TRAIT_DISABLE_FAILED_NATIVE_WINDOWS_TESTS true #define AZ_TRAIT_DISABLE_FAILED_PROCESS_LAUNCHER_TESTS true #define AZ_TRAIT_DISABLE_FAILED_EMOTION_FX_TESTS true diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp index afabbb233b..6c69fc04da 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -268,6 +269,7 @@ namespace AzToolsFramework azrtti_typeid(), azrtti_typeid(), azrtti_typeid(), + azrtti_typeid(), azrtti_typeid(), azrtti_typeid(), azrtti_typeid(), diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetPicker/AssetPickerDialog.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetPicker/AssetPickerDialog.cpp index eae8ec2a1e..4e3b8ee745 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetPicker/AssetPickerDialog.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetPicker/AssetPickerDialog.cpp @@ -99,6 +99,18 @@ namespace AzToolsFramework } } + if (selection.GetSelectedAssetIds().empty()) + { + for (auto& filePath : selection.GetSelectedFilePaths()) + { + if (!filePath.empty()) + { + selectedAsset = true; + m_ui->m_assetBrowserTreeViewWidget->SelectFileAtPath(filePath); + } + } + } + if (!selectedAsset) { m_ui->m_assetBrowserTreeViewWidget->SelectFolder(selection.GetDefaultDirectory()); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetSelectionModel.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetSelectionModel.cpp index 3547cf57b3..2fbdcaf40b 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetSelectionModel.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetSelectionModel.cpp @@ -10,18 +10,24 @@ #include #include +#if !defined(Q_MOC_RUN) +AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") +#include +AZ_POP_DISABLE_WARNING +#endif + namespace AzToolsFramework { namespace AssetBrowser { namespace { - FilterConstType ProductsNoFoldersFilter() + FilterConstType EntryTypeNoFoldersFilter(AssetBrowserEntry::AssetEntryType entryType = AssetBrowserEntry::AssetEntryType::Product) { - EntryTypeFilter* productFilter = new EntryTypeFilter(); - productFilter->SetEntryType(AssetBrowserEntry::AssetEntryType::Product); + EntryTypeFilter* entryTypeFilter = new EntryTypeFilter(); + entryTypeFilter->SetEntryType(entryType); // in case entry is a source or folder, it may still contain relevant product - productFilter->SetFilterPropagation(AssetBrowserEntryFilter::PropagateDirection::Down); + entryTypeFilter->SetFilterPropagation(AssetBrowserEntryFilter::PropagateDirection::Down); EntryTypeFilter* foldersFilter = new EntryTypeFilter(); foldersFilter->SetEntryType(AssetBrowserEntry::AssetEntryType::Folder); @@ -30,7 +36,7 @@ namespace AzToolsFramework noFoldersFilter->SetFilter(FilterConstType(foldersFilter)); CompositeFilter* compFilter = new CompositeFilter(CompositeFilter::LogicOperatorType::AND); - compFilter->AddFilter(FilterConstType(productFilter)); + compFilter->AddFilter(FilterConstType(entryTypeFilter)); compFilter->AddFilter(FilterConstType(noFoldersFilter)); return FilterConstType(compFilter); @@ -79,15 +85,39 @@ namespace AzToolsFramework void AssetSelectionModel::SetSelectedAssetIds(const AZStd::vector& selectedAssetIds) { + m_selectedFilePaths.clear(); + m_selectedAssetIds = selectedAssetIds; } void AssetSelectionModel::SetSelectedAssetId(const AZ::Data::AssetId& selectedAssetId) { + m_selectedFilePaths.clear(); + m_selectedAssetIds.clear(); m_selectedAssetIds.push_back(selectedAssetId); } + const AZStd::vector& AssetSelectionModel::GetSelectedFilePaths() const + { + return m_selectedFilePaths; + } + + void AssetSelectionModel::SetSelectedFilePaths(const AZStd::vector& selectedFilePaths) + { + m_selectedAssetIds.clear(); + + m_selectedFilePaths = selectedFilePaths; + } + + void AssetSelectionModel::SetSelectedFilePath(const AZStd::string& selectedFilePath) + { + m_selectedAssetIds.clear(); + + m_selectedFilePaths.clear(); + m_selectedFilePaths.push_back(selectedFilePath); + } + void AssetSelectionModel::SetDefaultDirectory(AZStd::string_view defaultDirectory) { m_defaultDirectory = defaultDirectory; @@ -136,7 +166,7 @@ namespace AzToolsFramework CompositeFilter* compFilter = new CompositeFilter(CompositeFilter::LogicOperatorType::AND); compFilter->AddFilter(assetTypeFilterPtr); - compFilter->AddFilter(ProductsNoFoldersFilter()); + compFilter->AddFilter(EntryTypeNoFoldersFilter()); selection.SetSelectionFilter(FilterConstType(compFilter)); selection.SetMultiselect(multiselect); @@ -169,7 +199,7 @@ namespace AzToolsFramework CompositeFilter* compFilter = new CompositeFilter(CompositeFilter::LogicOperatorType::AND); compFilter->AddFilter(anyAssetTypeFilterPtr); - compFilter->AddFilter(ProductsNoFoldersFilter()); + compFilter->AddFilter(EntryTypeNoFoldersFilter()); selection.SetSelectionFilter(FilterConstType(compFilter)); selection.SetMultiselect(multiselect); @@ -190,7 +220,28 @@ namespace AzToolsFramework CompositeFilter* compFilter = new CompositeFilter(CompositeFilter::LogicOperatorType::AND); compFilter->AddFilter(assetGroupFilterPtr); - compFilter->AddFilter(ProductsNoFoldersFilter()); + compFilter->AddFilter(EntryTypeNoFoldersFilter()); + + selection.SetSelectionFilter(FilterConstType(compFilter)); + selection.SetMultiselect(multiselect); + + return selection; + } + + AssetSelectionModel AssetSelectionModel::SourceAssetTypeSelection(const QString& pattern, bool multiselect) + { + AssetSelectionModel selection; + + RegExpFilter* patternFilter = new RegExpFilter(); + patternFilter->SetFilterPattern(pattern); + patternFilter->SetFilterPropagation(AssetBrowserEntryFilter::PropagateDirection::Down); + auto patternFilterPtr = FilterConstType(patternFilter); + + selection.SetDisplayFilter(patternFilterPtr); + + CompositeFilter* compFilter = new CompositeFilter(CompositeFilter::LogicOperatorType::AND); + compFilter->AddFilter(patternFilterPtr); + compFilter->AddFilter(EntryTypeNoFoldersFilter(AssetBrowserEntry::AssetEntryType::Source)); selection.SetSelectionFilter(FilterConstType(compFilter)); selection.SetMultiselect(multiselect); @@ -204,7 +255,7 @@ namespace AzToolsFramework CompositeFilter* compFilter = new CompositeFilter(CompositeFilter::LogicOperatorType::OR); selection.SetDisplayFilter(FilterConstType(compFilter)); - selection.SetSelectionFilter(ProductsNoFoldersFilter()); + selection.SetSelectionFilter(EntryTypeNoFoldersFilter()); selection.SetMultiselect(multiselect); return selection; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetSelectionModel.h b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetSelectionModel.h index 4036c166ac..241c896123 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetSelectionModel.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetSelectionModel.h @@ -44,6 +44,10 @@ namespace AzToolsFramework void SetSelectedAssetIds(const AZStd::vector& selectedAssetIds); void SetSelectedAssetId(const AZ::Data::AssetId& selectedAssetId); + const AZStd::vector& GetSelectedFilePaths() const; + void SetSelectedFilePaths(const AZStd::vector& selectedFilePaths); + void SetSelectedFilePath(const AZStd::string& selectedFilePath); + void SetDefaultDirectory(AZStd::string_view defaultDirectory); AZStd::string_view GetDefaultDirectory() const; @@ -60,6 +64,7 @@ namespace AzToolsFramework static AssetSelectionModel AssetTypeSelection(const char* assetTypeName, bool multiselect = false); static AssetSelectionModel AssetTypesSelection(const AZStd::vector& assetTypes, bool multiselect = false); static AssetSelectionModel AssetGroupSelection(const char* group, bool multiselect = false); + static AssetSelectionModel SourceAssetTypeSelection(const QString& pattern, bool multiselect = false); static AssetSelectionModel EverythingSelection(bool multiselect = false); private: @@ -68,8 +73,12 @@ namespace AzToolsFramework // some entries like folder should always be displayed, but not always selectable, thus 2 separate filters FilterConstType m_selectionFilter; FilterConstType m_displayFilter; - + + //! Selection can be based on asset ids (for products), or file paths (for sources) + //! These are mututally exclusive AZStd::vector m_selectedAssetIds; + AZStd::vector m_selectedFilePaths; + AZStd::vector m_results; AZStd::string m_defaultDirectory; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Search/Filter.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Search/Filter.cpp index 3f267dedd0..d617638632 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Search/Filter.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Search/Filter.cpp @@ -251,6 +251,40 @@ namespace AzToolsFramework return false; } + ////////////////////////////////////////////////////////////////////////// + // RegExpFilter + ////////////////////////////////////////////////////////////////////////// + RegExpFilter::RegExpFilter() + : m_filterPattern("") + { + } + + void RegExpFilter::SetFilterPattern(const QString& filterPattern) + { + m_filterPattern = filterPattern; + Q_EMIT updatedSignal(); + } + + QString RegExpFilter::GetNameInternal() const + { + return m_filterPattern; + } + + bool RegExpFilter::MatchInternal(const AssetBrowserEntry* entry) const + { + // no filter pattern matches any asset + if (m_filterPattern.isEmpty()) + { + return true; + } + + // entry's name matches regular expression pattern + QRegExp regExp(m_filterPattern); + regExp.setPatternSyntax(QRegExp::Wildcard); + + return regExp.exactMatch(entry->GetDisplayName()); + } + ////////////////////////////////////////////////////////////////////////// // AssetTypeFilter ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Search/Filter.h b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Search/Filter.h index 5819ae92d7..94f47e0599 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Search/Filter.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Search/Filter.h @@ -115,6 +115,28 @@ namespace AzToolsFramework QString m_filterString; }; + ////////////////////////////////////////////////////////////////////////// + // RegExpFilter + ////////////////////////////////////////////////////////////////////////// + //! RegExpFilter filters assets based on a regular expression pattern + class RegExpFilter + : public AssetBrowserEntryFilter + { + Q_OBJECT + public: + RegExpFilter(); + ~RegExpFilter() override = default; + + void SetFilterPattern(const QString& filterPattern); + + protected: + QString GetNameInternal() const override; + bool MatchInternal(const AssetBrowserEntry* entry) const override; + + private: + QString m_filterPattern; + }; + ////////////////////////////////////////////////////////////////////////// // AssetTypeFilter ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBundle/AssetBundleComponent.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBundle/AssetBundleComponent.cpp index ac8e034faf..6647f48c31 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBundle/AssetBundleComponent.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBundle/AssetBundleComponent.cpp @@ -409,9 +409,6 @@ namespace AzToolsFramework return false; } - // Surface any errors during the renames - ScopedIOEventBusHandler renameHandler; - // Rename all the temp files to the actual bundle names for (int idx = 0; idx < bundlePathDeltaCatalogPair.size(); ++idx) { @@ -759,20 +756,5 @@ namespace AzToolsFramework } return true; } - - ScopedIOEventBusHandler::ScopedIOEventBusHandler() - { - BusConnect(); - } - - ScopedIOEventBusHandler::~ScopedIOEventBusHandler() - { - BusDisconnect(); - } - - void ScopedIOEventBusHandler::OnError([[maybe_unused]] const AZ::IO::SystemFile* file, [[maybe_unused]] const char* fileName, [[maybe_unused]] int errorCode) - { - AZ_Error("AssetBundleComponent", false, "FileIO Error for file %s (errorCode %d)", file && file->Name() ? file->Name() : fileName, errorCode); - } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBundle/AssetBundleComponent.h b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBundle/AssetBundleComponent.h index a2f7729e4e..8d2b0f4263 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBundle/AssetBundleComponent.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBundle/AssetBundleComponent.h @@ -8,7 +8,6 @@ #pragma once #include -#include #include namespace AZ @@ -92,14 +91,4 @@ namespace AzToolsFramework //! We only create the delta catalog once we are sure about what all the files that will go in it. bool AddCatalogAndFilesToBundle(const AZStd::vector& deltaCatalogEntries, const AZStd::vector& fileEntries, const AZStd::string& bundleFilePath, const char* assetAlias, const AzFramework::PlatformId& platformId); }; - - class ScopedIOEventBusHandler : - public AZ::IO::FileIOEventBus::Handler - { - public: - ScopedIOEventBusHandler(); - ~ScopedIOEventBusHandler(); - - void OnError(const AZ::IO::SystemFile* file, const char* fileName, int errorCode) override; - }; } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AzToolsFrameworkModule.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/AzToolsFrameworkModule.cpp index 2cdf409125..dd1ac12a02 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AzToolsFrameworkModule.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AzToolsFrameworkModule.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -75,6 +76,7 @@ namespace AzToolsFramework EditorEntityFixupComponent::CreateDescriptor(), EntityUtilityComponent::CreateDescriptor(), ContainerEntitySystemComponent::CreateDescriptor(), + ReadOnlyEntitySystemComponent::CreateDescriptor(), FocusModeSystemComponent::CreateDescriptor(), SliceMetadataEntityContextComponent::CreateDescriptor(), SliceRequestComponent::CreateDescriptor(), diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntityBus.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntityBus.h new file mode 100644 index 0000000000..051e87c7e0 --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntityBus.h @@ -0,0 +1,63 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include + +#include + +namespace AzToolsFramework +{ + //! Used to notify changes of state for read-only entities. + class ReadOnlyEntityPublicNotifications + : public AZ::EBusTraits + { + public: + ////////////////////////////////////////////////////////////////////////// + // EBusTraits overrides + static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple; + static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; + using BusIdType = AzFramework::EntityContextId; + ////////////////////////////////////////////////////////////////////////// + + //! Triggered when an entity's read-only status changes. + //! @param entityId The entity whose status has changed. + //! @param readOnly The read-only state the container was changed to. + virtual void OnReadOnlyEntityStatusChanged([[maybe_unused]] const AZ::EntityId& entityId, [[maybe_unused]] bool readOnly) {} + + protected: + ~ReadOnlyEntityPublicNotifications() = default; + }; + using ReadOnlyEntityPublicNotificationBus = AZ::EBus; + + //! Used by the ReadOnlyEntitySystemComponent to query the read-only state of entities as set by systems using the API. + class ReadOnlyEntityQueryRequests + : public AZ::EBusTraits + { + public: + ////////////////////////////////////////////////////////////////////////// + // EBusTraits overrides + static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple; + static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; + using BusIdType = AzFramework::EntityContextId; + ////////////////////////////////////////////////////////////////////////// + + //! Triggered when an entity's read-only status is queried. + //! Allows multiple systems to weigh in on the read-only status of an entity. + //! @param entityId The entity whose status has changed. + //! @param[out] isReadOnly The output of the query. Should only be changed to true, and left untouched if false. + virtual void IsReadOnly(const AZ::EntityId& entityId, bool& isReadOnly) = 0; + + protected: + ~ReadOnlyEntityQueryRequests() = default; + }; + using ReadOnlyEntityQueryRequestBus = AZ::EBus; + +} // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntityInterface.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntityInterface.h new file mode 100644 index 0000000000..15ac04d0fd --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntityInterface.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include + +#include + +namespace AzToolsFramework +{ + //! An entity registered as read-only cannot be altered in the editor. + class ReadOnlyEntityPublicInterface + { + public: + AZ_RTTI(ReadOnlyEntityPublicInterface, "{921FE15B-6EBD-47F0-8238-BC63318DEDEA}"); + + //! Returns whether the entity id provided is registered as read-only. + virtual bool IsReadOnly(const AZ::EntityId& entityId) = 0; + }; + + //! An entity registered as read-only cannot be altered in the editor. + class ReadOnlyEntityQueryInterface + { + public: + AZ_RTTI(ReadOnlyEntityQueryInterface, "{2ACD63C5-1F3E-4DE8-880E-8115F857D329}"); + + //! Refreshes the cached read-only status for the entities provided. + //! @param entityIds The entityIds whose read-only state will be queried again. + virtual void RefreshReadOnlyState(const EntityIdList& entityIds) = 0; + + //! Refreshes the cached read-only status for all entities. + //! Useful when disconnecting a handler at runtime. + virtual void RefreshReadOnlyStateForAllEntities() = 0; + }; + +} // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntitySystemComponent.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntitySystemComponent.cpp new file mode 100644 index 0000000000..7536e1e8a5 --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntitySystemComponent.cpp @@ -0,0 +1,99 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +#include +#include + +namespace AzToolsFramework +{ + void ReadOnlyEntitySystemComponent::Activate() + { + AZ::Interface::Register(this); + AZ::Interface::Register(this); + EditorEntityContextNotificationBus::Handler::BusConnect(); + } + + void ReadOnlyEntitySystemComponent::Deactivate() + { + EditorEntityContextNotificationBus::Handler::BusDisconnect(); + AZ::Interface::Unregister(this); + AZ::Interface::Unregister(this); + } + + void ReadOnlyEntitySystemComponent::Reflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context)) + { + serializeContext->Class()->Version(1); + } + } + + void ReadOnlyEntitySystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) + { + provided.push_back(AZ_CRC_CE("ReadOnlyEntityService")); + } + + bool ReadOnlyEntitySystemComponent::IsReadOnly(const AZ::EntityId& entityId) + { + if (!m_readOnlystates.contains(entityId)) + { + QueryReadOnlyStateForEntity(entityId); + } + + return m_readOnlystates[entityId]; + } + + void ReadOnlyEntitySystemComponent::RefreshReadOnlyState(const EntityIdList& entityIds) + { + for (const AZ::EntityId& entityId : entityIds) + { + bool wasReadOnly = m_readOnlystates[entityId]; + QueryReadOnlyStateForEntity(entityId); + + if (bool isReadOnly = m_readOnlystates[entityId]; wasReadOnly != isReadOnly) + { + ReadOnlyEntityPublicNotificationBus::Broadcast( + &ReadOnlyEntityPublicNotificationBus::Events::OnReadOnlyEntityStatusChanged, entityId, isReadOnly); + } + } + } + + void ReadOnlyEntitySystemComponent::RefreshReadOnlyStateForAllEntities() + { + for (auto& elem : m_readOnlystates) + { + AZ::EntityId entityId = elem.first; + bool wasReadOnly = elem.second; + QueryReadOnlyStateForEntity(entityId); + + if (bool isReadOnly = m_readOnlystates[entityId]; wasReadOnly != isReadOnly) + { + ReadOnlyEntityPublicNotificationBus::Broadcast( + &ReadOnlyEntityPublicNotificationBus::Events::OnReadOnlyEntityStatusChanged, entityId, isReadOnly); + } + } + } + + void ReadOnlyEntitySystemComponent::OnContextReset() + { + m_readOnlystates.clear(); + } + + void ReadOnlyEntitySystemComponent::QueryReadOnlyStateForEntity(const AZ::EntityId& entityId) + { + bool isReadOnly = false; + + ReadOnlyEntityQueryRequestBus::Broadcast( + &ReadOnlyEntityQueryRequestBus::Events::IsReadOnly, entityId, isReadOnly); + + m_readOnlystates[entityId] = isReadOnly; + } + +} // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntitySystemComponent.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntitySystemComponent.h new file mode 100644 index 0000000000..4b8942bcd1 --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntitySystemComponent.h @@ -0,0 +1,56 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include + +#include +#include + +namespace AzToolsFramework +{ + //! System Component to track read-only entity registration. + //! An entity registered as ReadOnly cannot be altered in the Editor. + class ReadOnlyEntitySystemComponent final + : public AZ::Component + , private ReadOnlyEntityPublicInterface + , private ReadOnlyEntityQueryInterface + , private EditorEntityContextNotificationBus::Handler + { + public: + AZ_COMPONENT(ReadOnlyEntitySystemComponent, "{B32EB03F-D88F-4B3A-9C16-071AF04DA646}"); + + ReadOnlyEntitySystemComponent() = default; + virtual ~ReadOnlyEntitySystemComponent() = default; + + // AZ::Component overrides ... + void Activate() override; + void Deactivate() override; + + static void Reflect(AZ::ReflectContext* context); + static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided); + + // ReadOnlyEntityPublicInterface overrides ... + bool IsReadOnly(const AZ::EntityId& entityId) override; + + // ReadOnlyEntityQueryInterface overrides ... + void RefreshReadOnlyState(const EntityIdList& entityIds) override; + void RefreshReadOnlyStateForAllEntities() override; + + // EditorEntityContextNotificationBus overrides ... + void OnContextReset() override; + + private: + void QueryReadOnlyStateForEntity(const AZ::EntityId& entityId); + + AZStd::unordered_map m_readOnlystates; + }; + +} // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Logger/TraceLogger.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Logger/TraceLogger.cpp index ce73826388..8c7150f027 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Logger/TraceLogger.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Logger/TraceLogger.cpp @@ -50,7 +50,7 @@ namespace AzToolsFramework return false; } - void TraceLogger::PrepareLogFile(const AZStd::string& logFileName) + void TraceLogger::OpenLogFile(const AZStd::string& logFileName, bool clearLogFile) { using namespace AzFramework; @@ -73,7 +73,7 @@ namespace AzToolsFramework AZStd::string logPath; StringFunc::Path::Join(logDirectory.c_str(), logFileName.c_str(), logPath); - m_logFile.reset(aznew LogFile(logPath.c_str())); + m_logFile.reset(aznew LogFile(logPath.c_str(), clearLogFile)); if (m_logFile) { m_logFile->SetMachineReadable(false); @@ -81,7 +81,7 @@ namespace AzToolsFramework { m_logFile->AppendLog(LogFile::SEV_NORMAL, message.window.c_str(), message.message.c_str()); } - m_startupLogSink = {}; + m_startupLogSink.clear(); m_logFile->FlushLog(); } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Logger/TraceLogger.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Logger/TraceLogger.h index 10708e3239..639674f69e 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Logger/TraceLogger.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Logger/TraceLogger.h @@ -23,7 +23,7 @@ namespace AzToolsFramework ~TraceLogger(); //! Open log file and dump log sink into it - void PrepareLogFile(const AZStd::string& logFileName); + void OpenLogFile(const AZStd::string& logFileName, bool clearLogFile); //! Add filter to ignore messages for windows with matching names void AddWindowFilter(const AZStd::string& filter); @@ -55,7 +55,8 @@ namespace AzToolsFramework AZStd::string window; AZStd::string message; }; - AZStd::vector m_startupLogSink; + + AZStd::list m_startupLogSink; AZStd::unordered_set m_windowFilters; AZStd::unordered_set m_messageFilters; AZStd::unique_ptr m_logFile; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/AngularManipulator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/AngularManipulator.cpp index b8fb4e6a53..29445f6562 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/AngularManipulator.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/AngularManipulator.cpp @@ -191,8 +191,8 @@ namespace AzToolsFramework { m_manipulatorView->Draw( GetManipulatorManagerId(), managerState, GetManipulatorId(), - { ApplySpace(GetLocalTransform()), GetNonUniformScale(), AZ::Vector3::CreateZero(), MouseOver() }, debugDisplay, cameraState, - mouseInteraction); + ManipulatorState{ ApplySpace(GetLocalTransform()), GetNonUniformScale(), AZ::Vector3::CreateZero(), MouseOver() }, debugDisplay, + cameraState, mouseInteraction); } void AngularManipulator::SetAxis(const AZ::Vector3& axis) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/BaseManipulator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/BaseManipulator.cpp index b514c3957f..0221d6db8a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/BaseManipulator.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/BaseManipulator.cpp @@ -14,7 +14,7 @@ namespace AzToolsFramework { - AZ_CVAR(bool, cl_manipulatorDrawDebug, false, nullptr, AZ::ConsoleFunctorFlags::Null, "Enable debug drawing for Manipulators"); + AZ_CVAR(bool, ed_manipulatorDrawDebug, false, nullptr, AZ::ConsoleFunctorFlags::Null, "Enable debug drawing for Manipulators"); const AZ::Color BaseManipulator::s_defaultMouseOverColor = AZ::Color(1.0f, 1.0f, 0.0f, 1.0f); // yellow diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/BaseManipulator.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/BaseManipulator.h index 06e9c82e55..07a622c936 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/BaseManipulator.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/BaseManipulator.h @@ -28,7 +28,7 @@ namespace AzFramework namespace AzToolsFramework { - AZ_CVAR_EXTERNED(bool, cl_manipulatorDrawDebug); + AZ_CVAR_EXTERNED(bool, ed_manipulatorDrawDebug); namespace UndoSystem { diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LineSegmentSelectionManipulator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LineSegmentSelectionManipulator.cpp index 2131fdf1cf..4ded50e1ab 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LineSegmentSelectionManipulator.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LineSegmentSelectionManipulator.cpp @@ -116,8 +116,8 @@ namespace AzToolsFramework { m_manipulatorView->Draw( GetManipulatorManagerId(), managerState, GetManipulatorId(), - { TransformUniformScale(GetSpace()), GetNonUniformScale(), m_localStart, MouseOver() }, debugDisplay, cameraState, - mouseInteraction); + ManipulatorState{ TransformUniformScale(GetSpace()), GetNonUniformScale(), m_localStart, MouseOver() }, debugDisplay, + cameraState, mouseInteraction); } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LinearManipulator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LinearManipulator.cpp index 2c85d9df38..8b55480e5a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LinearManipulator.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LinearManipulator.cpp @@ -207,7 +207,7 @@ namespace AzToolsFramework ? AZ::Transform::CreateFromQuaternionAndTranslation(m_visualOrientationOverride, GetLocalPosition()) : GetLocalTransform(); - if (cl_manipulatorDrawDebug) + if (ed_manipulatorDrawDebug) { if (PerformingAction()) { @@ -239,8 +239,8 @@ namespace AzToolsFramework view->Draw( GetManipulatorManagerId(), managerState, GetManipulatorId(), - { ApplySpace(localTransform), GetNonUniformScale(), AZ::Vector3::CreateZero(), MouseOver() }, debugDisplay, cameraState, - mouseInteraction); + ManipulatorState{ ApplySpace(localTransform), GetNonUniformScale(), AZ::Vector3::CreateZero(), MouseOver() }, debugDisplay, + cameraState, mouseInteraction); } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorManager.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorManager.cpp index b07ac08d87..859bfcab30 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorManager.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorManager.cpp @@ -146,7 +146,7 @@ namespace AzToolsFramework for (const auto& pair : m_manipulatorIdToPtrMap) { - pair.second->Draw({ Interacting() }, debugDisplay, cameraState, mouseInteraction); + pair.second->Draw(ManipulatorManagerState{ Interacting() }, debugDisplay, cameraState, mouseInteraction); } RefreshMouseOverState(mouseInteraction.m_mousePick); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.cpp index d42182db92..5e05bea72a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.cpp @@ -10,6 +10,15 @@ namespace AzToolsFramework { + AZ::Transform ApplySpace(const AZ::Transform& localTransform, const AZ::Transform& space, const AZ::Vector3& nonUniformScale) + { + AZ::Transform result; + result.SetRotation(space.GetRotation() * localTransform.GetRotation()); + result.SetTranslation(space.TransformPoint(nonUniformScale * localTransform.GetTranslation())); + result.SetUniformScale(space.GetUniformScale() * localTransform.GetUniformScale()); + return result; + } + const AZ::Transform& ManipulatorSpace::GetSpace() const { return m_space; @@ -32,11 +41,7 @@ namespace AzToolsFramework AZ::Transform ManipulatorSpace::ApplySpace(const AZ::Transform& localTransform) const { - AZ::Transform result; - result.SetRotation(m_space.GetRotation() * localTransform.GetRotation()); - result.SetTranslation(m_space.TransformPoint(m_nonUniformScale * localTransform.GetTranslation())); - result.SetUniformScale(m_space.GetUniformScale() * localTransform.GetUniformScale()); - return result; + return AzToolsFramework::ApplySpace(localTransform, m_space, m_nonUniformScale); } const AZ::Vector3& ManipulatorSpaceWithLocalPosition::GetLocalPosition() const diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.h index c372afcf32..5ceb4a36cc 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.h @@ -17,6 +17,8 @@ namespace AZ namespace AzToolsFramework { + AZ::Transform ApplySpace(const AZ::Transform& localTransform, const AZ::Transform& space, const AZ::Vector3& nonUniformScale); + //! Handles location for manipulators which have a global space but no local transformation. class ManipulatorSpace { diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorView.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorView.cpp index d3c94dc8ab..e4ee75bbf9 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorView.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorView.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include AZ_CVAR( @@ -30,6 +31,13 @@ AZ_CVAR( nullptr, AZ::ConsoleFunctorFlags::Null, "Display additional debug drawing for manipulator bounds"); +AZ_CVAR( + float, + ed_planarManipulatorBoundScaleFactor, + 1.75f, + nullptr, + AZ::ConsoleFunctorFlags::Null, + "The scale factor to apply to the planar manipulator bounds"); namespace AzToolsFramework { @@ -78,7 +86,8 @@ namespace AzToolsFramework { // check if we actually needed to flip the axis, if so, write to shouldCorrect // so we know and are able to draw it differently if we wish (e.g. hollow if flipped) - const bool correcting = ShouldFlipCameraAxis(worldFromLocal, localPosition, axis, cameraState); + const bool correcting = + FlipManipulatorAxesTowardsView() && ShouldFlipCameraAxis(worldFromLocal, localPosition, axis, cameraState); // the corrected axis, if no flip was required, output == input correctedAxis = correcting ? -axis : axis; @@ -325,7 +334,8 @@ namespace AzToolsFramework float ManipulatorView::ManipulatorViewScaleMultiplier( const AZ::Vector3& worldPosition, const AzFramework::CameraState& cameraState) const { - return ScreenSizeFixed() ? CalculateScreenToWorldMultiplier(worldPosition, cameraState) : 1.0f; + const float screenScale = ScreenSizeFixed() ? CalculateScreenToWorldMultiplier(worldPosition, cameraState) : 1.0f; + return screenScale * ManipulatorViewBaseScale(); } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -342,47 +352,77 @@ namespace AzToolsFramework const AZ::Vector3 axis1 = m_axis1; const AZ::Vector3 axis2 = m_axis2; - CameraCorrectAxis( - axis1, m_cameraCorrectedAxis1, managerState, mouseInteraction, manipulatorState.m_worldFromLocal, - manipulatorState.m_localPosition, cameraState); - CameraCorrectAxis( - axis2, m_cameraCorrectedAxis2, managerState, mouseInteraction, manipulatorState.m_worldFromLocal, - manipulatorState.m_localPosition, cameraState); + // support partial application of CameraCorrectAxis to reduce redundant call site parameters + auto cameraCorrectAxisPartialFn = + [&manipulatorState, &managerState, &mouseInteraction, &cameraState](const AZ::Vector3& inAxis, AZ::Vector3& outAxis) + { + CameraCorrectAxis( + inAxis, outAxis, managerState, mouseInteraction, manipulatorState.m_worldFromLocal, manipulatorState.m_localPosition, + cameraState); + }; - const Picking::BoundShapeQuad quadBound = CalculateQuadBound( - manipulatorState.m_localPosition, manipulatorState, m_cameraCorrectedAxis1, m_cameraCorrectedAxis2, - m_size * - ManipulatorViewScaleMultiplier( - manipulatorState.m_worldFromLocal.TransformPoint(manipulatorState.m_localPosition), cameraState)); + cameraCorrectAxisPartialFn(axis1, m_cameraCorrectedAxis1); + cameraCorrectAxisPartialFn(axis2, m_cameraCorrectedAxis2); + cameraCorrectAxisPartialFn(axis1 * axis1.Dot(m_offset), m_cameraCorrectedOffsetAxis1); + cameraCorrectAxisPartialFn(axis2 * axis2.Dot(m_offset), m_cameraCorrectedOffsetAxis2); + + const AZ::Vector3 totalScale = + manipulatorState.m_nonUniformScale * AZ::Vector3(manipulatorState.m_worldFromLocal.GetUniformScale()); + + const auto cameraCorrectedVisualOffset = (m_cameraCorrectedOffsetAxis1 + m_cameraCorrectedOffsetAxis2) * totalScale.GetReciprocal(); + const auto viewScale = + ManipulatorViewScaleMultiplier(manipulatorState.m_worldFromLocal.TransformPoint(manipulatorState.m_localPosition), cameraState); + const Picking::BoundShapeQuad quadBoundVisual = CalculateQuadBound( + manipulatorState.m_localPosition + (cameraCorrectedVisualOffset * viewScale), manipulatorState, m_cameraCorrectedAxis1, + m_cameraCorrectedAxis2, m_size * viewScale); debugDisplay.SetLineWidth(defaultLineWidth(manipulatorState.m_mouseOver)); debugDisplay.SetColor(ViewColor(manipulatorState.m_mouseOver, m_axis1Color, m_mouseOverColor).GetAsVector4()); - debugDisplay.DrawLine(quadBound.m_corner4, quadBound.m_corner3); + debugDisplay.DrawLine(quadBoundVisual.m_corner4, quadBoundVisual.m_corner3); + debugDisplay.DrawLine(quadBoundVisual.m_corner1, quadBoundVisual.m_corner2); debugDisplay.SetColor(ViewColor(manipulatorState.m_mouseOver, m_axis2Color, m_mouseOverColor).GetAsVector4()); - debugDisplay.DrawLine(quadBound.m_corner2, quadBound.m_corner3); + debugDisplay.DrawLine(quadBoundVisual.m_corner4, quadBoundVisual.m_corner1); + debugDisplay.DrawLine(quadBoundVisual.m_corner2, quadBoundVisual.m_corner3); if (manipulatorState.m_mouseOver) { debugDisplay.SetColor(Vector3ToVector4(m_mouseOverColor.GetAsVector3(), 0.5f)); debugDisplay.CullOff(); - debugDisplay.DrawQuad(quadBound.m_corner1, quadBound.m_corner2, quadBound.m_corner3, quadBound.m_corner4); + debugDisplay.DrawQuad( + quadBoundVisual.m_corner1, quadBoundVisual.m_corner2, quadBoundVisual.m_corner3, quadBoundVisual.m_corner4); debugDisplay.CullOn(); } - RefreshBoundInternal(managerId, manipulatorId, quadBound); + // total size of bounds to use for mouse intersection + const float hitSize = m_size * ed_planarManipulatorBoundScaleFactor; + // size of edge bounds (the 'margin/border' outside the visual representation) + const float edgeSize = (hitSize - m_size) * 0.5f; + const AZ::Vector3 edgeOffset = + ((m_cameraCorrectedAxis1 * edgeSize + m_cameraCorrectedAxis2 * edgeSize) * totalScale.GetReciprocal()); + const auto cameraCorrectedHitOffset = cameraCorrectedVisualOffset - edgeOffset; + const Picking::BoundShapeQuad quadBoundHit = CalculateQuadBound( + manipulatorState.m_localPosition + (cameraCorrectedHitOffset * viewScale), manipulatorState, m_cameraCorrectedAxis1, + m_cameraCorrectedAxis2, hitSize * viewScale); + + if (ed_manipulatorDisplayBoundDebug) + { + debugDisplay.DrawQuad(quadBoundHit.m_corner1, quadBoundHit.m_corner2, quadBoundHit.m_corner3, quadBoundHit.m_corner4); + } + + RefreshBoundInternal(managerId, manipulatorId, quadBoundHit); } void ManipulatorViewQuadBillboard::Draw( const ManipulatorManagerId managerId, - const ManipulatorManagerState& /*managerState*/, + [[maybe_unused]] const ManipulatorManagerState& managerState, const ManipulatorId manipulatorId, const ManipulatorState& manipulatorState, AzFramework::DebugDisplayRequests& debugDisplay, const AzFramework::CameraState& cameraState, - const ViewportInteraction::MouseInteraction& /*mouseInteraction*/) + [[maybe_unused]] const ViewportInteraction::MouseInteraction& mouseInteraction) { const Picking::BoundShapeQuad quadBound = CalculateQuadBoundBillboard( manipulatorState.m_localPosition, manipulatorState.m_worldFromLocal, @@ -442,7 +482,7 @@ namespace AzToolsFramework void ManipulatorViewLineSelect::Draw( const ManipulatorManagerId managerId, - const ManipulatorManagerState& /*managerState*/, + [[maybe_unused]] const ManipulatorManagerState& managerState, const ManipulatorId manipulatorId, const ManipulatorState& manipulatorState, AzFramework::DebugDisplayRequests& debugDisplay, @@ -570,7 +610,7 @@ namespace AzToolsFramework void ManipulatorViewSphere::Draw( const ManipulatorManagerId managerId, - const ManipulatorManagerState& /*managerState*/, + [[maybe_unused]] const ManipulatorManagerState& managerState, const ManipulatorId manipulatorId, const ManipulatorState& manipulatorState, AzFramework::DebugDisplayRequests& debugDisplay, @@ -599,12 +639,12 @@ namespace AzToolsFramework void ManipulatorViewCircle::Draw( const ManipulatorManagerId managerId, - const ManipulatorManagerState& /*managerState*/, + [[maybe_unused]] const ManipulatorManagerState& managerState, const ManipulatorId manipulatorId, const ManipulatorState& manipulatorState, AzFramework::DebugDisplayRequests& debugDisplay, const AzFramework::CameraState& cameraState, - const ViewportInteraction::MouseInteraction& /*mouseInteraction*/) + [[maybe_unused]] const ViewportInteraction::MouseInteraction& mouseInteraction) { const float viewScale = ManipulatorViewScaleMultiplier(manipulatorState.m_worldFromLocal.TransformPoint(manipulatorState.m_localPosition), cameraState); @@ -665,7 +705,7 @@ namespace AzToolsFramework void ManipulatorViewSplineSelect::Draw( const ManipulatorManagerId managerId, - const ManipulatorManagerState& /*managerState*/, + [[maybe_unused]] const ManipulatorManagerState& managerState, const ManipulatorId manipulatorId, const ManipulatorState& manipulatorState, AzFramework::DebugDisplayRequests& debugDisplay, @@ -698,12 +738,18 @@ namespace AzToolsFramework /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// AZStd::unique_ptr CreateManipulatorViewQuad( - const PlanarManipulator& planarManipulator, const AZ::Color& axis1Color, const AZ::Color& axis2Color, const float size) + const AZ::Vector3& axis1, + const AZ::Vector3& axis2, + const AZ::Color& axis1Color, + const AZ::Color& axis2Color, + const AZ::Vector3& offset, + const float size) { AZStd::unique_ptr viewQuad = AZStd::make_unique(); - viewQuad->m_axis1 = planarManipulator.GetAxis1(); - viewQuad->m_axis2 = planarManipulator.GetAxis2(); + viewQuad->m_axis1 = axis1; + viewQuad->m_axis2 = axis2; viewQuad->m_size = size; + viewQuad->m_offset = offset; viewQuad->m_axis1Color = axis1Color; viewQuad->m_axis2Color = axis2Color; return viewQuad; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorView.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorView.h index 9eb84c7e0b..8a9514d11a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorView.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorView.h @@ -54,7 +54,7 @@ namespace AzToolsFramework AZ_RTTI(ManipulatorView, "{7529E3E9-39B3-4D15-899A-FA13770113B2}") ManipulatorView(); - ManipulatorView(bool screenSizeFixed); + explicit ManipulatorView(bool screenSizeFixed); virtual ~ManipulatorView(); ManipulatorView(ManipulatorView&&) = default; ManipulatorView& operator=(ManipulatorView&&) = default; @@ -117,13 +117,16 @@ namespace AzToolsFramework AZ::Vector3 m_axis1 = AZ::Vector3(1.0f, 0.0f, 0.0f); AZ::Vector3 m_axis2 = AZ::Vector3(0.0f, 1.0f, 0.0f); + AZ::Vector3 m_offset = AZ::Vector3::CreateZero(); AZ::Color m_axis1Color = AZ::Color(1.0f, 0.0f, 0.0f, 1.0f); AZ::Color m_axis2Color = AZ::Color(1.0f, 0.0f, 0.0f, 1.0f); float m_size = 0.06f; //!< size to render and do mouse ray intersection tests against. private: - AZ::Vector3 m_cameraCorrectedAxis1; - AZ::Vector3 m_cameraCorrectedAxis2; + AZ::Vector3 m_cameraCorrectedAxis1; //!< First axis of quad (should be orthogonal to second axis). + AZ::Vector3 m_cameraCorrectedAxis2; //!< Second axis of quad (should be orthogonal to first axis). + AZ::Vector3 m_cameraCorrectedOffsetAxis1; //!< Offset along first axis (parallel with first axis). + AZ::Vector3 m_cameraCorrectedOffsetAxis2; //!< Offset along second axis (parallel with second axis). }; //! A screen aligned quad, centered at the position of the manipulator, display filled. @@ -379,7 +382,12 @@ namespace AzToolsFramework // Helpers to create various manipulator views. AZStd::unique_ptr CreateManipulatorViewQuad( - const PlanarManipulator& planarManipulator, const AZ::Color& axis1Color, const AZ::Color& axis2Color, float size); + const AZ::Vector3& axis1, + const AZ::Vector3& axis2, + const AZ::Color& axis1Color, + const AZ::Color& axis2Color, + const AZ::Vector3& offset, + float size); AZStd::unique_ptr CreateManipulatorViewQuadBillboard(const AZ::Color& color, float size); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/MultiLinearManipulator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/MultiLinearManipulator.cpp index cc8e5d4866..f4dca63d77 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/MultiLinearManipulator.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/MultiLinearManipulator.cpp @@ -132,7 +132,7 @@ namespace AzToolsFramework const AzFramework::CameraState& cameraState, const ViewportInteraction::MouseInteraction& mouseInteraction) { - if (cl_manipulatorDrawDebug) + if (ed_manipulatorDrawDebug) { const AZ::Transform combined = TransformUniformScale(GetSpace()) * GetLocalTransform(); for (const auto& fixed : m_fixedAxes) @@ -145,8 +145,8 @@ namespace AzToolsFramework { view->Draw( GetManipulatorManagerId(), managerState, GetManipulatorId(), - { ApplySpace(GetLocalTransform()), GetNonUniformScale(), AZ::Vector3::CreateZero(), MouseOver() }, debugDisplay, - cameraState, mouseInteraction); + ManipulatorState{ ApplySpace(GetLocalTransform()), GetNonUniformScale(), AZ::Vector3::CreateZero(), MouseOver() }, + debugDisplay, cameraState, mouseInteraction); } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/PlanarManipulator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/PlanarManipulator.cpp index 0326e4a07f..9dbb49a1e6 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/PlanarManipulator.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/PlanarManipulator.cpp @@ -171,7 +171,7 @@ namespace AzToolsFramework const AzFramework::CameraState& cameraState, const ViewportInteraction::MouseInteraction& mouseInteraction) { - if (cl_manipulatorDrawDebug) + if (ed_manipulatorDrawDebug) { if (PerformingAction()) { @@ -202,8 +202,8 @@ namespace AzToolsFramework { view->Draw( GetManipulatorManagerId(), managerState, GetManipulatorId(), - { ApplySpace(GetLocalTransform()), GetNonUniformScale(), AZ::Vector3::CreateZero(), MouseOver() }, debugDisplay, - cameraState, mouseInteraction); + ManipulatorState{ ApplySpace(GetLocalTransform()), GetNonUniformScale(), AZ::Vector3::CreateZero(), MouseOver() }, + debugDisplay, cameraState, mouseInteraction); } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ScaleManipulators.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ScaleManipulators.cpp index d8c43ace9e..4b48512a5c 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ScaleManipulators.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ScaleManipulators.cpp @@ -9,6 +9,7 @@ #include "ScaleManipulators.h" #include +#include namespace AzToolsFramework { @@ -120,25 +121,25 @@ namespace AzToolsFramework void ScaleManipulators::ConfigureView( const float axisLength, const AZ::Color& axis1Color, const AZ::Color& axis2Color, const AZ::Color& axis3Color) { - const float boxSize = 0.1f; + const float boxHalfExtent = ScaleManipulatorBoxHalfExtent(); const AZ::Color colors[] = { axis1Color, axis2Color, axis3Color }; for (size_t manipulatorIndex = 0; manipulatorIndex < m_axisScaleManipulators.size(); ++manipulatorIndex) { - const auto lineLength = axisLength - boxSize; + const auto lineLength = axisLength - (2.0f * boxHalfExtent); ManipulatorViews views; - views.emplace_back( - CreateManipulatorViewLine(*m_axisScaleManipulators[manipulatorIndex], colors[manipulatorIndex], axisLength, m_lineBoundWidth)); + views.emplace_back(CreateManipulatorViewLine( + *m_axisScaleManipulators[manipulatorIndex], colors[manipulatorIndex], axisLength, m_lineBoundWidth)); views.emplace_back(CreateManipulatorViewBox( AZ::Transform::CreateIdentity(), colors[manipulatorIndex], - m_axisScaleManipulators[manipulatorIndex]->GetAxis() * lineLength, AZ::Vector3(boxSize))); + m_axisScaleManipulators[manipulatorIndex]->GetAxis() * (lineLength + boxHalfExtent), AZ::Vector3(boxHalfExtent))); m_axisScaleManipulators[manipulatorIndex]->SetViews(AZStd::move(views)); } ManipulatorViews views; views.emplace_back(CreateManipulatorViewBox( - AZ::Transform::CreateIdentity(), AZ::Color::CreateOne(), AZ::Vector3::CreateZero(), AZ::Vector3(boxSize))); + AZ::Transform::CreateIdentity(), AZ::Color::CreateOne(), AZ::Vector3::CreateZero(), AZ::Vector3(boxHalfExtent))); m_uniformScaleManipulator->SetViews(AZStd::move(views)); } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SelectionManipulator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SelectionManipulator.cpp index 9cf97dc213..64496c44d7 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SelectionManipulator.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SelectionManipulator.cpp @@ -90,8 +90,8 @@ namespace AzToolsFramework { view->Draw( GetManipulatorManagerId(), managerState, GetManipulatorId(), - { TransformUniformScale(GetSpace()), GetNonUniformScale(), GetLocalPosition(), MouseOver() }, debugDisplay, cameraState, - mouseInteraction); + ManipulatorState{ TransformUniformScale(GetSpace()), GetNonUniformScale(), GetLocalPosition(), MouseOver() }, debugDisplay, + cameraState, mouseInteraction); } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SplineSelectionManipulator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SplineSelectionManipulator.cpp index 4ee965e43a..1da4240bf7 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SplineSelectionManipulator.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SplineSelectionManipulator.cpp @@ -94,8 +94,8 @@ namespace AzToolsFramework { m_manipulatorView->Draw( GetManipulatorManagerId(), managerState, GetManipulatorId(), - { TransformUniformScale(GetSpace()), GetNonUniformScale(), AZ::Vector3::CreateZero(), MouseOver() }, debugDisplay, - cameraState, mouseInteraction); + ManipulatorState{ TransformUniformScale(GetSpace()), GetNonUniformScale(), AZ::Vector3::CreateZero(), MouseOver() }, + debugDisplay, cameraState, mouseInteraction); } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SurfaceManipulator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SurfaceManipulator.cpp index 01b8635406..58d579b20c 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SurfaceManipulator.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SurfaceManipulator.cpp @@ -166,8 +166,8 @@ namespace AzToolsFramework { m_manipulatorView->Draw( GetManipulatorManagerId(), managerState, GetManipulatorId(), - { TransformUniformScale(GetSpace()), GetNonUniformScale(), GetLocalPosition(), MouseOver() }, debugDisplay, cameraState, - mouseInteraction); + ManipulatorState{ TransformUniformScale(GetSpace()), GetNonUniformScale(), GetLocalPosition(), MouseOver() }, debugDisplay, + cameraState, mouseInteraction); } void SurfaceManipulator::InvalidateImpl() diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/TranslationManipulators.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/TranslationManipulators.cpp index 0efe310250..5810662e57 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/TranslationManipulators.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/TranslationManipulators.cpp @@ -10,18 +10,30 @@ #include #include +#include namespace AzToolsFramework { - static const float SurfaceManipulatorTransparency = 0.75f; - static const float LinearManipulatorAxisLength = 2.0f; - static const float SurfaceManipulatorRadius = 0.1f; - static const AZ::Color LinearManipulatorXAxisColor = AZ::Color(1.0f, 0.0f, 0.0f, 1.0f); static const AZ::Color LinearManipulatorYAxisColor = AZ::Color(0.0f, 1.0f, 0.0f, 1.0f); static const AZ::Color LinearManipulatorZAxisColor = AZ::Color(0.0f, 0.0f, 1.0f, 1.0f); static const AZ::Color SurfaceManipulatorColor = AZ::Color(1.0f, 1.0f, 0.0f, 0.5f); + static TranslationManipulatorsViewCreateInfo DefaultTranslationManipulatorViewCreateInfo() + { + TranslationManipulatorsViewCreateInfo createInfo; + createInfo.axis1Color = LinearManipulatorXAxisColor; + createInfo.axis2Color = LinearManipulatorYAxisColor; + createInfo.axis3Color = LinearManipulatorZAxisColor; + createInfo.surfaceColor = SurfaceManipulatorColor; + createInfo.linearAxisLength = LinearManipulatorAxisLength(); + createInfo.linearConeLength = LinearManipulatorConeLength(); + createInfo.linearConeRadius = LinearManipulatorConeRadius(); + createInfo.planarAxisLength = PlanarManipulatorAxisLength(); + createInfo.surfaceRadius = SurfaceManipulatorRadius(); + return createInfo; + } + TranslationManipulators::TranslationManipulators( const Dimensions dimensions, const AZ::Transform& worldFromLocal, const AZ::Vector3& nonUniformScale) : m_dimensions(dimensions) @@ -234,15 +246,32 @@ namespace AzToolsFramework } } + void TranslationManipulators::ConfigureView2d(const TranslationManipulatorsViewCreateInfo& translationManipulatorViewCreateInfo) + { + ConfigureLinearView( + translationManipulatorViewCreateInfo.linearAxisLength, translationManipulatorViewCreateInfo.linearConeLength, + translationManipulatorViewCreateInfo.linearConeRadius, translationManipulatorViewCreateInfo.axis1Color, + translationManipulatorViewCreateInfo.axis2Color, translationManipulatorViewCreateInfo.axis3Color); + ConfigurePlanarView( + translationManipulatorViewCreateInfo.planarAxisLength, translationManipulatorViewCreateInfo.linearAxisLength, + translationManipulatorViewCreateInfo.linearConeLength, translationManipulatorViewCreateInfo.axis1Color, + translationManipulatorViewCreateInfo.axis2Color, translationManipulatorViewCreateInfo.axis3Color); + } + + void TranslationManipulators::ConfigureView3d(const TranslationManipulatorsViewCreateInfo& translationManipulatorViewCreateInfo) + { + ConfigureView2d(translationManipulatorViewCreateInfo); + ConfigureSurfaceView(translationManipulatorViewCreateInfo.surfaceRadius, translationManipulatorViewCreateInfo.surfaceColor); + } + void TranslationManipulators::ConfigureLinearView( const float axisLength, + const float coneLength, + const float coneRadius, const AZ::Color& axis1Color, const AZ::Color& axis2Color, const AZ::Color& axis3Color /*= AZ::Color(0.0f, 0.0f, 1.0f, 0.5f)*/) { - const float coneLength = 0.28f; - const float coneRadius = 0.07f; - const AZ::Color axesColor[] = { axis1Color, axis2Color, axis3Color }; const auto configureLinearView = [lineBoundWidth = m_lineBoundWidth, coneLength, axisLength, @@ -251,7 +280,7 @@ namespace AzToolsFramework const auto lineLength = axisLength - coneLength; ManipulatorViews views; - views.emplace_back(CreateManipulatorViewLine(*linearManipulator, color, lineLength, lineBoundWidth)); + views.emplace_back(CreateManipulatorViewLine(*linearManipulator, color, axisLength, lineBoundWidth)); views.emplace_back( CreateManipulatorViewCone(*linearManipulator, color, linearManipulator->GetAxis() * lineLength, coneLength, coneRadius)); linearManipulator->SetViews(AZStd::move(views)); @@ -264,19 +293,21 @@ namespace AzToolsFramework } void TranslationManipulators::ConfigurePlanarView( + const float planarAxisLength, + const float linearAxisLength, + const float linearConeLength, const AZ::Color& plane1Color, const AZ::Color& plane2Color /*= AZ::Color(0.0f, 1.0f, 0.0f, 0.5f)*/, const AZ::Color& plane3Color /*= AZ::Color(0.0f, 0.0f, 1.0f, 0.5f)*/) { - const float planeSize = 0.6f; const AZ::Color planesColor[] = { plane1Color, plane2Color, plane3Color }; for (size_t manipulatorIndex = 0; manipulatorIndex < m_planarManipulators.size(); ++manipulatorIndex) { - const AZStd::shared_ptr manipulatorView = CreateManipulatorViewQuad( - *m_planarManipulators[manipulatorIndex], planesColor[manipulatorIndex], planesColor[(manipulatorIndex + 1) % 3], planeSize); - - m_planarManipulators[manipulatorIndex]->SetViews(ManipulatorViews{ manipulatorView }); + const auto& planarManipulator = *m_planarManipulators[manipulatorIndex]; + m_planarManipulators[manipulatorIndex]->SetViews(ManipulatorViews{ CreateManipulatorViewQuadForPlanarTranslationManipulator( + planarManipulator.GetAxis1(), planarManipulator.GetAxis2(), planesColor[manipulatorIndex], + planesColor[(manipulatorIndex + 1) % 3], linearAxisLength, linearConeLength, planarAxisLength) }); } } @@ -286,12 +317,11 @@ namespace AzToolsFramework { m_surfaceManipulator->SetView(CreateManipulatorViewSphere( color, radius, - [](const ViewportInteraction::MouseInteraction& /*mouseInteraction*/, bool mouseOver, + []([[maybe_unused]] const ViewportInteraction::MouseInteraction& mouseInteraction, bool mouseOver, const AZ::Color& defaultColor) -> AZ::Color { const AZ::Color color[2] = { - defaultColor, - Vector3ToVector4(BaseManipulator::s_defaultMouseOverColor.GetAsVector3(), SurfaceManipulatorTransparency) + defaultColor, Vector3ToVector4(BaseManipulator::s_defaultMouseOverColor.GetAsVector3(), SurfaceManipulatorOpacity()) }; return color[mouseOver]; @@ -325,16 +355,25 @@ namespace AzToolsFramework void ConfigureTranslationManipulatorAppearance3d(TranslationManipulators* translationManipulators) { translationManipulators->SetAxes(AZ::Vector3::CreateAxisX(), AZ::Vector3::CreateAxisY(), AZ::Vector3::CreateAxisZ()); - translationManipulators->ConfigurePlanarView(LinearManipulatorXAxisColor, LinearManipulatorYAxisColor, LinearManipulatorZAxisColor); - translationManipulators->ConfigureLinearView( - LinearManipulatorAxisLength, LinearManipulatorXAxisColor, LinearManipulatorYAxisColor, LinearManipulatorZAxisColor); - translationManipulators->ConfigureSurfaceView(SurfaceManipulatorRadius, SurfaceManipulatorColor); + translationManipulators->ConfigureView3d(DefaultTranslationManipulatorViewCreateInfo()); } void ConfigureTranslationManipulatorAppearance2d(TranslationManipulators* translationManipulators) { translationManipulators->SetAxes(AZ::Vector3::CreateAxisX(), AZ::Vector3::CreateAxisY()); - translationManipulators->ConfigurePlanarView(LinearManipulatorXAxisColor); - translationManipulators->ConfigureLinearView(LinearManipulatorAxisLength, LinearManipulatorXAxisColor, LinearManipulatorYAxisColor); + translationManipulators->ConfigureView2d(DefaultTranslationManipulatorViewCreateInfo()); + } + + AZStd::shared_ptr CreateManipulatorViewQuadForPlanarTranslationManipulator( + const AZ::Vector3& axis1, + const AZ::Vector3& axis2, + const AZ::Color& axis1Color, + const AZ::Color& axis2Color, + const float linearAxisLength, + const float linearConeLength, + const float planarAxisLength) + { + const AZ::Vector3 offset = (axis1 + axis2) * (((linearAxisLength - linearConeLength) * 0.5f) - (planarAxisLength * 0.5f)); + return CreateManipulatorViewQuad(axis1, axis2, axis1Color, axis2Color, offset, planarAxisLength); } } // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/TranslationManipulators.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/TranslationManipulators.h index 65e53f0680..ea8dbb7975 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/TranslationManipulators.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/TranslationManipulators.h @@ -15,6 +15,20 @@ namespace AzToolsFramework { + //! Parameters to configure the appearance of the TranslationManipulators view(s). + struct TranslationManipulatorsViewCreateInfo + { + float linearAxisLength; + float linearConeLength; + float linearConeRadius; + float planarAxisLength; + float surfaceRadius; + AZ::Color axis1Color; + AZ::Color axis2Color; + AZ::Color axis3Color; + AZ::Color surfaceColor; + }; + //! TranslationManipulators is an aggregation of 3 linear manipulators, 3 planar manipulators //! and one surface manipulator who share the same transform. class TranslationManipulators : public Manipulators @@ -23,6 +37,9 @@ namespace AzToolsFramework AZ_RTTI(TranslationManipulators, "{D5E49EA2-30E0-42BC-A51D-6A7F87818260}") AZ_CLASS_ALLOCATOR(TranslationManipulators, AZ::SystemAllocator, 0) + TranslationManipulators(TranslationManipulators&&) = delete; + TranslationManipulators& operator=(TranslationManipulators&&) = delete; + //! How many dimensions does this translation manipulator have. enum class Dimensions { @@ -52,25 +69,31 @@ namespace AzToolsFramework void SetAxes(const AZ::Vector3& axis1, const AZ::Vector3& axis2, const AZ::Vector3& axis3 = AZ::Vector3::CreateAxisZ()); + void ConfigureView2d(const TranslationManipulatorsViewCreateInfo& translationManipulatorViewCreateInfo); + void ConfigureView3d(const TranslationManipulatorsViewCreateInfo& translationManipulatorViewCreateInfo); + + //! Sets the bound width to use for the line/axis of a linear manipulator. + void SetLineBoundWidth(float lineBoundWidth); + + private: void ConfigurePlanarView( + float planeSize, + float linearAxisLength, + float linearConeLength, const AZ::Color& plane1Color, const AZ::Color& plane2Color = AZ::Color(0.0f, 1.0f, 0.0f, 0.5f), const AZ::Color& plane3Color = AZ::Color(0.0f, 0.0f, 1.0f, 0.5f)); void ConfigureLinearView( float axisLength, + float coneLength, + float coneRadius, const AZ::Color& axis1Color, const AZ::Color& axis2Color, const AZ::Color& axis3Color = AZ::Color(0.0f, 0.0f, 1.0f, 0.5f)); void ConfigureSurfaceView(float radius, const AZ::Color& color); - //! Sets the bound width to use for the line/axis of a linear manipulator. - void SetLineBoundWidth(float lineBoundWidth); - - private: - AZ_DISABLE_COPY_MOVE(TranslationManipulators) - // Manipulators void ProcessManipulators(const AZStd::function&) override; @@ -130,4 +153,12 @@ namespace AzToolsFramework void ConfigureTranslationManipulatorAppearance3d(TranslationManipulators* translationManipulators); void ConfigureTranslationManipulatorAppearance2d(TranslationManipulators* translationManipulators); + AZStd::shared_ptr CreateManipulatorViewQuadForPlanarTranslationManipulator( + const AZ::Vector3& axis1, + const AZ::Vector3& axis2, + const AZ::Color& axis1Color, + const AZ::Color& axis2Color, + float linearAxisLength, + float linearConeLength, + float planarAxisLength); } // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabDomUtils.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabDomUtils.cpp index a84d6bf706..83e8d2e4be 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabDomUtils.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabDomUtils.cpp @@ -150,6 +150,24 @@ namespace AzToolsFramework return result.GetOutcome() == AZ::JsonSerializationResult::Outcomes::Success; } + // some assets may come in from the JSON serialzier with no AssetID, but have an asset hint + // this attempts to fix up the assets using the assetHint field + void FixUpInvalidAssets(AZ::Data::Asset& asset) + { + if (!asset.GetId().IsValid() && !asset.GetHint().empty()) + { + AZ::Data::AssetId assetId; + AZ::Data::AssetCatalogRequestBus::BroadcastResult( + assetId, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetIdByPath, asset.GetHint().c_str(), + AZ::Data::s_invalidAssetType, false); + + if (assetId.IsValid()) + { + asset.Create(assetId, false); + } + } + } + bool LoadInstanceFromPrefabDom(Instance& instance, const PrefabDom& prefabDom, LoadFlags flags) { // When entities are rebuilt they are first destroyed. As a result any assets they were exclusively holding on to will @@ -164,13 +182,17 @@ namespace AzToolsFramework entityIdMapper.SetEntityIdGenerationApproach(InstanceEntityIdMapper::EntityIdGenerationApproach::Random); } + auto tracker = AZ::Data::SerializedAssetTracker{}; + tracker.SetAssetFixUp(&FixUpInvalidAssets); + AZ::JsonDeserializerSettings settings; // The InstanceEntityIdMapper is registered twice because it's used in several places during deserialization where one is // specific for the InstanceEntityIdMapper and once for the generic JsonEntityIdMapper. Because the Json Serializer's meta // data has strict typing and doesn't look for inheritance both have to be explicitly added so they're found both locations. settings.m_metadata.Add(static_cast(&entityIdMapper)); settings.m_metadata.Add(&entityIdMapper); - + settings.m_metadata.Add(tracker); + AZ::JsonSerializationResult::ResultCode result = AZ::JsonSerialization::Load(instance, prefabDom, settings); @@ -203,13 +225,16 @@ namespace AzToolsFramework entityIdMapper.SetEntityIdGenerationApproach(InstanceEntityIdMapper::EntityIdGenerationApproach::Random); } + auto tracker = AZ::Data::SerializedAssetTracker{}; + tracker.SetAssetFixUp(&FixUpInvalidAssets); + AZ::JsonDeserializerSettings settings; // The InstanceEntityIdMapper is registered twice because it's used in several places during deserialization where one is // specific for the InstanceEntityIdMapper and once for the generic JsonEntityIdMapper. Because the Json Serializer's meta // data has strict typing and doesn't look for inheritance both have to be explicitly added so they're found both locations. settings.m_metadata.Add(static_cast(&entityIdMapper)); settings.m_metadata.Add(&entityIdMapper); - settings.m_metadata.Create(); + settings.m_metadata.Add(tracker); AZ::JsonSerializationResult::ResultCode result = AZ::JsonSerialization::Load(instance, prefabDom, settings); @@ -246,29 +271,8 @@ namespace AzToolsFramework entityIdMapper.SetEntityIdGenerationApproach(InstanceEntityIdMapper::EntityIdGenerationApproach::Random); } - // some assets may come in from the JSON serialzier with no AssetID, but have an asset hint - // this attempts to fix up the assets using the assetHint field - auto fixUpInvalidAssets = [](AZ::Data::Asset& asset) - { - if (!asset.GetId().IsValid() && !asset.GetHint().empty()) - { - AZ::Data::AssetId assetId; - AZ::Data::AssetCatalogRequestBus::BroadcastResult( - assetId, - &AZ::Data::AssetCatalogRequestBus::Events::GetAssetIdByPath, - asset.GetHint().c_str(), - AZ::Data::s_invalidAssetType, - false); - - if (assetId.IsValid()) - { - asset.Create(assetId, false); - } - } - }; - auto tracker = AZ::Data::SerializedAssetTracker{}; - tracker.SetAssetFixUp(fixUpInvalidAssets); + tracker.SetAssetFixUp(&FixUpInvalidAssets); AZ::JsonDeserializerSettings settings; // The InstanceEntityIdMapper is registered twice because it's used in several places during deserialization where one is diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.cpp index 2ab68bfc10..3426c56c99 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -74,6 +75,13 @@ namespace AzToolsFramework::Prefab "Prefab - PrefabFocusHandler - " "Focus Mode Interface could not be found. " "Check that it is being correctly initialized."); + + m_readOnlyEntityQueryInterface = AZ::Interface::Get(); + AZ_Assert( + m_readOnlyEntityQueryInterface, + "Prefab - PrefabFocusHandler - " + "ReadOnly Entity Query Interface could not be found. " + "Check that it is being correctly initialized."); } PrefabFocusOperationResult PrefabFocusHandler::FocusOnOwningPrefab(AZ::EntityId entityId) @@ -186,6 +194,8 @@ namespace AzToolsFramework::Prefab // Close all container entities in the old path. CloseInstanceContainers(m_instanceFocusHierarchy); + AZ::EntityId previousContainerEntityId = m_focusedInstanceContainerEntityId; + // Do not store the container for the root instance, use an invalid EntityId instead. m_focusedInstanceContainerEntityId = focusedInstance->get().GetParentInstance().has_value() ? focusedInstance->get().GetContainerEntityId() : AZ::EntityId(); m_focusedTemplateId = focusedInstance->get().GetTemplateId(); @@ -201,6 +211,12 @@ namespace AzToolsFramework::Prefab m_focusModeInterface->SetFocusRoot(containerEntityId); } + // Refresh the read-only cache, if the interface is initialized. + if (m_readOnlyEntityQueryInterface) + { + m_readOnlyEntityQueryInterface->RefreshReadOnlyState({ previousContainerEntityId, m_focusedInstanceContainerEntityId }); + } + // Refresh path variables. RefreshInstanceFocusList(); RefreshInstanceFocusPath(); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.h index b02106d69d..4f3dbdd708 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.h @@ -22,6 +22,7 @@ namespace AzToolsFramework { class ContainerEntityInterface; class FocusModeInterface; + class ReadOnlyEntityQueryInterface; } namespace AzToolsFramework::Prefab @@ -93,6 +94,7 @@ namespace AzToolsFramework::Prefab ContainerEntityInterface* m_containerEntityInterface = nullptr; FocusModeInterface* m_focusModeInterface = nullptr; InstanceEntityMapperInterface* m_instanceEntityMapperInterface = nullptr; + ReadOnlyEntityQueryInterface* m_readOnlyEntityQueryInterface = nullptr; }; } // namespace AzToolsFramework::Prefab diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp index 1640ac1017..dfabd42cd1 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp @@ -521,21 +521,18 @@ namespace AzToolsFramework nestedInstanceLink.has_value(), "A valid link was not found for one of the instances provided as input for the CreatePrefab operation."); + PrefabDom patchesCopyForUndoSupport; PrefabDomReference nestedInstanceLinkDom = nestedInstanceLink->get().GetLinkDom(); - AZ_Assert( - nestedInstanceLinkDom.has_value(), - "A valid DOM was not found for the link corresponding to one of the instances provided as input for the " - "CreatePrefab operation."); - - PrefabDomValueReference nestedInstanceLinkPatches = - PrefabDomUtils::FindPrefabDomValue(nestedInstanceLinkDom->get(), PrefabDomUtils::PatchesName); - AZ_Assert( - nestedInstanceLinkPatches.has_value(), - "A valid DOM for patches was not found for the link corresponding to one of the instances provided as input for the " - "CreatePrefab operation."); + if (nestedInstanceLinkDom.has_value()) + { + PrefabDomValueReference nestedInstanceLinkPatches = + PrefabDomUtils::FindPrefabDomValue(nestedInstanceLinkDom->get(), PrefabDomUtils::PatchesName); + if (nestedInstanceLinkPatches.has_value()) + { + patchesCopyForUndoSupport.CopyFrom(nestedInstanceLinkPatches->get(), patchesCopyForUndoSupport.GetAllocator()); + } + } - PrefabDom patchesCopyForUndoSupport; - patchesCopyForUndoSupport.CopyFrom(nestedInstanceLinkPatches->get(), patchesCopyForUndoSupport.GetAllocator()); PrefabUndoHelpers::RemoveLink( sourceInstance->GetTemplateId(), targetTemplateId, sourceInstance->GetInstanceAlias(), sourceInstance->GetLinkId(), AZStd::move(patchesCopyForUndoSupport), undoBatch); @@ -921,6 +918,18 @@ namespace AzToolsFramework } } + bool PrefabPublicHandler::IsOwnedByProceduralPrefabInstance(AZ::EntityId entityId) const + { + if (InstanceOptionalReference instanceReference = m_instanceEntityMapperInterface->FindOwningInstance(entityId); + instanceReference.has_value()) + { + TemplateReference templateReference = m_prefabSystemComponentInterface->FindTemplate(instanceReference->get().GetTemplateId()); + return (templateReference.has_value()) && (templateReference->get().IsProcedural()); + } + + return false; + } + bool PrefabPublicHandler::IsInstanceContainerEntity(AZ::EntityId entityId) const { InstanceOptionalReference owningInstance = m_instanceEntityMapperInterface->FindOwningInstance(entityId); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h index dd071ac09f..41c9b4a292 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h @@ -54,6 +54,7 @@ namespace AzToolsFramework PrefabOperationResult GenerateUndoNodesForEntityChangeAndUpdateCache(AZ::EntityId entityId, UndoSystem::URSequencePoint* parentUndoBatch) override; + bool IsOwnedByProceduralPrefabInstance(AZ::EntityId entityId) const override; bool IsInstanceContainerEntity(AZ::EntityId entityId) const override; bool IsLevelInstanceContainerEntity(AZ::EntityId entityId) const override; AZ::EntityId GetInstanceContainerEntityId(AZ::EntityId entityId) const override; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicInterface.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicInterface.h index ede857dd2b..2eb0bfa8e6 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicInterface.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicInterface.h @@ -101,6 +101,13 @@ namespace AzToolsFramework */ virtual PrefabOperationResult GenerateUndoNodesForEntityChangeAndUpdateCache( AZ::EntityId entityId, UndoSystem::URSequencePoint* parentUndoBatch) = 0; + + /** + * Detects if an entity is owned by a procedural prefab. + * @param entityId The entity to query. + * @return True if the entity is owned by a procedural prefab instance, false otherwise. + */ + virtual bool IsOwnedByProceduralPrefabInstance(AZ::EntityId entityId) const = 0; /** * Detects if an entity is the container entity for its owning prefab instance. diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabSystemScriptingHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabSystemScriptingHandler.cpp index 9d0d0547ae..93dfca3f13 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabSystemScriptingHandler.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabSystemScriptingHandler.cpp @@ -8,10 +8,12 @@ #include #include +#include #include +#include +#include #include #include -#include #include #include @@ -72,6 +74,9 @@ namespace AzToolsFramework::Prefab entities, commonRoot, &topLevelEntities); auto containerEntity = AZStd::make_unique(); + containerEntity->CreateComponent(); + containerEntity->CreateComponent(); + containerEntity->CreateComponent(); containerEntity->CreateComponent(); for (AZ::Entity* entity : topLevelEntities) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/TransformComponent.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/TransformComponent.cpp index 7ab7dfdfe4..1f056729d7 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/TransformComponent.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/TransformComponent.cpp @@ -860,18 +860,20 @@ namespace AzToolsFramework return; } - bool isDuringUndoRedo = false; - EBUS_EVENT_RESULT(isDuringUndoRedo, AzToolsFramework::ToolsApplicationRequests::Bus, IsDuringUndoRedo); - if (!isDuringUndoRedo) + bool suppressTransformChangedEvent = m_suppressTransformChangedEvent; + // temporarily disable calling OnTransformChanged, because CheckApplyCachedWorldTransform is not guaranteed + // to call it when m_cachedWorldTransform is identity. We send it manually later. + m_suppressTransformChangedEvent = false; + // When parent comes online, compute local TM from world TM. + CheckApplyCachedWorldTransform(parentTransform->GetWorldTM()); + if (!m_initialized) { - // When parent comes online, compute local TM from world TM. - CheckApplyCachedWorldTransform(parentTransform->GetWorldTM()); - } - else - { - // During undo operations, just apply our local TM. + m_initialized = true; + // If this is the first time this entity is being activated, manually compute OnTransformChanged + // this can occur when either the entity first created or undo/redo command is performed OnTransformChanged(AZ::Transform::Identity(), parentTransform->GetWorldTM()); } + m_suppressTransformChangedEvent = suppressTransformChangedEvent; auto& parentChildIds = GetParentTransformComponent()->m_childrenEntityIds; if (parentChildIds.end() == AZStd::find(parentChildIds.begin(), parentChildIds.end(), GetEntityId())) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/TransformComponent.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/TransformComponent.h index 931d3b48d6..08d1392d74 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/TransformComponent.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/TransformComponent.h @@ -242,6 +242,9 @@ namespace AzToolsFramework // element is used rather than a data element. bool m_addNonUniformScaleButton = false; + // Used to check whether entity was just created vs manually reactivated. Set true after OnEntityActivated is called the first time. + bool m_initialized = false; + // Deprecated AZ::InterpolationMode m_interpolatePosition; AZ::InterpolationMode m_interpolateRotation; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.cpp index 95ea5397e7..59f4b76065 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.cpp @@ -36,8 +36,6 @@ #include #include -#include - #ifdef AZ_PLATFORM_WINDOWS #include "shlobj.h" #endif diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/CustomMenus/CustomMenusAPI.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/CustomMenus/CustomMenusAPI.h index 3a6c337b4e..826128354d 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/CustomMenus/CustomMenusAPI.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/CustomMenus/CustomMenusAPI.h @@ -35,12 +35,6 @@ namespace LegacyFramework static const AZ::Crc32 Edit; static const AZ::Crc32 Build; }; - struct Driller - { - static const AZ::Crc32 Application; - static const AZ::Crc32 DrillerMenu; - static const AZ::Crc32 Channels; - }; struct LUAEditor { static const AZ::Crc32 Application; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/CustomMenus/CustomMenusComponent.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/CustomMenus/CustomMenusComponent.cpp index f294850214..c287874b9c 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/CustomMenus/CustomMenusComponent.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/CustomMenus/CustomMenusComponent.cpp @@ -24,10 +24,6 @@ namespace LegacyFramework const AZ::Crc32 WorldEditor::Edit = AZ_CRC("World Editor - Edit", 0x46a2bd02); const AZ::Crc32 WorldEditor::Build = AZ_CRC("World Editor - Build", 0xae0bfdee); - const AZ::Crc32 Driller::Application = AZ_CRC_CE("Driller"); - const AZ::Crc32 Driller::DrillerMenu = AZ_CRC("Driller - File", 0x5a98bdd8); - const AZ::Crc32 Driller::Channels = AZ_CRC("Driller - Debug", 0xf9cc0aae); - const AZ::Crc32 LUAEditor::Application = AZ_CRC_CE("LUAEditor"); const AZ::Crc32 LUAEditor::File = AZ_CRC("LUAEditor - File", 0xcf589de3); const AZ::Crc32 LUAEditor::Edit = AZ_CRC("LUAEditor - Edit", 0xc2f275e9); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/active_color_swatch.png b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/active_color_swatch.png deleted file mode 100644 index 352cc3ddc8..0000000000 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/active_color_swatch.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:13b2e25ce3d4e2e296d28aa3c16f508a2ddfe7ddf0059dba61e8240f392aa357 -size 3253 diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/drill_down_disabled.png b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/drill_down_disabled.png deleted file mode 100644 index 9ab4e5a882..0000000000 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/drill_down_disabled.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:73d7cfcfdf299bfb682a2bb4492493ad4a1a4e1c2a0b9bd2a305218fe446feae -size 781 diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/export_button_disabled.png b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/export_button_disabled.png deleted file mode 100644 index 4f15ed99ee..0000000000 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/export_button_disabled.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:29f98d4b55674a38a87734be2028bb313bc85ae6360c3cb594cff466bbbf663b -size 723 diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/export_button_enabled.png b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/export_button_enabled.png deleted file mode 100644 index 9817feebeb..0000000000 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/export_button_enabled.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:26539410861d7d40fd1efce832ccb30c65c65993dc715b30df6a2b1132590df2 -size 786 diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/inactive_color_swatch.png b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/inactive_color_swatch.png deleted file mode 100644 index ce5d8e5ef4..0000000000 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/inactive_color_swatch.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ceea1a8a0d9efc93636bc8531d91b955c05907119539448ead8c0c22ea5889a9 -size 3253 diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/sharedResources.qrc b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/sharedResources.qrc index e20a52ae0f..44759daf55 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/sharedResources.qrc +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/sharedResources.qrc @@ -80,15 +80,6 @@ bug--minus.png bug--plus.png - - active_color_swatch.png - export_button_disabled.png - export_button_enabled.png - drill_down_disabled.png - drill_down_enabled.png - inactive_color_swatch.png - settings_icon.png - style_dark.qss diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/style_dark.qss b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/style_dark.qss index 193034b781..e308875793 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/style_dark.qss +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Resources/style_dark.qss @@ -1116,91 +1116,6 @@ QPushButton#captureButton:disabled { /*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/ -Driller--DrillerCaptureWindow > #centralwidget > #playButton { - color: white; -} - - -Driller--DrillerCaptureWindow > #centralwidget > AzToolsFramework--AZAutoSizingScrollArea#scrollArea { - background-color: rgb(100,100,100); - border: 1px solid rgb(100,100,100); -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--DrillerMainWindow QDockWidget -{ - background: rgb(56, 58, 59); -} - -Driller--DrillerMainWindow QDockWidget::title -{ - background: rgb(56, 58, 59); -} - -Driller--DrillerMainWindow QDockWidget .QWidget -{ - background: rgb(56, 58, 59); - border: 0px solid red; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--ChannelControl > QFrame { - background-color: rgb(100, 100, 100); -} - -Driller--ChannelControl > #infoArea > QLabel { - color: #999999; - font-size: 12px; - font-family: "open sans"; - font-weight:600; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--ChannelProfilerWidget #profilerName { - color: #cccccc; - font-size: 13px; - font-family: "open sans"; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--AnnotationHeaderView { - background-color: rgb(80,80,80); -} - -Driller--AnnotationHeaderView > #frame { - background-color: rgb(80,80,80); -} - -Driller--AnnotationHeaderView > #frame > #annotationBackground { - background-color: rgb(80,80,80); -} - -Driller--AnnotationHeaderView > #frame > #annotationBackground > #configureAnnotations { - color: white; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--CollapsiblePanel > QGroupBox { - background-color: rgb(56, 58, 59); - margin-top: 0px; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - AzToolsFramework--TargetSelectorButton#targetButton { color: white; } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/UIFramework.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/UIFramework.cpp index 26234f47e2..3eb794d892 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/UIFramework.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/UIFramework.cpp @@ -540,7 +540,6 @@ namespace AzToolsFramework //"Application" // + Open Lua Editor // + Open World Editor - // + Open Driller // + Open Model Viewer // + Preferences... // ------------------------ diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Logging/StyledTracePrintFLogPanel.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Logging/StyledTracePrintFLogPanel.cpp index 4f0fa3aa7e..8abd85bc63 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Logging/StyledTracePrintFLogPanel.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Logging/StyledTracePrintFLogPanel.cpp @@ -107,7 +107,7 @@ namespace AzToolsFramework void StyledTracePrintFLogTab::LogTraceMessage(Logging::LogLine::LogType type, const char* window, const char* message, bool alwaysShowMessage) { - // note: This is responding to a trace driller bus message + // note: This is responding to a TraceMessageBus message // as such, the mutex is already locked but we could be called from any thread at all, so we buffer the lines. // is it for this window? diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Logging/TracePrintFLogPanel.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Logging/TracePrintFLogPanel.cpp index aa37137c82..6d299a4aa1 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Logging/TracePrintFLogPanel.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Logging/TracePrintFLogPanel.cpp @@ -145,7 +145,7 @@ namespace AzToolsFramework void AZTracePrintFLogTab::LogTraceMessage(Logging::LogLine::LogType type, const char* window, const char* message, void* userData) { - // note: This is responding to a trace driller bus message + // note: This is responding to a TraceMessageBus message // as such, the mutex is already locked but we could be called from any thread at all, so we buffer the lines. // is it for this window? diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.cpp index a68a72f00a..284caaa7a2 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.cpp @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -313,7 +314,7 @@ namespace AzToolsFramework if (isEditorOnly) { - return QIcon(QString(":/Icons/Entity_Editor_Only.svg")); + return QIcon(QString(":/Entity/entity_editoronly.svg")); } AZ::Entity* entity = nullptr; @@ -322,10 +323,10 @@ namespace AzToolsFramework if (!isInitiallyActive) { - return QIcon(QString(":/Icons/Entity_Not_Active.svg")); + return QIcon(QString(":/Entity/entity_notactive.svg")); } - return QIcon(QString(":/Icons/Entity.svg")); + return QIcon(QString(":/Entity/entity.svg")); } QVariant EntityOutlinerListModel::GetEntityTooltip(const AZ::EntityId& id) const @@ -1994,9 +1995,13 @@ namespace AzToolsFramework , m_lockCheckBoxes(parent, "Lock", EntityOutlinerListModel::PartiallyLockedRole, EntityOutlinerListModel::LockedAncestorRole) { m_editorEntityFrameworkInterface = AZ::Interface::Get(); - AZ_Assert((m_editorEntityFrameworkInterface != nullptr), "EntityOutlinerItemDelegate requires a EditorEntityFrameworkInterface instance on Construction."); + + m_readOnlyEntityPublicInterface = AZ::Interface::Get(); + AZ_Assert( + (m_readOnlyEntityPublicInterface != nullptr), + "EntityOutlinerItemDelegate requires a ReadOnlyEntityPublicInterface instance on Construction."); } EntityOutlinerItemDelegate::CheckboxGroup::CheckboxGroup(QWidget* parent, AZStd::string prefix, @@ -2108,6 +2113,12 @@ namespace AzToolsFramework } PaintEntityNameAsRichText(painter, customOption, index); + + // Paint Read-Only icon if necessary + if (m_readOnlyEntityPublicInterface->IsReadOnly(entityId)) + { + PaintReadOnlyIcon(painter, option, index); + } } break; default: @@ -2166,10 +2177,10 @@ namespace AzToolsFramework backgroundPath.addRect(backgroundRect); - QColor backgroundColor = m_hoverColor; + QColor backgroundColor = s_hoverColor; if (isSelected) { - backgroundColor = m_selectedColor; + backgroundColor = s_selectedColor; } painter->fillPath(backgroundPath, backgroundColor); @@ -2336,6 +2347,20 @@ namespace AzToolsFramework EntityOutlinerListModel::s_paintingName = false; } + void EntityOutlinerItemDelegate::PaintReadOnlyIcon(QPainter* painter, const QStyleOptionViewItem& option, [[maybe_unused]] const QModelIndex& index) const + { + // Build the rect that will be used to paint the icon + QRect readOnlyRect = QRect(option.rect.topLeft() + s_readOnlyOffset, QSize(s_readOnlyRadius * 2, s_readOnlyRadius * 2)); + + painter->save(); + painter->setRenderHint(QPainter::Antialiasing, true); + painter->setPen(Qt::NoPen); + painter->setBrush(s_readOnlyBackgroundColor); + painter->drawEllipse(readOnlyRect.center(), s_readOnlyRadius, s_readOnlyRadius); + s_readOnlyIcon.paint(painter, readOnlyRect); + painter->restore(); + } + QSize EntityOutlinerItemDelegate::sizeHint(const QStyleOptionViewItem& option, const QModelIndex& /*index*/) const { // Get the height of a tall character... diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.hxx index 0a46ee4850..b785dcb31e 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.hxx +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.hxx @@ -38,6 +38,7 @@ namespace AzToolsFramework { class EditorEntityUiInterface; class FocusModeInterface; + class ReadOnlyEntityPublicInterface; namespace EntityOutliner { @@ -344,6 +345,9 @@ namespace AzToolsFramework // Paint the entity name using rich text void PaintEntityNameAsRichText(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; + // Paint the read-only icon on the entity + void PaintReadOnlyIcon(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; + struct CheckboxGroup { EntityOutlinerCheckBox m_default; @@ -372,10 +376,17 @@ namespace AzToolsFramework // this is a cache, and is hence mutable mutable QRect m_cachedBoundingRectOfTallCharacter; - const QColor m_selectedColor = QColor(255, 255, 255, 45); - const QColor m_hoverColor = QColor(255, 255, 255, 30); + inline static const QColor s_selectedColor = QColor(255, 255, 255, 45); + inline static const QColor s_hoverColor = QColor(255, 255, 255, 30); + + inline static const QColor s_readOnlyBackgroundColor = QColor("#444444"); + inline static const QPoint s_readOnlyOffset = QPoint(10, 10); + inline static const int s_readOnlyRadius = 6; + + QIcon s_readOnlyIcon = QIcon(QString(":/Entity/readonly.svg")); EditorEntityUiInterface* m_editorEntityFrameworkInterface = nullptr; + ReadOnlyEntityPublicInterface* m_readOnlyEntityPublicInterface = nullptr; }; } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp index aa6d82e634..1c60b78322 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -565,9 +566,7 @@ namespace AzToolsFramework EditorRequestBus::BroadcastResult(position, &EditorRequestBus::Events::GetWorldPositionAtViewportCenter); } - // Instantiating from context menu always puts the instance at the root level auto createPrefabOutcome = s_prefabPublicInterface->InstantiatePrefab(prefabFilePath, parentId, position); - if (!createPrefabOutcome.IsSuccess()) { WarnUserOfError("Prefab Instantiation Error",createPrefabOutcome.GetError()); @@ -594,15 +593,13 @@ namespace AzToolsFramework } else { - // otherwise return since it needs to be inside an authored prefab - return; + EditorRequestBus::BroadcastResult(position, &EditorRequestBus::Events::GetWorldPositionAtViewportCenter); } - // Instantiating from context menu always puts the instance at the root level auto createPrefabOutcome = s_prefabPublicInterface->InstantiatePrefab(prefabAssetPath, parentId, position); if (!createPrefabOutcome.IsSuccess()) { - WarnUserOfError("Prefab Instantiation Error", createPrefabOutcome.GetError()); + WarnUserOfError("Procedural Prefab Instantiation Error", createPrefabOutcome.GetError()); } } } @@ -1268,7 +1265,14 @@ namespace AzToolsFramework } else { - s_editorEntityUiInterface->RegisterEntity(entityId, m_prefabUiHandler.GetHandlerId()); + if (s_prefabPublicInterface->IsOwnedByProceduralPrefabInstance(entityId)) + { + s_editorEntityUiInterface->RegisterEntity(entityId, m_proceduralPrefabUiHandler.GetHandlerId()); + } + else + { + s_editorEntityUiInterface->RegisterEntity(entityId, m_prefabUiHandler.GetHandlerId()); + } // Register entity as a container s_containerEntityInterface->RegisterEntityAsContainer(entityId); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.h index 808a0c2408..8589bee942 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.h @@ -18,10 +18,11 @@ #include #include #include - #include #include #include +#include +#include #include @@ -92,12 +93,18 @@ namespace AzToolsFramework void ExecuteSavePrefabDialog(TemplateId templateId, bool useSaveAllPrefabsPreference) override; private: - // Used to handle the UI for the level root + // Used to handle the UI for the level root. LevelRootUiHandler m_levelRootUiHandler; - // Used to handle the UI for prefab entities + // Used to handle the UI for prefab entities. PrefabUiHandler m_prefabUiHandler; + // Used to handle the UI for procedural prefab entities. + ProceduralPrefabUiHandler m_proceduralPrefabUiHandler; + + // Ensures entities owned by procedural prefab instances are marked as read-only correctly. + ProceduralPrefabReadOnlyHandler m_proceduralPrefabReadOnlyHandler; + // Context menu item handlers static void ContextMenu_CreatePrefab(AzToolsFramework::EntityIdList selectedEntities); static void ContextMenu_InstantiatePrefab(); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabUiHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabUiHandler.cpp index 8b56b26508..cc0018753e 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabUiHandler.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabUiHandler.cpp @@ -23,17 +23,6 @@ namespace AzToolsFramework { AzFramework::EntityContextId PrefabUiHandler::s_editorEntityContextId = AzFramework::EntityContextId::CreateNull(); - const QColor PrefabUiHandler::m_backgroundColor = QColor("#444444"); - const QColor PrefabUiHandler::m_backgroundHoverColor = QColor("#5A5A5A"); - const QColor PrefabUiHandler::m_backgroundSelectedColor = QColor("#656565"); - const QColor PrefabUiHandler::m_prefabCapsuleColor = QColor("#1E252F"); - const QColor PrefabUiHandler::m_prefabCapsuleDisabledColor = QColor("#35383C"); - const QColor PrefabUiHandler::m_prefabCapsuleEditColor = QColor("#4A90E2"); - const QString PrefabUiHandler::m_prefabIconPath = QString(":/Entity/prefab.svg"); - const QString PrefabUiHandler::m_prefabEditIconPath = QString(":/Entity/prefab_edit.svg"); - const QString PrefabUiHandler::m_prefabEditOpenIconPath = QString(":/Entity/prefab_edit_open.svg"); - const QString PrefabUiHandler::m_prefabEditCloseIconPath = QString(":/Entity/prefab_edit_close.svg"); - PrefabUiHandler::PrefabUiHandler() { m_prefabPublicInterface = AZ::Interface::Get(); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabUiHandler.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabUiHandler.h index bb1c646dbe..a1c624f85a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabUiHandler.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabUiHandler.h @@ -46,7 +46,7 @@ namespace AzToolsFramework void OnOutlinerItemCollapse(const QModelIndex& index) const override; bool OnEntityDoubleClick(AZ::EntityId entityId) const override; - private: + protected: Prefab::PrefabFocusPublicInterface* m_prefabFocusPublicInterface = nullptr; Prefab::PrefabPublicInterface* m_prefabPublicInterface = nullptr; @@ -56,17 +56,17 @@ namespace AzToolsFramework static AzFramework::EntityContextId s_editorEntityContextId; - static constexpr int m_prefabCapsuleRadius = 6; - static constexpr int m_prefabBorderThickness = 2; - static const QColor m_backgroundColor; - static const QColor m_backgroundHoverColor; - static const QColor m_backgroundSelectedColor; - static const QColor m_prefabCapsuleColor; - static const QColor m_prefabCapsuleDisabledColor; - static const QColor m_prefabCapsuleEditColor; - static const QString m_prefabIconPath; - static const QString m_prefabEditIconPath; - static const QString m_prefabEditOpenIconPath; - static const QString m_prefabEditCloseIconPath; + int m_prefabCapsuleRadius = 6; + int m_prefabBorderThickness = 2; + QColor m_backgroundColor = QColor("#444444"); + QColor m_backgroundHoverColor = QColor("#5A5A5A"); + QColor m_backgroundSelectedColor = QColor("#656565"); + QColor m_prefabCapsuleColor = QColor("#1E252F"); + QColor m_prefabCapsuleDisabledColor = QColor("#35383C"); + QColor m_prefabCapsuleEditColor = QColor("#4A90E2"); + QString m_prefabIconPath = QString(":/Entity/prefab.svg"); + QString m_prefabEditIconPath = QString(":/Entity/prefab_edit.svg"); + QString m_prefabEditOpenIconPath = QString(":/Entity/prefab_edit_open.svg"); + QString m_prefabEditCloseIconPath = QString(":/Entity/prefab_edit_close.svg"); }; } // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabReadOnlyHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabReadOnlyHandler.cpp new file mode 100644 index 0000000000..ed962ef4ad --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabReadOnlyHandler.cpp @@ -0,0 +1,68 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +#include +#include +#include +#include + +namespace AzToolsFramework +{ + namespace Prefab + { + ProceduralPrefabReadOnlyHandler::ProceduralPrefabReadOnlyHandler() + { + m_prefabPublicInterface = AZ::Interface::Get(); + AZ_Assert( + m_prefabPublicInterface != nullptr, + "ProceduralPrefabReadOnlyHandler requires a PrefabPublicInterface instance on Initialize."); + + m_prefabFocusPublicInterface = AZ::Interface::Get(); + AZ_Assert( + m_prefabFocusPublicInterface != nullptr, + "ProceduralPrefabReadOnlyHandler requires a PrefabFocusPublicInterface instance on Initialize."); + + AzFramework::EntityContextId editorEntityContextId = AzFramework::EntityContextId::CreateNull(); + EditorEntityContextRequestBus::BroadcastResult(editorEntityContextId, &EditorEntityContextRequests::GetEditorEntityContextId); + + ReadOnlyEntityQueryRequestBus::Handler::BusConnect(editorEntityContextId); + + // Refresh the whole read-only cache + if (auto readOnlyEntityQueryInterface = AZ::Interface::Get()) + { + readOnlyEntityQueryInterface->RefreshReadOnlyStateForAllEntities(); + } + } + + ProceduralPrefabReadOnlyHandler ::~ProceduralPrefabReadOnlyHandler() + { + ReadOnlyEntityQueryRequestBus::Handler::BusDisconnect(); + } + + void ProceduralPrefabReadOnlyHandler::IsReadOnly(const AZ::EntityId& entityId, bool& isReadOnly) + { + if(m_prefabPublicInterface->IsOwnedByProceduralPrefabInstance(entityId)) + { + // All entities nested inside a procedural prefabs should always be marked as read-only. + if (!m_prefabPublicInterface->IsInstanceContainerEntity(entityId)) + { + isReadOnly = true; + } + + // The container entity of a procedural prefab should only be marked as read-only when the prefab is being edited. + if (m_prefabFocusPublicInterface->IsOwningPrefabBeingFocused(entityId)) + { + isReadOnly = true; + } + } + } + + } // namespace Prefab +} // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabReadOnlyHandler.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabReadOnlyHandler.h new file mode 100644 index 0000000000..a4d13752bd --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabReadOnlyHandler.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include + +#include + +namespace AzToolsFramework +{ + namespace Prefab + { + class PrefabFocusPublicInterface; + class PrefabPublicInterface; + + //! Ensures entities in a procedural prefab are correctly reported as read-only. + class ProceduralPrefabReadOnlyHandler + : public ReadOnlyEntityQueryRequestBus::Handler + { + public: + AZ_CLASS_ALLOCATOR(ProceduralPrefabReadOnlyHandler, AZ::SystemAllocator, 0); + AZ_RTTI(AzToolsFramework::ProceduralPrefabReadOnlyHandler, "{A2D72461-8CA3-45EE-81D2-4976BC0B6AE9}"); + + ProceduralPrefabReadOnlyHandler(); + ~ProceduralPrefabReadOnlyHandler() override; + + // ReadOnlyEntityQueryRequestBus overrides ... + void IsReadOnly(const AZ::EntityId& entityId, bool& isReadOnly) override; + + private: + PrefabPublicInterface* m_prefabPublicInterface = nullptr; + PrefabFocusPublicInterface* m_prefabFocusPublicInterface = nullptr; + }; + + } // namespace Prefab +} // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabUiHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabUiHandler.cpp new file mode 100644 index 0000000000..57b41d3a4b --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabUiHandler.cpp @@ -0,0 +1,32 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +#include + +namespace AzToolsFramework +{ + ProceduralPrefabUiHandler::ProceduralPrefabUiHandler() + { + m_prefabCapsuleColor = QColor("#361561"); + m_prefabCapsuleDisabledColor = QColor("#4B3455"); + m_prefabCapsuleEditColor = QColor("#361561"); + m_prefabIconPath = QString(":/Entity/prefab_edit.svg"); + m_prefabEditOpenIconPath = QString(":/Entity/prefab_edit_open_readonly.svg"); + } + + QString ProceduralPrefabUiHandler::GenerateItemTooltip(AZ::EntityId entityId) const + { + if (AZ::IO::Path path = m_prefabPublicInterface->GetOwningInstancePrefabPath(entityId); !path.empty()) + { + return QObject::tr("Double click to inspect.\n%1").arg(path.Native().data()); + } + return QString(); + } +} diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabUiHandler.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabUiHandler.h new file mode 100644 index 0000000000..2b8c90e0eb --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabUiHandler.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include + +#include + +namespace AzToolsFramework +{ + namespace Prefab + { + class PrefabFocusPublicInterface; + class PrefabPublicInterface; + }; + + //! Implements the Editor UI for Procedural Prefabs. + class ProceduralPrefabUiHandler + : public PrefabUiHandler + { + public: + AZ_CLASS_ALLOCATOR(ProceduralPrefabUiHandler, AZ::SystemAllocator, 0); + AZ_RTTI(AzToolsFramework::ProceduralPrefabUiHandler, "{3A3DF9FF-9C2E-4439-B7B4-72173B5A3502}", PrefabUiHandler); + + ProceduralPrefabUiHandler(); + ~ProceduralPrefabUiHandler() override = default; + + QString GenerateItemTooltip(AZ::EntityId entityId) const override; + }; +} // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp index fa419d5f14..8104aee4fd 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp @@ -45,6 +45,7 @@ AZ_POP_DISABLE_WARNING #include #include #include +#include #include #include #include @@ -497,6 +498,9 @@ namespace AzToolsFramework m_prefabPublicInterface = AZ::Interface::Get(); AZ_Assert(m_prefabPublicInterface != nullptr, "EntityPropertyEditor requires a PrefabPublicInterface instance on Initialize."); + m_readOnlyEntityPublicInterface = AZ::Interface::Get(); + AZ_Assert(m_readOnlyEntityPublicInterface != nullptr, "EntityPropertyEditor requires a ReadOnlyEntityPublicInterface instance on Initialize."); + setObjectName("EntityPropertyEditor"); setAcceptDrops(true); @@ -535,10 +539,6 @@ namespace AzToolsFramework model->setItem(row, 0, m_comboItems[row]); } m_gui->m_statusComboBox->setModel(model); - m_gui->m_statusComboBox->setStyleSheet("QComboBox {border: 0px; border-radius:3px; background-color:#555555; color:white}" - "QComboBox:on {background-color:#e9e9e9; color:black; border:0px}" - "QComboBox::down-arrow:on {image: url(:/stylesheet/img/dropdowns/black_down_arrow.png)}" - "QComboBox::drop-down {border-radius: 3p}"); AzQtComponents::ComboBox::addCustomCheckStateStyle(m_gui->m_statusComboBox); EnableEditor(true); m_sceneIsNew = true; @@ -565,6 +565,12 @@ namespace AzToolsFramework AZ::EntitySystemBus::Handler::BusConnect(); EntityPropertyEditorRequestBus::Handler::BusConnect(); EditorWindowUIRequestBus::Handler::BusConnect(); + + AzFramework::EntityContextId editorEntityContextId = AzFramework::EntityContextId::CreateNull(); + EditorEntityContextRequestBus::BroadcastResult( + editorEntityContextId, &EditorEntityContextRequests::GetEditorEntityContextId); + ReadOnlyEntityPublicNotificationBus::Handler::BusConnect(editorEntityContextId); + m_spacer = nullptr; m_emptyIcon = QIcon(); @@ -614,6 +620,7 @@ namespace AzToolsFramework { qApp->removeEventFilter(this); + ReadOnlyEntityPublicNotificationBus::Handler::BusDisconnect(); EditorWindowUIRequestBus::Handler::BusDisconnect(); EntityPropertyEditorRequestBus::Handler::BusDisconnect(); ToolsApplicationEvents::Bus::Handler::BusDisconnect(); @@ -973,7 +980,7 @@ namespace AzToolsFramework m_gui->m_entityDetailsLabel->setVisible(false); // If we're in edit mode, make the name field editable. - m_gui->m_entityNameEditor->setReadOnly(!m_gui->m_componentListContents->isEnabled()); + m_gui->m_entityNameEditor->setReadOnly(!m_gui->m_componentListContents->isEnabled() || m_selectionContainsReadOnlyEntity); // get the name of the entity. auto entity = GetSelectedEntityById(entityId); @@ -1062,6 +1069,12 @@ namespace AzToolsFramework bool EntityPropertyEditor::CanAddComponentsToSelection(const SelectionEntityTypeInfo& selectionEntityTypeInfo) const { + if (m_selectionContainsReadOnlyEntity) + { + // Can't add components if there is a read only entity in the selection + return false; + } + if (selectionEntityTypeInfo == SelectionEntityTypeInfo::Mixed || selectionEntityTypeInfo == SelectionEntityTypeInfo::None) { @@ -1126,6 +1139,17 @@ namespace AzToolsFramework m_selectedEntityIds.clear(); GetSelectedEntities(m_selectedEntityIds); + // Check if any of the selected entities are marked as read only + m_selectionContainsReadOnlyEntity = false; + for (const auto& entityId : m_selectedEntityIds) + { + if (m_readOnlyEntityPublicInterface->IsReadOnly(entityId)) + { + m_selectionContainsReadOnlyEntity = true; + break; + } + } + SourceControlFileInfo scFileInfo; ToolsApplicationRequests::Bus::BroadcastResult(scFileInfo, &ToolsApplicationRequests::GetSceneSourceControlInfo); @@ -1681,6 +1705,12 @@ namespace AzToolsFramework componentEditor->UpdateExpandability(); componentEditor->InvalidateAll(!componentInFilter ? m_filterString.c_str() : nullptr); + // If we are in read only mode, then show the components as disabled + if (m_selectionContainsReadOnlyEntity) + { + componentEditor->mockDisabledState(true); + } + if (!componentEditor->GetPropertyEditor()->HasFilteredOutNodes() || componentEditor->GetPropertyEditor()->HasVisibleNodes()) { for (AZ::Component* componentInstance : componentInstances) @@ -3077,6 +3107,7 @@ namespace AzToolsFramework } } + m_gui->m_statusComboBox->setDisabled(m_selectionContainsReadOnlyEntity); m_gui->m_statusComboBox->setVisible(!m_isSystemEntityEditor && !m_isLevelEntityEditor); m_gui->m_statusComboBox->style()->unpolish(m_gui->m_statusComboBox); m_gui->m_statusComboBox->style()->polish(m_gui->m_statusComboBox); @@ -3304,7 +3335,8 @@ namespace AzToolsFramework const auto& componentsToEdit = GetSelectedComponents(); const bool hasComponents = !m_selectedEntityIds.empty() && !componentsToEdit.empty(); - const bool allowRemove = hasComponents && AreComponentsRemovable(componentsToEdit); + // Don't allow components to be removed/cut/enabled/disabled if read only + const bool allowRemove = hasComponents && AreComponentsRemovable(componentsToEdit) && !m_selectionContainsReadOnlyEntity; const bool allowCopy = hasComponents && AreComponentsCopyable(componentsToEdit); m_actionToDeleteComponents->setEnabled(allowRemove); @@ -3366,6 +3398,12 @@ namespace AzToolsFramework return false; } + if (m_selectionContainsReadOnlyEntity) + { + // Can't paste components if there is a read only entity in the selection + return false; + } + // Grab component data from clipboard, if exists const QMimeData* mimeData = ComponentMimeData::GetComponentMimeDataFromClipboard(); @@ -5727,6 +5765,14 @@ namespace AzToolsFramework SaveComponentEditorState(); } + void EntityPropertyEditor::OnReadOnlyEntityStatusChanged(const AZ::EntityId& entityId, [[maybe_unused]] bool readOnly) + { + if (IsEntitySelected(entityId)) + { + UpdateContents(); + } + } + void EntityPropertyEditor::OnEditorModeActivated( [[maybe_unused]] const AzToolsFramework::ViewportEditorModesInterface& editorModeState, AzToolsFramework::ViewportEditorMode mode) { diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx index 8dd0ffc4ee..254b70996b 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -62,6 +63,7 @@ namespace AzToolsFramework class ComponentPaletteWidget; class ComponentModeCollectionInterface; struct SourceControlFileInfo; + class ReadOnlyEntityPublicInterface; namespace AssetBrowser { @@ -116,6 +118,7 @@ namespace AzToolsFramework , public AZ::EntitySystemBus::Handler , public AZ::TickBus::Handler , private EditorWindowUIRequestBus::Handler + , private ReadOnlyEntityPublicNotificationBus::Handler { Q_OBJECT; public: @@ -253,6 +256,9 @@ namespace AzToolsFramework // EditorWindowRequestBus overrides void SetEditorUiEnabled(bool enable) override; + // ReadOnlyEntityPublicNotificationBus overrides ... + void OnReadOnlyEntityStatusChanged(const AZ::EntityId& entityId, bool readOnly) override; + bool IsEntitySelected(const AZ::EntityId& id) const; bool IsSingleEntitySelected(const AZ::EntityId& id) const; @@ -623,6 +629,9 @@ namespace AzToolsFramework Prefab::PrefabPublicInterface* m_prefabPublicInterface = nullptr; bool m_prefabsAreEnabled = false; + ReadOnlyEntityPublicInterface* m_readOnlyEntityPublicInterface = nullptr; + bool m_selectionContainsReadOnlyEntity = false; + // Reordering row widgets within the RPE. static constexpr float MoveFadeSeconds = 0.5f; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.ui b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.ui index 8a86d429f1..b7cb5a0156 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.ui +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.ui @@ -191,7 +191,7 @@ - background-color:rgb(51, 51, 51) + QWidget#m_darkBox { background-color:rgb(51, 51, 51) } @@ -444,6 +444,9 @@ Qt::Horizontal + + background-color:rgb(51, 51, 51) + diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/Model/AssetCompleterModel.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/Model/AssetCompleterModel.cpp index 3e5b41ebeb..40f3b7063e 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/Model/AssetCompleterModel.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/Model/AssetCompleterModel.cpp @@ -39,7 +39,12 @@ namespace AzToolsFramework typeFilter->SetAssetType(filterType); typeFilter->SetFilterPropagation(AssetBrowserEntryFilter::PropagateDirection::Down); - m_assetBrowserFilterModel->SetFilter(FilterConstType(typeFilter)); + SetFilter(FilterConstType(typeFilter)); + } + + void AssetCompleterModel::SetFilter(FilterConstType filter) + { + m_assetBrowserFilterModel->SetFilter(filter); RefreshAssetList(); } @@ -120,9 +125,6 @@ namespace AzToolsFramework int rows = m_assetBrowserFilterModel->rowCount(index); if (rows == 0) { - if (index != QModelIndex()) { - AZ_Error("AssetCompleterModel", false, "No children detected in FetchResources()"); - } return; } @@ -131,7 +133,7 @@ namespace AzToolsFramework QModelIndex childIndex = m_assetBrowserFilterModel->index(i, 0, index); AssetBrowserEntry* childEntry = GetAssetEntry(m_assetBrowserFilterModel->mapToSource(childIndex)); - if (childEntry->GetEntryType() == AssetBrowserEntry::AssetEntryType::Product) + if (childEntry->GetEntryType() == m_entryType) { ProductAssetBrowserEntry* productEntry = static_cast(childEntry); AZStd::string assetName; @@ -167,7 +169,6 @@ namespace AzToolsFramework return m_assets[index.row()].m_displayName; } - const AZ::Data::AssetId AssetCompleterModel::GetAssetIdFromIndex(const QModelIndex& index) { if (!index.isValid()) @@ -177,4 +178,19 @@ namespace AzToolsFramework return m_assets[index.row()].m_assetId; } + + const AZStd::string_view AssetCompleterModel::GetPathFromIndex(const QModelIndex& index) + { + if (!index.isValid()) + { + return ""; + } + + return m_assets[index.row()].m_path; + } + + void AssetCompleterModel::SetFetchEntryType(AssetBrowserEntry::AssetEntryType entryType) + { + m_entryType = entryType; + } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/Model/AssetCompleterModel.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/Model/AssetCompleterModel.h index 55a6db8589..4596d70657 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/Model/AssetCompleterModel.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/Model/AssetCompleterModel.h @@ -32,6 +32,7 @@ namespace AzToolsFramework QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; void SetFilter(AZ::Data::AssetType filterType); + void SetFilter(FilterConstType filter); void RefreshAssetList(); void SearchStringHighlight(QString searchString); @@ -39,6 +40,9 @@ namespace AzToolsFramework const AZStd::string_view GetNameFromIndex(const QModelIndex& index); const AZ::Data::AssetId GetAssetIdFromIndex(const QModelIndex& index); + const AZStd::string_view GetPathFromIndex(const QModelIndex& index); + + void SetFetchEntryType(AssetBrowserEntry::AssetEntryType entryType); private: struct AssetItem @@ -57,6 +61,8 @@ namespace AzToolsFramework AZStd::vector m_assets; //! String that will be highlighted in the suggestions QString m_highlightString; + + AssetBrowserEntry::AssetEntryType m_entryType = AssetBrowserEntry::AssetEntryType::Product; }; } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp index 70e5aafe8a..bd0cb3844a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp @@ -1288,7 +1288,7 @@ namespace AzToolsFramework return newCtrl; } - void AssetPropertyHandlerDefault::ConsumeAttribute(PropertyAssetCtrl* GUI, AZ::u32 attrib, PropertyAttributeReader* attrValue, const char* debugName) + void AssetPropertyHandlerDefault::ConsumeAttributeInternal(PropertyAssetCtrl* GUI, AZ::u32 attrib, PropertyAttributeReader* attrValue, const char* debugName) { (void)debugName; @@ -1487,6 +1487,11 @@ namespace AzToolsFramework } } + void AssetPropertyHandlerDefault::ConsumeAttribute(PropertyAssetCtrl* GUI, AZ::u32 attrib, PropertyAttributeReader* attrValue, const char* debugName) + { + ConsumeAttributeInternal(GUI, attrib, attrValue, debugName); + } + void AssetPropertyHandlerDefault::WriteGUIValuesIntoProperty(size_t index, PropertyAssetCtrl* GUI, property_t& instance, InstanceDataNode* node) { (void)index; @@ -1629,8 +1634,8 @@ namespace AzToolsFramework void RegisterAssetPropertyHandler() { - EBUS_EVENT(PropertyTypeRegistrationMessages::Bus, RegisterPropertyType, aznew AssetPropertyHandlerDefault()); - EBUS_EVENT(PropertyTypeRegistrationMessages::Bus, RegisterPropertyType, aznew SimpleAssetPropertyHandlerDefault()); + PropertyTypeRegistrationMessages::Bus::Broadcast(&PropertyTypeRegistrationMessages::RegisterPropertyType, aznew AssetPropertyHandlerDefault()); + PropertyTypeRegistrationMessages::Bus::Broadcast(&PropertyTypeRegistrationMessages::RegisterPropertyType, aznew SimpleAssetPropertyHandlerDefault()); } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.hxx index 58ddbb967e..d6ff1b8de6 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.hxx +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.hxx @@ -175,10 +175,11 @@ namespace AzToolsFramework virtual void SetFolderSelection(const AZStd::string& /* folderPath */) {} virtual void ClearAssetInternal(); - void ConfigureAutocompleter(); + virtual void ConfigureAutocompleter(); void RefreshAutocompleter(); void EnableAutocompleter(); void DisableAutocompleter(); + const QModelIndex GetSourceIndex(const QModelIndex& index); void HandleFieldClear(); AZStd::string AddDefaultSuffix(const AZStd::string& filename); @@ -235,20 +236,19 @@ namespace AzToolsFramework void SetSelectedAssetID(const AZ::Data::AssetId& newID, const AZ::Data::AssetType& newType); void SetCurrentAssetHint(const AZStd::string& hint); void SetDefaultAssetID(const AZ::Data::AssetId& defaultID); - void PopupAssetPicker(); + virtual void PopupAssetPicker(); void OnClearButtonClicked(); void UpdateAssetDisplay(); void OnLineEditFocus(bool focus); virtual void OnEditButtonClicked(); void OnThumbnailClicked(); void OnCompletionModelReset(); - void OnAutocomplete(const QModelIndex& index); + virtual void OnAutocomplete(const QModelIndex& index); void OnTextChange(const QString& text); void OnReturnPressed(); void ShowContextMenu(const QPoint& pos); private: - const QModelIndex GetSourceIndex(const QModelIndex& index); void UpdateThumbnail(); }; @@ -270,7 +270,8 @@ namespace AzToolsFramework virtual void UpdateWidgetInternalTabbing(PropertyAssetCtrl* widget) override { widget->UpdateTabOrder(); } virtual QWidget* CreateGUI(QWidget* pParent) override; - virtual void ConsumeAttribute(PropertyAssetCtrl* GUI, AZ::u32 attrib, PropertyAttributeReader* attrValue, const char* debugName) override; + static void ConsumeAttributeInternal(PropertyAssetCtrl* GUI, AZ::u32 attrib, PropertyAttributeReader* attrValue, const char* debugName); + void ConsumeAttribute(PropertyAssetCtrl* GUI, AZ::u32 attrib, PropertyAttributeReader* attrValue, const char* debugName) override; virtual void WriteGUIValuesIntoProperty(size_t index, PropertyAssetCtrl* GUI, property_t& instance, InstanceDataNode* node) override; virtual bool ReadValuesIntoGUI(size_t index, PropertyAssetCtrl* GUI, const property_t& instance, InstanceDataNode* node) override; }; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.h index 1e29f1dbce..77a3639871 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.h @@ -15,12 +15,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -235,6 +237,13 @@ namespace UnitTest return toolsApp; } + //! It is possible to override this in classes deriving from ToolsApplicationFixture to provide alternate + //! implementations of the DebugDisplayRequests interface (e.g. TestDebugDisplayRequests). + virtual AZStd::shared_ptr CreateDebugDisplayRequests() + { + return AZStd::make_shared(); + } + protected: TestEditorActions m_editorActions; ToolsApplicationMessageHandler m_messageHandler; // used to suppress trace messages in test output diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportSettings.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportSettings.cpp new file mode 100644 index 0000000000..f8550b1a29 --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportSettings.cpp @@ -0,0 +1,123 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +namespace AzToolsFramework +{ + constexpr AZStd::string_view FlipManipulatorAxesTowardsViewSetting = "/Amazon/Preferences/Editor/Manipulator/FlipManipulatorAxesTowardsView"; + constexpr AZStd::string_view LinearManipulatorAxisLengthSetting = "/Amazon/Preferences/Editor/Manipulator/LinearManipulatorAxisLength"; + constexpr AZStd::string_view PlanarManipulatorAxisLengthSetting = "/Amazon/Preferences/Editor/Manipulator/PlanarManipulatorAxisLength"; + constexpr AZStd::string_view SurfaceManipulatorRadiusSetting = "/Amazon/Preferences/Editor/Manipulator/SurfaceManipulatorRadius"; + constexpr AZStd::string_view SurfaceManipulatorOpacitySetting = "/Amazon/Preferences/Editor/Manipulator/SurfaceManipulatorOpacity"; + constexpr AZStd::string_view LinearManipulatorConeLengthSetting = "/Amazon/Preferences/Editor/Manipulator/LinearManipulatorConeLength"; + constexpr AZStd::string_view LinearManipulatorConeRadiusSetting = "/Amazon/Preferences/Editor/Manipulator/LinearManipulatorConeRadius"; + constexpr AZStd::string_view ScaleManipulatorBoxHalfExtentSetting = "/Amazon/Preferences/Editor/Manipulator/ScaleManipulatorBoxHalfExtent"; + constexpr AZStd::string_view RotationManipulatorRadiusSetting = "/Amazon/Preferences/Editor/Manipulator/RotationManipulatorRadius"; + constexpr AZStd::string_view ManipulatorViewBaseScaleSetting = "/Amazon/Preferences/Editor/Manipulator/ViewBaseScale"; + + bool FlipManipulatorAxesTowardsView() + { + return GetRegistry(FlipManipulatorAxesTowardsViewSetting, true); + } + + void SetFlipManipulatorAxesTowardsView(const bool enabled) + { + SetRegistry(FlipManipulatorAxesTowardsViewSetting, enabled); + } + + float LinearManipulatorAxisLength() + { + return aznumeric_cast(GetRegistry(LinearManipulatorAxisLengthSetting, 2.0)); + } + + void SetLinearManipulatorAxisLength(const float length) + { + SetRegistry(LinearManipulatorAxisLengthSetting, length); + } + + float PlanarManipulatorAxisLength() + { + return aznumeric_cast(GetRegistry(PlanarManipulatorAxisLengthSetting, 0.6)); + } + + void SetPlanarManipulatorAxisLength(const float length) + { + SetRegistry(PlanarManipulatorAxisLengthSetting, length); + } + + float SurfaceManipulatorRadius() + { + return aznumeric_cast(GetRegistry(SurfaceManipulatorRadiusSetting, 0.1)); + } + + void SetSurfaceManipulatorRadius(const float radius) + { + SetRegistry(SurfaceManipulatorRadiusSetting, radius); + } + + float SurfaceManipulatorOpacity() + { + return aznumeric_cast(GetRegistry(SurfaceManipulatorOpacitySetting, 0.75)); + } + + void SetSurfaceManipulatorOpacity(const float opacity) + { + SetRegistry(SurfaceManipulatorOpacitySetting, opacity); + } + + float LinearManipulatorConeLength() + { + return aznumeric_cast(GetRegistry(LinearManipulatorConeLengthSetting, 0.28)); + } + + void SetLinearManipulatorConeLength(const float length) + { + SetRegistry(LinearManipulatorConeLengthSetting, length); + } + + float LinearManipulatorConeRadius() + { + return aznumeric_cast(GetRegistry(LinearManipulatorConeRadiusSetting, 0.1)); + } + + void SetLinearManipulatorConeRadius(const float radius) + { + SetRegistry(LinearManipulatorConeRadiusSetting, radius); + } + + float ScaleManipulatorBoxHalfExtent() + { + return aznumeric_cast(GetRegistry(ScaleManipulatorBoxHalfExtentSetting, 0.1)); + } + + void SetScaleManipulatorBoxHalfExtent(const float size) + { + SetRegistry(ScaleManipulatorBoxHalfExtentSetting, size); + } + + float RotationManipulatorRadius() + { + return aznumeric_cast(GetRegistry(RotationManipulatorRadiusSetting, 2.0)); + } + + void SetRotationManipulatorRadius(const float radius) + { + SetRegistry(RotationManipulatorRadiusSetting, radius); + } + + float ManipulatorViewBaseScale() + { + return aznumeric_cast(GetRegistry(ManipulatorViewBaseScaleSetting, 1.0)); + } + + void SetManipulatorViewBaseScale(const float scale) + { + SetRegistry(ManipulatorViewBaseScaleSetting, scale); + } +} // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportSettings.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportSettings.h new file mode 100644 index 0000000000..f5371b6035 --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportSettings.h @@ -0,0 +1,69 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include + +namespace AzToolsFramework +{ + template + void SetRegistry(const AZStd::string_view setting, T&& value) + { + if (auto* registry = AZ::SettingsRegistry::Get()) + { + registry->Set(setting, AZStd::forward(value)); + } + } + + template + AZStd::remove_cvref_t GetRegistry(const AZStd::string_view setting, T&& defaultValue) + { + AZStd::remove_cvref_t value = AZStd::forward(defaultValue); + if (const auto* registry = AZ::SettingsRegistry::Get()) + { + T potentialValue; + if (registry->Get(potentialValue, setting)) + { + value = AZStd::move(potentialValue); + } + } + + return value; + } + + bool FlipManipulatorAxesTowardsView(); + void SetFlipManipulatorAxesTowardsView(bool enabled); + + float LinearManipulatorAxisLength(); + void SetLinearManipulatorAxisLength(float length); + + float PlanarManipulatorAxisLength(); + void SetPlanarManipulatorAxisLength(float length); + + float SurfaceManipulatorRadius(); + void SetSurfaceManipulatorRadius(float radius); + + float SurfaceManipulatorOpacity(); + void SetSurfaceManipulatorOpacity(float opacity); + + float LinearManipulatorConeLength(); + void SetLinearManipulatorConeLength(float length); + + float LinearManipulatorConeRadius(); + void SetLinearManipulatorConeRadius(float radius); + + float ScaleManipulatorBoxHalfExtent(); + void SetScaleManipulatorBoxHalfExtent(float halfExtent); + + float RotationManipulatorRadius(); + void SetRotationManipulatorRadius(float radius); + + float ManipulatorViewBaseScale(); + void SetManipulatorViewBaseScale(float scale); +} // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.cpp index d3cfed4665..f54da3b089 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -33,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -1018,6 +1020,7 @@ namespace AzToolsFramework EditorManipulatorCommandUndoRedoRequestBus::Handler::BusConnect(entityContextId); EditorContextMenuBus::Handler::BusConnect(); ViewportInteraction::ViewportSettingsNotificationBus::Handler::BusConnect(ViewportUi::DefaultViewportId); + ReadOnlyEntityPublicNotificationBus::Handler::BusConnect(entityContextId); CreateTransformModeSelectionCluster(); CreateSpaceSelectionCluster(); @@ -1053,6 +1056,7 @@ namespace AzToolsFramework m_pivotOverrideFrame.Reset(); + ReadOnlyEntityPublicNotificationBus::Handler::BusDisconnect(); ViewportInteraction::ViewportSettingsNotificationBus::Handler::BusDisconnect(); EditorContextMenuBus::Handler::BusConnect(); EditorManipulatorCommandUndoRedoRequestBus::Handler::BusDisconnect(); @@ -1376,7 +1380,7 @@ namespace AzToolsFramework // view rotationManipulators->SetLocalAxes(AZ::Vector3::CreateAxisX(), AZ::Vector3::CreateAxisY(), AZ::Vector3::CreateAxisZ()); rotationManipulators->ConfigureView( - 2.0f, AzFramework::ViewportColors::XAxisColor, AzFramework::ViewportColors::YAxisColor, + RotationManipulatorRadius(), AzFramework::ViewportColors::XAxisColor, AzFramework::ViewportColors::YAxisColor, AzFramework::ViewportColors::ZAxisColor); struct SharedRotationState @@ -1535,7 +1539,8 @@ namespace AzToolsFramework RecalculateAverageManipulatorTransform(m_entityIdManipulators.m_lookups, m_pivotOverrideFrame, m_pivotMode, m_referenceFrame)); scaleManipulators->SetAxes(AZ::Vector3::CreateAxisX(), AZ::Vector3::CreateAxisY(), AZ::Vector3::CreateAxisZ()); - scaleManipulators->ConfigureView(2.0f, AZ::Color::CreateOne(), AZ::Color::CreateOne(), AZ::Color::CreateOne()); + scaleManipulators->ConfigureView( + LinearManipulatorAxisLength(), AZ::Color::CreateOne(), AZ::Color::CreateOne(), AZ::Color::CreateOne()); struct SharedScaleState { @@ -3621,6 +3626,18 @@ namespace AzToolsFramework m_selectedEntityIds.erase(focusRoot); } } + + // Do not create manipulators for any entities marked as read only + if (auto readOnlyEntityPublicInterface = AZ::Interface::Get()) + { + AZStd::erase_if( + m_selectedEntityIds, + [readOnlyEntityPublicInterface](auto entityId) + { + return readOnlyEntityPublicInterface->IsReadOnly(entityId); + } + ); + } } void EditorTransformComponentSelection::OnTransformChanged( @@ -3828,6 +3845,14 @@ namespace AzToolsFramework m_snappingCluster.TrySetVisible(m_viewportUiVisible && !m_selectedEntityIds.empty()); } + void EditorTransformComponentSelection::OnReadOnlyEntityStatusChanged(const AZ::EntityId& entityId, [[maybe_unused]] bool readOnly) + { + if (IsEntitySelected(entityId)) + { + RefreshSelectedEntityIdsAndRegenerateManipulators(); + } + } + namespace ETCS { // little raii wrapper to switch a value from true to false and back diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.h index afc290380b..7b3ba08894 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.h @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -160,6 +161,7 @@ namespace AzToolsFramework , private EditorManipulatorCommandUndoRedoRequestBus::Handler , private AZ::TransformNotificationBus::MultiHandler , private ViewportInteraction::ViewportSettingsNotificationBus::Handler + , private ReadOnlyEntityPublicNotificationBus::Handler { public: AZ_CLASS_ALLOCATOR_DECL @@ -297,6 +299,9 @@ namespace AzToolsFramework // ViewportSettingsNotificationBus overrides ... void OnGridSnappingChanged(bool enabled) override; + // ReadOnlyEntityPublicNotificationBus overrides ... + void OnReadOnlyEntityStatusChanged(const AZ::EntityId& entityId, bool readOnly) override; + // Helpers to safely interact with the TransformBus (requests). void SetEntityWorldTranslation(AZ::EntityId entityId, const AZ::Vector3& worldTranslation); void SetEntityLocalTranslation(AZ::EntityId entityId, const AZ::Vector3& localTranslation); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/InvalidClicks.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/InvalidClicks.h index fe54b5379b..9f89b92948 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/InvalidClicks.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/InvalidClicks.h @@ -9,6 +9,7 @@ #pragma once #include +#include #include namespace AzFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/aztoolsframework_files.cmake b/Code/Framework/AzToolsFramework/AzToolsFramework/aztoolsframework_files.cmake index bdf6abe141..6922ad26a2 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/aztoolsframework_files.cmake +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/aztoolsframework_files.cmake @@ -159,6 +159,10 @@ set(FILES Entity/SliceEditorEntityOwnershipServiceBus.h Entity/EntityUtilityComponent.h Entity/EntityUtilityComponent.cpp + Entity/ReadOnly/ReadOnlyEntityInterface.h + Entity/ReadOnly/ReadOnlyEntityBus.h + Entity/ReadOnly/ReadOnlyEntitySystemComponent.cpp + Entity/ReadOnly/ReadOnlyEntitySystemComponent.h Fingerprinting/TypeFingerprinter.h Fingerprinting/TypeFingerprinter.cpp FocusMode/FocusModeInterface.h @@ -502,6 +506,8 @@ set(FILES Viewport/ViewportMessages.cpp Viewport/ViewportTypes.h Viewport/ViewportTypes.cpp + Viewport/ViewportSettings.h + Viewport/ViewportSettings.cpp ViewportUi/Button.h ViewportUi/Button.cpp ViewportUi/ButtonGroup.h @@ -762,6 +768,10 @@ set(FILES UI/Prefab/PrefabUiHandler.cpp UI/Prefab/PrefabViewportFocusPathHandler.h UI/Prefab/PrefabViewportFocusPathHandler.cpp + UI/Prefab/Procedural/ProceduralPrefabReadOnlyHandler.h + UI/Prefab/Procedural/ProceduralPrefabReadOnlyHandler.cpp + UI/Prefab/Procedural/ProceduralPrefabUiHandler.h + UI/Prefab/Procedural/ProceduralPrefabUiHandler.cpp UI/Notifications/ToastNotificationsView.cpp UI/Notifications/ToastNotificationsView.h UI/Notifications/ToastBus.h diff --git a/Code/Framework/AzToolsFramework/Tests/ComponentAddRemove.cpp b/Code/Framework/AzToolsFramework/Tests/ComponentAddRemove.cpp index 06353b17c5..730e7a7309 100644 --- a/Code/Framework/AzToolsFramework/Tests/ComponentAddRemove.cpp +++ b/Code/Framework/AzToolsFramework/Tests/ComponentAddRemove.cpp @@ -578,7 +578,6 @@ namespace UnitTest AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); AzFramework::Application::Descriptor descriptor; - descriptor.m_enableDrilling = false; m_app.Start(descriptor); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Framework/AzToolsFramework/Tests/Entity/ReadOnly/ReadOnlyEntityFixture.cpp b/Code/Framework/AzToolsFramework/Tests/Entity/ReadOnly/ReadOnlyEntityFixture.cpp new file mode 100644 index 0000000000..d80ecebce0 --- /dev/null +++ b/Code/Framework/AzToolsFramework/Tests/Entity/ReadOnly/ReadOnlyEntityFixture.cpp @@ -0,0 +1,125 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +#include + +namespace AzToolsFramework +{ + void ReadOnlyEntityFixture::SetUpEditorFixtureImpl() + { + // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is + // shared across the whole engine, if multiple tests are run in parallel, the saving could cause a crash + // in the unit tests. + AZ::UserSettingsComponentRequestBus::Broadcast(&AZ::UserSettingsComponentRequests::DisableSaveOnFinalize); + + m_readOnlyEntityPublicInterface = AZ::Interface::Get(); + ASSERT_TRUE(m_readOnlyEntityPublicInterface != nullptr); + + GenerateTestHierarchy(); + } + + void ReadOnlyEntityFixture::TearDownEditorFixtureImpl() + { + } + + void ReadOnlyEntityFixture::GenerateTestHierarchy() + { + /* + * Root + * |_ Child + * |_ GrandChild1 + * |_ GrandChild2 + */ + + m_entityMap[RootEntityName] = CreateEditorEntity(RootEntityName, AZ::EntityId()); + m_entityMap[ChildEntityName] = CreateEditorEntity(ChildEntityName, m_entityMap[RootEntityName]); + m_entityMap[GrandChild1EntityName] = CreateEditorEntity(GrandChild1EntityName, m_entityMap[ChildEntityName]); + m_entityMap[GrandChild2EntityName] = CreateEditorEntity(GrandChild2EntityName, m_entityMap[ChildEntityName]); + } + + AZ::EntityId ReadOnlyEntityFixture::CreateEditorEntity(const char* name, AZ::EntityId parentId) + { + AZ::Entity* entity = nullptr; + UnitTest::CreateDefaultEditorEntity(name, &entity); + + // Parent + AZ::TransformBus::Event(entity->GetId(), &AZ::TransformInterface::SetParent, parentId); + + return entity->GetId(); + } + + ReadOnlyHandlerAlwaysTrue::ReadOnlyHandlerAlwaysTrue() + { + auto editorEntityContextId = AzFramework::EntityContextId::CreateNull(); + EditorEntityContextRequestBus::BroadcastResult(editorEntityContextId, &EditorEntityContextRequests::GetEditorEntityContextId); + + ReadOnlyEntityQueryRequestBus::Handler::BusConnect(editorEntityContextId); + } + + ReadOnlyHandlerAlwaysTrue::~ReadOnlyHandlerAlwaysTrue() + { + ReadOnlyEntityQueryRequestBus::Handler::BusDisconnect(); + + if (auto readOnlyEntityQueryInterface = AZ::Interface::Get()) + { + readOnlyEntityQueryInterface->RefreshReadOnlyStateForAllEntities(); + } + } + + void ReadOnlyHandlerAlwaysTrue::IsReadOnly([[maybe_unused]] const AZ::EntityId& entityId, bool& isReadOnly) + { + isReadOnly = true; + } + + ReadOnlyHandlerAlwaysFalse::ReadOnlyHandlerAlwaysFalse() + { + auto editorEntityContextId = AzFramework::EntityContextId::CreateNull(); + EditorEntityContextRequestBus::BroadcastResult(editorEntityContextId, &EditorEntityContextRequests::GetEditorEntityContextId); + + ReadOnlyEntityQueryRequestBus::Handler::BusConnect(editorEntityContextId); + } + + ReadOnlyHandlerAlwaysFalse::~ReadOnlyHandlerAlwaysFalse() + { + ReadOnlyEntityQueryRequestBus::Handler::BusDisconnect(); + + if (auto readOnlyEntityQueryInterface = AZ::Interface::Get()) + { + readOnlyEntityQueryInterface->RefreshReadOnlyStateForAllEntities(); + } + } + + ReadOnlyHandlerEntityId::ReadOnlyHandlerEntityId(AZ::EntityId entityId) + : m_entityId(entityId) + { + auto editorEntityContextId = AzFramework::EntityContextId::CreateNull(); + EditorEntityContextRequestBus::BroadcastResult(editorEntityContextId, &EditorEntityContextRequests::GetEditorEntityContextId); + + ReadOnlyEntityQueryRequestBus::Handler::BusConnect(editorEntityContextId); + } + + ReadOnlyHandlerEntityId::~ReadOnlyHandlerEntityId() + { + ReadOnlyEntityQueryRequestBus::Handler::BusDisconnect(); + + if (auto readOnlyEntityQueryInterface = AZ::Interface::Get()) + { + readOnlyEntityQueryInterface->RefreshReadOnlyStateForAllEntities(); + } + } + + void ReadOnlyHandlerEntityId::IsReadOnly(const AZ::EntityId& entityId, bool& isReadOnly) + { + if (entityId == m_entityId) + { + isReadOnly = true; + } + } +} diff --git a/Code/Framework/AzToolsFramework/Tests/Entity/ReadOnly/ReadOnlyEntityFixture.h b/Code/Framework/AzToolsFramework/Tests/Entity/ReadOnly/ReadOnlyEntityFixture.h new file mode 100644 index 0000000000..72fff56c6a --- /dev/null +++ b/Code/Framework/AzToolsFramework/Tests/Entity/ReadOnly/ReadOnlyEntityFixture.h @@ -0,0 +1,78 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include + +#include + +#include +#include +#include + +namespace AzToolsFramework +{ + class ReadOnlyEntityFixture + : public UnitTest::ToolsApplicationFixture + { + protected: + void SetUpEditorFixtureImpl() override; + void TearDownEditorFixtureImpl() override; + + void GenerateTestHierarchy(); + AZ::EntityId CreateEditorEntity(const char* name, AZ::EntityId parentId); + + AZStd::unordered_map m_entityMap; + + ReadOnlyEntityPublicInterface* m_readOnlyEntityPublicInterface = nullptr; + + public: + inline static const char* RootEntityName = "Root"; + inline static const char* ChildEntityName = "Child"; + inline static const char* GrandChild1EntityName = "GrandChild1"; + inline static const char* GrandChild2EntityName = "GrandChild2"; + }; + + class ReadOnlyHandlerAlwaysTrue + : public ReadOnlyEntityQueryRequestBus::Handler + { + public: + ReadOnlyHandlerAlwaysTrue(); + ~ReadOnlyHandlerAlwaysTrue(); + + // ReadOnlyEntityQueryNotificationBus overrides ... + void IsReadOnly(const AZ::EntityId& entityId, bool& isReadOnly) override; + }; + + class ReadOnlyHandlerAlwaysFalse + : public ReadOnlyEntityQueryRequestBus::Handler + { + public: + ReadOnlyHandlerAlwaysFalse(); + ~ReadOnlyHandlerAlwaysFalse(); + + // ReadOnlyEntityQueryNotificationBus overrides ... + void IsReadOnly([[maybe_unused]] const AZ::EntityId& entityId, [[maybe_unused]] bool& isReadOnly) override {} + }; + + class ReadOnlyHandlerEntityId + : public ReadOnlyEntityQueryRequestBus::Handler + { + public: + ReadOnlyHandlerEntityId(AZ::EntityId entityId); + ~ReadOnlyHandlerEntityId(); + + // ReadOnlyEntityQueryNotificationBus overrides ... + void IsReadOnly(const AZ::EntityId& entityId, bool& isReadOnly) override; + + private: + AZ::EntityId m_entityId; + }; +} diff --git a/Code/Framework/AzToolsFramework/Tests/Entity/ReadOnly/ReadOnlyEntityTests.cpp b/Code/Framework/AzToolsFramework/Tests/Entity/ReadOnly/ReadOnlyEntityTests.cpp new file mode 100644 index 0000000000..69a130b33f --- /dev/null +++ b/Code/Framework/AzToolsFramework/Tests/Entity/ReadOnly/ReadOnlyEntityTests.cpp @@ -0,0 +1,117 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +namespace AzToolsFramework +{ + TEST_F(ReadOnlyEntityFixture, NoHandlerEntityIsNotReadOnlyByDefault) + { + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[ChildEntityName])); + } + + TEST_F(ReadOnlyEntityFixture, SingleHandlerEntityIsReadOnly) + { + // Create a handler that sets all entities to read-only. + ReadOnlyHandlerAlwaysTrue alwaysTrueHandler; + + // All entities should be marked read-only now. + EXPECT_TRUE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[RootEntityName])); + EXPECT_TRUE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[ChildEntityName])); + EXPECT_TRUE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[GrandChild1EntityName])); + EXPECT_TRUE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[GrandChild2EntityName])); + } + + TEST_F(ReadOnlyEntityFixture, SingleHandlerEntityIsNotReadOnly) + { + // Create a handler that sets all entities to read-only. + ReadOnlyHandlerAlwaysFalse alwaysFalseHandler; + + // All entities should not be marked read-only now. + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[RootEntityName])); + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[ChildEntityName])); + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[GrandChild1EntityName])); + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[GrandChild2EntityName])); + } + + TEST_F(ReadOnlyEntityFixture, SingleHandlerWithLogic) + { + // Create a handler that sets just the child entity to read-only. + ReadOnlyHandlerEntityId entityIdHandler(m_entityMap[ChildEntityName]); + + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[RootEntityName])); + EXPECT_TRUE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[ChildEntityName])); + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[GrandChild1EntityName])); + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[GrandChild2EntityName])); + } + + TEST_F(ReadOnlyEntityFixture, TwoHandlersCanOverlap) + { + // Create two handlers that set different entities to read-only. + ReadOnlyHandlerEntityId entityIdHandler1(m_entityMap[ChildEntityName]); + ReadOnlyHandlerEntityId entityIdHandler2(m_entityMap[GrandChild2EntityName]); + + // Both entities should be marked as read-only, while others aren't. + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[RootEntityName])); + EXPECT_TRUE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[ChildEntityName])); + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[GrandChild1EntityName])); + EXPECT_TRUE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[GrandChild2EntityName])); + } + + TEST_F(ReadOnlyEntityFixture, EnsureCacheIsRefreshedCorrectly) + { + // Verify the child entity is not marked as read-only + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[ChildEntityName])); + + // Create a handler that sets the child entity to read-only. + ReadOnlyHandlerEntityId entityIdHandler(m_entityMap[ChildEntityName]); + + // Communicate to the ReadOnlyEntitySystemComponent that the read-only state for the child entity may have changed. + // Note that this operation would usually be executed by the handler, hence the Query interface call. + if (auto readOnlyEntityQueryInterface = AZ::Interface::Get()) + { + readOnlyEntityQueryInterface->RefreshReadOnlyState({ m_entityMap[ChildEntityName] }); + } + + // Verify the child entity is marked as read-only + EXPECT_TRUE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[ChildEntityName])); + } + + TEST_F(ReadOnlyEntityFixture, EnsureCacheIsClearedCorrectly) + { + { + // Create a handler that sets the child entity to read-only. + ReadOnlyHandlerEntityId entityIdHandler(m_entityMap[ChildEntityName]); + + // Verify the child entity is marked as read-only + EXPECT_TRUE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[ChildEntityName])); + } + // When the handler goes out of scope, it calls RefreshReadOnlyStateForAllEntities and refreshes the cache. + + // Verify the child entity is no longer marked as read-only + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[ChildEntityName])); + } + + TEST_F(ReadOnlyEntityFixture, EnsureCacheIsClearedCorrectlyEvenIfUnchanged) + { + // Create a handler that sets all entities to read-only. + ReadOnlyHandlerAlwaysTrue alwaysTrueHandler; + + { + // Create a handler that sets the child entity to read-only. + ReadOnlyHandlerEntityId entityIdHandler(m_entityMap[ChildEntityName]); + + // Verify the child entity is marked as read-only + EXPECT_TRUE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[ChildEntityName])); + } + // When the handler goes out of scope, it calls RefreshReadOnlyStateForAllEntities and refreshes the cache. + + // Verify the child entity is still marked as read-only + EXPECT_TRUE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[ChildEntityName])); + } +} diff --git a/Code/Framework/AzToolsFramework/Tests/EntityOwnershipService/EntityOwnershipServiceTestFixture.cpp b/Code/Framework/AzToolsFramework/Tests/EntityOwnershipService/EntityOwnershipServiceTestFixture.cpp index 646576a8c9..9cfb918758 100644 --- a/Code/Framework/AzToolsFramework/Tests/EntityOwnershipService/EntityOwnershipServiceTestFixture.cpp +++ b/Code/Framework/AzToolsFramework/Tests/EntityOwnershipService/EntityOwnershipServiceTestFixture.cpp @@ -19,7 +19,6 @@ namespace UnitTest AllocatorsTestFixture::SetUp(); AZ::ComponentApplication::Descriptor componentApplicationDescriptor; componentApplicationDescriptor.m_useExistingAllocator = true; - componentApplicationDescriptor.m_enableDrilling = false; // we already created a memory driller for the test(AllocatorsTestFixture) m_app = AZStd::make_unique(); m_app->Start(componentApplicationDescriptor); diff --git a/Code/Framework/AzToolsFramework/Tests/EntityTestbed.h b/Code/Framework/AzToolsFramework/Tests/EntityTestbed.h index 1bf51045c0..b100e78f6c 100644 --- a/Code/Framework/AzToolsFramework/Tests/EntityTestbed.h +++ b/Code/Framework/AzToolsFramework/Tests/EntityTestbed.h @@ -163,7 +163,6 @@ namespace UnitTest void SetupComponentApplication() { AZ::ComponentApplication::Descriptor desc; - desc.m_enableDrilling = true; desc.m_allocationRecords = true; desc.m_recordingMode = AZ::Debug::AllocationRecords::RECORD_FULL; desc.m_stackRecordLevels = 10; diff --git a/Code/Framework/AzToolsFramework/Tests/ManipulatorViewTests.cpp b/Code/Framework/AzToolsFramework/Tests/ManipulatorViewTests.cpp index 11ec33a995..5f02d9da9c 100644 --- a/Code/Framework/AzToolsFramework/Tests/ManipulatorViewTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/ManipulatorViewTests.cpp @@ -7,12 +7,16 @@ */ #include +#include +#include +#include +#include #include #include -#include +#include #include -#include - +#include +#include #include #include #include @@ -21,8 +25,7 @@ namespace UnitTest { using namespace AzToolsFramework; - class ManipulatorViewTest - : public AllocatorsTestFixture + class ManipulatorViewTest : public AllocatorsTestFixture { AZStd::unique_ptr m_serializeContext; @@ -32,7 +35,7 @@ namespace UnitTest m_serializeContext = AZStd::make_unique(); m_app.Start(AzFramework::Application::Descriptor()); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is - // shared across the whole engine, if multiple tests are run in parallel, the saving could cause a crash + // shared across the whole engine, if multiple tests are run in parallel, the saving could cause a crash // in the unit tests. AZ::UserSettingsComponentRequestBus::Broadcast(&AZ::UserSettingsComponentRequests::DisableSaveOnFinalize); } @@ -51,12 +54,9 @@ namespace UnitTest /////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Given const AZ::Transform orientation = - AZ::Transform::CreateFromQuaternion( - AZ::Quaternion::CreateFromAxisAngle( - AZ::Vector3::CreateAxisX(), AZ::DegToRad(-90.0f))); + AZ::Transform::CreateFromQuaternion(AZ::Quaternion::CreateRotationX(AZ::DegToRad(-90.0f))); - const AZ::Transform translation = - AZ::Transform::CreateTranslation(AZ::Vector3(5.0f, 0.0f, 10.0f)); + const AZ::Transform translation = AZ::Transform::CreateTranslation(AZ::Vector3(5.0f, 0.0f, 10.0f)); const AZ::Transform manipulatorSpace = translation * orientation; // create a rotation manipulator in an arbitrary space @@ -67,8 +67,7 @@ namespace UnitTest // When const AZ::Vector3 worldCameraPosition = AZ::Vector3(5.0f, -10.0f, 10.0f); // transform the view direction to the space of the manipulator (space + local transform) - const AZ::Vector3 viewDirection = - CalculateViewDirection(rotationManipulators, worldCameraPosition); + const AZ::Vector3 viewDirection = CalculateViewDirection(rotationManipulators, worldCameraPosition); /////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -84,8 +83,7 @@ namespace UnitTest cameraState.m_position = AZ::Vector3::CreateAxisY(20.0f); cameraState.m_forward = -AZ::Vector3::CreateAxisY(); - const float scale = - AzToolsFramework::CalculateScreenToWorldMultiplier(AZ::Vector3::CreateZero(), cameraState); + const float scale = AzToolsFramework::CalculateScreenToWorldMultiplier(AZ::Vector3::CreateZero(), cameraState); EXPECT_NEAR(scale, 2.0f, std::numeric_limits::epsilon()); } @@ -96,9 +94,57 @@ namespace UnitTest cameraState.m_position = AZ::Vector3::CreateAxisY(20.0f); cameraState.m_forward = -AZ::Vector3::CreateAxisY(); - const float scale = - AzToolsFramework::CalculateScreenToWorldMultiplier(AZ::Vector3::CreateAxisX(-10.0f), cameraState); + const float scale = AzToolsFramework::CalculateScreenToWorldMultiplier(AZ::Vector3::CreateAxisX(-10.0f), cameraState); EXPECT_NEAR(scale, 2.0f, std::numeric_limits::epsilon()); } + + TEST_F(ManipulatorViewTest, ManipulatorViewQuadDrawsAtCorrectPositionWhenManipulatorSpaceIsScaledUniformlyAndNonUniformly) + { + // Given + // simulate a custom manipulator space (e.g. entity transform) and a local offset within that space (e.g. spline vertex position) + const AZ::Transform space = + AZ::Transform::CreateTranslation(AZ::Vector3(2.0f, -3.0f, -4.0f)) * AZ::Transform::CreateUniformScale(2.0f); + const AZ::Vector3 localPosition = AZ::Vector3(2.0f, -2.0f, 0.0f); + const AZ::Vector3 nonUniformScale = AZ::Vector3(2.0f, 3.0f, 4.0f); + const AZ::Transform combinedTransform = + AzToolsFramework::ApplySpace(AZ::Transform::CreateTranslation(localPosition), space, nonUniformScale); + + // create a manipulator state based on the space and local position + AzToolsFramework::ManipulatorState manipulatorState{}; + manipulatorState.m_worldFromLocal = combinedTransform; + manipulatorState.m_nonUniformScale = nonUniformScale; + // note: This is zero as the localPosition is already encoded in the combinedTransform + manipulatorState.m_localPosition = AZ::Vector3::CreateZero(); + + // camera (go to position format) - 10.00, -15.00, 6.00, -90.00, 0.00 + const AzFramework::CameraState cameraState = AzFramework::CreateDefaultCamera( + AZ::Transform::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationX(AZ::DegToRad(-90.0f)), AZ::Vector3(10.0f, -15.0f, 6.0f)), + AZ::Vector2(1280, 720)); + + // test debug display instance to record vertices that were output + auto testDebugDisplayRequests = AZStd::make_shared(); + auto planarTranslationViewQuad = CreateManipulatorViewQuadForPlanarTranslationManipulator( + AZ::Vector3::CreateAxisX(), AZ::Vector3::CreateAxisY(), AZ::Color::CreateZero(), AZ::Color::CreateZero(), 2.2f, 0.2f, 1.0f); + + // When + // draw the quad as it would be for a manipulator + planarTranslationViewQuad->Draw( + AzToolsFramework::ManipulatorManagerId(1), AzToolsFramework::ManipulatorManagerState{ false }, + AzToolsFramework::ManipulatorId(1), manipulatorState, *testDebugDisplayRequests, cameraState, + AzToolsFramework::ViewportInteraction::MouseInteraction{}); + + const AZStd::vector expectedDisplayPositions = { + AZ::Vector3(10.5f, -13.5f, -4.0f), AZ::Vector3(11.5f, -13.5f, -4.0f), AZ::Vector3(10.5f, -14.5f, -4.0f), + AZ::Vector3(11.5f, -14.5f, -4.0f), AZ::Vector3(10.5f, -13.5f, -4.0f), AZ::Vector3(10.5f, -14.5f, -4.0f), + AZ::Vector3(11.5f, -14.5f, -4.0f), AZ::Vector3(11.5f, -13.5f, -4.0f) + }; + + // Then + const auto points = testDebugDisplayRequests->GetPoints(); + // quad vertices appear in the expected position (not offset or scaled incorrectly by space scale) + using ::testing::UnorderedPointwise; + EXPECT_THAT(points, UnorderedPointwise(ContainerIsClose(), expectedDisplayPositions)); + } } // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabAssetFixupTests.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabAssetFixupTests.cpp new file mode 100644 index 0000000000..379392553e --- /dev/null +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabAssetFixupTests.cpp @@ -0,0 +1,185 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include + +namespace UnitTest +{ + using PrefabInstantiateTest = PrefabTestFixture; + + struct MockAsset : AZ::Data::AssetData + { + AZ_RTTI(MockAsset, "{DAB98A3F-1714-4B95-AACB-8C150B0D0628}", AZ::Data::AssetData); + + AZ_CLASS_ALLOCATOR(MockAsset, AZ::SystemAllocator, 0); + + static void Reflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context)) + { + serializeContext->Class()->Field("data", &MockAsset::m_data); + } + } + float m_data = 1.f; + }; + + struct MockAssetComponent : AZ::Component + { + AZ_COMPONENT(MockAssetComponent, "{D81B0D06-B495-479E-832A-A63079FD6D37}"); + + static void Reflect(AZ::ReflectContext* context) + { + MockAsset::Reflect(context); + + if (auto serializeContext = azrtti_cast(context)) + { + serializeContext->Class() + ->Field("asset", &MockAssetComponent::m_asset); + } + } + + void Activate() override{} + void Deactivate() override{} + + AZ::Data::Asset m_asset; + }; + + class MockAssetHandler : public AZ::Data::AssetHandler + { + public: + AZ_CLASS_ALLOCATOR(MockAssetHandler, AZ::SystemAllocator, 0); + + AZ::Data::AssetPtr CreateAsset(const AZ::Data::AssetId& id, const AZ::Data::AssetType& type) override + { + (void)id; + EXPECT_TRUE(type == azrtti_typeid()); + if (type == azrtti_typeid()) + { + return aznew MockAsset(); + } + return nullptr; + } + + LoadResult LoadAssetData(const AZ::Data::Asset&, AZStd::shared_ptr, const AZ::Data::AssetFilterCB&) override + { + return LoadResult::Error; + } + + void DestroyAsset(AZ::Data::AssetPtr ptr) override + { + EXPECT_TRUE(ptr->GetType() == azrtti_typeid()); + delete ptr; + } + + void GetHandledAssetTypes(AZStd::vector& assetTypes) override + { + assetTypes.push_back(azrtti_typeid()); + } + }; + + struct PrefabFixupTest : PrefabInstantiateTest + { + void SetUpEditorFixtureImpl() override + { + PrefabInstantiateTest::SetUpEditorFixtureImpl(); + + AZ::SerializeContext* context = nullptr; + + AZ::ComponentApplicationBus::BroadcastResult(context, &AZ::ComponentApplicationBus::Events::GetSerializeContext); + + ASSERT_NE(context, nullptr); + + MockAssetComponent::Reflect(context); + + AZ::Data::AssetManager::Instance().RegisterHandler(&m_handler, azrtti_typeid()); + + auto entity = aznew AZ::Entity(); + auto mockAssetComponent = entity->CreateComponent(); + + mockAssetComponent->m_asset = + AZ::Data::Asset(AZ::Uuid::CreateNull(), AZ::Data::AssetType::CreateNull(), "test.asset"); + + auto newInstance = AZ::Interface::Get()->CreatePrefab({ entity }, {}, "test.prefab"); + + AZStd::string prefabString; + ASSERT_TRUE(m_prefabLoaderInterface->SaveTemplateToString(newInstance->GetTemplateId(), prefabString)); + m_prefabSystemComponent->RemoveAllTemplates(); + + AZ::Outcome readPrefabFileResult = AZ::JsonSerializationUtils::ReadJsonString(prefabString); + + ASSERT_TRUE(readPrefabFileResult.IsSuccess()); + + AZ::Data::AssetCatalogRequestBus::BroadcastResult( + m_assetId, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetIdByPath, "test.asset", azrtti_typeid(), + true); // True to register the asset and generate an AssetId for lookup + + m_prefabDom = readPrefabFileResult.TakeValue(); + } + + void TearDownEditorFixtureImpl() override + { + PrefabInstantiateTest::TearDownEditorFixtureImpl(); + + AZ::Data::AssetManager::Instance().UnregisterHandler(&m_handler); + } + + void CheckInstance(const Instance& instance) + { + const AZ::Entity* loadedEntity = nullptr; + instance.GetConstEntities( + [&loadedEntity](const AZ::Entity& entity) + { + loadedEntity = &entity; + + return false; + }); + + auto loadedComponent = loadedEntity->FindComponent(); + + ASSERT_NE(loadedComponent, nullptr); + + ASSERT_STREQ(loadedComponent->m_asset.GetHint().c_str(), "test.asset"); + ASSERT_EQ(loadedComponent->m_asset->GetId(), m_assetId); + } + + MockAssetHandler m_handler; + PrefabDom m_prefabDom; + AZ::Data::AssetId m_assetId; + }; + + TEST_F(PrefabFixupTest, Test_LoadInstanceFromPrefabDom_Overload1) + { + Instance instance; + ASSERT_TRUE(PrefabDomUtils::LoadInstanceFromPrefabDom(instance, m_prefabDom)); + + CheckInstance(instance); + } + + TEST_F(PrefabFixupTest, Test_LoadInstanceFromPrefabDom_Overload2) + { + Instance instance; + AZStd::vector> referencedAssets; + ASSERT_TRUE(PrefabDomUtils::LoadInstanceFromPrefabDom(instance, m_prefabDom, referencedAssets)); + + CheckInstance(instance); + } + + TEST_F(PrefabFixupTest, Test_LoadInstanceFromPrefabDom_Overload3) + { + Instance instance; + AZStd::vector> referencedAssets; + Instance::EntityList entityList; + (PrefabDomUtils::LoadInstanceFromPrefabDom(instance, entityList, m_prefabDom)); + + CheckInstance(instance); + } +} diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabDeleteTests.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabDeleteTests.cpp new file mode 100644 index 0000000000..0ef328b2ca --- /dev/null +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabDeleteTests.cpp @@ -0,0 +1,150 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include + +#include +#include +#include + +namespace UnitTest +{ + using PrefabDeleteTest = PrefabTestFixture; + + TEST_F(PrefabDeleteTest, DeleteEntitiesInInstance_DeleteSingleEntitySucceeds) + { + PrefabEntityResult createEntityResult = m_prefabPublicInterface->CreateEntity(AZ::EntityId(), AZ::Vector3()); + + // Verify that a valid entity is created. + AZ::EntityId testEntityId = createEntityResult.GetValue(); + ASSERT_TRUE(testEntityId.IsValid()); + AZ::Entity* testEntity = AzToolsFramework::GetEntityById(testEntityId); + ASSERT_TRUE(testEntity != nullptr); + + m_prefabPublicInterface->DeleteEntitiesInInstance(AzToolsFramework::EntityIdList{ testEntityId }); + + // Verify that entity can't be found after deletion. + testEntity = AzToolsFramework::GetEntityById(testEntityId); + EXPECT_TRUE(testEntity == nullptr); + } + + TEST_F(PrefabDeleteTest, DeleteEntitiesInInstance_DeleteSinglePrefabSucceeds) + { + PrefabEntityResult createEntityResult = m_prefabPublicInterface->CreateEntity(AZ::EntityId(), AZ::Vector3()); + + // Verify that a valid entity is created. + AZ::EntityId createdEntityId = createEntityResult.GetValue(); + ASSERT_TRUE(createdEntityId.IsValid()); + AZ::Entity* createdEntity = AzToolsFramework::GetEntityById(createdEntityId); + ASSERT_TRUE(createdEntity != nullptr); + + // Rather than hardcode a path, use a path from settings registry since that will work on all platforms. + AZ::SettingsRegistryInterface* registry = AZ::SettingsRegistry::Get(); + AZ::IO::FixedMaxPath path; + registry->Get(path.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + CreatePrefabResult createPrefabResult = + m_prefabPublicInterface->CreatePrefabInMemory(AzToolsFramework::EntityIdList{ createdEntityId }, path); + + AZ::EntityId createdPrefabContainerId = createPrefabResult.GetValue(); + ASSERT_TRUE(createdPrefabContainerId.IsValid()); + AZ::Entity* prefabContainerEntity = AzToolsFramework::GetEntityById(createdPrefabContainerId); + ASSERT_TRUE(prefabContainerEntity != nullptr); + + // Verify that the prefab container entity and the entity within are deleted. + m_prefabPublicInterface->DeleteEntitiesInInstance(AzToolsFramework::EntityIdList{ createdPrefabContainerId }); + prefabContainerEntity = AzToolsFramework::GetEntityById(createdPrefabContainerId); + EXPECT_TRUE(prefabContainerEntity == nullptr); + createdEntity = AzToolsFramework::GetEntityById(createdEntityId); + EXPECT_TRUE(createdEntity == nullptr); + } + + TEST_F(PrefabDeleteTest, DeleteEntitiesAndAllDescendantsInInstance_DeletingEntityDeletesChildEntityToo) + { + PrefabEntityResult parentEntityCreationResult = m_prefabPublicInterface->CreateEntity(AZ::EntityId(), AZ::Vector3()); + + // Verify that valid parent entity is created. + AZ::EntityId parentEntityId = parentEntityCreationResult.GetValue(); + ASSERT_TRUE(parentEntityId.IsValid()); + AZ::Entity* parentEntity = AzToolsFramework::GetEntityById(parentEntityId); + ASSERT_TRUE(parentEntity != nullptr); + + // Verify that valid child entity is created. + PrefabEntityResult childEntityCreationResult = m_prefabPublicInterface->CreateEntity(parentEntityId, AZ::Vector3()); + AZ::EntityId childEntityId = childEntityCreationResult.GetValue(); + ASSERT_TRUE(childEntityId.IsValid()); + AZ::Entity* childEntity = AzToolsFramework::GetEntityById(childEntityId); + ASSERT_TRUE(childEntity != nullptr); + + // PrefabTestFixture won't add required editor components by default. Hence we add them here. + AddRequiredEditorComponents(childEntity); + AddRequiredEditorComponents(parentEntity); + + // Parent the child entity under the parent entity. + AZ::TransformBus::Event(childEntityId, &AZ::TransformBus::Events::SetParent, parentEntityId); + + // Delete parent entity and its children. + m_prefabPublicInterface->DeleteEntitiesAndAllDescendantsInInstance(AzToolsFramework::EntityIdList{ parentEntityId }); + + // Verify that both the parent and child entities are deleted. + parentEntity = AzToolsFramework::GetEntityById(parentEntityId); + EXPECT_TRUE(parentEntity == nullptr); + childEntity = AzToolsFramework::GetEntityById(childEntityId); + EXPECT_TRUE(childEntity == nullptr); + } + + TEST_F(PrefabDeleteTest, DeleteEntitiesAndAllDescendantsInInstance_DeletingEntityDeletesChildPrefabToo) + { + PrefabEntityResult entityToBePutUnderPrefabResult = m_prefabPublicInterface->CreateEntity(AZ::EntityId(), AZ::Vector3()); + + // Verify that a valid entity is created that will be put in a prefab later. + AZ::EntityId entityToBePutUnderPrefabId = entityToBePutUnderPrefabResult.GetValue(); + ASSERT_TRUE(entityToBePutUnderPrefabId.IsValid()); + AZ::Entity* entityToBePutUnderPrefab = AzToolsFramework::GetEntityById(entityToBePutUnderPrefabId); + ASSERT_TRUE(entityToBePutUnderPrefab != nullptr); + + // Verify that a valid parent entity is created. + PrefabEntityResult parentEntityCreationResult = m_prefabPublicInterface->CreateEntity(AZ::EntityId(), AZ::Vector3()); + AZ::EntityId parentEntityId = parentEntityCreationResult.GetValue(); + ASSERT_TRUE(parentEntityId.IsValid()); + AZ::Entity* parentEntity = AzToolsFramework::GetEntityById(parentEntityId); + ASSERT_TRUE(parentEntity != nullptr); + + // Rather than hardcode a path, use a path from settings registry since that will work on all platforms. + AZ::SettingsRegistryInterface* registry = AZ::SettingsRegistry::Get(); + AZ::IO::FixedMaxPath path; + registry->Get(path.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + CreatePrefabResult createPrefabResult = + m_prefabPublicInterface->CreatePrefabInMemory(AzToolsFramework::EntityIdList{ entityToBePutUnderPrefabId }, path); + + // Verify that a valid prefab container entity is created. + AZ::EntityId createdPrefabContainerId = createPrefabResult.GetValue(); + ASSERT_TRUE(createdPrefabContainerId.IsValid()); + AZ::Entity* prefabContainerEntity = AzToolsFramework::GetEntityById(createdPrefabContainerId); + ASSERT_TRUE(prefabContainerEntity != nullptr); + + // PrefabTestFixture won't add required editor components by default. Hence we add them here. + AddRequiredEditorComponents(parentEntity); + AddRequiredEditorComponents(prefabContainerEntity); + + // Parent the prefab under the parent entity. + AZ::TransformBus::Event(createdPrefabContainerId, &AZ::TransformBus::Events::SetParent, parentEntityId); + + // Delete the parent entity. + m_prefabPublicInterface->DeleteEntitiesAndAllDescendantsInInstance(AzToolsFramework::EntityIdList{ parentEntityId }); + + // Validate that the parent and the prefab under it and the entity inside the prefab are all deleted. + parentEntity = AzToolsFramework::GetEntityById(parentEntityId); + ASSERT_TRUE(parentEntity == nullptr); + entityToBePutUnderPrefab = AzToolsFramework::GetEntityById(entityToBePutUnderPrefabId); + ASSERT_TRUE(entityToBePutUnderPrefab == nullptr); + prefabContainerEntity = AzToolsFramework::GetEntityById(createdPrefabContainerId); + EXPECT_TRUE(prefabContainerEntity == nullptr); + } +} // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.cpp index ed30de09c4..3067f66aa0 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.cpp @@ -11,6 +11,8 @@ #include #include #include +#include +#include #include #include @@ -50,6 +52,15 @@ namespace UnitTest GetApplication()->RegisterComponentDescriptor(PrefabTestComponent::CreateDescriptor()); GetApplication()->RegisterComponentDescriptor(PrefabTestComponentWithUnReflectedTypeMember::CreateDescriptor()); + + AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult( + m_undoStack, &AzToolsFramework::ToolsApplicationRequestBus::Events::GetUndoStack); + AZ_Assert(m_undoStack, "Failed to look up undo stack from tools application"); + } + + void PrefabTestFixture::TearDownEditorFixtureImpl() + { + m_undoStack = nullptr; } AZStd::unique_ptr PrefabTestFixture::CreateTestApplication() @@ -57,7 +68,25 @@ namespace UnitTest return AZStd::make_unique("PrefabTestApplication"); } - AZ::Entity* PrefabTestFixture::CreateEntity(const char* entityName, const bool shouldActivate) + void PrefabTestFixture::CreateRootPrefab() + { + auto entityOwnershipService = AZ::Interface::Get(); + ASSERT_TRUE(entityOwnershipService != nullptr); + entityOwnershipService->CreateNewLevelPrefab("UnitTestRoot.prefab", ""); + auto rootEntityReference = entityOwnershipService->GetRootPrefabInstance()->get().GetContainerEntity(); + ASSERT_TRUE(rootEntityReference.has_value()); + auto& rootEntity = rootEntityReference->get(); + rootEntity.Deactivate(); + rootEntity.CreateComponent(); + rootEntity.Activate(); + } + + void PrefabTestFixture::PropagateAllTemplateChanges() + { + m_prefabSystemComponent->OnSystemTick(); + } + + AZ::Entity* PrefabTestFixture::CreateEntity(AZStd::string entityName, const bool shouldActivate) { // Circumvent the EntityContext system and generate a new entity with a transformcomponent AZ::Entity* newEntity = aznew AZ::Entity(entityName); @@ -71,8 +100,43 @@ namespace UnitTest return newEntity; } + AZ::EntityId PrefabTestFixture::CreateEntityUnderRootPrefab(AZStd::string name, AZ::EntityId parentId) + { + auto createResult = m_prefabPublicInterface->CreateEntity(parentId, AZ::Vector3()); + AZ_Assert(createResult.IsSuccess(), "Failed to create entity: %s", createResult.GetError().c_str()); + AZ::EntityId entityId = createResult.GetValue(); + + AZ::Entity* entity = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(entity, &AZ::ComponentApplicationRequests::FindEntity, entityId); + + entity->Deactivate(); + + entity->SetName(name); + + // Normally, in invalid parent ID should automatically parent us to the root prefab, but currently in the unit test + // environment entities aren't created with a default transform component, so CreateEntity won't correctly parent. + // We get the actual target parent ID here, then create our missing transform component. + if (!parentId.IsValid()) + { + auto prefabEditorEntityOwnershipInterface = AZ::Interface::Get(); + parentId = prefabEditorEntityOwnershipInterface->GetRootPrefabInstance()->get().GetContainerEntityId(); + } + + auto transform = aznew AzToolsFramework::Components::TransformComponent; + transform->SetParent(parentId); + entity->AddComponent(transform); + + entity->Activate(); + + // Update our undo cache entry to include the rename / reparent as one atomic operation. + m_prefabPublicInterface->GenerateUndoNodesForEntityChangeAndUpdateCache(entityId, m_undoStack->GetTop()); + m_prefabSystemComponent->OnSystemTick(); + + return entityId; + } + void PrefabTestFixture::CompareInstances(const AzToolsFramework::Prefab::Instance& instanceA, - const AzToolsFramework::Prefab::Instance& instanceB, bool shouldCompareLinkIds, bool shouldCompareContainerEntities) + const AzToolsFramework::Prefab::Instance& instanceB, bool shouldCompareLinkIds, bool shouldCompareContainerEntities) { AzToolsFramework::Prefab::TemplateId templateAId = instanceA.GetTemplateId(); AzToolsFramework::Prefab::TemplateId templateBId = instanceB.GetTemplateId(); @@ -125,4 +189,31 @@ namespace UnitTest EXPECT_EQ(entityInInstance->GetState(), AZ::Entity::State::Active); } } + + void PrefabTestFixture::ProcessDeferredUpdates() + { + // Force a prefab propagation for updates that are deferred to the next tick. + m_prefabSystemComponent->OnSystemTick(); + } + + void PrefabTestFixture::Undo() + { + m_undoStack->Undo(); + ProcessDeferredUpdates(); + } + + void PrefabTestFixture::Redo() + { + m_undoStack->Redo(); + ProcessDeferredUpdates(); + } + + void PrefabTestFixture::AddRequiredEditorComponents(AZ::Entity* entity) + { + ASSERT_TRUE(entity != nullptr); + entity->Deactivate(); + AzToolsFramework::EditorEntityContextRequestBus::Broadcast( + &AzToolsFramework::EditorEntityContextRequests::AddRequiredComponents, *entity); + entity->Activate(); + } } diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.h b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.h index 0a78ded1a6..a4cc1c8a7a 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.h +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.h @@ -49,10 +49,14 @@ namespace UnitTest inline static const char* CarPrefabMockFilePath = "SomePathToCar"; void SetUpEditorFixtureImpl() override; + void TearDownEditorFixtureImpl() override; AZStd::unique_ptr CreateTestApplication() override; - AZ::Entity* CreateEntity(const char* entityName, const bool shouldActivate = true); + void CreateRootPrefab(); + AZ::Entity* CreateEntity(AZStd::string entityName, const bool shouldActivate = true); + AZ::EntityId CreateEntityUnderRootPrefab(AZStd::string name, AZ::EntityId parentId = AZ::EntityId()); + void PropagateAllTemplateChanges(); void CompareInstances(const Instance& instanceA, const Instance& instanceB, bool shouldCompareLinkIds = true, bool shouldCompareContainerEntities = true); @@ -62,10 +66,22 @@ namespace UnitTest //! Validates that all entities within a prefab instance are in 'Active' state. void ValidateInstanceEntitiesActive(Instance& instance); + // Kicks off any updates scheduled for the next tick + virtual void ProcessDeferredUpdates(); + + // Performs an undo operation and ensures the tick-scheduled updates happen + void Undo(); + + // Performs a redo operation and ensures the tick-scheduled updates happen + void Redo(); + + void AddRequiredEditorComponents(AZ::Entity* entity); + PrefabSystemComponent* m_prefabSystemComponent = nullptr; PrefabLoaderInterface* m_prefabLoaderInterface = nullptr; PrefabPublicInterface* m_prefabPublicInterface = nullptr; InstanceUpdateExecutorInterface* m_instanceUpdateExecutorInterface = nullptr; InstanceToTemplateInterface* m_instanceToTemplateInterface = nullptr; + AzToolsFramework::UndoSystem::UndoStack* m_undoStack = nullptr; }; } diff --git a/Code/Framework/AzToolsFramework/Tests/Script/ScriptComponentTests.cpp b/Code/Framework/AzToolsFramework/Tests/Script/ScriptComponentTests.cpp index 93d108de85..f480621a40 100644 --- a/Code/Framework/AzToolsFramework/Tests/Script/ScriptComponentTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Script/ScriptComponentTests.cpp @@ -31,7 +31,7 @@ namespace UnitTest int myReloadValue = 0; class ScriptComponentTest - : public testing::Test + : public UnitTest::ScopedAllocatorSetupFixture { public: AZ_TYPE_INFO(ScriptComponentTest, "{85CDBD49-70FF-416A-8154-B5525EDD30D4}"); diff --git a/Code/Framework/AzToolsFramework/Tests/SliceUpgradeTests.cpp b/Code/Framework/AzToolsFramework/Tests/SliceUpgradeTests.cpp index d0f97e22f3..7a578a2bf3 100644 --- a/Code/Framework/AzToolsFramework/Tests/SliceUpgradeTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/SliceUpgradeTests.cpp @@ -16,6 +16,7 @@ AZ_PUSH_DISABLE_WARNING(,"-Wdelete-non-virtual-dtor") #include #include #include +#include #include #include #include diff --git a/Code/Framework/AzToolsFramework/Tests/TransformComponent.cpp b/Code/Framework/AzToolsFramework/Tests/TransformComponent.cpp index 4fbebc8526..71ce9e3b5f 100644 --- a/Code/Framework/AzToolsFramework/Tests/TransformComponent.cpp +++ b/Code/Framework/AzToolsFramework/Tests/TransformComponent.cpp @@ -18,7 +18,10 @@ #include #include +#include #include +#include +#include #include @@ -43,7 +46,6 @@ namespace UnitTest AllocatorsFixture::SetUp(); ComponentApplication::Descriptor desc; desc.m_useExistingAllocator = true; - desc.m_enableDrilling = false; // we already created a memory driller for the test (AllocatorsFixture) m_app.Start(desc); @@ -1063,4 +1065,67 @@ R"DELIMITER( } } } + + // Fixture provides a root prefab with Transform component and listens for TransformNotificationBus. + class TransformComponentActivationTest + : public PrefabTestFixture + , public TransformNotificationBus::Handler + { + protected: + void SetUpEditorFixtureImpl() override + { + PrefabTestFixture::SetUpEditorFixtureImpl(); + + CreateRootPrefab(); + } + + void TearDownEditorFixtureImpl() override + { + BusDisconnect(); + + PrefabTestFixture::TearDownEditorFixtureImpl(); + } + + void OnTransformChanged(const Transform& /*local*/, const Transform& /*world*/) override + { + m_transformUpdated = true; + } + + void MoveEntity(AZ::EntityId entityId) + { + AzToolsFramework::ScopedUndoBatch undoBatch("Move Entity"); + TransformBus::Event(entityId, &TransformInterface::SetWorldTranslation, Vector3(1.f, 0.f, 0.f)); + } + + bool m_transformUpdated = false; + }; + + TEST_F(TransformComponentActivationTest, TransformChangedEventIsSentWhenEntityIsActivatedViaUndoRedo) + { + AZ::EntityId entityId = CreateEntityUnderRootPrefab("Entity"); + MoveEntity(entityId); + BusConnect(entityId); + + // verify that undoing/redoing move operations fires TransformChanged event + Undo(); + EXPECT_TRUE(m_transformUpdated); + m_transformUpdated = false; + + Redo(); + EXPECT_TRUE(m_transformUpdated); + m_transformUpdated = false; + } + + TEST_F(TransformComponentActivationTest, TransformChangedEventIsNotSentWhenEntityIsDeactivatedAndActivated) + { + AZ::EntityId entityId = CreateEntityUnderRootPrefab("Entity"); + BusConnect(entityId); + + // verify that simply activating/deactivating an entity does not fire TransformChanged event + Entity* entity = nullptr; + ComponentApplicationBus::BroadcastResult(entity, &AZ::ComponentApplicationRequests::FindEntity, entityId); + entity->Deactivate(); + entity->Activate(); + EXPECT_FALSE(m_transformUpdated); + } } // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/UI/EntityOutlinerTests.cpp b/Code/Framework/AzToolsFramework/Tests/UI/EntityOutlinerTests.cpp index 78cdcf9d38..36e2398162 100644 --- a/Code/Framework/AzToolsFramework/Tests/UI/EntityOutlinerTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/UI/EntityOutlinerTests.cpp @@ -37,16 +37,11 @@ namespace UnitTest m_model->Initialize(); m_modelTester = AZStd::make_unique(m_model.get(), QAbstractItemModelTester::FailureReportingMode::Fatal); - - AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult( - m_undoStack, &AzToolsFramework::ToolsApplicationRequestBus::Events::GetUndoStack); - AZ_Assert(m_undoStack, "Failed to look up undo stack from tools application"); - + // Create a new root prefab - the synthetic "NewLevel.prefab" that comes in by default isn't suitable for outliner tests // because it's created before the EditorEntityModel that our EntityOutlinerListModel subscribes to, and we want to // recreate it as part of the fixture regardless. - auto entityOwnershipService = AZ::Interface::Get(); - entityOwnershipService->CreateNewLevelPrefab("UnitTestRoot.prefab", ""); + CreateRootPrefab(); } void TearDownEditorFixtureImpl() override @@ -125,32 +120,17 @@ namespace UnitTest } // Kicks off any updates scheduled for the next tick - void ProcessDeferredUpdates() + void ProcessDeferredUpdates() override { // Force a prefab propagation for updates that are deferred to the next tick. - m_prefabSystemComponent->OnSystemTick(); + PropagateAllTemplateChanges(); // Ensure the model process its entity update queue m_model->ProcessEntityUpdates(); } - - // Performs an undo operation and ensures the tick-scheduled updates happen - void Undo() - { - m_undoStack->Undo(); - ProcessDeferredUpdates(); - } - - // Performs a redo operation and ensures the tick-scheduled updates happen - void Redo() - { - m_undoStack->Redo(); - ProcessDeferredUpdates(); - } - + AZStd::unique_ptr m_model; AZStd::unique_ptr m_modelTester; - AzToolsFramework::UndoSystem::UndoStack* m_undoStack = nullptr; }; TEST_F(EntityOutlinerTest, TestCreateFlatHierarchyUndoAndRedoWorks) diff --git a/Code/Framework/AzToolsFramework/Tests/UI/EntityPropertyEditorTests.cpp b/Code/Framework/AzToolsFramework/Tests/UI/EntityPropertyEditorTests.cpp index a3c6666a40..bf3e6e9787 100644 --- a/Code/Framework/AzToolsFramework/Tests/UI/EntityPropertyEditorTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/UI/EntityPropertyEditorTests.cpp @@ -53,7 +53,6 @@ namespace UnitTest ToolsApplication::Descriptor desc; desc.m_useExistingAllocator = true; - desc.m_enableDrilling = false; ToolsApplication::StartupParameters startupParams; startupParams.m_allocator = &AZ::AllocatorInstance::Get(); diff --git a/Code/Framework/AzToolsFramework/Tests/aztoolsframeworktests_files.cmake b/Code/Framework/AzToolsFramework/Tests/aztoolsframeworktests_files.cmake index 8e0297fb1f..31c70c81a0 100644 --- a/Code/Framework/AzToolsFramework/Tests/aztoolsframeworktests_files.cmake +++ b/Code/Framework/AzToolsFramework/Tests/aztoolsframeworktests_files.cmake @@ -28,6 +28,9 @@ set(FILES Entity/EditorEntitySearchComponentTests.cpp Entity/EditorEntitySelectionTests.cpp Entity/EntityUtilityComponentTests.cpp + Entity/ReadOnly/ReadOnlyEntityFixture.cpp + Entity/ReadOnly/ReadOnlyEntityFixture.h + Entity/ReadOnly/ReadOnlyEntityTests.cpp EntityIdQLabelTests.cpp EntityInspectorTests.cpp EntityOwnershipService/EntityOwnershipServiceTestFixture.cpp @@ -66,11 +69,12 @@ set(FILES Prefab/PrefabFocus/PrefabFocusTests.cpp Prefab/MockPrefabFileIOActionValidator.cpp Prefab/MockPrefabFileIOActionValidator.h + Prefab/PrefabDeleteTests.cpp Prefab/PrefabDuplicateTests.cpp Prefab/PrefabEntityAliasTests.cpp Prefab/PrefabInstanceToTemplatePropagatorTests.cpp Prefab/PrefabInstantiateTests.cpp - Prefab/PrefabInstantiateTests.cpp + Prefab/PrefabAssetFixupTests.cpp Prefab/PrefabLoadTemplateTests.cpp Prefab/PrefabTestComponent.cpp Prefab/PrefabTestComponent.h diff --git a/Code/Framework/GridMate/GridMate/Carrier/Carrier.cpp b/Code/Framework/GridMate/GridMate/Carrier/Carrier.cpp index 2922cc2891..0fcb2e6ba3 100644 --- a/Code/Framework/GridMate/GridMate/Carrier/Carrier.cpp +++ b/Code/Framework/GridMate/GridMate/Carrier/Carrier.cpp @@ -3820,10 +3820,8 @@ CarrierImpl::DisconnectRequest(ConnectionID id, CarrierDisconnectReason reason) case Carrier::CST_CONNECTED: { conn->m_state = Carrier::CST_DISCONNECTING; - EBUS_EVENT(Debug::CarrierDrillerBus, OnConnectionStateChanged, this, conn, conn->m_state); m_handshake->OnDisconnect(conn); EBUS_EVENT_ID(m_gridMate, CarrierEventBus, OnDisconnect, this, id, reason); - EBUS_EVENT(Debug::CarrierDrillerBus, OnDisconnect, this, id, reason); ThreadMessage* ctm = aznew ThreadMessage(CTM_DISCONNECT); ctm->m_connection = conn; @@ -3836,10 +3834,8 @@ CarrierImpl::DisconnectRequest(ConnectionID id, CarrierDisconnectReason reason) case Carrier::CST_CONNECTING: { conn->m_state = Carrier::CST_DISCONNECTING; - EBUS_EVENT(Debug::CarrierDrillerBus, OnConnectionStateChanged, this, id, conn->m_state); m_handshake->OnDisconnect(conn); EBUS_EVENT_ID(m_gridMate, CarrierEventBus, OnFailedToConnect, this, id, reason); - EBUS_EVENT(Debug::CarrierDrillerBus, OnFailedToConnect, this, id, reason); ThreadMessage* ctm = aznew ThreadMessage(CTM_DISCONNECT); ctm->m_connection = conn; @@ -3873,13 +3869,11 @@ CarrierImpl::DeleteConnection(Connection* conn, CarrierDisconnectReason reason) { m_handshake->OnDisconnect(conn); EBUS_EVENT_ID(m_gridMate, CarrierEventBus, OnDisconnect, this, conn, reason); - EBUS_EVENT(Debug::CarrierDrillerBus, OnDisconnect, this, conn, reason); } break; case Carrier::CST_CONNECTING: { m_handshake->OnDisconnect(conn); EBUS_EVENT_ID(m_gridMate, CarrierEventBus, OnFailedToConnect, this, conn, reason); - EBUS_EVENT(Debug::CarrierDrillerBus, OnFailedToConnect, this, conn, reason); } break; case Carrier::CST_DISCONNECTED: case Carrier::CST_DISCONNECTING: @@ -4271,7 +4265,6 @@ CarrierImpl::ProcessMainThreadMessages() m_connections.insert(conn); EBUS_EVENT_ID(m_gridMate, CarrierEventBus, OnIncomingConnection, this, conn); - EBUS_EVENT(Debug::CarrierDrillerBus, OnIncomingConnection, this, conn); ThreadMessage* ctm = aznew ThreadMessage(CTM_CONNECT); ctm->m_connection = conn; @@ -4306,7 +4299,6 @@ CarrierImpl::ProcessMainThreadMessages() ctm->m_threadConnection = threadConn; ctm->m_disconnectReason = msg->m_disconnectReason; m_thread->PushCarrierThreadMessage(ctm); - EBUS_EVENT(Debug::CarrierDrillerBus, OnConnectionStateChanged, this, msg->m_connection, msg->m_connection->m_state); } } break; case MTM_DELETE_CONNECTION: @@ -4333,7 +4325,6 @@ CarrierImpl::ProcessMainThreadMessages() if (msg->m_errorCode == CarrierErrorCode::EC_DRIVER) { EBUS_EVENT_ID(m_gridMate, CarrierEventBus, OnDriverError, this, msg->m_connection, msg->m_error.m_driverError); - EBUS_EVENT(Debug::CarrierDrillerBus, OnDriverError, this, msg->m_connection, msg->m_error.m_driverError); if (msg->m_connection) { @@ -4344,7 +4335,6 @@ CarrierImpl::ProcessMainThreadMessages() else { EBUS_EVENT_ID(m_gridMate, CarrierEventBus, OnSecurityError, this, msg->m_connection, msg->m_error.m_securityError); - EBUS_EVENT(Debug::CarrierDrillerBus, OnSecurityError, this, msg->m_connection, msg->m_error.m_securityError); } } break; case MTM_RATE_UPDATE: @@ -4443,13 +4433,11 @@ CarrierImpl::ProcessSystemMessages() if (requestError == HandshakeErrorCode::OK) { conn->m_state = Carrier::CST_CONNECTED; - EBUS_EVENT(Debug::CarrierDrillerBus, OnConnectionStateChanged, this, conn, conn->m_state); SendSyncTime(); // send time first if we have the clock. SendSystemMessage(SM_CONNECT_ACK, wb, conn, SEND_RELIABLE); EBUS_EVENT_ID(m_gridMate, CarrierEventBus, OnConnectionEstablished, this, conn); - EBUS_EVENT(Debug::CarrierDrillerBus, OnConnectionEstablished, this, conn); ThreadMessage* ctm = aznew ThreadMessage(CTM_HANDSHAKE_COMPLETE); ctm->m_connection = conn; @@ -4494,9 +4482,7 @@ CarrierImpl::ProcessSystemMessages() m_pendingHandshakes.erase(PendingHandshake(conn)); // Connected -> no need to retry handshake anymore conn->m_state = Carrier::CST_CONNECTED; - EBUS_EVENT(Debug::CarrierDrillerBus, OnConnectionStateChanged, this, conn, conn->m_state); EBUS_EVENT_ID(m_gridMate, CarrierEventBus, OnConnectionEstablished, this, conn); - EBUS_EVENT(Debug::CarrierDrillerBus, OnConnectionEstablished, this, conn); ThreadMessage* ctm = aznew ThreadMessage(CTM_HANDSHAKE_COMPLETE); ctm->m_connection = conn; @@ -4540,7 +4526,6 @@ CarrierImpl::ProcessSystemMessages() ctm->m_threadConnection = threadConn; ctm->m_disconnectReason = reason; m_thread->PushCarrierThreadMessage(ctm); - EBUS_EVENT(Debug::CarrierDrillerBus, OnConnectionStateChanged, this, conn, conn->m_state); ////////////////////////////////////////////////////////////////////////// } break; case SM_CLOCK_SYNC: @@ -4850,7 +4835,6 @@ CarrierImpl::DebugDeleteConnection(ConnectionID id) ctm->m_threadConnection = threadConn; ctm->m_disconnectReason = reason; m_thread->PushCarrierThreadMessage(ctm); - EBUS_EVENT(Debug::CarrierDrillerBus, OnConnectionStateChanged, this, conn, conn->m_state); ////////////////////////////////////////////////////////////////////////// } diff --git a/Code/Framework/GridMate/GridMate/Carrier/Carrier.h b/Code/Framework/GridMate/GridMate/Carrier/Carrier.h index 94c31ed6d2..9255bb4016 100644 --- a/Code/Framework/GridMate/GridMate/Carrier/Carrier.h +++ b/Code/Framework/GridMate/GridMate/Carrier/Carrier.h @@ -14,8 +14,6 @@ #include #include -#include -#include #include "AzCore/std/smart_ptr/weak_ptr.h" namespace GridMate @@ -485,60 +483,6 @@ namespace GridMate }; typedef AZ::EBus CarrierEventBus; - - namespace Debug - { - class CarrierDrillerEvents - : public CarrierEventsBase - , public AZ::Debug::DrillerEBusTraits - { - public: - virtual void OnIncomingConnection(Carrier* carrier, ConnectionID id) = 0; - - virtual void OnFailedToConnect(Carrier* carrier, ConnectionID id, CarrierDisconnectReason reason) = 0; - - virtual void OnConnectionEstablished(Carrier* carrier, ConnectionID id) = 0; - - virtual void OnDisconnect(Carrier* carrier, ConnectionID id, CarrierDisconnectReason reason) = 0; - - /// Report all carrier and driver errors! id == InvalidConnectionID if the error is not connection related! - virtual void OnDriverError(Carrier* carrier, ConnectionID id, const DriverError& error) = 0; - virtual void OnSecurityError(Carrier* carrier, ConnectionID id, const SecurityError& error) = 0; - - ////////////////////////////////////////////////////////////////////////// - // Executed from NETWORK thread - - // Driver - /// SendTo - /// ReceiveFrom - /// Errors - - // Traffic control - - /// Called every second when you update last second statistics - virtual void OnUpdateStatistics(const AZStd::string& address, const TrafficControl::Statistics& lastSecond, const TrafficControl::Statistics& lifeTime, const TrafficControl::Statistics& effectiveLastSecond, const TrafficControl::Statistics& effectiveLifeTime) = 0; - - // Simulator - /// Enable/Disable - /// Change Simulator parameters - - // Carrier - virtual void OnConnectionStateChanged(Carrier* carrier, ConnectionID id, Carrier::ConnectionStates newState) = 0; - - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // Executed from GAME/MAIN thread - - // Handshake low level (we drill the handshake on session level too) - - // Carrier - in addition to carrier events - - ////////////////////////////////////////////////////////////////////////// - }; - - typedef AZ::EBus CarrierDrillerBus; - } } #endif // GM_CARRIER_H diff --git a/Code/Framework/GridMate/GridMate/Carrier/DefaultTrafficControl.cpp b/Code/Framework/GridMate/GridMate/Carrier/DefaultTrafficControl.cpp index 8743e50e83..107dfe839b 100644 --- a/Code/Framework/GridMate/GridMate/Carrier/DefaultTrafficControl.cpp +++ b/Code/Framework/GridMate/GridMate/Carrier/DefaultTrafficControl.cpp @@ -591,9 +591,6 @@ DefaultTrafficControl::Update() //AZ_TracePrintf("GridMate","Traffic control: Connection %s LifeTime(rtt %.2f packetLoss %.2f) LastSecond(rtt %.2f packetLoss %.2f)\n", // cd.m_address.c_str(),cd.m_sdLifetime.m_rtt,cd.m_sdLifetime.m_packetLoss,cd.m_sdLastSecond.m_rtt,cd.m_sdLastSecond.m_packetLoss); - // send new statistics event - EBUS_EVENT(Debug::CarrierDrillerBus, OnUpdateStatistics, cd.m_address, cd.m_sdLastSecond, cd.m_sdLifetime, cd.m_sdEffectiveLastSecond, cd.m_sdEffectiveLifetime); - cd.m_sdCurrentSecond.Reset(); cd.m_sdCurrentSecond.m_rtt = cd.m_sdLastSecond.m_rtt; //cd.sdCurrentSecond.flow = 1.0f; // Good diff --git a/Code/Framework/GridMate/GridMate/Drillers/CarrierDriller.cpp b/Code/Framework/GridMate/GridMate/Drillers/CarrierDriller.cpp deleted file mode 100644 index 38f029f0f5..0000000000 --- a/Code/Framework/GridMate/GridMate/Drillers/CarrierDriller.cpp +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include - -using namespace AZ::Debug; - -namespace GridMate -{ - namespace Debug - { - //========================================================================= - // CarrierDriller - // [4/14/2011] - //========================================================================= - CarrierDriller::CarrierDriller() - { - m_drillerTag = AZ_CRC("CarrierDriller", 0x72a37d06); - } - - //========================================================================= - // Start - // [4/14/2011] - //========================================================================= - void CarrierDriller::Start(const Param* params, int numParams) - { - (void)params; - (void)numParams; - CarrierDrillerBus::Handler::BusConnect(); - - /* get carriers and output all the data - m_output->BeginTag(m_drillerTag); - m_output->Write(AZ_CRC("CarrierId"),carrier); - m_output->BeginTag(AZ_CRC("StartDrill")); - for(unsigned int iConn = 0; iConn < carrier->GetNumConnections(); ++iConn ) - { - ConnectionID connId = carrier->GetConnectionId(iConn); - m_output->BeginTag(AZ_CRC("Connection")); - m_output->Write(AZ_CRC("Id"),connId); - m_output->Write(AZ_CRC("Address"),carrier->ConnectionToAddress(connId)); - m_output->Write(AZ_CRC("State"),static_cast(carrier->GetConnectionState(connId))); - m_output->EndTag(AZ_CRC("Connection")); - } - m_output->EndTag(AZ_CRC("StartDrill")); - m_output->EndTag(m_drillerTag);*/ - } - - //========================================================================= - // Stop - // [4/14/2011] - //========================================================================= - void CarrierDriller::Stop() - { - CarrierDrillerBus::Handler::BusDisconnect(); - } - - //========================================================================= - // OnUpdateStatistics - // [4/14/2011] - //========================================================================= - void CarrierDriller::OnUpdateStatistics(const AZStd::string& address, const TrafficControl::Statistics& lastSecond, const TrafficControl::Statistics& lifeTime, const TrafficControl::Statistics& effectiveLastSecond, const TrafficControl::Statistics& effectiveLifeTime) - { - m_output->BeginTag(m_drillerTag); - m_output->BeginTag(AZ_CRC("Statistics", 0xe2d38b22)); - m_output->Write(AZ_CRC("Address", 0x0d4e6f81), address); - m_output->BeginTag(AZ_CRC("LastSecond", 0x5e6ccbee)); - m_output->Write(AZ_CRC("DataSend", 0xae94c282), lastSecond.m_dataSend); - m_output->Write(AZ_CRC("DataReceived", 0xd92f8e4b), lastSecond.m_dataReceived); - m_output->Write(AZ_CRC("DataResend", 0xe44a3086), lastSecond.m_dataResend); - m_output->Write(AZ_CRC("DataAcked", 0xbb5e5496), lastSecond.m_dataAcked); - m_output->Write(AZ_CRC("PacketSend", 0x5b52fa79), lastSecond.m_packetSend); - m_output->Write(AZ_CRC("PacketReceived", 0xf247dd9e), lastSecond.m_packetReceived); - m_output->Write(AZ_CRC("PacketLost", 0xbc64441e), lastSecond.m_packetLost); - m_output->Write(AZ_CRC("PacketAcked", 0x91c4b93a), lastSecond.m_packetAcked); - m_output->Write(AZ_CRC("PacketLoss", 0x2200d1bd), lastSecond.m_packetLoss); - m_output->Write(AZ_CRC("rtt", 0xb40f6cfb), lastSecond.m_rtt); - //m_output->Write(AZ_CRC("flow"),lastSecond.m_flow); - m_output->EndTag(AZ_CRC("LastSecond", 0x5e6ccbee)); - m_output->BeginTag(AZ_CRC("LifeTime", 0x3de73088)); - m_output->Write(AZ_CRC("DataSend", 0xae94c282), lifeTime.m_dataSend); - m_output->Write(AZ_CRC("DataReceived", 0xd92f8e4b), lifeTime.m_dataReceived); - m_output->Write(AZ_CRC("DataResend", 0xe44a3086), lifeTime.m_dataResend); - m_output->Write(AZ_CRC("DataAcked", 0xbb5e5496), lifeTime.m_dataAcked); - m_output->Write(AZ_CRC("PacketSend", 0x5b52fa79), lifeTime.m_packetSend); - m_output->Write(AZ_CRC("PacketReceived", 0xf247dd9e), lifeTime.m_packetReceived); - m_output->Write(AZ_CRC("PacketLost", 0xbc64441e), lifeTime.m_packetLost); - m_output->Write(AZ_CRC("PacketAcked", 0x91c4b93a), lifeTime.m_packetAcked); - m_output->Write(AZ_CRC("PacketLoss", 0x2200d1bd), lifeTime.m_packetLoss); - m_output->Write(AZ_CRC("rtt", 0xb40f6cfb), lifeTime.m_rtt); - //m_output->Write(AZ_CRC("flow"),lifeTime.m_flow); - m_output->EndTag(AZ_CRC("LifeTime", 0x3de73088)); - m_output->BeginTag(AZ_CRC("EffectiveLastSecond", 0x8f84642f)); - m_output->Write(AZ_CRC("DataSend", 0xae94c282), effectiveLastSecond.m_dataSend); - m_output->Write(AZ_CRC("DataReceived", 0xd92f8e4b), effectiveLastSecond.m_dataReceived); - m_output->Write(AZ_CRC("DataResend", 0xe44a3086), effectiveLastSecond.m_dataResend); - m_output->Write(AZ_CRC("DataAcked", 0xbb5e5496), effectiveLastSecond.m_dataAcked); - m_output->Write(AZ_CRC("PacketSend", 0x5b52fa79), effectiveLastSecond.m_packetSend); - m_output->Write(AZ_CRC("PacketReceived", 0xf247dd9e), effectiveLastSecond.m_packetReceived); - m_output->Write(AZ_CRC("PacketLost", 0xbc64441e), effectiveLastSecond.m_packetLost); - m_output->Write(AZ_CRC("PacketAcked", 0x91c4b93a), effectiveLastSecond.m_packetAcked); - m_output->Write(AZ_CRC("PacketLoss", 0x2200d1bd), effectiveLastSecond.m_packetLoss); - m_output->Write(AZ_CRC("rtt", 0xb40f6cfb), effectiveLastSecond.m_rtt); - //m_output->Write(AZ_CRC("flow"),effectiveLastSecond.m_flow); - m_output->EndTag(AZ_CRC("EffectiveLastSecond", 0x8f84642f)); - m_output->BeginTag(AZ_CRC("EffectiveLifeTime", 0x4644a47a)); - m_output->Write(AZ_CRC("DataSend", 0xae94c282), effectiveLifeTime.m_dataSend); - m_output->Write(AZ_CRC("DataReceived", 0xd92f8e4b), effectiveLifeTime.m_dataReceived); - m_output->Write(AZ_CRC("DataResend", 0xe44a3086), effectiveLifeTime.m_dataResend); - m_output->Write(AZ_CRC("DataAcked", 0xbb5e5496), effectiveLifeTime.m_dataAcked); - m_output->Write(AZ_CRC("PacketSend", 0x5b52fa79), effectiveLifeTime.m_packetSend); - m_output->Write(AZ_CRC("PacketReceived", 0xf247dd9e), effectiveLifeTime.m_packetReceived); - m_output->Write(AZ_CRC("PacketLost", 0xbc64441e), effectiveLifeTime.m_packetLost); - m_output->Write(AZ_CRC("PacketAcked", 0x91c4b93a), effectiveLifeTime.m_packetAcked); - m_output->Write(AZ_CRC("PacketLoss", 0x2200d1bd), effectiveLifeTime.m_packetLoss); - m_output->Write(AZ_CRC("rtt", 0xb40f6cfb), effectiveLifeTime.m_rtt); - //m_output->Write(AZ_CRC("flow"),effectiveLifeTime.m_flow); - m_output->EndTag(AZ_CRC("EffectiveLifeTime", 0x4644a47a)); - m_output->EndTag(AZ_CRC("Statistics", 0xe2d38b22)); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnConnectionStateChanged - // [4/14/2011] - //========================================================================= - void CarrierDriller::OnConnectionStateChanged(Carrier* carrier, ConnectionID id, Carrier::ConnectionStates newState) - { - m_output->BeginTag(m_drillerTag); - m_output->Write(AZ_CRC("CarrierId", 0x93f4bfbe), carrier); - m_output->BeginTag(AZ_CRC("ConnectionState", 0x38a6a5da)); - m_output->Write(AZ_CRC("Id", 0xbf396750), id); - m_output->Write(AZ_CRC("State", 0xa393d2fb), static_cast(newState)); - m_output->EndTag(AZ_CRC("ConnectionState", 0x38a6a5da)); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnIncomingConnection - // [4/14/2011] - //========================================================================= - void CarrierDriller::OnIncomingConnection(Carrier* carrier, ConnectionID id) - { - m_output->BeginTag(m_drillerTag); - m_output->Write(AZ_CRC("CarrierId", 0x93f4bfbe), carrier); - m_output->BeginTag(AZ_CRC("IncomingConnection", 0x8c9d071a)); - m_output->Write(AZ_CRC("Id", 0xbf396750), id); - m_output->Write(AZ_CRC("Address", 0x0d4e6f81), carrier->ConnectionToAddress(id)); - m_output->EndTag(AZ_CRC("IncomingConnection", 0x8c9d071a)); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnFailedToConnect - // [4/14/2011] - //========================================================================= - void CarrierDriller::OnFailedToConnect(Carrier* carrier, ConnectionID id, CarrierDisconnectReason reason) - { - m_output->BeginTag(m_drillerTag); - m_output->Write(AZ_CRC("CarrierId", 0x93f4bfbe), carrier); - m_output->BeginTag(AZ_CRC("FailedToConnect", 0xb6539549)); - m_output->Write(AZ_CRC("Id", 0xbf396750), id); - m_output->Write(AZ_CRC("Reason", 0x3bb8880c), ReasonToString(reason)); - m_output->EndTag(AZ_CRC("FailedToConnect", 0xb6539549)); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnConnectionEstablished - // [4/14/2011] - //========================================================================= - void CarrierDriller::OnConnectionEstablished(Carrier* carrier, ConnectionID id) - { - m_output->BeginTag(m_drillerTag); - m_output->Write(AZ_CRC("CarrierId", 0x93f4bfbe), carrier); - m_output->BeginTag(AZ_CRC("ConnectionEstablished", 0xcde31aa7)); - m_output->Write(AZ_CRC("Id", 0xbf396750), id); - m_output->EndTag(AZ_CRC("ConnectionEstablished", 0xcde31aa7)); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnDisconnect - // [4/14/2011] - //========================================================================= - void CarrierDriller::OnDisconnect(Carrier* carrier, ConnectionID id, CarrierDisconnectReason reason) - { - m_output->BeginTag(m_drillerTag); - m_output->Write(AZ_CRC("CarrierId", 0x93f4bfbe), carrier); - m_output->BeginTag(AZ_CRC("Disconnect", 0x003a4b91)); - m_output->Write(AZ_CRC("Id", 0xbf396750), id); - m_output->Write(AZ_CRC("Reason", 0x3bb8880c), ReasonToString(reason)); - m_output->EndTag(AZ_CRC("Disconnect", 0x003a4b91)); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnDriverError - // [12/14/2016] - //========================================================================= - void CarrierDriller::OnDriverError(Carrier* carrier, ConnectionID id, const DriverError& error) - { - m_output->BeginTag(m_drillerTag); - m_output->Write(AZ_CRC("CarrierId", 0x93f4bfbe), carrier); - m_output->BeginTag(AZ_CRC("DriverError", 0xe7522aff)); - m_output->Write(AZ_CRC("Id", 0xbf396750), id); - m_output->Write(AZ_CRC("ErrorCode", 0x499e660e), static_cast(error.m_errorCode)); - m_output->EndTag(AZ_CRC("DriverError", 0xe7522aff)); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnSecurityError - //========================================================================= - void CarrierDriller::OnSecurityError(Carrier* carrier, ConnectionID id, const SecurityError& error) - { - m_output->BeginTag(m_drillerTag); - m_output->Write(AZ_CRC("CarrierId", 0x93f4bfbe), carrier); - m_output->BeginTag(AZ_CRC("SecurityError", 0xdfe940ab)); - m_output->Write(AZ_CRC("Id", 0xbf396750), id); - m_output->Write(AZ_CRC("ErrorCode", 0x499e660e), static_cast(error.m_errorCode)); - m_output->EndTag(AZ_CRC("SecurityError", 0xdfe940ab)); - m_output->EndTag(m_drillerTag); - } - } // namespace Debug -} // namespace GridMate diff --git a/Code/Framework/GridMate/GridMate/Drillers/CarrierDriller.h b/Code/Framework/GridMate/GridMate/Drillers/CarrierDriller.h deleted file mode 100644 index b12441e6fa..0000000000 --- a/Code/Framework/GridMate/GridMate/Drillers/CarrierDriller.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef GM_CARRIER_DRILLER_H -#define GM_CARRIER_DRILLER_H - -#include -#include -#include - -namespace GridMate -{ - namespace Debug - { - /** - * Carrier driller - * \note Be careful which buses you attach. The drillers work in Multi threaded environment and expect that - * a driller mutex (DrillerManager::DrillerManager) will be automatically locked on every write. - * Otherwise in output stream corruption will happen (even is the stream is thread safe). - */ - class CarrierDriller - : public AZ::Debug::Driller - , public CarrierDrillerBus::Handler - { - int m_drillerTag; - public: - AZ_CLASS_ALLOCATOR(CarrierDriller, AZ::OSAllocator, 0); - CarrierDriller(); - - ////////////////////////////////////////////////////////////////////////// - // Driller - const char* GroupName() const override { return "GridMate"; } - const char* GetName() const override { return "CarrierDriller"; } - const char* GetDescription() const override { return "Drills Carrier/transport layer,traffic control, driver,etc."; } - void Start(const Param* params = nullptr, int numParams = 0) override; - void Stop() override; - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // Carrier Driller Bus - void OnUpdateStatistics(const AZStd::string& address, const TrafficControl::Statistics& lastSecond, const TrafficControl::Statistics& lifeTime, const TrafficControl::Statistics& effectiveLastSecond, const TrafficControl::Statistics& effectiveLifeTime) override; - void OnConnectionStateChanged(Carrier* carrier, ConnectionID id, Carrier::ConnectionStates newState) override; - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // Carrier Event Bus - void OnIncomingConnection(Carrier* carrier, ConnectionID id) override; - void OnFailedToConnect(Carrier* carrier, ConnectionID id, CarrierDisconnectReason reason) override; - void OnConnectionEstablished(Carrier* carrier, ConnectionID id) override; - void OnDisconnect(Carrier* carrier, ConnectionID id, CarrierDisconnectReason reason) override; - void OnDriverError(Carrier* carrier, ConnectionID id, const DriverError& error) override; - void OnSecurityError(Carrier* carrier, ConnectionID id, const SecurityError& error) override; - ////////////////////////////////////////////////////////////////////////// - }; - } -} - -#endif // GM_CARRIER_DRILLER_H diff --git a/Code/Framework/GridMate/GridMate/Drillers/ReplicaDriller.cpp b/Code/Framework/GridMate/GridMate/Drillers/ReplicaDriller.cpp deleted file mode 100644 index cb48578255..0000000000 --- a/Code/Framework/GridMate/GridMate/Drillers/ReplicaDriller.cpp +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#include -#include -#include -#include - -using namespace AZ::Debug; - -namespace GridMate -{ - namespace Debug - { - const AZ::Crc32 ReplicaDriller::Tags::REPLICA_DRILLER = AZ_CRC("ReplicaDriller", 0xd832f49a); - - // Event Types - const AZ::Crc32 ReplicaDriller::Tags::CHUNK_SEND_DATASET = AZ_CRC("ChunkSendDataSet", 0x085ea99b); - const AZ::Crc32 ReplicaDriller::Tags::CHUNK_RECEIVE_DATASET = AZ_CRC("ChunkReceiveDataSet", 0x8d4536db); - const AZ::Crc32 ReplicaDriller::Tags::CHUNK_SEND_RPC = AZ_CRC("ChunkSendRPC", 0x7c40afe0); - const AZ::Crc32 ReplicaDriller::Tags::CHUNK_RECEIVE_RPC = AZ_CRC("ChunkReceiveRPC", 0xb49b302d); - - // Data Fields - const AZ::Crc32 ReplicaDriller::Tags::REPLICA_NAME = AZ_CRC("ReplicaName", 0xc69b68ee); - const AZ::Crc32 ReplicaDriller::Tags::REPLICA_ID = AZ_CRC("ReplicaID", 0x394dd741); - const AZ::Crc32 ReplicaDriller::Tags::CHUNK_TYPE = AZ_CRC("TypeName", 0x115f811d); - const AZ::Crc32 ReplicaDriller::Tags::CHUNK_INDEX = AZ_CRC("ChunkIndex", 0x25ba3370); - const AZ::Crc32 ReplicaDriller::Tags::DATA_SET_NAME = AZ_CRC("DataSetName", 0xf22dbaae); - const AZ::Crc32 ReplicaDriller::Tags::DATA_SET_INDEX = AZ_CRC("DataSetIndex", 0x58d2421f); - const AZ::Crc32 ReplicaDriller::Tags::RPC_NAME = AZ_CRC("RPCName", 0x4c4cbf3a); - const AZ::Crc32 ReplicaDriller::Tags::RPC_INDEX = AZ_CRC("RPCIndex", 0xaf0e7447); - const AZ::Crc32 ReplicaDriller::Tags::SIZE = AZ_CRC("Size", 0xf7c0246a); - const AZ::Crc32 ReplicaDriller::Tags::TIME_PROCESSED_MILLISEC = AZ_CRC("Time", 0x6f949845); - - ReplicaDriller::ReplicaDriller() - { - } - - void ReplicaDriller::Start(const Param* params, int numParams) - { - (void)params; - (void)numParams; - ReplicaDrillerBus::Handler::BusConnect(); - } - - void ReplicaDriller::Stop() - { - ReplicaDrillerBus::Handler::BusDisconnect(); - } - - void ReplicaDriller::OnSendDataSet(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, DataSetBase* dataSet, PeerId from, PeerId to, const void* data, size_t len) - { - (void)from; - (void)to; - (void)data; - - const char* dataSetName = chunk->GetDescriptor()->GetDataSetName(chunk, dataSet); - size_t dataSetIndex = chunk->GetDescriptor()->GetDataSetIndex(chunk, dataSet); - - m_output->BeginTag(Tags::REPLICA_DRILLER); - m_output->BeginTag(Tags::CHUNK_SEND_DATASET); - OutputBaseReplicaChunkTags(chunk, chunkIndex, len); - m_output->Write(Tags::DATA_SET_NAME, dataSetName); - m_output->Write(Tags::DATA_SET_INDEX, dataSetIndex); - m_output->EndTag(Tags::CHUNK_SEND_DATASET); - m_output->EndTag(Tags::REPLICA_DRILLER); - } - - void ReplicaDriller::OnReceiveDataSet(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, DataSetBase* dataSet, PeerId from, PeerId to, const void* data, size_t len) - { - (void)from; - (void)to; - (void)data; - - const char* dataSetName = chunk->GetDescriptor()->GetDataSetName(chunk, dataSet); - size_t dataSetIndex = chunk->GetDescriptor()->GetDataSetIndex(chunk, dataSet); - - m_output->BeginTag(Tags::REPLICA_DRILLER); - m_output->BeginTag(Tags::CHUNK_RECEIVE_DATASET); - OutputBaseReplicaChunkTags(chunk, chunkIndex, len); - m_output->Write(Tags::DATA_SET_NAME, dataSetName); - m_output->Write(Tags::DATA_SET_INDEX, dataSetIndex); - m_output->EndTag(Tags::CHUNK_RECEIVE_DATASET); - m_output->EndTag(Tags::REPLICA_DRILLER); - } - - void ReplicaDriller::OnSendRpc(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, Internal::RpcRequest* rpc, PeerId from, PeerId to, const void* data, size_t len) - { - (void)from; - (void)to; - (void)data; - - const char* rpcName = chunk->GetDescriptor()->GetRpcName(chunk, rpc->m_rpc); - size_t rpcIndex = chunk->GetDescriptor()->GetRpcIndex(chunk, rpc->m_rpc); - - - m_output->BeginTag(Tags::REPLICA_DRILLER); - m_output->BeginTag(Tags::CHUNK_SEND_RPC); - OutputBaseReplicaChunkTags(chunk, chunkIndex, len); - m_output->Write(Tags::RPC_NAME, rpcName); - m_output->Write(Tags::RPC_INDEX, rpcIndex); - m_output->EndTag(Tags::CHUNK_SEND_RPC); - m_output->EndTag(Tags::REPLICA_DRILLER); - } - void ReplicaDriller::OnReceiveRpc(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, Internal::RpcRequest* rpc, PeerId from, PeerId to, const void* data, size_t len) - { - (void)from; - (void)to; - (void)data; - - const char* rpcName = chunk->GetDescriptor()->GetRpcName(chunk, rpc->m_rpc); - size_t rpcIndex = chunk->GetDescriptor()->GetRpcIndex(chunk, rpc->m_rpc); - - m_output->BeginTag(Tags::REPLICA_DRILLER); - m_output->BeginTag(Tags::CHUNK_RECEIVE_RPC); - OutputBaseReplicaChunkTags(chunk, chunkIndex, len); - m_output->Write(Tags::RPC_NAME, rpcName); - m_output->Write(Tags::RPC_INDEX, rpcIndex); - m_output->EndTag(Tags::CHUNK_RECEIVE_RPC); - m_output->EndTag(Tags::REPLICA_DRILLER); - } - - void ReplicaDriller::OutputBaseReplicaChunkTags(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, size_t len) - { - const char* chunkTypeName = chunk->GetDescriptor()->GetChunkName(); - const char* replicaName = chunk->GetReplica()->GetDebugName(); - - m_output->Write(Tags::REPLICA_NAME, replicaName); - m_output->Write(Tags::REPLICA_ID, chunk->GetReplicaId()); - m_output->Write(Tags::CHUNK_TYPE, chunkTypeName); - m_output->Write(Tags::CHUNK_INDEX, chunkIndex); - m_output->Write(Tags::SIZE, len); - m_output->Write(Tags::TIME_PROCESSED_MILLISEC, AZStd::chrono::milliseconds(AZStd::chrono::system_clock::now().time_since_epoch()).count()); - } - } -} diff --git a/Code/Framework/GridMate/GridMate/Drillers/ReplicaDriller.h b/Code/Framework/GridMate/GridMate/Drillers/ReplicaDriller.h deleted file mode 100644 index e2b7213926..0000000000 --- a/Code/Framework/GridMate/GridMate/Drillers/ReplicaDriller.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef GM_REPLICA_DRILLER_H -#define GM_REPLICA_DRILLER_H - -#include -#include -#include -#include - -namespace GridMate -{ - namespace Debug - { - class ReplicaDriller - : public AZ::Debug::Driller - , public GridMate::Debug::ReplicaDrillerBus::Handler - { - public: - struct Tags - { - // Driller - static const AZ::Crc32 REPLICA_DRILLER; - - // Event Types - static const AZ::Crc32 CHUNK_SEND_DATASET; - static const AZ::Crc32 CHUNK_RECEIVE_DATASET; - static const AZ::Crc32 CHUNK_SEND_RPC; - static const AZ::Crc32 CHUNK_RECEIVE_RPC; - - // Data Fields - static const AZ::Crc32 REPLICA_NAME; - static const AZ::Crc32 REPLICA_ID; - static const AZ::Crc32 CHUNK_TYPE; - static const AZ::Crc32 CHUNK_INDEX; - static const AZ::Crc32 DATA_SET_NAME; - static const AZ::Crc32 DATA_SET_INDEX; - static const AZ::Crc32 RPC_NAME; - static const AZ::Crc32 RPC_INDEX; - static const AZ::Crc32 SIZE; - static const AZ::Crc32 TIME_PROCESSED_MILLISEC; - }; - - AZ_CLASS_ALLOCATOR(ReplicaDriller, AZ::OSAllocator, 0); - ReplicaDriller(); - - ////////////////////////////////////////////////////////////////////////// - // Driller - const char* GroupName() const override { return "GridMate"; } - const char* GetName() const override { return "ReplicaDriller"; } - const char* GetDescription() const override { return "Drills replicas."; } - void Start(const Param* params = NULL, int numParams = 0) override; - void Stop() override; - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // ReplicaDrillerEvents - void OnSendDataSet(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, DataSetBase* dataSet, PeerId from, PeerId to, const void* data, size_t len) override; - void OnReceiveDataSet(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, DataSetBase* dataSet, PeerId from, PeerId to, const void* data, size_t len) override; - - void OnSendRpc(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, Internal::RpcRequest* rpc, PeerId from, PeerId to, const void* data, size_t len) override; - void OnReceiveRpc(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, Internal::RpcRequest* rpc, PeerId from, PeerId to, const void* data, size_t len) override; - ////////////////////////////////////////////////////////////////////////// - - private: - - void OutputBaseReplicaChunkTags(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, size_t len); - }; - } -} - -#endif diff --git a/Code/Framework/GridMate/GridMate/Drillers/SessionDriller.cpp b/Code/Framework/GridMate/GridMate/Drillers/SessionDriller.cpp deleted file mode 100644 index a7130218f8..0000000000 --- a/Code/Framework/GridMate/GridMate/Drillers/SessionDriller.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include - -using namespace AZ::Debug; - -namespace GridMate -{ - namespace Debug - { - //========================================================================= - // SessionDriller - // [4/14/2011] - //========================================================================= - SessionDriller::SessionDriller() - { - m_drillerTag = AZ_CRC("SessionDriller", 0x30b916a9); - } - - //========================================================================= - // Start - // [4/14/2011] - //========================================================================= - void SessionDriller::Start(const Param* params, int numParams) - { - (void)params; - (void)numParams; - // Collect current session information ? - SessionDrillerBus::Handler::BusConnect(); - - // - //m_output->BeginTag(m_drillerTag); - //m_output->BeginTag(AZ_CRC("StartDrill")); - //if(sessionMgr->m_activeSession) - //{ - // GridSession* gs = sessionMgr->m_activeSession; - // // store the current session state - // m_output->BeginTag(AZ_CRC("Session")); - // m_output->Write(AZ_CRC("SessionId"),gs->GetId()); - // m_output->Write(AZ_CRC("Carrier"),gs->GetCarrier()); - // m_output->Write(AZ_CRC("ReplicaMgr"),gs->GetReplicaMgr()); - // m_output->Write(AZ_CRC("Topology"),(char)gs->GetTopology()); - // m_output->Write(AZ_CRC("Time"),gs->GetTime()); - // m_output->Write(AZ_CRC("State"),(char)gs->m_sm.GetCurrentState()); - // m_output->Write(AZ_CRC("IsHost"),gs->IsHost()); - // // There are endless params add as needed - - // for(unsigned int i = 0; i < gs->GetNumberOfMembers(); ++i ) - // { - // GridMember* gm = gs->GetMember(i); - // m_output->BeginTag(AZ_CRC("Member")); - // m_output->Write(AZ_CRC("Id"),gm->GetId().ToString()); - // m_output->Write(AZ_CRC("Name"),gm->GetName()); - // m_output->Write(AZ_CRC("ConnectionId"),gm->GetConnectionId()); - // m_output->Write(AZ_CRC("NAT"),(char)gm->GetNatType()); - // m_output->Write(AZ_CRC("CommFilter"),gm->GetCommFilter()); - // m_output->Write(AZ_CRC("IsHost"),gm->IsHost()); - // m_output->Write(AZ_CRC("IsLocal"),gm->IsLocal()); - // m_output->Write(AZ_CRC("IsInvited"),gm->IsInvited()); - // m_output->EndTag(AZ_CRC("Member")); - // } - - // m_output->EndTag(AZ_CRC("Session")); - //} - //else if(sessionMgr->m_activeSearch) - //{ - // GridSearch* gs = sessionMgr->m_activeSearch; - // m_output->BeginTag(AZ_CRC("GridSearch")); - // m_output->Write(AZ_CRC("SearchId"),gs); - // m_output->Write(AZ_CRC("IsDone"),gs->IsDone()); - // m_output->Write(AZ_CRC("NumResults"),gs->GetNumResults()); - // // add platform specific drill or just generic reporting - // m_output->EndTag(AZ_CRC("GridSearch")); - //} - //m_output->EndTag(AZ_CRC("StartDrill")); - //m_output->EndTag(m_drillerTag); - } - - //========================================================================= - // Stop - // [4/14/2011] - //========================================================================= - void SessionDriller::Stop() - { - SessionDrillerBus::Handler::BusDisconnect(); - } - - //========================================================================= - // OnSessionServiceReady - // [4/15/2011] - //========================================================================= - void - SessionDriller::OnSessionServiceReady() - { - // m_output->BeginTag(m_drillerTag); - // m_output->EndTag(m_drillerTag); - } - - //========================================================================= - // OnGridSearchComplete - // [4/15/2011] - //========================================================================= - void - SessionDriller::OnGridSearchComplete(GridSearch* gridSearch) - { - m_output->BeginTag(m_drillerTag); - m_output->BeginTag(AZ_CRC("GridSearchComplete", 0x974b5717)); - m_output->Write(AZ_CRC("SearchId", 0x4f7ef2d2), gridSearch); - m_output->Write(AZ_CRC("NumResults", 0xdfb1542f), gridSearch->GetNumResults()); - // add platform specific drill or just generic reporting - m_output->EndTag(AZ_CRC("GridSearchComplete", 0x974b5717)); - m_output->EndTag(m_drillerTag); - } - - //========================================================================= - // OnMemberJoined - // [4/15/2011] - //========================================================================= - void - SessionDriller::OnMemberJoined(GridSession* session, GridMember* member) - { - m_output->BeginTag(m_drillerTag); - m_output->BeginTag(AZ_CRC("MemberJoined", 0xbde4706c)); - m_output->Write(AZ_CRC("SessionId", 0xacd49154), session->GetId()); - m_output->Write(AZ_CRC("Id", 0xbf396750), member->GetId().ToString()); - m_output->Write(AZ_CRC("Name", 0x5e237e06), member->GetName()); - m_output->Write(AZ_CRC("ConnectionId", 0x4592a200), member->GetConnectionId()); - m_output->Write(AZ_CRC("NAT", 0x9686d0fb), (char)member->GetNatType()); - //m_output->Write(AZ_CRC("MuteList"),member->GetMuteList()); - m_output->Write(AZ_CRC("IsHost", 0xce28a9cf), member->IsHost()); - m_output->Write(AZ_CRC("IsLocal", 0x4300d6d2), member->IsLocal()); - m_output->Write(AZ_CRC("IsInvited", 0x29d785f7), member->IsInvited()); - m_output->EndTag(AZ_CRC("MemberJoined", 0xbde4706c)); - m_output->EndTag(m_drillerTag); - } - - //========================================================================= - // OnMemberLeaving - // [4/15/2011] - //========================================================================= - void - SessionDriller::OnMemberLeaving(GridSession* session, GridMember* member) - { - m_output->BeginTag(m_drillerTag); - m_output->BeginTag(AZ_CRC("MemberLeaving", 0xd10ee176)); - m_output->Write(AZ_CRC("SessionId", 0xacd49154), session->GetId()); - m_output->Write(AZ_CRC("Id", 0xbf396750), member->GetId().ToString()); - m_output->EndTag(AZ_CRC("MemberLeaving", 0xd10ee176)); - m_output->EndTag(m_drillerTag); - } - - //========================================================================= - // OnMemberKicked - // [4/15/2011] - //========================================================================= - void - SessionDriller::OnMemberKicked(GridSession* session, GridMember* member) - { - m_output->BeginTag(m_drillerTag); - m_output->BeginTag(AZ_CRC("MemberKicked", 0x908e74e6)); - m_output->Write(AZ_CRC("SessionId", 0xacd49154), session->GetId()); - m_output->Write(AZ_CRC("Id", 0xbf396750), member->GetId().ToString()); - m_output->EndTag(AZ_CRC("MemberKicked", 0x908e74e6)); - m_output->EndTag(m_drillerTag); - } - - //========================================================================= - // OnSessionCreated - // [4/15/2011] - //========================================================================= - void - SessionDriller::OnSessionCreated(GridSession* session) - { - m_output->BeginTag(m_drillerTag); - m_output->BeginTag(AZ_CRC("SessionCreated", 0x24655a62)); - m_output->Write(AZ_CRC("SessionId", 0xacd49154), session->GetId()); - m_output->Write(AZ_CRC("Carrier", 0x4739f11c), session->GetCarrier()); - m_output->Write(AZ_CRC("ReplicaMgr", 0x41cf3853), session->GetReplicaMgr()); - m_output->Write(AZ_CRC("Topology", 0x1198610c), (char)session->GetTopology()); - m_output->Write(AZ_CRC("Time", 0x6f949845), session->GetTime()); - m_output->Write(AZ_CRC("State", 0xa393d2fb), (char)session->m_sm.GetCurrentState()); - m_output->Write(AZ_CRC("IsHost", 0xce28a9cf), session->IsHost()); - m_output->EndTag(AZ_CRC("SessionCreated", 0x24655a62)); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnSessionJoined - // [4/15/2011] - //========================================================================= - void - SessionDriller::OnSessionJoined(GridSession* session) - { - m_output->BeginTag(m_drillerTag); - m_output->BeginTag(AZ_CRC("SessionJoined", 0x04b85d49)); - m_output->Write(AZ_CRC("SessionId", 0xacd49154), session->GetId()); - m_output->Write(AZ_CRC("Carrier", 0x4739f11c), session->GetCarrier()); - m_output->Write(AZ_CRC("ReplicaMgr", 0x41cf3853), session->GetReplicaMgr()); - m_output->Write(AZ_CRC("Topology", 0x1198610c), (char)session->GetTopology()); - m_output->Write(AZ_CRC("Time", 0x6f949845), session->GetTime()); - m_output->Write(AZ_CRC("State", 0xa393d2fb), (char)session->m_sm.GetCurrentState()); - m_output->Write(AZ_CRC("IsHost", 0xce28a9cf), session->IsHost()); - m_output->EndTag(AZ_CRC("SessionJoined", 0x04b85d49)); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnSessionDelete - // [4/15/2011] - //========================================================================= - void - SessionDriller::OnSessionDelete(GridSession* session) - { - m_output->BeginTag(m_drillerTag); - m_output->Write(AZ_CRC("SessionDelete", 0x6b5728cd), session->GetId()); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnSessionError - // [4/15/2011] - //========================================================================= - void - SessionDriller::OnSessionError(GridSession* session, const AZStd::string& errorMsg) - { - m_output->BeginTag(m_drillerTag); - m_output->BeginTag(AZ_CRC("SessionError", 0xc689cc40)); - m_output->Write(AZ_CRC("SessionId", 0xacd49154), session ? session->GetId() : "NoId"); - m_output->Write(AZ_CRC("Error", 0x5dddbc71), errorMsg); - m_output->EndTag(AZ_CRC("SessionError", 0xc689cc40)); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnSessionStart - // [4/15/2011] - //========================================================================= - void - SessionDriller::OnSessionStart(GridSession* session) - { - m_output->BeginTag(m_drillerTag); - m_output->Write(AZ_CRC("SessionStart", 0x042d25be), session->GetId()); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnSessionEnd - // [4/15/2011] - //========================================================================= - void - SessionDriller::OnSessionEnd(GridSession* session) - { - m_output->BeginTag(m_drillerTag); - m_output->Write(AZ_CRC("SessionEnd", 0x07821a5e), session->GetId()); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnWriteStatistics - // [6/8/2011] - //========================================================================= - void - SessionDriller::OnWriteStatistics(GridSession* session, GridMember* member, StatisticsData& data) - { - m_output->BeginTag(m_drillerTag); - m_output->BeginTag(AZ_CRC("WriteStatistics", 0xcf7f12aa)); - m_output->Write(AZ_CRC("SessionId", 0xacd49154), session->GetId()); - m_output->Write(AZ_CRC("Id", 0xbf396750), member->GetId().ToString()); - // data... - (void)data; - m_output->EndTag(AZ_CRC("WriteStatistics", 0xcf7f12aa)); - m_output->EndTag(m_drillerTag); - } - } // namespace Debug -} // namespace GridMate diff --git a/Code/Framework/GridMate/GridMate/Drillers/SessionDriller.h b/Code/Framework/GridMate/GridMate/Drillers/SessionDriller.h deleted file mode 100644 index 7af318287a..0000000000 --- a/Code/Framework/GridMate/GridMate/Drillers/SessionDriller.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef GM_SESSION_DRILLER_H -#define GM_SESSION_DRILLER_H - -#include -#include -#include - -namespace GridMate -{ - namespace Debug - { - /** - * Session Driller - * \note Be careful which buses you attach. The drillers work in Multi threaded environment and expect that - * a driller mutex (DrillerManager::DrillerManager) will be automatically locked on every write. - * Otherwise in output stream corruption will happen (even is the stream is thread safe). - */ - class SessionDriller - : public AZ::Debug::Driller - , public SessionDrillerBus::Handler - { - int m_drillerTag; - public: - AZ_CLASS_ALLOCATOR(SessionDriller, AZ::OSAllocator, 0); - SessionDriller(); - - ////////////////////////////////////////////////////////////////////////// - // Driller - const char* GroupName() const override { return "GridMate"; } - const char* GetName() const override { return "SessionDriller"; } - const char* GetDescription() const override { return "Drills GridSession, Search, etc."; } - void Start(const Param* params = NULL, int numParams = 0) override; - void Stop() override; - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // Session Event Bus - /// Callback that is called when the Session service is ready to process sessions. - void OnSessionServiceReady() override; - //virtual OnCommucationChanged() = 0 Callback that notifies the title when a member's communication settings change. - /// Callback that notifies the title when a game search query have completed. - void OnGridSearchComplete(GridSearch* gridSearch) override; - /// Callback that notifies the title when a new member joins the game session. - void OnMemberJoined(GridSession* session, GridMember* member) override; - /// Callback that notifies the title that a member is leaving the game session. member pointer is NOT valid after the callback returns. - void OnMemberLeaving(GridSession* session, GridMember* member) override; - // \todo a better way will be (after we solve migration) is to supply a reason to OnMemberLeaving... like the member was kicked. - // this will require that we actually remove the replica at the same moment. - /// Callback that host decided to kick a member. You will receive a OnMemberLeaving when the actual member leaves the session. - void OnMemberKicked(GridSession* session, GridMember* member) override; - /// After this callback it is safe to access session features. If host session is fully operational if client wait for OnSessionJoined. - void OnSessionCreated(GridSession* session) override; - /// Called on client machines to indicate that we join successfully. - void OnSessionJoined(GridSession* session) override; - /// Callback that notifies the title when a session will be left. session pointer is NOT valid after the callback returns. - void OnSessionDelete(GridSession* session) override; - /// Called when a session error occurs. - void OnSessionError(GridSession* session, const AZStd::string& errorMsg) override; - /// Called when the actual game(match) starts - void OnSessionStart(GridSession* session) override; - /// Called when the actual game(match) ends - void OnSessionEnd(GridSession* session) override; - /// Called when we have our last chance to write statistics data for member in the session. - void OnWriteStatistics(GridSession* session, GridMember* member, StatisticsData& data) override; - ////////////////////////////////////////////////////////////////////////// - }; - } -} - -#endif // GM_SESSION_DRILLER_H diff --git a/Code/Framework/GridMate/GridMate/Replica/RemoteProcedureCall.cpp b/Code/Framework/GridMate/GridMate/Replica/RemoteProcedureCall.cpp index 3feef708be..7f96638cf5 100644 --- a/Code/Framework/GridMate/GridMate/Replica/RemoteProcedureCall.cpp +++ b/Code/Framework/GridMate/GridMate/Replica/RemoteProcedureCall.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include #include @@ -32,14 +31,12 @@ namespace GridMate m_replicaChunk->QueueRPCRequest(rpc); } - void RpcBase::OnRpcRequest(GridMate::Internal::RpcRequest* rpc) const + void RpcBase::OnRpcRequest(GridMate::Internal::RpcRequest*) const { - EBUS_EVENT(Debug::ReplicaDrillerBus, OnRequestRpc, m_replicaChunk, rpc); } - void RpcBase::OnRpcInvoke(GridMate::Internal::RpcRequest* rpc) const + void RpcBase::OnRpcInvoke(GridMate::Internal::RpcRequest*) const { - EBUS_EVENT(Debug::ReplicaDrillerBus, OnInvokeRpc, m_replicaChunk, rpc); } PeerId RpcBase::GetSourcePeerId() diff --git a/Code/Framework/GridMate/GridMate/Replica/Replica.cpp b/Code/Framework/GridMate/GridMate/Replica/Replica.cpp index a05b92a7a0..bc95302afd 100644 --- a/Code/Framework/GridMate/GridMate/Replica/Replica.cpp +++ b/Code/Framework/GridMate/GridMate/Replica/Replica.cpp @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -49,8 +48,6 @@ namespace GridMate replicaName = nullptr; #endif InternalCreateInitialChunks(replicaName); - - EBUS_EVENT(Debug::ReplicaDrillerBus, OnCreateReplica, this); } //----------------------------------------------------------------------------- Replica::~Replica() @@ -96,8 +93,6 @@ namespace GridMate } } m_chunks.clear(); - - EBUS_EVENT(Debug::ReplicaDrillerBus, OnDestroyReplica, this); } //----------------------------------------------------------------------------- void Replica::Destroy() @@ -257,17 +252,12 @@ namespace GridMate //----------------------------------------------------------------------------- void Replica::OnActivate(const ReplicaContext& rc) { - EBUS_EVENT(Debug::ReplicaDrillerBus, OnActivateReplica, this); - for (auto chunk : m_chunks) { if (chunk) { - { - GM_PROFILE_USER_CALLBACK("OnReplicaActivate"); - chunk->OnReplicaActivate(rc); - } - EBUS_EVENT(Debug::ReplicaDrillerBus, OnActivateReplicaChunk, chunk.get()); + GM_PROFILE_USER_CALLBACK("OnReplicaActivate"); + chunk->OnReplicaActivate(rc); } } } @@ -277,17 +267,13 @@ namespace GridMate AZ_PROFILE_FUNCTION(GridMate); EBUS_EVENT_ID(rc.m_rm->GetGridMate(), ReplicaMgrCallbackBus, OnDeactivateReplica, GetRepId(), rc.m_rm); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnDeactivateReplica, this); for (auto chunk : m_chunks) { if (chunk) { - { - GM_PROFILE_USER_CALLBACK("OnReplicaDeactivate"); - chunk->OnReplicaDeactivate(rc); - } - EBUS_EVENT(Debug::ReplicaDrillerBus, OnDeactivateReplicaChunk, chunk.get()); + GM_PROFILE_USER_CALLBACK("OnReplicaDeactivate"); + chunk->OnReplicaDeactivate(rc); } } } @@ -325,8 +311,6 @@ namespace GridMate { if (IsPrimary()) { - EBUS_EVENT(Debug::ReplicaDrillerBus, OnRequestReplicaChangeOwnership, this, requestor); - if (IsMigratable() && requestor != m_manager->GetLocalPeerId()) { bool accepted; @@ -595,8 +579,6 @@ namespace GridMate chunkInfo.m_payload.Init(128); mc.m_outBuffer = &chunkInfo.m_payload; - EBUS_EVENT(Debug::ReplicaDrillerBus, OnSendReplicaChunkBegin, chunk.get(), static_cast(iChunk), mc.m_rm->GetLocalPeerId(), mc.m_peer->GetId()); - PackedSize writeOffset = mc.m_outBuffer->GetExactSize(); // Write the ctor data if we need to if (mc.m_marshalFlags & ReplicaMarshalFlags::IncludeCtorData) { @@ -606,7 +588,6 @@ namespace GridMate // Marshal the chunk data chunk->Marshal(mc, static_cast(iChunk)); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnSendReplicaChunkEnd, chunk.get(), static_cast(iChunk), mc.m_outBuffer->Get() + writeOffset.GetBytes(), mc.m_outBuffer->Size() - writeOffset.GetBytes()); // Precompute the chunk payload length and add to overall replica payload length PackedSize chunkLen = chunkInfo.m_payload.GetExactSize(); @@ -696,9 +677,7 @@ namespace GridMate if (chunk) { - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReceiveReplicaChunkBegin, chunk.get(), static_cast(iChunk), chunkContext.m_peer->GetId(), chunkContext.m_rm->GetLocalPeerId(), innerBuffer.Get(), chunkSize.GetSizeInBytesRoundUp()); chunk->Unmarshal(chunkContext, static_cast(iChunk)); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReceiveReplicaChunkEnd, chunk.get(), static_cast(iChunk)); } else { diff --git a/Code/Framework/GridMate/GridMate/Replica/ReplicaChunk.cpp b/Code/Framework/GridMate/GridMate/Replica/ReplicaChunk.cpp index d3db481ccd..2ded895be0 100644 --- a/Code/Framework/GridMate/GridMate/Replica/ReplicaChunk.cpp +++ b/Code/Framework/GridMate/GridMate/Replica/ReplicaChunk.cpp @@ -15,7 +15,6 @@ #include #include #include -#include #include namespace GridMate @@ -41,13 +40,11 @@ namespace GridMate ReplicaChunkInitContext* initContext = ReplicaChunkDescriptorTable::Get().GetCurrentReplicaChunkInitContext(); AZ_Assert(initContext, "Replica's descriptor is NOT pushed on the stack! Call Replica::Desriptor::Push() before construction!"); initContext->m_chunk = this; - EBUS_EVENT(Debug::ReplicaDrillerBus, OnCreateReplicaChunk, this); } //----------------------------------------------------------------------------- ReplicaChunkBase::~ReplicaChunkBase() { AZ_Assert(m_refCount == 0, "Attempting to free replica with non-zero refCount(%d)!", m_refCount); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnDestroyReplicaChunk, this); } //----------------------------------------------------------------------------- void ReplicaChunkBase::Init(ReplicaChunkClassId chunkTypeId) @@ -332,7 +329,7 @@ namespace GridMate return dataSetMask; } //----------------------------------------------------------------------------- - void ReplicaChunkBase::MarshalDataSets(MarshalContext& mc, AZ::u32 chunkIndex) + void ReplicaChunkBase::MarshalDataSets(MarshalContext& mc, [[maybe_unused]] AZ::u32 chunkIndex) { //AZ_PROFILE_SCOPE("GridMate"); AZ::u32 dirtyDataSetMask = CalculateDirtyDataSetMask(mc); @@ -358,15 +355,6 @@ namespace GridMate ReadBuffer data = dataset->GetMarshalData(); mc.m_outBuffer->WriteRaw(data.Get(), data.Size()); wroteDataSet = true; - - EBUS_EVENT(Debug::ReplicaDrillerBus, OnSendDataSet, - this, - chunkIndex, - dataset, - mc.m_rm->GetLocalPeerId(), - mc.m_peer->GetId(), - data.Get(), - data.Size().GetSizeInBytesRoundUp()); } } if(wroteDataSet) @@ -380,7 +368,7 @@ namespace GridMate } } //----------------------------------------------------------------------------- - void ReplicaChunkBase::UnmarshalDataSets(UnmarshalContext& mc, AZ::u32 chunkIndex) + void ReplicaChunkBase::UnmarshalDataSets(UnmarshalContext& mc, [[maybe_unused]] AZ::u32 chunkIndex) { AZ_PROFILE_FUNCTION(GridMate); @@ -421,22 +409,12 @@ namespace GridMate dataset->MarkAsNonDefaultValue(); m_nonDefaultValueBits.set(i); - const char* readPtr = mc.m_iBuf->GetCurrent(); dataset->Unmarshal(mc); - - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReceiveDataSet, - this, - chunkIndex, - dataset, - mc.m_peer->GetId(), - mc.m_rm->GetLocalPeerId(), - readPtr, - mc.m_iBuf->GetCurrent() - readPtr); } } } //----------------------------------------------------------------------------- - void ReplicaChunkBase::MarshalRpcs(MarshalContext& mc, AZ::u32 chunkIndex) + void ReplicaChunkBase::MarshalRpcs(MarshalContext& mc, [[maybe_unused]] AZ::u32 chunkIndex) { //AZ_PROFILE_SCOPE("GridMate"); @@ -467,22 +445,12 @@ namespace GridMate AZ::u8 rpcIndex = static_cast(GetDescriptor()->GetRpcIndex(this, rpc->m_rpc)); - auto bufferSize = mc.m_outBuffer->Size(); - SafeGuardWrite(mc.m_outBuffer, [rpc, rpcIndex, &mc]() { mc.m_outBuffer->Write(rpcIndex); rpc->m_rpc->Marshal(*mc.m_outBuffer, rpc); }); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnSendRpc, - this, - chunkIndex, - rpc, - mc.m_rm->GetLocalPeerId(), - mc.m_peer->GetId(), - mc.m_outBuffer->Get() + bufferSize, - mc.m_outBuffer->Size() - bufferSize); rpc->m_relayed = !(mc.m_marshalFlags & ReplicaMarshalFlags::Authoritative); // marking upstream rpcs relayed, for downstream rpcs - replicamgr marks them relayed after marshaling is finished rpcsSent++; } @@ -494,7 +462,7 @@ namespace GridMate } } //----------------------------------------------------------------------------- - void ReplicaChunkBase::UnmarshalRpcs(UnmarshalContext& mc, AZ::u32 chunkIndex) + void ReplicaChunkBase::UnmarshalRpcs(UnmarshalContext& mc, [[maybe_unused]] AZ::u32 chunkIndex) { AZ_PROFILE_FUNCTION(GridMate); @@ -504,7 +472,7 @@ namespace GridMate { for (AZ::u32 rpcsRead = 0; rpcsRead < rpcCount; ++rpcsRead) { - SafeGuardRead(mc.m_iBuf, [this, &mc, &chunkIndex]() + SafeGuardRead(mc.m_iBuf, [this, &mc]() { unsigned char rpcIndex; if (!mc.m_iBuf->Read(rpcIndex)) @@ -519,7 +487,6 @@ namespace GridMate return; } - const char* dataPtr = mc.m_iBuf->GetCurrent(); Internal::RpcRequest* request = rpc->Unmarshal(*mc.m_iBuf); if (!request) { @@ -565,15 +532,6 @@ namespace GridMate request->m_sourcePeer = mc.m_peer->GetId(); } - size_t dataSize = mc.m_iBuf->GetCurrent() - dataPtr; - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReceiveRpc, - this, - chunkIndex, - request, - mc.m_peer->GetId(), - mc.m_rm->GetLocalPeerId(), - dataPtr, - dataSize); m_rpcQueue.push_back(request); } else @@ -739,7 +697,6 @@ namespace GridMate m_replica = replica; - EBUS_EVENT(Debug::ReplicaDrillerBus, OnAttachReplicaChunk, this); { GM_PROFILE_USER_CALLBACK("OnAttachedToReplica"); OnAttachedToReplica(replica); @@ -751,7 +708,6 @@ namespace GridMate AZ_PROFILE_FUNCTION(GridMate); AZ_Assert(m_replica, "Should be attached to a replica"); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnDetachReplicaChunk, this); { GM_PROFILE_USER_CALLBACK("OnDetachedFromReplica"); OnDetachedFromReplica(m_replica); diff --git a/Code/Framework/GridMate/GridMate/Replica/ReplicaDrillerEvents.h b/Code/Framework/GridMate/GridMate/Replica/ReplicaDrillerEvents.h deleted file mode 100644 index 9ee2785f09..0000000000 --- a/Code/Framework/GridMate/GridMate/Replica/ReplicaDrillerEvents.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef GM_REPLICA_DRILLER_EVENTS_H -#define GM_REPLICA_DRILLER_EVENTS_H - -#include - -/*! -* The replica system emits debugging EBus events via the ReplicaDrillerEvents interface. -* To listen for these events, derive from ReplicaDrillerBus::Handler and implement all -* the functions declared in the ReplicaDrillerEvents interface. -*/ - -namespace GridMate -{ - class Replica; - class ReplicaChunk; - class ReplicaChunkBase; - class DataSetBase; - typedef AZ::u32 PeerId; - - namespace Internal - { - struct RpcRequest; - } - - namespace Debug - { - /*! - * These are the driller events that the replica system will emit. - * All functions in this interface should be implemented by the user. - */ - class ReplicaDrillerEvents - : public AZ::Debug::DrillerEBusTraits - { - public: - //! Called when a replica is instantiated. It doesn't mean it will be added to the system. - virtual void OnCreateReplica(Replica* replica) { (void)replica; } - //! Called when a replica is actually destroyed. - virtual void OnDestroyReplica(Replica* replica) { (void)replica; } - //! Called when a replica is added to the system. - virtual void OnActivateReplica(Replica* replica) { (void)replica; } - //! Called when a replica is removed from the system. - virtual void OnDeactivateReplica(Replica* replica) { (void)replica; } - //! Called every time the replica data is sent to a peer. - virtual void OnSendReplicaBegin(Replica* replica) { (void)replica; } - //! Called every time the replica data is sent to a peer. - virtual void OnSendReplicaEnd(Replica* replica, const void* data, size_t len) { (void)replica; (void)data; (void)len; } - //! Called when data is received for a replica. Called with nullptr replica pointer when data for unknown replica received. - virtual void OnReceiveReplicaBegin(Replica* replica, const void* data, size_t len) { (void)replica; (void)data; (void)len; } - //! Called when data is received for a replica. Called with nullptr replica pointer when data for unknown replica received. - virtual void OnReceiveReplicaEnd(Replica* replica) { (void)replica; } - //! Called when an ownership transfer request is received. - virtual void OnRequestReplicaChangeOwnership(Replica* replica, PeerId requestor) { (void)replica; (void)requestor; } - //! Called when a replica changes ownership, not necessarily to or from the local node. - virtual void OnReplicaChangeOwnership(Replica* replica, bool wasPrimary) { (void)replica; (void)wasPrimary; } - - //! Called when a chunk has been created. It doesn't mean it will be added to the system. - //! Object will be partially constructed at this point if you inherit from ReplicaChunk - virtual void OnCreateReplicaChunk(ReplicaChunkBase* chunk) { (void)chunk; } - //! Called when a chuck is actually destroyed. - virtual void OnDestroyReplicaChunk(ReplicaChunkBase* chunk) { (void)chunk; } - //! Called when a chunk is added to the system. - virtual void OnActivateReplicaChunk(ReplicaChunkBase* chunk) { (void)chunk; } - //! Called when a chunk is removed from the system. - virtual void OnDeactivateReplicaChunk(ReplicaChunkBase* chunk) { (void)chunk; } - //! Called when a chunk is attached to a replica. - virtual void OnAttachReplicaChunk(ReplicaChunkBase* chunk) { (void)chunk; } - //! Called when a chunk is detached from a replica. - virtual void OnDetachReplicaChunk(ReplicaChunkBase* chunk) { (void)chunk; } - //! Called every time the chunk data is sent to a peer. - virtual void OnSendReplicaChunkBegin(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, PeerId from, PeerId to) { (void)chunk; (void)chunkIndex; (void)from; (void)to; } - //! Called every time the chunk data is sent to a peer. - virtual void OnSendReplicaChunkEnd(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, const void* data, size_t len) { (void)chunk; (void)chunkIndex; (void)data; (void)len; } - //! Called when data is received for a chunk. - virtual void OnReceiveReplicaChunkBegin(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, PeerId from, PeerId to, const void* data, size_t len) { (void)chunk; (void)chunkIndex; (void)from; (void)to; (void)data; (void)len; } - //! Called when data is received for a chunk. - virtual void OnReceiveReplicaChunkEnd(ReplicaChunkBase* chunk, AZ::u32 chunkIndex) { (void)chunk; (void)chunkIndex; } - - //! Called every time a dataset is sent to a peer. - virtual void OnSendDataSet(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, DataSetBase* dataSet, PeerId from, PeerId to, const void* data, size_t len) { (void)chunk; (void)chunkIndex; (void)dataSet; (void)from; (void)to; (void)data; (void)len; } - //! Called when data is received for a dataset. - virtual void OnReceiveDataSet(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, DataSetBase* dataSet, PeerId from, PeerId to, const void* data, size_t len) { (void)chunk; (void)chunkIndex; (void)dataSet; (void)from; (void)to; (void)data; (void)len; } - - //! Called when an rpc request is received. RpcRequest pointer will be null if rpc is called on primary replica. - virtual void OnRequestRpc(ReplicaChunkBase* chunk, Internal::RpcRequest* rpc) { (void)chunk; (void)rpc; } - //! Called when an rpc is invoked. RpcRequest pointer will be null if rpc is called on primary replica. - virtual void OnInvokeRpc(ReplicaChunkBase* chunk, Internal::RpcRequest* rpc) { (void)chunk; (void)rpc; } - //! Called every time an rpc is sent to a peer. - virtual void OnSendRpc(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, Internal::RpcRequest* rpc, PeerId from, PeerId to, const void* data, size_t len) { (void)chunk; (void)chunkIndex; (void)rpc; (void)from; (void)to; (void)data; (void)len; } - //! Called when an rpc is received. - virtual void OnReceiveRpc(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, Internal::RpcRequest* rpc, PeerId from, PeerId to, const void* data, size_t len) { (void)chunk; (void)chunkIndex; (void)rpc; (void)from; (void)to; (void)data; (void)len; } - - //! Called when a replica packet is sent. - virtual void OnSend(PeerId to, const void* data, size_t len, bool isReliable) { (void)to; (void)data; (void)len; (void)isReliable; } - //! Called when a replica packet is received. - virtual void OnReceive(PeerId from, const void* data, size_t len) { (void)from; (void)data; (void)len; } - }; - - /*! - * Replica driller events are sent are sent via this the ReplicaDrillerBus. - * To receive events, derive a handler from ReplicaDrillerBus::Handler and - * attach it to the bus. - */ - typedef AZ::EBus ReplicaDrillerBus; - } // namespace Debug -} // namespace GridMate - -#endif // GM_REPLICA_DRILLER_EVENTS_H - -#pragma once diff --git a/Code/Framework/GridMate/GridMate/Replica/ReplicaMgr.cpp b/Code/Framework/GridMate/GridMate/Replica/ReplicaMgr.cpp index 7a56393bd5..1331e08bd6 100644 --- a/Code/Framework/GridMate/GridMate/Replica/ReplicaMgr.cpp +++ b/Code/Framework/GridMate/GridMate/Replica/ReplicaMgr.cpp @@ -17,7 +17,6 @@ #include #include #include -#include #include #include @@ -147,8 +146,6 @@ namespace GridMate auto callback = AZStd::make_unique((m_reliableCallbacks)); carrier->SendWithCallback(m_reliableOutBuffer.Get(), static_cast(m_reliableOutBuffer.Size()), AZStd::move(callback), GetConnectionId(), Carrier::SEND_RELIABLE, Carrier::PRIORITY_NORMAL, commChannel); - - EBUS_EVENT(Debug::ReplicaDrillerBus, OnSend, GetId(), m_reliableOutBuffer.Get(), m_reliableOutBuffer.Size(), true); } if (hasUnreliableData) @@ -164,8 +161,6 @@ namespace GridMate auto callback = AZStd::make_unique((m_unreliableCallbacks)); carrier->SendWithCallback(m_unreliableOutBuffer.Get(), static_cast(m_unreliableOutBuffer.Size()), AZStd::move(callback), GetConnectionId(), Carrier::SEND_UNRELIABLE, Carrier::PRIORITY_NORMAL, commChannel); - - EBUS_EVENT(Debug::ReplicaDrillerBus, OnSend, GetId(), m_unreliableOutBuffer.Get(), m_unreliableOutBuffer.Size(), false); } // prepare for next cycle ResetBuffer(); @@ -1024,9 +1019,6 @@ namespace GridMate */ while (!rb.IsEmptyIgnoreTrailingBits()) { - // This is used later to report the buffer information to driller. - const char* cmdBufferBegin = rb.GetCurrent(); - CmdId cmdhdr; if (!rb.Read(cmdhdr)) { @@ -1179,10 +1171,8 @@ namespace GridMate return; } - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReceiveReplicaBegin, pReplica.get(), cmdBufferBegin, rb.GetCurrent() - cmdBufferBegin); pReplica->Unmarshal(mc); OnReplicaUnmarshaled(pReplica); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReceiveReplicaEnd, pReplica.get()); } else { @@ -1195,12 +1185,10 @@ namespace GridMate pReplica->SetSyncStage(isSyncStage); pReplica->SetMigratable(isMigratable); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReceiveReplicaBegin, pReplica.get(), cmdBufferBegin, rb.GetCurrent() - cmdBufferBegin); pReplica->Unmarshal(mc); ReplicaContext rc(this, GetTime(), pFrom); RegisterReplica(pReplica, false, rc); OnReplicaUnmarshaled(pReplica); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReceiveReplicaEnd, pReplica.get()); } break; } @@ -1268,11 +1256,9 @@ namespace GridMate } if (pObj->m_upstreamHop) { - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReceiveReplicaBegin, pObj.get(), cmdBufferBegin, rb.GetCurrent() - cmdBufferBegin); mc.m_peer = pFrom; pObj->Unmarshal(mc); OnReplicaUnmarshaled(pObj); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReceiveReplicaEnd, pObj.get()); } else { @@ -1332,7 +1318,6 @@ namespace GridMate } ReadBuffer rb(GetGridMate()->GetDefaultEndianType(), m_receiveBuffer.data(), result.m_numBytes); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReceive, peer->GetId(), rb.Get(), rb.Size().GetSizeInBytesRoundUp()); _Unmarshal(rb, peer); AZ_Assert(rb.IsEmptyIgnoreTrailingBits(), "We did not process the whole message!"); } @@ -1655,7 +1640,6 @@ namespace GridMate { replica->SetPrimary(isPrimary); replica->OnChangeOwnership(rc); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReplicaChangeOwnership, replica.get(), wasPrimary); } } //----------------------------------------------------------------------------- diff --git a/Code/Framework/GridMate/GridMate/Replica/Tasks/ReplicaMarshalTasks.cpp b/Code/Framework/GridMate/GridMate/Replica/Tasks/ReplicaMarshalTasks.cpp index c1d6905e14..cab40e18ca 100644 --- a/Code/Framework/GridMate/GridMate/Replica/Tasks/ReplicaMarshalTasks.cpp +++ b/Code/Framework/GridMate/GridMate/Replica/Tasks/ReplicaMarshalTasks.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include #include @@ -72,12 +71,10 @@ namespace GridMate //----------------------------------------------------------------------------- void ReplicaMarshalTaskBase::OnSendReplicaBegin() { - EBUS_EVENT(Debug::ReplicaDrillerBus, OnSendReplicaBegin, m_replica.get()); } //----------------------------------------------------------------------------- - void ReplicaMarshalTaskBase::OnSendReplicaEnd(ReplicaPeer* to, const void* data, size_t len) + void ReplicaMarshalTaskBase::OnSendReplicaEnd(ReplicaPeer* to, const void*, size_t len) { - EBUS_EVENT(Debug::ReplicaDrillerBus, OnSendReplicaEnd, m_replica.get(), data, len); to->m_sentBytes += static_cast(len); } //----------------------------------------------------------------------------- diff --git a/Code/Framework/GridMate/GridMate/Session/LANSession.cpp b/Code/Framework/GridMate/GridMate/Session/LANSession.cpp index 223085cf13..ae1e674cf2 100644 --- a/Code/Framework/GridMate/GridMate/Session/LANSession.cpp +++ b/Code/Framework/GridMate/GridMate/Session/LANSession.cpp @@ -882,7 +882,6 @@ LANSession::OnStateHostMigrateSession(AZ::HSM& sm, const AZ::HSM::Event& e) { // check the output for more info AZStd::string errorMsg = AZStd::string::format("Failed to initialize socket at port %d!", hostPort); - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnSessionError, this, errorMsg); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnSessionError, this, errorMsg); // We can't be a real host if we failed to provide matching services. Leave(false); @@ -1146,7 +1145,6 @@ void LANSessionService::OnServiceRegistered(IGridMate* gridMate) LANSessionServiceBus::Handler::BusConnect(gridMate); - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnSessionServiceReady); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnSessionServiceReady); } diff --git a/Code/Framework/GridMate/GridMate/Session/Session.cpp b/Code/Framework/GridMate/GridMate/Session/Session.cpp index 3dcb16b08d..54e1e1dfe6 100644 --- a/Code/Framework/GridMate/GridMate/Session/Session.cpp +++ b/Code/Framework/GridMate/GridMate/Session/Session.cpp @@ -316,7 +316,6 @@ GridSession::Shutdown() m_carrier->Shutdown(); } - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnSessionDelete, this); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnSessionDelete, this); m_state = nullptr; @@ -438,7 +437,6 @@ GridSession::Update() memberStateIter = m_unboundMemberStates.erase(memberStateIter); // Both member and client state are valid! send member joined message - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnMemberJoined, this, member); EBUS_EVENT_ID(GetGridMate(), SessionEventBus, OnMemberJoined, this, member); } else @@ -1221,7 +1219,6 @@ GridSession::OnDriverError(Carrier* carrier, ConnectionID id, const DriverError& } uintptr_t idInt = reinterpret_cast(static_cast(id)); AZStd::string errorMsg = AZStd::string::format("Carrier driver error ConnectionID: %" PRIuPTR "ErrorCode: 0x%08x", idInt, error.m_errorCode); - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnSessionError, this, errorMsg); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnSessionError, this, errorMsg); if (id != InvalidConnectionID) @@ -1249,7 +1246,6 @@ GridSession::OnSecurityError(Carrier* carrier, ConnectionID id, const SecurityEr } uintptr_t idInt = reinterpret_cast(static_cast(id)); AZStd::string errorMsg = AZStd::string::format("Carrier security error ConnectionID: %" PRIuPTR " ErrorCode: 0x%08x", idInt, error.m_errorCode); - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnSessionError, this, errorMsg); } //========================================================================= @@ -1276,7 +1272,6 @@ GridSession::ElectNewHost() // AZ_Assert(m_sm.IsInState(SS_HOST_MIGRATE_ELECTION),"We should be in host migrate election state to call this function!"); GridMember* newHost = nullptr; // Allow the user to choose - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnMigrationElectHost, this, newHost); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnMigrationElectHost, this, newHost); if (newHost == nullptr || newHost->GetConnectionId() == InvalidConnectionID || newHost->IsHost()) @@ -1497,7 +1492,6 @@ GridSession::OnStateJoin(HSM& sm, const HSM::Event& e) { case SE_JOINED: { - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnSessionJoined, this); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnSessionJoined, this); sm.Transition(SS_IDLE); } return true; @@ -1591,7 +1585,6 @@ GridSession::OnStateCreate(HSM& sm, const HSM::Event& e) } sm.Transition(SS_IDLE); - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnSessionCreated, this); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnSessionCreated, this); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnSessionHosted, this); } @@ -1616,7 +1609,6 @@ GridSession::OnStateCreate(HSM& sm, const HSM::Event& e) m_carrier->Connect(m_hostAddress); - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnSessionCreated, this); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnSessionCreated, this); } @@ -1639,7 +1631,6 @@ GridSession::OnStateStart(HSM& sm, const HSM::Event& e) { case HSM::EnterEventId: { - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnSessionStart, this); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnSessionStart, this); } return true; } @@ -1660,7 +1651,6 @@ GridSession::OnStateEnd(HSM& sm, const HSM::Event& e) { case HSM::EnterEventId: { - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnSessionEnd, this); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnSessionEnd, this); } return true; } @@ -1710,7 +1700,6 @@ GridSession::OnStateHostMigrateElection(AZ::HSM& sm, const AZ::HSM::Event& e) m_hostMigrationInProcess = true; m_handshake->SetHostMigration(true); - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnMigrationStart, this); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnMigrationStart, this); m_hostMigrationTimeOut = m_state ? m_state->m_hostMigrationTimeout.Get() : 0; @@ -1890,7 +1879,6 @@ GridSession::OnStateHostMigrateSession(AZ::HSM& sm, const AZ::HSM::Event& e) GridMember* host = GetHost(); - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnMigrationEnd, this, host); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnMigrationEnd, this, host); m_myMember->m_clientState->m_newHostVote.Set(0); @@ -2004,7 +1992,6 @@ GridMember::OnReplicaActivate(const ReplicaContext& rc) rc.m_rm->AddPrimary(m_clientState->GetReplica()); // Both member and client state are valid! send member joined message - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnMemberJoined, m_session, this); EBUS_EVENT_ID(m_session->GetGridMate(), SessionEventBus, OnMemberJoined, m_session, this); } } @@ -2021,7 +2008,6 @@ GridMember::OnReplicaDeactivate(const ReplicaContext& rc) if (m_clientState) { // We are deleting the member so send leave message (we are always keeping member <-> state together). - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnMemberLeaving, m_session, this); EBUS_EVENT_ID(m_session->GetGridMate(), SessionEventBus, OnMemberLeaving, m_session, this); m_clientState->m_member = nullptr; @@ -2072,7 +2058,6 @@ GridMember::OnKick(AZ::u8 reason, const RpcContext& rc) // 2 Kick messages in quick succession can cause this to crash otherwise. if (m_session && m_session->GetHost() && rc.m_sourcePeer == m_session->GetHost()->GetIdCompact()) //Only the host can kick { - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnMemberKicked, m_session, this); EBUS_EVENT_ID(m_session->GetGridMate(), SessionEventBus, OnMemberKicked, m_session, this, reason); if (IsLocal()) @@ -2325,7 +2310,6 @@ GridMemberStateReplica::OnReplicaDeactivate(const ReplicaContext& rc) if (m_member) { // client state is gone send leave message - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnMemberLeaving, m_member->m_session, m_member); EBUS_EVENT_ID(m_member->GetSession()->GetGridMate(), SessionEventBus, OnMemberLeaving, m_member->m_session, m_member); m_member->m_clientState = nullptr; @@ -2519,7 +2503,6 @@ SessionService::Update() it = m_activeSearches.erase(it); m_completedSearches.push_back(search); - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnGridSearchComplete, search); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnGridSearchComplete, search); } else diff --git a/Code/Framework/GridMate/GridMate/Session/Session.h b/Code/Framework/GridMate/GridMate/Session/Session.h index e075a0aa48..4ab978a713 100644 --- a/Code/Framework/GridMate/GridMate/Session/Session.h +++ b/Code/Framework/GridMate/GridMate/Session/Session.h @@ -28,10 +28,6 @@ namespace GridMate extern const EndianType kSessionEndian; - namespace Debug { - class SessionDriller; - } - typedef AZ::u32 MemberIDCompact; /** * MemberID interface class. @@ -403,7 +399,6 @@ namespace GridMate friend class Internal::GridSessionReplica; friend class Internal::GridMemberStateReplica; friend class SessionService; - friend class Debug::SessionDriller; public: enum CarrierChannels { @@ -742,7 +737,6 @@ namespace GridMate : public GridMateService { friend class GridSession; - friend class Debug::SessionDriller; friend class GridSearch; public: typedef vector SessionArrayType; @@ -936,62 +930,6 @@ namespace GridMate }; } - namespace Debug - { - /** - * Session driller events, - * this events are in addition to the session event bus - */ - class SessionDrillerEvents - : public AZ::Debug::DrillerEBusTraits - { - public: - virtual ~SessionDrillerEvents() {} - - /// Callback that is called when the Session service is ready to process sessions. - virtual void OnSessionServiceReady() {} - - //virtual OnCommucationChanged() = 0 Callback that notifies the title when a member's communication settings change. - - /// Callback when we start a grid search. - virtual void OnGridSearchStart(GridSearch* gridSearch) { (void)gridSearch; } - /// Callback that notifies the title when a game search query have completed. - virtual void OnGridSearchComplete(GridSearch* gridSearch) { (void)gridSearch; } - /// Callback when we release (delete) a grid search. It's not safe to hold the grid pointer after this. - virtual void OnGridSearchRelease(GridSearch* gridSearch) { (void)gridSearch; } - - /// Callback that notifies the title when a new member joins the game session. - virtual void OnMemberJoined(GridSession* session, GridMember* member) { (void)session; (void)member; } - /// Callback that notifies the title that a member is leaving the game session. member pointer is NOT valid after the callback returns. - virtual void OnMemberLeaving(GridSession* session, GridMember* member) { (void)session; (void)member; } - // \todo a better way will be (after we solve migration) is to supply a reason to OnMemberLeaving... like the member was kicked. - // this will require that we actually remove the replica at the same moment. - /// Callback that host decided to kick a member. You will receive a OnMemberLeaving when the actual member leaves the session. - virtual void OnMemberKicked(GridSession* session, GridMember* member) { (void)session; (void)member; } - /// After this callback it is safe to access session features. If host session is fully operational if client wait for OnSessionJoined. - virtual void OnSessionCreated(GridSession* session) { (void)session; } - /// Called on client machines to indicate that we join successfully. - virtual void OnSessionJoined(GridSession* session) { (void)session; } - /// Callback that notifies the title when a session will be left. session pointer is NOT valid after the callback returns. - virtual void OnSessionDelete(GridSession* session) { (void)session; } - /// Called when a session error occurs. - virtual void OnSessionError(GridSession* session, const AZStd::string& errorMsg) { (void)session; (void)errorMsg; } - /// Called when the actual game(match) starts - virtual void OnSessionStart(GridSession* session) { (void)session; } - /// Called when the actual game(match) ends - virtual void OnSessionEnd(GridSession* session) { (void)session; } - /// Called when we start a host migration. - virtual void OnMigrationStart(GridSession* session) { (void)session; } - /// Called so the user can select a member that should be the new Host. Value will be ignored if NULL, current host or the member has invalid connection id. - virtual void OnMigrationElectHost(GridSession* session, GridMember*& newHost) { (void)session; (void)newHost; } - /// Called when the host migration has completed. - virtual void OnMigrationEnd(GridSession* session, GridMember* newHost) { (void)session; (void)newHost; } - /// Called when we have our last chance to write statistics data for member in the session. - virtual void OnWriteStatistics(GridSession* session, GridMember* member, StatisticsData& data) { (void)session; (void)member; (void)data; } - }; - - typedef AZ::EBus SessionDrillerBus; - } } // namespace GridMate #endif // GM_SESSION_H diff --git a/Code/Framework/GridMate/GridMate/gridmate_files.cmake b/Code/Framework/GridMate/GridMate/gridmate_files.cmake index e318a8adcd..99dc4257f6 100644 --- a/Code/Framework/GridMate/GridMate/gridmate_files.cmake +++ b/Code/Framework/GridMate/GridMate/gridmate_files.cmake @@ -45,12 +45,6 @@ set(FILES Containers/unordered_map.h Containers/unordered_set.h Containers/vector.h - Drillers/CarrierDriller.cpp - Drillers/CarrierDriller.h - Drillers/ReplicaDriller.cpp - Drillers/ReplicaDriller.h - Drillers/SessionDriller.cpp - Drillers/SessionDriller.h Online/OnlineUtilityThread.h Online/UserServiceTypes.h Replica/BasicHostChunkDescriptor.h @@ -71,7 +65,6 @@ set(FILES Replica/ReplicaChunkInterface.h Replica/ReplicaCommon.h Replica/ReplicaDefs.h - Replica/ReplicaDrillerEvents.h Replica/ReplicaFunctions.h Replica/ReplicaFunctions.inl Replica/ReplicaInline.inl diff --git a/Code/Framework/GridMate/Tests/Replica.cpp b/Code/Framework/GridMate/Tests/Replica.cpp index 5fef135347..4e569f525a 100644 --- a/Code/Framework/GridMate/Tests/Replica.cpp +++ b/Code/Framework/GridMate/Tests/Replica.cpp @@ -1399,2553 +1399,8 @@ public: } }; -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- -class MPSession - : public CarrierEventBus::Handler -{ -public: - ReplicaManager& GetReplicaMgr() { return m_rm; } - void SetTransport(Carrier* transport) { m_pTransport = transport; CarrierEventBus::Handler::BusConnect(transport->GetGridMate()); } - Carrier* GetTransport() { return m_pTransport; } - void SetClient(bool isClient) { m_client = isClient; } - void AcceptConn(bool accept) { m_acceptConn = accept; } - - ~MPSession() - { - CarrierEventBus::Handler::BusDisconnect(); - } - - void Update() - { - char buf[1500]; - for (ConnectionSet::iterator iConn = m_connections.begin(); iConn != m_connections.end(); ++iConn) - { - ConnectionID conn = *iConn; - Carrier::ReceiveResult result = m_pTransport->Receive(buf, 1500, conn, GM_REPLICA_TEST_SESSION_CHANNEL); - if (result.m_state == Carrier::ReceiveResult::RECEIVED) - { - if (strcmp(buf, "IM_A_CLIENT") == 0) - { - m_rm.AddPeer(conn, Mode_Client); - } - else if (strcmp(buf, "IM_A_PEER") == 0) - { - m_rm.AddPeer(conn, Mode_Peer); - } - } - } - } - - template - typename T::Ptr GetChunkFromReplica(ReplicaId id) - { - ReplicaPtr replica = GetReplicaMgr().FindReplica(id); - if (!replica) - { - return nullptr; - } - return replica->FindReplicaChunk(); - } - - ////////////////////////////////////////////////////////////////////////// - // CarrierEventBus - void OnConnectionEstablished(Carrier* carrier, ConnectionID id) override - { - if (carrier != m_pTransport) - { - return; // not for us - } - m_connections.insert(id); - if (m_client) - { - m_pTransport->Send("IM_A_CLIENT", 12, id, Carrier::SEND_RELIABLE, Carrier::PRIORITY_NORMAL, GM_REPLICA_TEST_SESSION_CHANNEL); - } - else - { - m_pTransport->Send("IM_A_PEER", 10, id, Carrier::SEND_RELIABLE, Carrier::PRIORITY_NORMAL, GM_REPLICA_TEST_SESSION_CHANNEL); - } - } - - void OnDisconnect(Carrier* carrier, ConnectionID id, CarrierDisconnectReason /*reason*/) override - { - if (carrier != m_pTransport) - { - return; // not for us - } - m_rm.RemovePeer(id); - m_connections.erase(id); - } - - void OnDriverError(Carrier* carrier, ConnectionID id, const DriverError& error) override - { - (void)error; - if (carrier != m_pTransport) - { - return; // not for us - } - m_pTransport->Disconnect(id); - } - - void OnSecurityError(Carrier* carrier, ConnectionID id, const SecurityError& error) override - { - (void)carrier; - (void)id; - (void)error; - //Ignore security warnings in unit tests - } - ////////////////////////////////////////////////////////////////////////// - - ReplicaManager m_rm; - Carrier* m_pTransport; - typedef unordered_set ConnectionSet; - ConnectionSet m_connections; - bool m_client; - bool m_acceptConn; -}; - -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- -class MyObj -{ -public: - GM_CLASS_ALLOCATOR(MyObj); - MyObj() - : m_f1(0.f) - , m_b1(false) - , m_i1(0) {} - - float m_f1; - bool m_b1; - int m_i1; -}; - -//----------------------------------------------------------------------------- -class MyCtorContext - : public CtorContextBase -{ -public: - CtorDataSet m_f; - - MyCtorContext() - : m_f(Float16Marshaler(0.f, 1.f)) - {} -}; - -//----------------------------------------------------------------------------- -class MigratableReplica - : public ReplicaChunk -{ -public: - class Descriptor - : public ReplicaChunkDescriptor - { - public: - Descriptor() - : ReplicaChunkDescriptor(MigratableReplica::GetChunkName(), sizeof(MigratableReplica)) - { - } - - ReplicaChunkBase* CreateFromStream(UnmarshalContext& mc) override - { - MyCtorContext cc; - cc.Unmarshal(*mc.m_iBuf); - - // Important hooks. Pre/Post construct allows us to detect all datasets. - if (mc.m_rm->GetUserContext(12345)) - { - AZ_TracePrintf("GridMate", "Create with UserData:%p\n", mc.m_rm->GetUserContext(12345)); - } - ReplicaChunk* chunk = aznew MigratableReplica; - return chunk; - } - - void DiscardCtorStream(UnmarshalContext& mc) override - { - MyCtorContext cc; - cc.Unmarshal(*mc.m_iBuf); - } - - void DeleteReplicaChunk(ReplicaChunkBase* chunkInstance) override { delete chunkInstance; } - - void MarshalCtorData(ReplicaChunkBase*, WriteBuffer& wb) override - { - MyCtorContext cc; - cc.m_f.Set(0.5f); - cc.Marshal(wb); - } - }; - - class MigratableReplicaDebugMsgs - : public AZ::Debug::DrillerEBusTraits - { - public: - typedef AZ::EBus EBus; - - virtual void OnNewOwner(ReplicaId repId, ReplicaManager* repMgr) = 0; - }; - - typedef AZStd::intrusive_ptr Ptr; - - GM_CLASS_ALLOCATOR(MigratableReplica); - static const char* GetChunkName() {return "MigratableReplica"; } - - MigratableReplica(MyObj* pObj = nullptr) - : MyHandler123Rpc("MyHandler123Rpc") - , m_data1("Data1") - , m_data2("Data2") - , m_data3("Data3", 3.0f, Float16Marshaler(0.0f, 10.0f)) - , m_data4("Data4") - - { - Bind(pObj); - } - - bool IsReplicaMigratable() override - { - return true; - } - - bool MyHandler123(const float& f, const RpcContext& rc) - { - (void)f; - (void)rc; - AZ_TracePrintf("GridMate", "Executed MyHandler123 requested at %u with %g on %s at %u.\n", rc.m_timestamp, f, GetReplica()->IsPrimary() ? "Primary" : "Proxy", rc.m_realTime); - return true; - } - - Rpc >::BindInterface MyHandler123Rpc; - - void UpdateChunk(const ReplicaContext& rc) override - { - if (m_pLocalObj) - { - m_data1.Set(m_pLocalObj->m_f1); - m_data1Interpolated.AddSample(m_pLocalObj->m_f1, rc.m_localTime); - - m_data2.Set(m_pLocalObj->m_i1); - m_data3.Set(m_pLocalObj->m_f1); - } - AZStd::bitset<25> bits = m_data4.Get(); - m_data4.Set(bits.flip()); - } - - void UpdateFromChunk(const ReplicaContext& rc) override - { - // AZ_TracePrintf("GridMate", "Updating proxy 0x%x on peer %d coming from peer %d %s\n", GetRepId(), rc.rm->GetLocalPeerId(), rc.myPeer->GetId(), rc.myPeer->GetConnectionId() == InvalidConnectionID ? "(orphan)" : ""); - if (m_pLocalObj) - { - m_data1Interpolated.AddSample(m_data1.Get(), m_data1.GetLastUpdateTime()); - m_pLocalObj->m_f1 = m_data1Interpolated.GetInterpolatedValue(rc.m_localTime); - - m_pLocalObj->m_i1 = m_data2.Get(); - } - m_dummy = m_data3.Get(); - } - - void OnReplicaActivate(const ReplicaContext& rc) override - { - (void)rc; - if (rc.m_rm->GetUserContext(12345)) - { - AZ_TracePrintf("GridMate", "Activate %s with UserData:%p\n", GetReplica()->IsPrimary() ? "primary" : "proxy", rc.m_rm->GetUserContext(12345)); - } - if (IsProxy()) - { - Bind(aznew MyObj()); - } - - if (IsPrimary()) - { - EBUS_EVENT(MigratableReplicaDebugMsgs::EBus, OnNewOwner, GetReplicaId(), rc.m_rm); - } - } - - void OnReplicaDeactivate(const ReplicaContext& rc) override - { - (void)rc; - if (m_pLocalObj) - { - delete m_pLocalObj; - m_pLocalObj = NULL; - } - } - - void OnReplicaChangeOwnership(const ReplicaContext& rc) override - { - (void)rc; - AZ_TracePrintf("GridMate", "Migratable replica 0x%x became %s on Peer %d\n", (int) GetReplicaId(), IsPrimary() ? "primary" : "proxy", (int) rc.m_rm->GetLocalPeerId()); - - if (IsPrimary()) - { - EBUS_EVENT(MigratableReplicaDebugMsgs::EBus, OnNewOwner, GetReplicaId(), rc.m_rm); - } - } - - void Bind(MyObj* pObj) - { - m_pLocalObj = pObj; - } -private: - DataSet m_data1; - LinearInterpExtrap m_data1Interpolated; - - DataSet m_data2; - DataSet m_data3; - DataSet > m_data4; - - MyObj* m_pLocalObj; - float m_dummy; -}; -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- -class NonMigratableReplica - : public ReplicaChunk -{ -public: - enum EBla : AZ::u8 - { - e_Bla0, - e_Bla1, - }; - typedef vector IntVectorType; - bool m_unreliableCheck; -protected: - MyObj* m_pLocalObj; - int m_prevUnreliableValue; - - bool MyHandler123(const float& f, const RpcContext& rc) - { - (void)f; - (void)rc; - AZ_TracePrintf("GridMate", "Executed MyHandler123 requested at %u with %g on %s at %u.\n", rc.m_timestamp, f, IsPrimary() ? "Primary" : "Proxy", rc.m_realTime); - return true; - } - bool MyHandler2(const float& f, int p2, const RpcContext& rc) - { - (void)f; - (void)p2; - (void)rc; - AZ_TracePrintf("GridMate", "Executed MyHandler2 requested at %u with %g,%d on %s at %u.\n", rc.m_timestamp, f, p2, IsPrimary() ? "Primary" : "Proxy", rc.m_realTime); - return true; - } - bool MyHandler3(const float& f, int p2, EBla p3, const RpcContext& rc) - { - (void)f; - (void)p2; - (void)p3; - (void)rc; - AZ_TracePrintf("GridMate", "Executed MyHandler3 requested at %u with %g,%d,%d on %s at %u.\n", rc.m_timestamp, f, p2, p3, IsPrimary() ? "Primary" : "Proxy", rc.m_realTime); - return true; - } - bool MyHandler4(const float& f, int p2, EBla p3, const IntVectorType& p4, const RpcContext& rc) - { - (void)f; - (void)p2; - (void)p3; - (void)p4; - (void)rc; - AZ_TracePrintf("GridMate", "Executed MyHandler4 requested at %u with %g,%d,%d,%d,%d on %s at %u.\n", rc.m_timestamp, f, p2, p3, p4[0], p4[1], IsPrimary() ? "Primary" : "Proxy", rc.m_realTime); - return true; - } - bool MyHandlerUnreliable(const int& i, const RpcContext& rc) - { - (void)rc; - AZ_TracePrintf("GridMate", "Executed MyHandlerUnreliable requested at %u with %d on %s at %u.\n", rc.m_timestamp, i, IsPrimary() ? "Primary" : "Proxy", rc.m_realTime); - AZ_TEST_ASSERT(i > m_prevUnreliableValue); - if ((i - m_prevUnreliableValue) > 1) - { - m_unreliableCheck = true; - } - m_prevUnreliableValue = i; - return true; - } -public: - GM_CLASS_ALLOCATOR(NonMigratableReplica); - typedef AZStd::intrusive_ptr Ptr; - static const char* GetChunkName() { return "NonMigratableReplica"; } - - Rpc >::BindInterface MyHandler123Rpc; - Rpc, RpcArg >::BindInterface MyHandler2Rpc; - Rpc, RpcArg, RpcArg >::BindInterface MyHandler3Rpc; - Rpc, RpcArg, RpcArg, RpcArg >::BindInterface MyHandler4Rpc; - - Rpc >::BindInterface MyHandlerUnreliableRpc; - - NonMigratableReplica(MyObj* pObj = NULL) - : m_unreliableCheck(false) - , m_prevUnreliableValue(0) - , MyHandler123Rpc("MyHandler123Rpc") - , MyHandler2Rpc("MyHandler2Rpc") - , MyHandler3Rpc("MyHandler3Rpc") - , MyHandler4Rpc("MyHandler4Rpc") - , MyHandlerUnreliableRpc("MyHandlerUnreliableRpc") - , m_data1("Data1") - , m_data2("Data2") - { - Bind(pObj); - } - - bool IsReplicaMigratable() override - { - return false; - } - - ~NonMigratableReplica() - { - AZ_Assert(!m_pLocalObj, "Local object should be cleared"); - } - - void UpdateChunk(const ReplicaContext& rc) override - { - m_data1.Set(m_pLocalObj->m_f1); - m_data1Interpolated.AddSample(m_pLocalObj->m_f1, rc.m_localTime); - - m_data2.Set(m_pLocalObj->m_i1); - } - - void UpdateFromChunk(const ReplicaContext& rc) override - { - m_data1Interpolated.AddSample(m_data1.Get(), m_data1.GetLastUpdateTime()); - m_pLocalObj->m_f1 = m_data1Interpolated.GetInterpolatedValue(rc.m_localTime); - - m_pLocalObj->m_i1 = m_data2.Get(); - } - - void OnReplicaActivate(const ReplicaContext& rc) override - { - (void)rc; - if (rc.m_rm->GetUserContext(12345)) - { - AZ_TracePrintf("GridMate", "Activate %s with UserData:%p\n", IsPrimary() ? "primary" : "proxy", rc.m_rm->GetUserContext(12345)); - } - if (IsProxy()) - { - Bind(aznew MyObj()); - } - } - - void OnReplicaDeactivate(const ReplicaContext& rc) override - { - (void)rc; - if (m_pLocalObj) - { - delete m_pLocalObj; - m_pLocalObj = NULL; - } - } - - void OnReplicaChangeOwnership(const ReplicaContext& rc) override - { - (void)rc; - AZ_TracePrintf("GridMate", "NonMigratable replica 0x%x became %s on Peer %d\n", (int) GetReplicaId(), IsPrimary() ? "primary" : "proxy", (int) rc.m_rm->GetLocalPeerId()); - } - - void Bind(MyObj* pObj) - { - m_pLocalObj = pObj; - } - -protected: - DataSet m_data1; - LinearInterpExtrap m_data1Interpolated; - - DataSet m_data2; -}; -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- -class MyDerivedReplica - : public NonMigratableReplica -{ -public: - GM_CLASS_ALLOCATOR(MyDerivedReplica); - - MyDerivedReplica() - : m_data3("Data3") { } - - typedef AZStd::intrusive_ptr Ptr; - static const char* GetChunkName() { return "MyDerivedReplica"; } - - virtual void UpdateChunk(const ReplicaContext& rc) override - { - NonMigratableReplica::UpdateChunk(rc); - m_data3.Set(m_pLocalObj->m_b1); - } - - virtual void UpdateFromChunk(const ReplicaContext& rc) override - { - NonMigratableReplica::UpdateFromChunk(rc); - m_pLocalObj->m_b1 = m_data3.Get(); - } - -protected: - DataSet m_data3; -}; -//----------------------------------------------------------------------------- - -class ReplicaGMTest - : public UnitTest::GridMateMPTestFixture - , public ::testing::Test -{}; - -TEST_F(ReplicaGMTest, DISABLED_ReplicaTest) - { - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - - AZ_TracePrintf("GridMate", "\n"); - enum - { - s1, - s2, - s3, - nSessions - }; - const int k_delay = 100; - - // Setting up simulator with outgoing packet loss - DefaultSimulator clientSimulator; - clientSimulator.SetOutgoingPacketLoss(1, 1); - - MPSession sessions[nSessions]; - - MyObj* s1obj1 = NULL, * s1obj2 = NULL, * s2obj1 = NULL, * s3obj1 = NULL; - MigratableReplica::Ptr s1rep1, s3rep1; - NonMigratableReplica::Ptr s1rep2; - MyDerivedReplica::Ptr s2rep1; - ReplicaId s1rep1id = 0, s1rep2id = 0, s2rep1id = 0, s3rep1id = 0; - - // initialize transport - int basePort = 4427; - for (int i = 0; i < nSessions; ++i) - { - TestCarrierDesc desc; - desc.m_port = basePort + i; - desc.m_enableDisconnectDetection = false; - if (i == s2) - { - desc.m_simulator = &clientSimulator; - } - - // initialize replica managers - // s2(p)<-->(p)s1(p)<-->(c)s3 - sessions[i].SetTransport(DefaultCarrier::Create(desc, m_gridMate)); - sessions[i].AcceptConn(true); - sessions[i].SetClient(i == s3); - sessions[i].GetReplicaMgr().Init(ReplicaMgrDesc(i + 1, sessions[i].GetTransport(), 0, i == 0 ? ReplicaMgrDesc::Role_SyncHost : 0)); - sessions[i].GetReplicaMgr().RegisterUserContext(12345, reinterpret_cast(static_cast(i + 1))); - } - sessions[0].GetReplicaMgr().SetLocalLagAmt(50); - - // put something on s1 to get it going - auto rep = Replica::CreateReplica(nullptr); - s1rep1 = CreateAndAttachReplicaChunk(rep); - s1rep1id = sessions[s1].GetReplicaMgr().AddPrimary(rep); - s1rep1->Bind(s1obj1 = aznew MyObj()); - - // connect s2 to s1 - sessions[s2].GetTransport()->Connect("127.0.0.1", basePort); - - // main test loop - static bool keepRunning = true; - int tick = 0; - while (keepRunning) - { - // perform some random actions on a timeline - switch (tick) - { - case 5: - { - // connect s3 to s1 - sessions[s3].GetTransport()->Connect("127.0.0.1", basePort); - break; - } - case 25: - // remove s1rep1 - AZ_TEST_ASSERT(s1rep1id); - s1rep1->GetReplica()->Destroy(); - s1obj1 = NULL; - break; - case 35: - //AZ_TracePrintf("GridMate", "No more updates.\n"); - break; - case 70: - //AZ_TracePrintf("GridMate", "Restart updates.\n"); - break; - case 90: - keepRunning = false; - } - - // add an object on s2 - if (sessions[s2].GetReplicaMgr().IsReady()) - { - if (!s2rep1id) - { - auto newReplica = Replica::CreateReplica(nullptr); - s2rep1 = CreateAndAttachReplicaChunk(newReplica); - s2rep1id = sessions[s2].GetReplicaMgr().AddPrimary(newReplica); - s2rep1->Bind(s2obj1 = aznew MyObj()); - } - else - { - static bool sends2rep1rpc = true; - if (sends2rep1rpc && tick >= 20) - { - s2rep1->MyHandler123Rpc(5.f); - s2rep1->MyHandler2Rpc(6.0f, 1); - s2rep1->MyHandler3Rpc(7.0f, 2, NonMigratableReplica::e_Bla0); - NonMigratableReplica::IntVectorType v; - v.push_back(10); - v.push_back(13); - s2rep1->MyHandler4Rpc(8.0f, 3, NonMigratableReplica::e_Bla1, v); - sends2rep1rpc = false; - } - } - } - - // add object on s1 - if (sessions[s1].GetReplicaMgr().IsReady()) - { - if (!s1rep2) - { - auto newReplica = Replica::CreateReplica(nullptr); - s1rep2 = CreateAndAttachReplicaChunk(newReplica); - s1rep2id = sessions[s1].GetReplicaMgr().AddPrimary(newReplica); - s1rep2->Bind(s1obj2 = aznew MyObj); - } - else - { - if (s1rep2id && tick >= 40) - { - s1rep2->GetReplica()->Destroy(); - s1obj2 = NULL; - s1rep2id = 0; - } - } - } - - // add object on s3 - if (sessions[s3].GetReplicaMgr().IsReady()) - { - if (!s3rep1) - { - auto newReplica = Replica::CreateReplica(nullptr); - s3rep1 = CreateAndAttachReplicaChunk(newReplica); - s3rep1id = sessions[s3].GetReplicaMgr().AddPrimary(newReplica); - s3rep1->Bind(s3obj1 = aznew MyObj()); - } - else - { - if (s3rep1id && tick >= 45) - { - s3rep1->MyHandler123Rpc(-1.f); - s3rep1->GetReplica()->Destroy(); - s3obj1 = NULL; - s3rep1id = 0; - } - } - } - - { // Testing unreliable rpcs: enabling network simulator with outgoing packetloss, - // calling 10 rpcs with 1..10 int argument, checking if replicas got rpcs in an order, and have missing calls - static bool requestrpc = true; - if (s3rep1id && requestrpc) - { - if (ReplicaPtr pObj = sessions[s2].GetReplicaMgr().FindReplica(s3rep1id)) - { - pObj->FindReplicaChunk()->MyHandler123Rpc(2.0f); - requestrpc = false; - } - } - - static bool unreliableRequest = true; - static int numUnreliableRequests = 0; - if (sessions[s2].GetReplicaMgr().IsReady() && s2rep1 && tick > 15 && unreliableRequest) - { - // Starting packet loss - unreliableRequest = false; - } - - if (!unreliableRequest && numUnreliableRequests < 10) - { - if (numUnreliableRequests == 4) - { - clientSimulator.Enable(); - } - else if (numUnreliableRequests == 5) - { - clientSimulator.Disable(); - } - s2rep1->MyHandlerUnreliableRpc(++numUnreliableRequests); - } - - static bool checkUnreliableDelivery = true; - if (checkUnreliableDelivery && tick >= 25) - { - // Stopping packet loss - ReplicaPtr rep1 = sessions[s1].GetReplicaMgr().FindReplica(s2rep1->GetReplicaId()); - ReplicaPtr rep3 = sessions[s3].GetReplicaMgr().FindReplica(s2rep1->GetReplicaId()); - AZ_TEST_ASSERT(rep1); - AZ_TEST_ASSERT(rep3); - AZ_TEST_ASSERT(rep1->FindReplicaChunk()->m_unreliableCheck); - AZ_TEST_ASSERT(rep3->FindReplicaChunk()->m_unreliableCheck); - checkUnreliableDelivery = false; - } - } - - // modify local objects - if (tick < 20 || tick > 70) - { - if (s1obj1) - { - s1obj1->m_f1 += 0.5f; - s1obj1->m_i1 += 1; - s1obj1->m_b1 = !s1obj1->m_b1; - } - if (s1obj2) - { - s1obj2->m_f1 += 1.0f; - s1obj2->m_i1 -= 1; - s1obj2->m_b1 = !s1obj2->m_b1; - } - if (s2obj1) - { - s2obj1->m_f1 += 0.1f; - s2obj1->m_i1 += 2; - s2obj1->m_b1 = !s2obj1->m_b1; - } - if (s3obj1) - { - s3obj1->m_f1 += 0.3f; - s3obj1->m_i1 += 3; - s3obj1->m_b1 = !s3obj1->m_b1; - } - } - ++tick; - // tick everything - for (int i = 0; i < nSessions; ++i) - { - sessions[i].Update(); - sessions[i].GetReplicaMgr().Unmarshal(); - } - for (int i = 0; i < nSessions; ++i) - { - sessions[i].GetReplicaMgr().UpdateReplicas(); - } - for (int i = 0; i < nSessions; ++i) - { - sessions[i].GetReplicaMgr().UpdateFromReplicas(); - sessions[i].GetReplicaMgr().Marshal(); - } - for (int i = 0; i < nSessions; ++i) - { - sessions[i].GetTransport()->Update(); - } - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(k_delay)); - } - - for (int i = 0; i < nSessions; ++i) - { - sessions[i].GetReplicaMgr().Shutdown(); - DefaultCarrier::Destroy(sessions[i].GetTransport()); - } - } - -class ForcedReplicaMigrationTest - : public UnitTest::GridMateMPTestFixture - , public ReplicaMgrCallbackBus::Handler - , public MigratableReplica::MigratableReplicaDebugMsgs::EBus::Handler - , public ::testing::Test -{ - void OnNewHost(bool isHost, ReplicaManager* pMgr) override - { - if (isHost) - { - AZ_TracePrintf("GridMate", "Peer %d has completed host migration and is now the host.\n", (int)pMgr->GetLocalPeerId()); - pMgr->SetSendTimeInterval(k_hostSendRateMs); - m_newHostEventOnNewHostCount++; - } - else - { - AZ_TracePrintf("GridMate", "Peer %d has has received notification that host migration is complete.\n", (int)pMgr->GetLocalPeerId()); - pMgr->SetSendTimeInterval(0); - m_newHostEventOnPeersCount++; - } - } - - void OnNewOwner(ReplicaId repId, ReplicaManager* repMgr) override - { - AZ_TracePrintf("GridMate", "Replica 0x%08x got new owner %d on frame %d.\n", repId, (int)repMgr->GetLocalPeerId(), m_frameCount); - m_replicaOwnership[repId] = repMgr; - } - -public: - ForcedReplicaMigrationTest() { ReplicaMgrCallbackBus::Handler::BusConnect(m_gridMate); } - ~ForcedReplicaMigrationTest() { ReplicaMgrCallbackBus::Handler::BusDisconnect(); } - - - enum - { - p1, p2, p3, p4, p5, nPeers - }; - - static const int k_frameTimePerNodeMs = 10; - static const int k_numFramesToRun = 300; - static const int k_hostSendRateMs = k_frameTimePerNodeMs * nPeers * 2; // limiting host send rate x2 times - - int m_frameCount; - int m_newHostEventOnNewHostCount; - int m_newHostEventOnPeersCount; - AZStd::unordered_map m_replicaOwnership; -}; - -const int ForcedReplicaMigrationTest::k_frameTimePerNodeMs; -const int ForcedReplicaMigrationTest::k_numFramesToRun; -const int ForcedReplicaMigrationTest::k_hostSendRateMs; - -TEST_F(ForcedReplicaMigrationTest, DISABLED_ForcedReplicaMigrationTest) - { - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - - MPSession peers[nPeers]; - MigratableReplica::Ptr migrRep[nPeers]; - NonMigratableReplica::Ptr nonMigrRep[nPeers]; - - m_newHostEventOnNewHostCount = 0; - m_newHostEventOnPeersCount = 0; - - MigratableReplica::MigratableReplicaDebugMsgs::EBus::Handler::BusConnect(); - - // initialize full-mesh P2P session - int basePort = 4427; - for (int i = 0; i < nPeers; ++i) - { - TestCarrierDesc desc; - desc.m_port = basePort + i; - desc.m_enableDisconnectDetection = /*false*/ true; - desc.m_threadUpdateTimeMS = k_frameTimePerNodeMs / 2; - - // initialize replica managers - peers[i].SetTransport(DefaultCarrier::Create(desc, m_gridMate)); - peers[i].AcceptConn(true); - peers[i].SetClient(false); - peers[i].GetReplicaMgr().Init(ReplicaMgrDesc(i + 1 - , peers[i].GetTransport() - , 0 - , i == 0 ? ReplicaMgrDesc::Role_SyncHost : 0 - , i == 0 ? k_hostSendRateMs : 0)); - } - - AZ_TracePrintf("GridMate", "\n"); - m_frameCount = 0; - while (m_frameCount < k_numFramesToRun) - { - static bool allReady = false; - // establish all connections - if (m_frameCount < nPeers) - { - for (int i = 0; i < m_frameCount; ++i) - { - peers[m_frameCount].GetTransport()->Connect("127.0.0.1", basePort + i); - } - } - - if (!allReady) - { - allReady = true; - for (int i = 0; i < nPeers; ++i) - { - if (!peers[i].GetReplicaMgr().IsReady()) - { - allReady = false; - } - } - if (allReady) - { - AZ_TracePrintf("GridMate", "All peers ready at frame %d\n", m_frameCount); - } - } - - // perform tests - if (allReady) - { - // add replicas - static bool addReplicas = true; - if (addReplicas) - { - for (int i = 0; i < nPeers; ++i) - { - { - auto rep = Replica::CreateReplica(nullptr); - migrRep[i] = CreateAndAttachReplicaChunk(rep, aznew MyObj()); - peers[i].GetReplicaMgr().AddPrimary(rep); - AZ_TEST_ASSERT(m_replicaOwnership[migrRep[i]->GetReplicaId()] == &peers[i].GetReplicaMgr()); - } - { - auto rep = Replica::CreateReplica(nullptr); - nonMigrRep[i] = CreateAndAttachReplicaChunk(rep, aznew MyObj()); - peers[i].GetReplicaMgr().AddPrimary(rep); - } - } - addReplicas = false; - AZ_TracePrintf("GridMate", "Replicas added at frame %d\n", m_frameCount); - } - - // disconnect p3 and trigger peer migration - static bool dropP3 = true; - if (m_frameCount > 50 && dropP3) - { - peers[p3].GetTransport()->Disconnect(AllConnections); - dropP3 = false; - AZ_TracePrintf("GridMate", "Dropped P3 at frame %d\n", m_frameCount); - } - - // Check that p3's MigratableReplica has migrated to p1 (host) - if (m_frameCount == 85) - { - AZ_TEST_ASSERT(m_replicaOwnership[migrRep[p3]->GetReplicaId()] == &peers[p1].GetReplicaMgr()); - } - - // disconnect p1 and trigger host loss - static bool dropP1 = true; - if (m_frameCount > 100 && dropP1) - { - peers[p1].GetTransport()->Disconnect(AllConnections); - dropP1 = false; - AZ_TracePrintf("GridMate", "Dropped P1 at frame %d\n", m_frameCount); - } - - // promote p2 to host - static bool promoteP2 = true; - if (m_frameCount > 150 && promoteP2) - { - peers[p2].GetReplicaMgr().Promote(); - promoteP2 = false; - AZ_TracePrintf("GridMate", "Promoted P2 at frame %d\n", m_frameCount); - } - } - - // tick - int tickPeer = m_frameCount++ % nPeers; - peers[tickPeer].Update(); - peers[tickPeer].GetReplicaMgr().Unmarshal(); - peers[tickPeer].GetReplicaMgr().UpdateReplicas(); - peers[tickPeer].GetReplicaMgr().UpdateFromReplicas(); - peers[tickPeer].GetReplicaMgr().Marshal(); - peers[tickPeer].GetTransport()->Update(); - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(k_frameTimePerNodeMs)); - } - - // Check that p1's MigratableReplicas (including the one from p3) have migrated to p2 (host) - AZ_TEST_ASSERT(m_replicaOwnership[migrRep[p1]->GetReplicaId()] == &peers[p2].GetReplicaMgr()); - AZ_TEST_ASSERT(m_replicaOwnership[migrRep[p3]->GetReplicaId()] == &peers[p2].GetReplicaMgr()); - - AZ_TEST_ASSERT(m_newHostEventOnNewHostCount == 1); // New host should have received OnNewHost event - AZ_TEST_ASSERT(m_newHostEventOnPeersCount == 2); // 2 peers remaining should have received OnNewHost event - - // clean up - for (int i = 0; i < nPeers; ++i) - { - peers[i].GetReplicaMgr().Shutdown(); - DefaultCarrier::Destroy(peers[i].GetTransport()); - } - - MigratableReplica::MigratableReplicaDebugMsgs::EBus::Handler::BusDisconnect(); - } - -class ReplicaMigrationRequestTest - : public UnitTest::GridMateMPTestFixture - , public ::testing::Test -{ -public: - enum - { - Host, - Peer1, - Peer2, - Client1, - Client2, - TotalNodes - }; - - class AlwaysMigratable - : public ReplicaChunk - { - public: - GM_CLASS_ALLOCATOR(AlwaysMigratable); - typedef AZStd::intrusive_ptr Ptr; - static const char* GetChunkName() { return "AlwaysMigratable"; } - - AlwaysMigratable() - : UpdateControlValue("UpdateControlValue") - , m_requests(0) - , m_accepted(0) - , m_triggerNextTransfer(false) - , m_owner("Owner") - , m_control("Control") - { - } - - bool IsReplicaMigratable() override - { - return true; - } - - bool AcceptChangeOwnership(PeerId requestor, const ReplicaContext& rc) override - { - AZ_TracePrintf("GridMate", "Node %d accepted transfer of AlwaysMigratable 0x%x to node %d.\n", rc.m_rm->GetLocalPeerId() - 1, GetReplicaId(), requestor - 1); - m_requests++; - m_accepted++; - - if (rc.m_rm->GetLocalPeerId() - 1 == Peer2 && requestor - 1 == Host) - { - m_triggerNextTransfer = true; - } - - return true; - } - - void OnReplicaActivate(const ReplicaContext& rc) override - { - if (IsPrimary()) - { - m_owner.Set(rc.m_rm->GetLocalPeerId() - 1); - m_control.Set(rc.m_rm->GetLocalPeerId() - 1); - } - } - - void OnReplicaChangeOwnership(const ReplicaContext& rc) override - { - if (IsPrimary()) - { - AZ_TracePrintf("GridMate", "OnChangeOwnership: 0x%04x Became primary on node %d\n", GetReplicaId(), rc.m_rm->GetLocalPeerId() - 1); - m_owner.Set(rc.m_rm->GetLocalPeerId() - 1); - } - else - { - AZ_TracePrintf("GridMate", "OnChangeOwnership: 0x%04x Became proxy on node %d\n", GetReplicaId(), rc.m_rm->GetLocalPeerId() - 1); - if (m_triggerNextTransfer) - { - GetReplica()->RequestChangeOwnership(Client2 + 1); - m_triggerNextTransfer = false; - } - } - } - - bool UpdateControlValueFn(const RpcContext& rc) - { - (void)rc; - m_control.Set(GetReplicaManager()->GetLocalPeerId() - 1); - return false; - } - Rpc<>::BindInterface UpdateControlValue; - - int m_requests; - int m_accepted; - bool m_triggerNextTransfer; - - DataSet m_owner; - DataSet m_control; - }; - - class NeverMigratable - : public AlwaysMigratable - { - public: - GM_CLASS_ALLOCATOR(NeverMigratable); - typedef AZStd::intrusive_ptr Ptr; - static const char* GetChunkName() { return "NeverMigratable"; } - - NeverMigratable() - { - } - - bool IsReplicaMigratable() override - { - return false; - } - }; - - class SometimesMigratable - : public AlwaysMigratable - { - public: - GM_CLASS_ALLOCATOR(SometimesMigratable); - typedef AZStd::intrusive_ptr Ptr; - static const char* GetChunkName() { return "SometimesMigratable"; } - - SometimesMigratable() - { - m_acceptMigrationRequests = false; - } - - virtual bool AcceptChangeOwnership(PeerId requestor, const ReplicaContext& rc) override - { - (void)requestor; - (void)rc; - m_requests++; - if (m_acceptMigrationRequests) - { - AZ_TracePrintf("GridMate", "Node %d accepted transfer of SometimesMigratable 0x%x to node %d.\n", rc.m_rm->GetLocalPeerId() - 1, GetReplicaId(), requestor - 1); - m_accepted++; - return true; - } - return false; - } - - bool m_acceptMigrationRequests; - }; - - struct Node - { - MPSession m_session; - AlwaysMigratable::Ptr m_always; - NeverMigratable::Ptr m_never; - SometimesMigratable::Ptr m_sometimes; - }; - - - static const int k_frameTimePerNodeMs = 10; - static const int k_hostSendTimeMs = k_frameTimePerNodeMs * TotalNodes * 4; // limiting host send rate to be x4 times slower than tick -}; - -TEST_F(ReplicaMigrationRequestTest, DISABLED_ReplicaMigrationRequestTest) - { - /* - Topology: - P1---P2 - \ / - \ / - H - / \ - / \ - C1 C2 - - Migration pattern: - AlwaysMigratable: - P1 -> P2 - P2 -> Host -> C2 (both at same time, with C2 arriving second) - Host -> C1 - C1 -> C2 -> Host - C2 -> P1 - NeverMigratable: - P1 -> C1 (Forbidden) - C2 -> P2 (Forbidden) - SometimesMigratable: - P1 -> Host - C1 -> P1 - P2 -> C2 (Forbidden) - C2 -> Host (Forbidden) - */ - - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - - Node nodes[TotalNodes]; - int basePort = 4427; - for (int i = 0; i < TotalNodes; ++i) - { - TestCarrierDesc desc; - desc.m_port = basePort + i; - desc.m_connectionTimeoutMS = 15000; - // initialize replica managers - nodes[i].m_session.SetTransport(DefaultCarrier::Create(desc, m_gridMate)); - nodes[i].m_session.AcceptConn(true); - nodes[i].m_session.SetClient(i == Client1 || i == Client2); - nodes[i].m_session.GetReplicaMgr().Init(ReplicaMgrDesc(i + 1 - , nodes[i].m_session.GetTransport() - , 0 - , i == Host ? ReplicaMgrDesc::Role_SyncHost : 0 - , i == Host ? k_hostSendTimeMs : 0)); - } - - // Connect all the nodes - nodes[Peer1].m_session.GetTransport()->Connect("127.0.0.1", basePort + Host); - nodes[Peer2].m_session.GetTransport()->Connect("127.0.0.1", basePort + Host); - nodes[Client1].m_session.GetTransport()->Connect("127.0.0.1", basePort + Host); - nodes[Client2].m_session.GetTransport()->Connect("127.0.0.1", basePort + Host); - nodes[Peer1].m_session.GetTransport()->Connect("127.0.0.1", basePort + Peer2); - - - int framesToRun = 800; - for (int iTick = 0; iTick < framesToRun; ++iTick) - { - for (int iNode = 0; iNode < TotalNodes; ++iNode) - { - if (nodes[iNode].m_session.GetReplicaMgr().IsReady()) - { - if (nodes[iNode].m_always == nullptr) - { - { - auto rep = Replica::CreateReplica(nullptr); - nodes[iNode].m_always = CreateAndAttachReplicaChunk(rep); - nodes[iNode].m_session.GetReplicaMgr().AddPrimary(rep); - } - { - auto rep = Replica::CreateReplica(nullptr); - nodes[iNode].m_never = CreateAndAttachReplicaChunk(rep); - nodes[iNode].m_session.GetReplicaMgr().AddPrimary(rep); - } - { - auto rep = Replica::CreateReplica(nullptr); - nodes[iNode].m_sometimes = CreateAndAttachReplicaChunk(rep); - nodes[iNode].m_sometimes->m_acceptMigrationRequests = iNode == Peer1 || iNode == Client1; - nodes[iNode].m_session.GetReplicaMgr().AddPrimary(rep); - } - } - } - } - - // First round of migrations - if (iTick == 200) - { - // P1 -> P2 - ReplicaPtr aP1onP2 = nodes[Peer2].m_session.GetReplicaMgr().FindReplica(nodes[Peer1].m_always->GetReplicaId()); - AZ_TEST_ASSERT(aP1onP2); - aP1onP2->RequestChangeOwnership(); - - // P2 -> Host -> C2 (both at same time, with C2 arriving second) - ReplicaPtr aP2onH = nodes[Host].m_session.GetReplicaMgr().FindReplica(nodes[Peer2].m_always->GetReplicaId()); - AZ_TEST_ASSERT(aP2onH); - aP2onH->RequestChangeOwnership(); - - // Host -> C1 - ReplicaPtr aHonC1 = nodes[Client1].m_session.GetReplicaMgr().FindReplica(nodes[Host].m_always->GetReplicaId()); - AZ_TEST_ASSERT(aHonC1); - aHonC1->RequestChangeOwnership(); - - // C1 -> C2 -> Host (first migration) - ReplicaPtr aC1onC2 = nodes[Client2].m_session.GetReplicaMgr().FindReplica(nodes[Client1].m_always->GetReplicaId()); - AZ_TEST_ASSERT(aC1onC2); - aC1onC2->RequestChangeOwnership(); - - // C2 -> P1 - ReplicaPtr aC2onP1 = nodes[Peer1].m_session.GetReplicaMgr().FindReplica(nodes[Client2].m_always->GetReplicaId()); - AZ_TEST_ASSERT(aC2onP1); - aC2onP1->RequestChangeOwnership(); - - // P1 -> C1 (Forbidden) - ReplicaPtr nP1onC1 = nodes[Client1].m_session.GetReplicaMgr().FindReplica(nodes[Peer1].m_never->GetReplicaId()); - AZ_TEST_ASSERT(nP1onC1); - nP1onC1->RequestChangeOwnership(); - - // C2 -> P2 (Forbidden) - ReplicaPtr nC2onP2 = nodes[Peer2].m_session.GetReplicaMgr().FindReplica(nodes[Client2].m_never->GetReplicaId()); - AZ_TEST_ASSERT(nC2onP2); - nC2onP2->RequestChangeOwnership(); - - // P1 -> Host - ReplicaPtr sP1onH = nodes[Host].m_session.GetReplicaMgr().FindReplica(nodes[Peer1].m_sometimes->GetReplicaId()); - AZ_TEST_ASSERT(sP1onH); - sP1onH->RequestChangeOwnership(); - - // C1 -> P1 - ReplicaPtr sC1onP1 = nodes[Peer1].m_session.GetReplicaMgr().FindReplica(nodes[Client1].m_sometimes->GetReplicaId()); - AZ_TEST_ASSERT(sC1onP1); - sC1onP1->RequestChangeOwnership(); - - // P2 -> C2 (Forbidden) - ReplicaPtr sP2onC2 = nodes[Client2].m_session.GetReplicaMgr().FindReplica(nodes[Peer2].m_sometimes->GetReplicaId()); - AZ_TEST_ASSERT(sP2onC2); - sP2onC2->RequestChangeOwnership(); - - // C2 -> Host (Forbidden) - ReplicaPtr sC2onH = nodes[Host].m_session.GetReplicaMgr().FindReplica(nodes[Client2].m_sometimes->GetReplicaId()); - AZ_TEST_ASSERT(sC2onH); - sC2onH->RequestChangeOwnership(); - } - - // Second round of migrations - if (iTick == 400) - { - // C1 -> C2 -> Host (1st migration) - AZ_TEST_ASSERT(nodes[Client1].m_always->m_requests == 1); - AZ_TEST_ASSERT(nodes[Client1].m_always->m_accepted == 1); - AZ_TEST_ASSERT(nodes[Client1].m_always->GetReplica()->IsProxy()); - AZ_TEST_ASSERT(nodes[Client1].m_always->m_owner.Get() == Client2); - AZ_TEST_ASSERT(nodes[Client2].m_session.GetReplicaMgr().FindReplica(nodes[Client1].m_always->GetReplicaId())->IsPrimary()); - - // C1 -> C2 -> Host (2nd migration) - ReplicaPtr aHonC1 = nodes[Host].m_session.GetReplicaMgr().FindReplica(nodes[Client1].m_always->GetReplicaId()); - AZ_TEST_ASSERT(aHonC1); - aHonC1->RequestChangeOwnership(); - } - - // Send non-authoritative control RPCs - if (iTick == 600) - { - // P1 -> P2 - AlwaysMigratable::Ptr aP1onH = nodes[Host].m_session.GetChunkFromReplica(nodes[Peer1].m_always->GetReplicaId()); - aP1onH->UpdateControlValue(); - // P2 -> Host -> C2 (both at same time, with C2 arriving second) - AlwaysMigratable::Ptr aP2onC1 = nodes[Client1].m_session.GetChunkFromReplica(nodes[Peer2].m_always->GetReplicaId()); - aP2onC1->UpdateControlValue(); - // Host -> C1 - AlwaysMigratable::Ptr aHonP1 = nodes[Peer1].m_session.GetChunkFromReplica(nodes[Host].m_always->GetReplicaId()); - aHonP1->UpdateControlValue(); - // C1 -> C2 -> Host - AlwaysMigratable::Ptr aC1onP2 = nodes[Peer2].m_session.GetChunkFromReplica(nodes[Client1].m_always->GetReplicaId()); - aC1onP2->UpdateControlValue(); - // C2 -> P1 - AlwaysMigratable::Ptr aC2onP2 = nodes[Peer2].m_session.GetChunkFromReplica(nodes[Client2].m_always->GetReplicaId()); - aC2onP2->UpdateControlValue(); - // P1 -> C1 (Forbidden) - NeverMigratable::Ptr nP1onH = nodes[Host].m_session.GetChunkFromReplica(nodes[Peer1].m_never->GetReplicaId()); - nP1onH->UpdateControlValue(); - // C2 -> P2 (Forbidden) - NeverMigratable::Ptr nC2onP1 = nodes[Peer1].m_session.GetChunkFromReplica(nodes[Client2].m_never->GetReplicaId()); - nC2onP1->UpdateControlValue(); - // P1 -> Host - SometimesMigratable::Ptr sP1onH = nodes[Host].m_session.GetChunkFromReplica(nodes[Peer1].m_sometimes->GetReplicaId()); - sP1onH->UpdateControlValue(); - // C1 -> P1 - SometimesMigratable::Ptr sC1onC2 = nodes[Client2].m_session.GetChunkFromReplica(nodes[Client1].m_sometimes->GetReplicaId()); - sC1onC2->UpdateControlValue(); - // P2 -> C2 (Forbidden) - SometimesMigratable::Ptr sP2onC2 = nodes[Client2].m_session.GetChunkFromReplica(nodes[Peer2].m_sometimes->GetReplicaId()); - sP2onC2->UpdateControlValue(); - // C2 -> Host (Forbidden) - SometimesMigratable::Ptr sC2onP1 = nodes[Peer1].m_session.GetChunkFromReplica(nodes[Client2].m_sometimes->GetReplicaId()); - sC2onP1->UpdateControlValue(); - } - - // tick - int tickNode = iTick % TotalNodes; - nodes[tickNode].m_session.Update(); - nodes[tickNode].m_session.GetReplicaMgr().Unmarshal(); - nodes[tickNode].m_session.GetReplicaMgr().UpdateFromReplicas(); - nodes[tickNode].m_session.GetReplicaMgr().UpdateReplicas(); - nodes[tickNode].m_session.GetReplicaMgr().Marshal(); - nodes[tickNode].m_session.GetTransport()->Update(); - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(k_frameTimePerNodeMs)); - } - - // P1 -> P2 - AZ_TEST_ASSERT(nodes[Peer1].m_always->m_requests == 1); - AZ_TEST_ASSERT(nodes[Peer1].m_always->m_accepted == 1); - AZ_TEST_ASSERT(nodes[Peer1].m_always->GetReplica()->IsProxy()); - AZ_TEST_ASSERT(nodes[Peer1].m_always->m_owner.Get() == Peer2); - AZ_TEST_ASSERT(nodes[Peer2].m_session.GetReplicaMgr().FindReplica(nodes[Peer1].m_always->GetReplicaId())->IsPrimary()); - AZ_TEST_ASSERT(nodes[Peer1].m_always->m_control.Get() == Peer2); - - // P2 -> Host -> C2 (both at same time, with C2 arriving second) - AZ_TEST_ASSERT(nodes[Peer2].m_always->m_requests == 1); - AZ_TEST_ASSERT(nodes[Peer2].m_always->m_accepted == 1); - AZ_TEST_ASSERT(nodes[Peer2].m_always->GetReplica()->IsProxy()); - AZ_TEST_ASSERT(nodes[Peer2].m_always->m_owner.Get() == Client2); - AlwaysMigratable::Ptr aP2onH = nodes[Host].m_session.GetChunkFromReplica(nodes[Peer2].m_always->GetReplicaId()); - AZ_TEST_ASSERT(aP2onH->m_requests == 1); - AZ_TEST_ASSERT(aP2onH->m_accepted == 1); - AZ_TEST_ASSERT(aP2onH->GetReplica()->IsProxy()); - AZ_TEST_ASSERT(aP2onH->m_owner.Get() == Client2); - AZ_TEST_ASSERT(nodes[Client2].m_session.GetReplicaMgr().FindReplica(nodes[Peer2].m_always->GetReplicaId())->IsPrimary()); - AZ_TEST_ASSERT(nodes[Peer2].m_always->m_control.Get() == Client2); - - // Host -> C1 - AZ_TEST_ASSERT(nodes[Host].m_always->m_requests == 1); - AZ_TEST_ASSERT(nodes[Host].m_always->m_accepted == 1); - AZ_TEST_ASSERT(nodes[Host].m_always->GetReplica()->IsProxy()); - AZ_TEST_ASSERT(nodes[Host].m_always->m_owner.Get() == Client1); - AZ_TEST_ASSERT(nodes[Client1].m_session.GetReplicaMgr().FindReplica(nodes[Host].m_always->GetReplicaId())->IsPrimary()); - AZ_TEST_ASSERT(nodes[Host].m_always->m_control.Get() == Client1); - - // C1 -> C2 -> Host (2nd migration) - AZ_TEST_ASSERT(nodes[Client1].m_always->m_requests == 1); - AZ_TEST_ASSERT(nodes[Client1].m_always->m_accepted == 1); - AZ_TEST_ASSERT(nodes[Client1].m_always->GetReplica()->IsProxy()); - AZ_TEST_ASSERT(nodes[Client1].m_always->m_owner.Get() == Host); - AlwaysMigratable::Ptr aC1onC2 = nodes[Client2].m_session.GetChunkFromReplica(nodes[Client1].m_always->GetReplicaId()); - AZ_TEST_ASSERT(aC1onC2->m_requests == 1); - AZ_TEST_ASSERT(aC1onC2->m_accepted == 1); - AZ_TEST_ASSERT(aC1onC2->GetReplica()->IsProxy()); - AZ_TEST_ASSERT(aC1onC2->m_owner.Get() == Host); - AZ_TEST_ASSERT(nodes[Host].m_session.GetReplicaMgr().FindReplica(nodes[Client1].m_always->GetReplicaId())->IsPrimary()); - AZ_TEST_ASSERT(nodes[Client1].m_always->m_control.Get() == Host); - - // C2 -> P1 - AZ_TEST_ASSERT(nodes[Client2].m_always->m_requests == 1); - AZ_TEST_ASSERT(nodes[Client2].m_always->m_accepted == 1); - AZ_TEST_ASSERT(nodes[Client2].m_always->GetReplica()->IsProxy()); - AZ_TEST_ASSERT(nodes[Client2].m_always->m_owner.Get() == Peer1); - AZ_TEST_ASSERT(nodes[Peer1].m_session.GetReplicaMgr().FindReplica(nodes[Client2].m_always->GetReplicaId())->IsPrimary()); - AZ_TEST_ASSERT(nodes[Client2].m_always->m_control.Get() == Peer1); - - // P1 -> C1 (Forbidden) - AZ_TEST_ASSERT(nodes[Peer1].m_never->m_requests == 0); - AZ_TEST_ASSERT(nodes[Peer1].m_never->m_accepted == 0); - AZ_TEST_ASSERT(nodes[Peer1].m_never->GetReplica()->IsPrimary()); - AZ_TEST_ASSERT(nodes[Peer1].m_never->m_owner.Get() == Peer1); - AZ_TEST_ASSERT(nodes[Client1].m_session.GetReplicaMgr().FindReplica(nodes[Peer1].m_never->GetReplicaId())->IsProxy()); - AZ_TEST_ASSERT(nodes[Peer1].m_never->m_control.Get() == Peer1); - - // C2 -> P2 (Forbidden) - AZ_TEST_ASSERT(nodes[Client2].m_never->m_requests == 0); - AZ_TEST_ASSERT(nodes[Client2].m_never->m_accepted == 0); - AZ_TEST_ASSERT(nodes[Client2].m_never->GetReplica()->IsPrimary()); - AZ_TEST_ASSERT(nodes[Client2].m_never->m_owner.Get() == Client2); - AZ_TEST_ASSERT(nodes[Peer2].m_session.GetReplicaMgr().FindReplica(nodes[Client2].m_never->GetReplicaId())->IsProxy()); - AZ_TEST_ASSERT(nodes[Client2].m_never->m_control.Get() == Client2); - - // P1 -> Host - AZ_TEST_ASSERT(nodes[Peer1].m_sometimes->m_requests == 1); - AZ_TEST_ASSERT(nodes[Peer1].m_sometimes->m_accepted == 1); - AZ_TEST_ASSERT(nodes[Peer1].m_sometimes->GetReplica()->IsProxy()); - AZ_TEST_ASSERT(nodes[Peer1].m_sometimes->m_owner.Get() == Host); - AZ_TEST_ASSERT(nodes[Host].m_session.GetReplicaMgr().FindReplica(nodes[Peer1].m_sometimes->GetReplicaId())->IsPrimary()); - AZ_TEST_ASSERT(nodes[Peer1].m_sometimes->m_control.Get() == Host); - - // C1 -> P1 - AZ_TEST_ASSERT(nodes[Client1].m_sometimes->m_requests == 1); - AZ_TEST_ASSERT(nodes[Client1].m_sometimes->m_accepted == 1); - AZ_TEST_ASSERT(nodes[Client1].m_sometimes->GetReplica()->IsProxy()); - AZ_TEST_ASSERT(nodes[Client1].m_sometimes->m_owner.Get() == Peer1); - AZ_TEST_ASSERT(nodes[Peer1].m_session.GetReplicaMgr().FindReplica(nodes[Client1].m_sometimes->GetReplicaId())->IsPrimary()); - AZ_TEST_ASSERT(nodes[Client1].m_sometimes->m_control.Get() == Peer1); - - // P2 -> C2 (Forbidden) - AZ_TEST_ASSERT(nodes[Peer2].m_sometimes->m_requests == 1); - AZ_TEST_ASSERT(nodes[Peer2].m_sometimes->m_accepted == 0); - AZ_TEST_ASSERT(nodes[Peer2].m_sometimes->GetReplica()->IsPrimary()); - AZ_TEST_ASSERT(nodes[Peer2].m_sometimes->m_owner.Get() == Peer2); - AZ_TEST_ASSERT(nodes[Client2].m_session.GetReplicaMgr().FindReplica(nodes[Peer2].m_never->GetReplicaId())->IsProxy()); - AZ_TEST_ASSERT(nodes[Peer2].m_sometimes->m_control.Get() == Peer2); - - // C2 -> Host (Forbidden) - AZ_TEST_ASSERT(nodes[Client2].m_sometimes->m_requests == 1); - AZ_TEST_ASSERT(nodes[Client2].m_sometimes->m_accepted == 0); - AZ_TEST_ASSERT(nodes[Client2].m_sometimes->GetReplica()->IsPrimary()); - AZ_TEST_ASSERT(nodes[Client2].m_sometimes->m_owner.Get() == Client2); - AZ_TEST_ASSERT(nodes[Host].m_session.GetReplicaMgr().FindReplica(nodes[Client2].m_never->GetReplicaId())->IsProxy()); - AZ_TEST_ASSERT(nodes[Client2].m_sometimes->m_control.Get() == Client2); - - // clean up - for (int i = 0; i < TotalNodes; ++i) - { - nodes[i].m_always = nullptr; - nodes[i].m_never = nullptr; - nodes[i].m_sometimes = nullptr; - nodes[i].m_session.GetReplicaMgr().Shutdown(); - DefaultCarrier::Destroy(nodes[i].m_session.GetTransport()); - } - } - -const int ReplicaMigrationRequestTest::k_frameTimePerNodeMs; -const int ReplicaMigrationRequestTest::k_hostSendTimeMs; - - -class PeerRejoinTest - : public UnitTest::GridMateMPTestFixture - , public ReplicaMgrCallbackBus::Handler - , public ::testing::Test -{ - void OnNewHost(bool isHost, ReplicaManager* pMgr) override - { - (void)pMgr; - if (isHost) - { - AZ_TracePrintf("GridMate", "Peer %d has completed host migration and is now the host.\n", (int)pMgr->GetLocalPeerId()); - } - else - { - AZ_TracePrintf("GridMate", "Peer %d has has received notification that host migration is complete.\n", (int)pMgr->GetLocalPeerId()); - } - } - -public: - PeerRejoinTest() { ReplicaMgrCallbackBus::Handler::BusConnect(m_gridMate); } - ~PeerRejoinTest() { ReplicaMgrCallbackBus::Handler::BusDisconnect(); } -}; - -TEST_F(PeerRejoinTest, DISABLED_PeerRejoinTest) - { - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - - int frameTime = 10; - int framesToRun = 300; - enum - { - p1, p2, nPeers - }; - - MPSession peers[nPeers]; - MigratableReplica::Ptr migrRep[nPeers]; - NonMigratableReplica::Ptr nonMigrRep[nPeers]; - - // initialize full-mesh P2P session - int basePort = 4427; - for (int i = 0; i < nPeers; ++i) - { - TestCarrierDesc desc; - desc.m_port = basePort + i; - desc.m_enableDisconnectDetection = true; - desc.m_threadUpdateTimeMS = frameTime / 2; - - // initialize replica managers - peers[i].SetTransport(DefaultCarrier::Create(desc, m_gridMate)); - peers[i].AcceptConn(true); - peers[i].SetClient(false); - peers[i].GetReplicaMgr().Init(ReplicaMgrDesc(i + 1 - , peers[i].GetTransport() - , 0 - , i == 0 ? ReplicaMgrDesc::Role_SyncHost : 0 - , frameTime / 2)); - } - - AZ_TracePrintf("GridMate", "\n"); - int frameCount = 0; - while (frameCount < framesToRun) - { - static bool allReady = false; - // establish all connections - if (frameCount < nPeers) - { - for (int i = 0; i < frameCount; ++i) - { - peers[frameCount].GetTransport()->Connect("127.0.0.1", basePort + i); - } - } - - if (!allReady) - { - allReady = true; - for (int i = 0; i < nPeers; ++i) - { - if (!peers[i].GetReplicaMgr().IsReady()) - { - allReady = false; - } - } - if (allReady) - { - AZ_TracePrintf("GridMate", "All peers ready at frame %d\n", frameCount); - } - } - - // perform tests - if (allReady) - { - // add replicas - static bool addReplicas = true; - if (addReplicas) - { - for (int i = 0; i < nPeers; ++i) - { - { - auto rep = Replica::CreateReplica(nullptr); - migrRep[i] = CreateAndAttachReplicaChunk(rep, aznew MyObj()); - peers[i].GetReplicaMgr().AddPrimary(rep); - } - { - auto rep = Replica::CreateReplica(nullptr); - nonMigrRep[i] = CreateAndAttachReplicaChunk(rep, aznew MyObj()); - peers[i].GetReplicaMgr().AddPrimary(rep); - } - } - addReplicas = false; - AZ_TracePrintf("GridMate", "Replicas added at frame %d\n", frameCount); - } - - // disconnect p2 and trigger peer migration - static bool dropP2 = true; - if (frameCount > 50 && dropP2) - { - peers[p2].GetTransport()->Disconnect(AllConnections); - peers[p2].GetReplicaMgr().Shutdown(); - dropP2 = false; - AZ_TracePrintf("GridMate", "Dropped P2 at frame %d\n", frameCount); - } - - // reconnect p2 - static bool reconP2 = true; - if (frameCount > 100 && reconP2) - { - peers[p2].GetReplicaMgr().Init(ReplicaMgrDesc(p2 + 1 - , peers[p2].GetTransport() - , 0 - , 0 - , frameTime / 2)); - peers[p1].GetTransport()->Connect("127.0.0.1", basePort + p2); - peers[p2].GetTransport()->Connect("127.0.0.1", basePort + p1); - reconP2 = false; - AZ_TracePrintf("GridMate", "Reconnected P2 at frame %d\n", frameCount); - } - - // disconnect p2 again - static bool redropP2 = true; - if (frameCount > 150 && redropP2) - { - peers[p2].GetTransport()->Disconnect(AllConnections); - redropP2 = false; - AZ_TracePrintf("GridMate", "Re-Dropped P2 at frame %d\n", frameCount); - } - } - - // tick - int tickPeer = frameCount++ % nPeers; - peers[tickPeer].Update(); - if (peers[tickPeer].GetReplicaMgr().IsInitialized()) - { - peers[tickPeer].GetReplicaMgr().Unmarshal(); - peers[tickPeer].GetReplicaMgr().UpdateReplicas(); - peers[tickPeer].GetReplicaMgr().UpdateFromReplicas(); - peers[tickPeer].GetReplicaMgr().Marshal(); - } - peers[tickPeer].GetTransport()->Update(); - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(frameTime)); - } - - // clean up - for (int i = 0; i < nPeers; ++i) - { - peers[i].GetReplicaMgr().Shutdown(); - DefaultCarrier::Destroy(peers[i].GetTransport()); - } - } - -class ReplicationSecurityOptionsTest - : public UnitTest::GridMateMPTestFixture - , public ::testing::Test -{ -public: - enum - { - s1, - s2, - s3, - nSessions - }; - - class TestChunk : public ReplicaChunk - { - public: - struct ForwardSourcePeerTrait : public RpcDefaultTraits - { - static const bool s_alwaysForwardSourcePeer = true; - static const bool s_allowNonAuthoritativeRequestRelay = false; - }; - - struct DisableNonAuthoritativeRequestTrait : public RpcAuthoritativeTraits - { - static const bool s_alwaysForwardSourcePeer = true; - }; - - GM_CLASS_ALLOCATOR(TestChunk); - - static const char* GetChunkName() { return "ReplicationSecurityOptionsTest::TestChunk"; } - - TestChunk() - : m_nForwardSourcePeerRpcCallsFromS1("m_nForwardSourcePeerRpcCallsFromS1", 0) - , m_nForwardSourcePeerRpcCallsFromS2("m_nForwardSourcePeerRpcCallsFromS2", 0) - , m_nForwardSourcePeerRpcCallsFromS3("m_nForwardSourcePeerRpcCallsFromS3", 0) - , ForwardSourcePeerRpcFromS1("ForwardSourcePeerRpcFromS1") - , ForwardSourcePeerRpcFromS2("ForwardSourcePeerRpcFromS2") - , ForwardSourcePeerRpcFromS3("ForwardSourcePeerRpcFromS3") - , m_nAuthoritativeOnlyRpcCallsFromS1("m_nAuthoritativeOnlyRpcCallsFromS1", 0) - , m_nAuthoritativeOnlyRpcCallsFromS2("m_nAuthoritativeOnlyRpcCallsFromS2", 0) - , m_nAuthoritativeOnlyRpcCallsFromS3("m_nAuthoritativeOnlyRpcCallsFromS3", 0) - , m_nAuthoritativeOnlyProxyRpcCallsFromS1(0) - , m_nAuthoritativeOnlyProxyRpcCallsFromS2(0) - , m_nAuthoritativeOnlyProxyRpcCallsFromS3(0) - , AuthoritativeOnlyRpcFromS1("AuthoritativeOnlyRpcFromS1") - , AuthoritativeOnlyRpcFromS2("AuthoritativeOnlyRpcFromS2") - , AuthoritativeOnlyRpcFromS3("AuthoritativeOnlyRpcFromS3") - { - } - - bool IsReplicaMigratable() override { return false; } - - bool OnForwardSourcePeerRpcFromS1(const RpcContext& rpcContext) - { - // make sure the requestor is set to s1 - AZ_TEST_ASSERT(rpcContext.m_sourcePeer == s1 + 1); - m_nForwardSourcePeerRpcCallsFromS1.Modify([](int& value) { ++value; return true; }); - return false; - } - - bool OnForwardSourcePeerRpcFromS2(const RpcContext& rpcContext) - { - // make sure the requestor is set to s2 - AZ_TEST_ASSERT(rpcContext.m_sourcePeer == s2 + 1); - // requests to s3 should be blocked in this test - AZ_TEST_ASSERT(GetReplicaManager()->GetLocalPeerId() != s3 + 1); - m_nForwardSourcePeerRpcCallsFromS2.Modify([](int& value) { ++value; return true; }); - return false; - } - - bool OnForwardSourcePeerRpcFromS3(const RpcContext& rpcContext) - { - // make sure the requestor is set to s3 - AZ_TEST_ASSERT(rpcContext.m_sourcePeer == s3 + 1); - // requests to s2 should be blocked in this test - AZ_TEST_ASSERT(GetReplicaManager()->GetLocalPeerId() != s2 + 1); - m_nForwardSourcePeerRpcCallsFromS3.Modify([](int& value) { ++value; return true; }); - return false; - } - - bool OnAuthoritativeOnlyRpcFromS1(const RpcContext& rpcContext) - { - // make sure the requestor is set to s1 - AZ_TEST_ASSERT(rpcContext.m_sourcePeer == s1 + 1); - if (IsPrimary()) - { - m_nAuthoritativeOnlyRpcCallsFromS1.Modify([](int& value) { ++value; return true; }); - } - else - { - ++m_nAuthoritativeOnlyProxyRpcCallsFromS1; - } - return true; - } - - bool OnAuthoritativeOnlyRpcFromS2(const RpcContext& rpcContext) - { - // make sure the requestor is set to s2 - AZ_TEST_ASSERT(rpcContext.m_sourcePeer == s2 + 1); - if (IsPrimary()) - { - m_nAuthoritativeOnlyRpcCallsFromS2.Modify([](int& value) { ++value; return true; }); - } - else - { - ++m_nAuthoritativeOnlyProxyRpcCallsFromS2; - } - return true; - } - - bool OnAuthoritativeOnlyRpcFromS3(const RpcContext& rpcContext) - { - // make sure the requestor is set to s3 - AZ_TEST_ASSERT(rpcContext.m_sourcePeer == s3 + 1); - if (IsPrimary()) - { - m_nAuthoritativeOnlyRpcCallsFromS3.Modify([](int& value) { ++value; return true; }); - } - else - { - ++m_nAuthoritativeOnlyProxyRpcCallsFromS3; - } - return true; - } - - DataSet m_nForwardSourcePeerRpcCallsFromS1; - DataSet m_nForwardSourcePeerRpcCallsFromS2; - DataSet m_nForwardSourcePeerRpcCallsFromS3; - Rpc<>::BindInterface ForwardSourcePeerRpcFromS1; - Rpc<>::BindInterface ForwardSourcePeerRpcFromS2; - Rpc<>::BindInterface ForwardSourcePeerRpcFromS3; - - DataSet m_nAuthoritativeOnlyRpcCallsFromS1; - DataSet m_nAuthoritativeOnlyRpcCallsFromS2; - DataSet m_nAuthoritativeOnlyRpcCallsFromS3; - int m_nAuthoritativeOnlyProxyRpcCallsFromS1; - int m_nAuthoritativeOnlyProxyRpcCallsFromS2; - int m_nAuthoritativeOnlyProxyRpcCallsFromS3; - Rpc<>::BindInterface AuthoritativeOnlyRpcFromS1; - Rpc<>::BindInterface AuthoritativeOnlyRpcFromS2; - Rpc<>::BindInterface AuthoritativeOnlyRpcFromS3; - }; - using TestChunkPtr = AZStd::intrusive_ptr ; -}; - -TEST_F(ReplicationSecurityOptionsTest, DISABLED_ReplicationSecurityOptionsTest) - { - AZ_TracePrintf("GridMate", "\n"); - - // Register test chunks - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - - MPSession sessions[nSessions]; - ReplicaPtr primarys[nSessions]; - - // initialize transport - int basePort = 4427; - for (int i = 0; i < nSessions; ++i) - { - TestCarrierDesc desc; - desc.m_port = basePort + i; - // initialize replica managers - // s2(c)<-->(p)s1(p)<-->(c)s3 - sessions[i].SetTransport(DefaultCarrier::Create(desc, m_gridMate)); - sessions[i].AcceptConn(true); - sessions[i].SetClient(i != s1); - sessions[i].GetReplicaMgr().Init(ReplicaMgrDesc(i + 1, sessions[i].GetTransport(), 0, i == 0 ? ReplicaMgrDesc::Role_SyncHost : 0)); - - ReplicationSecurityOptions options; - options.m_enableStrictSourceValidation = true; - sessions[i].GetReplicaMgr().SetSecurityOptions(options); - } - - // connect s2 to s1 - sessions[s2].GetTransport()->Connect("127.0.0.1", basePort); - - // connect s3 to s1 - sessions[s3].GetTransport()->Connect("127.0.0.1", basePort); - - // main test loop - for (int tick = 0; tick < 1000; ++tick) - { - if (tick == 100) - { - for (int i = 0; i < nSessions; ++i) - { - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().IsReady()); - primarys[i] = Replica::CreateReplica("ReplicationSecurityOptionsTest::TestReplica"); - TestChunkPtr chunk = CreateReplicaChunk(); - primarys[i]->AttachReplicaChunk(chunk); - sessions[i].GetReplicaMgr().AddPrimary(primarys[i]); - } - } - - if (tick == 200) - { - AZ_TEST_START_TRACE_SUPPRESSION; - for (int i = 0; i < nSessions; ++i) - { - sessions[s1].GetReplicaMgr().FindReplica(primarys[i]->GetRepId())->FindReplicaChunk()->ForwardSourcePeerRpcFromS1(); - sessions[s2].GetReplicaMgr().FindReplica(primarys[i]->GetRepId())->FindReplicaChunk()->ForwardSourcePeerRpcFromS2(); - sessions[s3].GetReplicaMgr().FindReplica(primarys[i]->GetRepId())->FindReplicaChunk()->ForwardSourcePeerRpcFromS3(); - } - } - - if (tick == 300) - { - // The previous test should have triggered the following assert twice: - // ReplicaChunk.cpp(449): AZ_Assert(false, "Discarding non-authoritative RPC <%s> because s_allowNonAuthoritativeRequestRelay trait is disabled!", GetDescriptor()->GetRpcName(this, rpc)); - AZ_TEST_STOP_TRACE_SUPPRESSION(2); - - // All chunks should have received the call from the host - AZ_TEST_ASSERT(primarys[s1]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS1 == 1); - AZ_TEST_ASSERT(primarys[s2]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS1 == 1); - AZ_TEST_ASSERT(primarys[s3]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS1 == 1); - - // the host chunk should have received calls from both clients - AZ_TEST_ASSERT(primarys[s1]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS2 == 1); - AZ_TEST_ASSERT(primarys[s1]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS3 == 1); - - // the chunk on s2 should receive its own call but not from s3 - AZ_TEST_ASSERT(primarys[s2]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS2 == 1); - AZ_TEST_ASSERT(primarys[s2]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS3 == 0); - - // the chunk on s3 should receive its own call but not from s2 - AZ_TEST_ASSERT(primarys[s3]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS2 == 0); - AZ_TEST_ASSERT(primarys[s3]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS3 == 1); - - // all datasets should have propagated properly - for (int i = 0; i < nSessions; ++i) - { - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s1]->GetRepId())->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS1.Get() == primarys[s1]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS1.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s1]->GetRepId())->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS2.Get() == primarys[s1]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS2.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s1]->GetRepId())->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS3.Get() == primarys[s1]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS3.Get()); - - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s2]->GetRepId())->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS1.Get() == primarys[s2]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS1.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s2]->GetRepId())->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS2.Get() == primarys[s2]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS2.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s2]->GetRepId())->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS3.Get() == primarys[s2]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS3.Get()); - - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s3]->GetRepId())->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS1.Get() == primarys[s3]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS1.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s3]->GetRepId())->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS2.Get() == primarys[s3]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS2.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s3]->GetRepId())->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS3.Get() == primarys[s3]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS3.Get()); - } - } - - if (tick == 400) - { - AZ_TEST_START_TRACE_SUPPRESSION; - for (int i = 0; i < nSessions; ++i) - { - sessions[s1].GetReplicaMgr().FindReplica(primarys[i]->GetRepId())->FindReplicaChunk()->AuthoritativeOnlyRpcFromS1(); - sessions[s2].GetReplicaMgr().FindReplica(primarys[i]->GetRepId())->FindReplicaChunk()->AuthoritativeOnlyRpcFromS2(); - sessions[s3].GetReplicaMgr().FindReplica(primarys[i]->GetRepId())->FindReplicaChunk()->AuthoritativeOnlyRpcFromS3(); - } - } - - if (tick == 500) - { - // The previous test should have triggered the following assert six times: - // ReplicaChunk.cpp(444): AZ_Assert(false, "Discarding non-authoritative RPC <%s> because s_allowNonAuthoritativeRequests trait is disabled!", GetDescriptor()->GetRpcName(this, rpc)); - AZ_TEST_STOP_TRACE_SUPPRESSION(6); - - // Each chunk should have received their own AuthoritativeOnlyRpc once. - AZ_TEST_ASSERT(primarys[s1]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS1 == 1); - AZ_TEST_ASSERT(primarys[s2]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS2 == 1); - AZ_TEST_ASSERT(primarys[s3]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS3 == 1); - - // Calls from other nodes should have been discarded. - AZ_TEST_ASSERT(primarys[s1]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS2 == 0); - AZ_TEST_ASSERT(primarys[s1]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS3 == 0); - AZ_TEST_ASSERT(primarys[s2]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS1 == 0); - AZ_TEST_ASSERT(primarys[s2]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS3 == 0); - AZ_TEST_ASSERT(primarys[s3]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS1 == 0); - AZ_TEST_ASSERT(primarys[s3]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS2 == 0); - - // Calls should have successfully propagated to the other 2 proxies - AZ_TEST_ASSERT(sessions[s1].GetReplicaMgr().FindReplica(primarys[s2]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyProxyRpcCallsFromS2 == 1); - AZ_TEST_ASSERT(sessions[s1].GetReplicaMgr().FindReplica(primarys[s3]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyProxyRpcCallsFromS3 == 1); - AZ_TEST_ASSERT(sessions[s2].GetReplicaMgr().FindReplica(primarys[s1]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyProxyRpcCallsFromS1 == 1); - AZ_TEST_ASSERT(sessions[s2].GetReplicaMgr().FindReplica(primarys[s3]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyProxyRpcCallsFromS3 == 1); - AZ_TEST_ASSERT(sessions[s3].GetReplicaMgr().FindReplica(primarys[s1]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyProxyRpcCallsFromS1 == 1); - AZ_TEST_ASSERT(sessions[s3].GetReplicaMgr().FindReplica(primarys[s2]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyProxyRpcCallsFromS2 == 1); - - // all datasets should have propagated properly - for (int i = 0; i < nSessions; ++i) - { - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s1]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS1.Get() == primarys[s1]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS1.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s1]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS2.Get() == primarys[s1]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS2.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s1]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS3.Get() == primarys[s1]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS3.Get()); - - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s2]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS1.Get() == primarys[s2]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS1.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s2]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS2.Get() == primarys[s2]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS2.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s2]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS3.Get() == primarys[s2]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS3.Get()); - - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s3]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS1.Get() == primarys[s3]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS1.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s3]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS2.Get() == primarys[s3]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS2.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s3]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS3.Get() == primarys[s3]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS3.Get()); - } - } - - // tick everything - for (int i = 0; i < nSessions; ++i) - { - sessions[i].Update(); - sessions[i].GetReplicaMgr().Unmarshal(); - sessions[i].GetReplicaMgr().UpdateReplicas(); - sessions[i].GetReplicaMgr().UpdateFromReplicas(); - sessions[i].GetReplicaMgr().Marshal(); - sessions[i].GetTransport()->Update(); - } - - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(10)); - } - - - for (int i = 0; i < nSessions; ++i) - { - sessions[i].GetReplicaMgr().Shutdown(); - DefaultCarrier::Destroy(sessions[i].GetTransport()); - } - } - - -/* - *03.25.2015* Typical test results on Core i7 3.4 GHz desktop (with polling): - Release: - Replica update time (msec): avg=2.02, min=2, max=3 (peers=40, replicas=16000, freq=0%, samples=4000) - Replica update time (msec): avg=4.83, min=2, max=12 (peers=40, replicas=16000, freq=10%, samples=4000) - Replica update time (msec): avg=4.73, min=3, max=12 (peers=40, replicas=16000, freq=100%, samples=4000) - DebugOpt: - Replica update time (msec): avg=2.53, min=2, max=5 (peers=40, replicas=16000, freq=0%, samples=4000) - Replica update time (msec): avg=4.21, min=2, max=8 (peers=40, replicas=16000, freq=10%, samples=4000) - Replica update time (msec): avg=5.59, min=3, max=14 (peers=40, replicas=16000, freq=100%, samples=4000) - - - Test results (task based marshaling): - Release: - Replica update time (msec): avg=0.03, min=0, max=1 (peers=40, replicas=16000, freq=0%, samples=4000) - Replica update time (msec): avg=3.94, min=1, max=11 (peers=40, replicas=16000, freq=10%, samples=4000) - Replica update time (msec): avg=5.21, min=4, max=15 (peers=40, replicas=16000, freq=100%, samples=4000) - DebugOpt: - Replica update time (msec): avg=1.00, min=1, max=2 (peers=40, replicas=16000, freq=0%, samples=4000) - Replica update time (msec): avg=4.94, min=1, max=9 (peers=40, replicas=16000, freq=10%, samples=4000) - Replica update time (msec): avg=8.05, min=6, max=15 (peers=40, replicas=16000, freq=100%, samples=4000) -*/ -class DISABLED_ReplicaStressTest - : public UnitTest::GridMateMPTestFixture -{ -public: - class StressTestReplica - : public ReplicaChunk - { - public: - GM_CLASS_ALLOCATOR(StressTestReplica); - typedef AZStd::intrusive_ptr Ptr; - static const char* GetChunkName() { return "StressTestReplica"; } - - StressTestReplica() - : m_data("Data") - { - } - - bool IsReplicaMigratable() override - { - return false; - } - - bool m_changing; - DataSet m_data; - }; - - static const size_t NUM_PEERS = 40; - static const size_t NUM_REPLICAS_PER_PEER = 400; - static const int FRAME_TIME = 5; - static const int BASE_PORT = 44270; - - // TODO: Reduce the size or disable the test for platforms which can't allocate 2 GiB - DISABLED_ReplicaStressTest() - : UnitTest::GridMateMPTestFixture(2000u * 1024u * 1024u) - {} - - void UpdateReplica(MPSession& session) - { - session.GetReplicaMgr().Unmarshal(); - session.GetReplicaMgr().UpdateReplicas(); - - session.GetReplicaMgr().UpdateFromReplicas(); - session.GetReplicaMgr().Marshal(); - } - - void Wait(MPSession* sessions, vector >& replicas, int numFrames, int frameTime) - { - (void)replicas; - while (numFrames--) - { - for (size_t i = 0; i < NUM_PEERS; ++i) - { - sessions[i].Update(); - UpdateReplica(sessions[i]); - } - - for (size_t i = 0; i < NUM_PEERS; ++i) - { - sessions[i].GetTransport()->Update(); - } - - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(frameTime)); - } - } - - // freq is 0..1, 0.0 - no dirty replicas per tick, 1.0 - all replicas are dirty every tick, 0.5 - 50% of replicas per tick - void TestReplicas(MPSession* sessions, vector >& replicas, int numFrames, int frameTime, double freq) - { - AZStd::chrono::system_clock::duration minUpdateTime(AZStd::chrono::system_clock::duration::max()); - AZStd::chrono::system_clock::duration maxUpdateTime(AZStd::chrono::system_clock::duration::min()); - AZStd::chrono::system_clock::duration sumSamples(AZStd::chrono::system_clock::duration::zero()); - unsigned long long numSamples = 0; - - int count = 0; - while (numFrames--) - { - MarkChanging(replicas, freq); - - for (auto& r : replicas) - { - if (r.second->m_changing) - { - r.second->m_data.Set(count++); - } - } - - for (size_t i = 0; i < NUM_PEERS; ++i) - { - sessions[i].Update(); - AZStd::chrono::system_clock::time_point beforeUpdateTime = AZStd::chrono::system_clock::now(); - UpdateReplica(sessions[i]); - auto updateTime = AZStd::chrono::system_clock::now() - beforeUpdateTime; - minUpdateTime = AZStd::min(updateTime, minUpdateTime); - maxUpdateTime = AZStd::max(updateTime, maxUpdateTime); - sumSamples += updateTime; - ++numSamples; - } - - for (size_t i = 0; i < NUM_PEERS; ++i) - { - sessions[i].GetTransport()->Update(); - } - - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(frameTime)); - } - - AZ_TEST_ASSERT(numSamples > 0); - - AZ_Printf("GridMate", "\n\n----------------\nReplica update time (msec): avg=%.2f, min=%.2f, max=%.2f (peers=%d, replicas=%d, freq=%d%%, samples=%llu)\n", - static_cast(AZStd::chrono::duration_cast(sumSamples).count()) / static_cast(numSamples), - AZStd::chrono::duration_cast(minUpdateTime).count() / 1000.0, - AZStd::chrono::duration_cast(maxUpdateTime).count() / 1000.0, - NUM_PEERS, - replicas.size(), - static_cast(freq * 100.0), - numSamples); - } - - bool ConnectPeers(MPSession* sessions, int frameTime) - { - size_t frameCount = 0; - bool allReady = false; - size_t maxFramesToReady = NUM_PEERS + 100; // this is to avoid infinite loop waiting for all peers to become ready in case some peer cannot connect - vector > replicas; - - while (!allReady && frameCount < maxFramesToReady) - { - // establish all connections - if (frameCount < NUM_PEERS) - { - for (size_t i = 0; i < frameCount; ++i) - { - sessions[frameCount].GetTransport()->Connect("127.0.0.1", BASE_PORT + static_cast(i)); - } - } - - allReady = true; - for (size_t i = 0; i < NUM_PEERS; ++i) - { - if (!sessions[i].GetReplicaMgr().IsReady()) - { - allReady = false; - break; - } - } - if (allReady) - { - AZ_Printf("GridMate", "All peers ready at frame %d\n", frameCount); - } - - Wait(sessions, replicas, 1, frameTime); - ++frameCount; - } - - return allReady; - } - - virtual void RunStressTests(MPSession* sessions, vector >& replicas) - { - // testing 3 cases & waiting for system to settle in between - //TestProfiler::StartProfiling(); - Wait(sessions, replicas, 50, FRAME_TIME); - //TestProfiler::PrintProfilingTotal("GridMate"); - - Wait(sessions, replicas, 20, FRAME_TIME); - //TestProfiler::StartProfiling(); - TestReplicas(sessions, replicas, 100, FRAME_TIME, 0.0); // no replicas are dirty - //TestProfiler::PrintProfilingTotal("GridMate"); - - Wait(sessions, replicas, 20, FRAME_TIME); - //TestProfiler::StartProfiling(); - TestReplicas(sessions, replicas, 1, FRAME_TIME, 1.0); // single burst dirty replicas - Wait(sessions, replicas, 2, FRAME_TIME); - //TestProfiler::PrintProfilingTotal("GridMate"); - - Wait(sessions, replicas, 20, FRAME_TIME); - //TestProfiler::StartProfiling(); - TestReplicas(sessions, replicas, 100, FRAME_TIME, 0.1); // 10% of replicas are marked dirty every frame - //TestProfiler::PrintProfilingTotal("GridMate"); - - Wait(sessions, replicas, 20, FRAME_TIME); - //TestProfiler::StartProfiling(); - TestReplicas(sessions, replicas, 100, FRAME_TIME, 1.0); // every replica is marked dirty every frame - //TestProfiler::PrintProfilingTotal("GridMate"); - //TestProfiler::PrintProfilingSelf("GridMate"); - - //TestProfiler::StopProfiling(); - } - - virtual void MarkChanging(vector >& replicas, double freq) - { - AZ::Sfmt& sfmt = AZ::Sfmt::GetInstance(); - for (auto& r : replicas) - { - r.second->m_changing = sfmt.RandR32_2() <= freq; - } - } - - void run() - { - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - - MPSession sessions[NUM_PEERS]; - vector > replicas; - - replicas.reserve(NUM_PEERS * NUM_REPLICAS_PER_PEER); - - for (unsigned int i = 0; i < NUM_PEERS; ++i) - { - TestCarrierDesc desc; - desc.m_port = BASE_PORT + i; - desc.m_enableDisconnectDetection = false; - - // initialize replica managers - sessions[i].SetTransport(DefaultCarrier::Create(desc, m_gridMate)); - sessions[i].AcceptConn(true); - sessions[i].SetClient(false); - sessions[i].GetReplicaMgr().Init(ReplicaMgrDesc(i + 1 - , sessions[i].GetTransport() - , 0 - , i == 0 ? ReplicaMgrDesc::Role_SyncHost : 0)); - } - - bool allReady = ConnectPeers(sessions, FRAME_TIME); - - AZ_TEST_ASSERT(allReady); - - for (auto& session : sessions) - { - for (size_t j = 0; j < NUM_REPLICAS_PER_PEER; ++j) - { - auto rep = Replica::CreateReplica(nullptr); - auto chunk = CreateAndAttachReplicaChunk(rep); - replicas.push_back(AZStd::make_pair(rep, chunk)); - session.GetReplicaMgr().AddPrimary(rep); - } - } - - RunStressTests(sessions, replicas); - - // clean up - for (auto& s : sessions) - { - s.GetReplicaMgr().Shutdown(); - DefaultCarrier::Destroy(s.GetTransport()); - } - } -}; - -/* - This test performs updates to the same replicas every frame unlike stress test that picks random replicas every frame - *03.25.2015* Typical test results on Core i7 3.4 GHz desktop (with polling): - Release: - Replica update time (msec): avg=2.54, min=2, max=9 (peers=40, replicas=16000, freq=10%, samples=4000) - Replica update time (msec): avg=3.15, min=2, max=7 (peers=40, replicas=16000, freq=50%, samples=4000) - DebugOpt: - Replica update time (msec): avg=3.35, min=3, max=8 (peers=40, replicas=16000, freq=10%, samples=4000) - Replica update time (msec): avg=4.45, min=3, max=10 (peers=40, replicas=16000, freq=50%, samples=4000) - - Test results (task based marshaling): - Release: - Replica update time (msec): avg=1.62, min=1, max=10 (peers=40, replicas=16000, freq=10%, samples=4000) - Replica update time (msec): avg=4.38, min=2, max=15 (peers=40, replicas=16000, freq=50%, samples=4000) - DebugOpt: - Replica update time (msec): avg=2.01, min=1, max=5 (peers=40, replicas=16000, freq=10%, samples=4000) - Replica update time (msec): avg=4.61, min=3, max=10 (peers=40, replicas=16000, freq=50%, samples=4000) -*/ -class DISABLED_ReplicaStableStressTest - : public DISABLED_ReplicaStressTest -{ -public: - - void MarkChanging(vector >& replicas, double freq) override - { - (void)replicas; - (void)freq; - } - - void RunStressTests(MPSession* sessions, vector >& replicas) override - { - DISABLED_ReplicaStressTest::MarkChanging(replicas, 0.1); // picks 10% of replicas - Wait(sessions, replicas, 20, FRAME_TIME); - //TestProfiler::StartProfiling(); - TestReplicas(sessions, replicas, 100, FRAME_TIME, 0.1); - /*TestProfiler::PrintProfilingTotal("GridMate"); - TestProfiler::PrintProfilingSelf("GridMate");*/ - - DISABLED_ReplicaStressTest::MarkChanging(replicas, 0.5); // picks 50% of replicas - Wait(sessions, replicas, 20, FRAME_TIME); - //TestProfiler::StartProfiling(); - TestReplicas(sessions, replicas, 100, FRAME_TIME, 0.5); - /*TestProfiler::PrintProfilingTotal("GridMate"); - TestProfiler::PrintProfilingSelf("GridMate"); - - TestProfiler::StopProfiling();*/ - } -}; - - -/* -* This test verifies bandwidth limiter. The test takes ~2 minutes. It sends ~7k/s of data with a limit of 4k with the following pattern: -* -* -* time | 10s | 10s | 20s | 20s | 10s | 20s | -* +-----+-----+----------+----------+-----+----------+ -* sendrate | 0k | 7k | 7k | 1.5k | 7k | 7k | -* | | | | | | | -* expected |none |brst | capped |under cap |brst | capped | -* -*/ -class DISABLED_ReplicaBandiwdthTest - : public UnitTest::GridMateMPTestFixture -{ -public: - - class BandwidthTestChunk - : public ReplicaChunk - { - public: - GM_CLASS_ALLOCATOR(BandwidthTestChunk); - typedef AZStd::intrusive_ptr Ptr; - static const char* GetChunkName() { return "BandwidthTestChunk"; } - - BandwidthTestChunk() - : m_value("Value") - { - Touch(); - } - - void Touch() - { - AZStd::string randomStr; - for (unsigned i = 0; i < k_strSize; ++i) - { - randomStr += 'a' + (rand() % 26); - } - m_value.Set(randomStr); - } - - bool IsReplicaMigratable() override { return false; } - - static const unsigned k_strSize = 64; - DataSet m_value; - }; - - void run() - { - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - - MPSession sessions[nSessions]; - // initialize transport - int basePort = 4427; - for (int i = 0; i < nSessions; ++i) - { - TestCarrierDesc desc; - desc.m_port = basePort + i; - desc.m_enableDisconnectDetection = false; - sessions[i].SetClient(i != sHost); - sessions[i].SetTransport(DefaultCarrier::Create(desc, m_gridMate)); - sessions[i].AcceptConn(true); - sessions[i].GetReplicaMgr().Init(ReplicaMgrDesc(i + 1, sessions[i].GetTransport(), 0, i == 0 ? ReplicaMgrDesc::Role_SyncHost : 0)); - } - - // adding replicas for the host - static const size_t k_numReplicas = 10; - BandwidthTestChunk::Ptr chunks[k_numReplicas]; - for (size_t i = 0; i < k_numReplicas; ++i) - { - auto rep = Replica::CreateReplica(nullptr); - chunks[i] = CreateAndAttachReplicaChunk(rep); - sessions[sHost].GetReplicaMgr().AddPrimary(rep); - } - - // connect to host - for (size_t i = 0; i < nSessions; ++i) - { - if (i == sHost) - { - continue; - } - - sessions[i].GetTransport()->Connect("127.0.0.1", basePort); - } - - static const int k_delayMS = 100; // tick time - - bool isDone = false; - size_t numReplicasToChange = 0; - - /* - 10 replicas x ~70 bytes per replica x 10 frames per second =~ 7000 bytes per second - Will try to cutoff it at 4k per sec - */ - static const unsigned k_sendRateLimit = 4000; - - unsigned tickNo = 0; - AZ_Printf("GridMate", "Created %d sessions.\n", nSessions); - while (!isDone) - { - for (size_t i = 0; i < numReplicasToChange; ++i) - { - chunks[i]->Touch(); - } - - for (auto connId : sessions[sHost].m_connections) - { - if (connId == InvalidConnectionID) - { - continue; - } - - TrafficControl::Statistics lastSecEffective; - sessions[sHost].GetTransport()->QueryStatistics(connId, nullptr, nullptr, &lastSecEffective); - m_measurements[connId].m_sendData.push_back(lastSecEffective.m_dataSend); - - if (!(tickNo % 30)) // printout every 3 seconds - { - AZ_Printf("GridMate", " - effective sendRate=%.2f KB\n", lastSecEffective.m_dataSend / 1000.f); - } - //AZ_TracePrintf("GridMate", "%d\n", lastSecEffective.m_dataSend); - } - - - // ======================================================= - // Actual tests - // ======================================================= - if (tickNo == 100) // things should've settle at this point, session is established, initial replicas are sent - { - for (size_t i = 0; i < AZ_ARRAY_SIZE(sessions); ++i) - { - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().IsReady()); - } - - numReplicasToChange = k_numReplicas; - ResetMeasurements(); - AZ_Printf("GridMate", "Starting replica data send. Unlimited.\n"); - } - else if (tickNo == 200) - { - // test if initial unlimited burst was allowed - for (const auto& m : m_measurements) - { - AZ_TEST_ASSERT(m.second.Max() > k_sendRateLimit * 1.5f); - } - ResetMeasurements(); - sessions[sHost].GetReplicaMgr().SetSendLimit(k_sendRateLimit); - AZ_Printf("GridMate", "Limited by SendLimit=%d Bps.\n", sessions[sHost].GetReplicaMgr().GetSendLimit()); - } - else if (tickNo == 400) - { - // checking if bandwidth was rate limited - for (const auto& m : m_measurements) - { - if (!(m.second.Mean() < k_sendRateLimit * 1.1f)) - { - AZ_Printf("GridMate", "rate mean: %f limit %d\n", m.second.Mean(), sessions[sHost].GetReplicaMgr().GetSendLimit()) - } - AZ_TEST_ASSERT(m.second.Mean() < k_sendRateLimit * 1.1f); // allowing 10% margin of error - } - ResetMeasurements(); - numReplicasToChange = k_numReplicas / 4; // reducing outgoing traffic 1/4 - AZ_Printf("GridMate", "Reduced send rate...\n"); - } - else if (tickNo == 600) - { - // checking if traffic below the limit - for (const auto& m : m_measurements) - { - AZ_TEST_ASSERT(m.second.Mean() < k_sendRateLimit * 0.7f); - } - ResetMeasurements(); - sessions[sHost].GetReplicaMgr().SetSendLimit(0); // returning to unlimited send rate - numReplicasToChange = k_numReplicas; - AZ_Printf("GridMate", "Full send rate...\n"); - } - else if (tickNo == 700) - { - // test if burst allowed - for (const auto& m : m_measurements) - { - AZ_TEST_ASSERT(m.second.Max() > k_sendRateLimit * 1.5f); - } - ResetMeasurements(); - sessions[sHost].GetReplicaMgr().SetSendLimit(k_sendRateLimit); - AZ_Printf("GridMate", "Limited by SendLimit=%d Bps.\n", sessions[sHost].GetReplicaMgr().GetSendLimit()); - } - else if (tickNo == 900) - { - // checking if bandwidth was limited - for (const auto& m : m_measurements) - { - AZ_TEST_ASSERT(m.second.Mean() < k_sendRateLimit * 1.1f); // allowing 10% jerking around limit - } - - isDone = true; - } - - // ======================================================= - // Tick everything - // ======================================================= - for (size_t i = 0; i < nSessions; ++i) - { - sessions[i].Update(); - sessions[i].GetReplicaMgr().Unmarshal(); - } - - for (size_t i = 0; i < nSessions; ++i) - { - sessions[i].GetReplicaMgr().UpdateReplicas(); - } - - for (size_t i = 0; i < nSessions; ++i) - { - sessions[i].GetReplicaMgr().UpdateFromReplicas(); - sessions[i].GetReplicaMgr().Marshal(); - } - - for (size_t i = 0; i < nSessions; ++i) - { - sessions[i].GetTransport()->Update(); - } - - ++tickNo; - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(k_delayMS)); - } - - - for (int i = 0; i < nSessions; ++i) - { - sessions[i].GetReplicaMgr().Shutdown(); - DefaultCarrier::Destroy(sessions[i].GetTransport()); - } - } - - void ResetMeasurements() - { - for (auto& m : m_measurements) - { - m.second.Reset(); - } - } - - struct Measurement - { - unsigned int Mean() const - { - AZ_Assert(!m_sendData.empty(), "No data!"); - unsigned int sum = 0; - for (auto val : m_sendData) - { - sum += val; - } - - return sum / static_cast(m_sendData.size()); - } - - unsigned int Max() const - { - unsigned int curMax = 0; - for (auto val : m_sendData) - { - curMax = AZStd::GetMax(curMax, val); - } - - return curMax; - } - - void Reset() - { - m_sendData.clear(); - } - - vector m_sendData; // data sent per second - }; - - enum - { - sHost, sClient1, nSessions - }; - unordered_map m_measurements; -}; - } // namespace UnitTest GM_TEST_SUITE(ReplicaSuite) GM_TEST(InterpolatorTest) - -#if !defined(AZ_DEBUG_BUILD) // these tests are a little slow for debug -GM_TEST(DISABLED_ReplicaBandiwdthTest) -GM_TEST(DISABLED_ReplicaStressTest) -GM_TEST(DISABLED_ReplicaStableStressTest) -#endif - GM_TEST_SUITE_END() diff --git a/Code/Framework/GridMate/Tests/ReplicaBehavior.cpp b/Code/Framework/GridMate/Tests/ReplicaBehavior.cpp index 86f9f4605b..67b5e49df7 100644 --- a/Code/Framework/GridMate/Tests/ReplicaBehavior.cpp +++ b/Code/Framework/GridMate/Tests/ReplicaBehavior.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include using namespace GridMate; @@ -584,837 +583,5 @@ namespace ReplicaBehavior { AZStd::array m_sessions; }; - /* - * A hook to intercept the payload size of a replica and it's contents. - */ - class ReplicaDrillerHook - : public Debug::ReplicaDrillerBus::Handler - { - public: - ReplicaDrillerHook() - { - } - - void OnSendReplicaEnd(Replica* /*replica*/, const void* /*data*/, size_t len) override - { - m_replicaLengths.push_back(len); - } - - void ResetCounts([[maybe_unused]] bool trace = false) - { -#if defined(AZ_ENABLE_TRACING) - if (trace && m_replicaLengths.size() > 0) - { - AZ_TracePrintf("GridMate", "Driller saw replicas with the following byte sizes:\n"); - for (auto length : m_replicaLengths) - { - AZ_TracePrintf("GridMate", "\t\t\t %d \n", length); - } - } -#endif - - m_replicaLengths.clear(); - } - - AZStd::vector m_replicaLengths; - }; - - template - class FilteredHook : public ReplicaDrillerHook - { - public: - void OnSendReplicaEnd(Replica* replica, const void* /*data*/, size_t len) override - { - if (ContainsChunkTypeWeWant(replica)) - { - m_replicaLengths.push_back(len); - } - } - - private: - bool ContainsChunkTypeWeWant(Replica* replica) const - { - auto numChunks = replica->GetNumChunks(); - for (size_t i = 0; i < numChunks; i++) - { - auto chunk = replica->GetChunkByIndex(i); - if (chunk->GetDescriptor()->GetChunkName() == ReplicaChunkType::GetChunkName()) - { - return true; - } - } - - return false; - } - }; - - /* - * The most basic functionality test for sending datasets that have a default value and have not yet been modified - * from their constructor values. - * - * This is a simple sanity check to ensure the logic sends the update when it's necessary. - */ - class Replica_DontSendDataSets_WithNoDiffFromCtorData - : public SimpleBehaviorTest - { - public: - Replica_DontSendDataSets_WithNoDiffFromCtorData() - : m_replicaIdDefault(InvalidReplicaId), m_replicaIdModified(InvalidReplicaId) - { - } - - enum - { - sHost, - s2, - nSessions - }; - - int GetNumSessions() override { return nSessions; } - - void PreConnect() override - { - m_driller.BusConnect(); - { - ReplicaPtr replica = Replica::CreateReplica(nullptr); - - auto chunk = CreateAndAttachReplicaChunk(replica); - AZ_TEST_ASSERT(chunk); - AZ_TEST_ASSERT(chunk->Data1.IsDefaultValue()); - AZ_TEST_ASSERT(chunk->Data2.IsDefaultValue()); - - m_replicaIdDefault = m_sessions[sHost].GetReplicaMgr().AddPrimary(replica); - } - } - - const int ExpectedReplicaSizeWithDefaults = 37; - const int ExpectedReplicaSizeWithNonDefaults = 46; - - TestStatus Tick(int tick) override - { - switch (tick) - { - case 20: - { - { - ReplicaPtr rep = m_sessions[s2].GetReplicaMgr().FindReplica(m_replicaIdDefault); - AZ_TEST_ASSERT(rep); - - auto chunk = rep->FindReplicaChunk(); - AZ_TEST_ASSERT(chunk); - - auto replicaSize = m_driller.m_replicaLengths[0]; - AZ_TEST_ASSERT(replicaSize == ExpectedReplicaSizeWithDefaults); - m_driller.ResetCounts(); - } - // create another replica with non-default values - { - ReplicaPtr replica = Replica::CreateReplica(nullptr); - - auto chunk = CreateAndAttachReplicaChunk(replica); - AZ_TEST_ASSERT(chunk); - - AZ_TEST_ASSERT(chunk->Data1.IsDefaultValue()); - AZ_TEST_ASSERT(chunk->Data2.IsDefaultValue()); - chunk->Data1.Set(4242); - chunk->Data2.Set(4242); - AZ_TEST_ASSERT(!chunk->Data1.IsDefaultValue()); - AZ_TEST_ASSERT(!chunk->Data2.IsDefaultValue()); - - m_replicaIdModified = m_sessions[sHost].GetReplicaMgr().AddPrimary(replica); - } - break; - } - case 40: - { - { - ReplicaPtr rep = m_sessions[s2].GetReplicaMgr().FindReplica(m_replicaIdModified); - AZ_TEST_ASSERT(rep); - - auto chunk = rep->FindReplicaChunk(); - AZ_TEST_ASSERT(chunk); - - auto replicaSize = m_driller.m_replicaLengths[0]; - AZ_TEST_ASSERT(replicaSize == ExpectedReplicaSizeWithNonDefaults); - m_driller.ResetCounts(); - - // check that non-default values are set for the dataset - { - AZ_TEST_ASSERT(!chunk->Data1.IsDefaultValue()); - auto value = chunk->Data1.Get(); - AZ_TEST_ASSERT(value == 4242); - } - { - AZ_TEST_ASSERT(!chunk->Data2.IsDefaultValue()); - auto value = chunk->Data2.Get(); - AZ_TEST_ASSERT(value == 4242); - } - } - m_driller.ResetCounts(true); - break; - } - case 45: - { - { - m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaIdDefault)->Destroy(); - m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaIdModified)->Destroy(); - } - break; - } - case 50: - return TestStatus::Completed; - default: - break; - } - return TestStatus::Running; - } - - ReplicaId m_replicaIdDefault; - ReplicaId m_replicaIdModified; - FilteredHook m_driller; - }; - - TEST(Replica_DontSendDataSets_WithNoDiffFromCtorData, DISABLED_Replica_DontSendDataSets_WithNoDiffFromCtorData) - { - Replica_DontSendDataSets_WithNoDiffFromCtorData tester; - tester.run(); - } - - /* - * This test checks the actual size of the replica as marshalled in the binary payload. - * The assessment of the payload size is done using driller EBus. - */ - class ReplicaDefaultDataSetDriller - : public SimpleBehaviorTest - { - public: - ReplicaDefaultDataSetDriller() - : m_replicaId(InvalidReplicaId) - { - } - - enum - { - sHost, - s2, - nSessions - }; - - int GetNumSessions() override { return nSessions; } - - static const int NonDefaultValue = 4242; - - void PreConnect() override - { - m_driller.BusConnect(); - - ReplicaPtr replica = Replica::CreateReplica(nullptr); - LargeChunkWithDefaults* chunk = CreateAndAttachReplicaChunk(replica); - AZ_TEST_ASSERT(chunk); - - m_replicaId = m_sessions[sHost].GetReplicaMgr().AddPrimary(replica); - } - - ~ReplicaDefaultDataSetDriller() override - { - m_driller.BusDisconnect(); - } - - TestStatus Tick(int tick) override - { - switch (tick) - { - case 10: - { - auto rep = m_sessions[s2].GetReplicaMgr().FindReplica(m_replicaId); - AZ_TEST_ASSERT(rep); - - m_driller.ResetCounts(); - - break; - } - case 15: - { - ReplicaPtr replica = m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaId); - auto chunk = replica->FindReplicaChunk(); - int nonDefaultValue = NonDefaultValue; - auto touch = [nonDefaultValue](DataSet& dataSet) { dataSet.Set(nonDefaultValue); }; - touch(chunk->Data1); - touch(chunk->Data2); - touch(chunk->Data3); - - m_driller.ResetCounts(); - - break; - } - case 20: - { - auto repLengths = m_driller.m_replicaLengths; - m_driller.ResetCounts(); - - // check exact expected sizes - const auto countUnreliable = 4; - const auto countReliable = 1; - const auto expectedReplicaSize = 22; - - AZ_TEST_ASSERT(repLengths.size() == countUnreliable + countReliable); - for (auto length : repLengths) - { - AZ_TEST_ASSERT(length == expectedReplicaSize); - } - - m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaId)->Destroy(); - break; - } - case 25: - { - return TestStatus::Completed; - } - default: - break; - } - return TestStatus::Running; - } - - ReplicaDrillerHook m_driller; - ReplicaId m_replicaId; - }; - - const int ReplicaDefaultDataSetDriller::NonDefaultValue; - - TEST(ReplicaDefaultDataSetDriller, DISABLED_ReplicaDefaultDataSetDriller) - { - ReplicaDefaultDataSetDriller tester; - tester.run(); - } - - /* - * This test checks the actual size of the replica as marshalled in the binary payload. - * The assessment of the payload size is done using driller EBus. - */ - class Replica_ComparePackingBoolsVsU8 - : public SimpleBehaviorTest - { - public: - Replica_ComparePackingBoolsVsU8() - : m_replicaBoolsId(InvalidReplicaId) - , m_replicaU8Id(InvalidReplicaId) - { - } - - enum - { - sHost, - s2, - nSessions - }; - - int GetNumSessions() override { return nSessions; } - - void PreConnect() override - { - m_driller.BusConnect(); - - ReplicaPtr replica1 = Replica::CreateReplica(nullptr); - ChunkWithBools* chunk1 = CreateAndAttachReplicaChunk(replica1); - AZ_TEST_ASSERT(chunk1); - - m_replicaBoolsId = m_sessions[sHost].GetReplicaMgr().AddPrimary(replica1); - - ReplicaPtr replica2 = Replica::CreateReplica(nullptr); - ChunkWithShortInts* chunk2 = CreateAndAttachReplicaChunk(replica2); - AZ_TEST_ASSERT(chunk2); - - m_replicaU8Id = m_sessions[sHost].GetReplicaMgr().AddPrimary(replica2); - } - - ~Replica_ComparePackingBoolsVsU8() override - { - m_driller.BusDisconnect(); - } - - TestStatus Tick(int tick) override - { - switch (tick) - { - case 10: - { - auto rep1 = m_sessions[s2].GetReplicaMgr().FindReplica(m_replicaBoolsId); - AZ_TEST_ASSERT(rep1); - auto rep2 = m_sessions[s2].GetReplicaMgr().FindReplica(m_replicaU8Id); - AZ_TEST_ASSERT(rep2); - break; - } - case 15: - { - // we have to poke the values so that they become non-default - { - ReplicaPtr replica = m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaBoolsId); - auto chunk = replica->FindReplicaChunk(); - - auto touch = [](DataSet& dataSet) { dataSet.Set(true); }; - touch(chunk->Data1); - touch(chunk->Data2); - touch(chunk->Data3); - touch(chunk->Data4); - touch(chunk->Data5); - touch(chunk->Data6); - touch(chunk->Data7); - touch(chunk->Data8); - touch(chunk->Data9); - touch(chunk->Data10); - } - { - ReplicaPtr replica = m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaU8Id); - auto chunk = replica->FindReplicaChunk(); - - auto touch = [](DataSet& dataSet) { dataSet.Set(42); }; - touch(chunk->Data1); - touch(chunk->Data2); - touch(chunk->Data3); - touch(chunk->Data4); - touch(chunk->Data5); - touch(chunk->Data6); - touch(chunk->Data7); - touch(chunk->Data8); - touch(chunk->Data9); - touch(chunk->Data10); - } - m_driller.ResetCounts(); - - break; - } - case 30: - { - auto repLengths = m_driller.m_replicaLengths; - m_driller.ResetCounts(); - - // check exact expected sizes - const auto expectedReplicaSizeWithBools = 12; - const auto expectedReplicaSizeWithShortInts = 20; - - AZ_TEST_ASSERT(repLengths.size() >= 2); - AZ_TEST_ASSERT(AZStd::find(repLengths.begin(), repLengths.end(), expectedReplicaSizeWithBools)); - AZ_TEST_ASSERT(AZStd::find(repLengths.begin(), repLengths.end(), expectedReplicaSizeWithShortInts)); - - m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaBoolsId)->Destroy(); - m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaU8Id)->Destroy(); - break; - } - case 35: - { - //auto boolDatasetSize = m_driller.m_boolChunkLengths[1]; - //auto u8DatasetSize = m_driller.m_u8ChunkLengths[1]; - //AZ_TEST_ASSERT(boolDatasetSize < u8DatasetSize); // Observed example: 5bytes < 13bytes - - return TestStatus::Completed; - } - default: - break; - } - return TestStatus::Running; - } - - ReplicaDrillerHook m_driller; - ReplicaId m_replicaBoolsId; - ReplicaId m_replicaU8Id; - }; - - TEST(Replica_ComparePackingBoolsVsU8, DISABLED_Replica_ComparePackingBoolsVsU8) - { - Replica_ComparePackingBoolsVsU8 tester; - tester.run(); - } - - class CheckDataSetStreamIsntWrittenMoreThanNecessary - : public SimpleBehaviorTest - { - public: - CheckDataSetStreamIsntWrittenMoreThanNecessary() - : m_replicaId(InvalidReplicaId) - { - } - - enum - { - sHost, - s2, - nSessions - }; - - int GetNumSessions() override { return nSessions; } - - static const int NonDefaultValue = 4242; - - void PreConnect() override - { - m_driller.BusConnect(); - - ReplicaPtr replica = Replica::CreateReplica(nullptr); - auto chunk = CreateAndAttachReplicaChunk(replica); - AZ_TEST_ASSERT(chunk); - - m_replicaId = m_sessions[sHost].GetReplicaMgr().AddPrimary(replica); - } - - ~CheckDataSetStreamIsntWrittenMoreThanNecessary() override - { - m_driller.BusDisconnect(); - } - - CustomMarshalerTestChunk::Ptr GetHostChunk() - { - ReplicaPtr replica = m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaId); - auto chunk = replica->FindReplicaChunk(); - - return chunk; - } - - TestStatus Tick(int tick) override - { - switch (tick) - { - case 10: - { - auto rep = m_sessions[s2].GetReplicaMgr().FindReplica(m_replicaId); - AZ_TEST_ASSERT(rep); - break; - } - case 15: - { - auto chunk = GetHostChunk(); - //chunk->Data1.Set(CustomInt(41)); - - const auto& m = chunk->Data1.GetMarshaler(); - // Only the initial setup call should have occurred - AZ_TEST_ASSERT(m.m_marshalCalls == 1); - m.m_marshalCalls = 0; - m_driller.ResetCounts(); - - break; - } - case 42: - { - auto chunk = GetHostChunk(); - const auto& m = chunk->Data1.GetMarshaler(); - // No reason for any new calls to occur - AZ_TEST_ASSERT(m.m_marshalCalls == 0); - - m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaId)->Destroy(); - break; - } - case 45: - { - return TestStatus::Completed; - } - default: - break; - } - return TestStatus::Running; - } - - ReplicaDrillerHook m_driller; - ReplicaId m_replicaId; - }; - - TEST(CheckDataSetStreamIsntWrittenMoreThanNecessary, DISABLED_CheckDataSetStreamIsntWrittenMoreThanNecessary) - { - CheckDataSetStreamIsntWrittenMoreThanNecessary tester; - tester.run(); - } - - class CheckDataSetStreamIsntWrittenMoreThanNecessaryOnceDirty - : public SimpleBehaviorTest - { - public: - CheckDataSetStreamIsntWrittenMoreThanNecessaryOnceDirty() - : m_replicaId(InvalidReplicaId) - { - } - - enum - { - sHost, - s2, - nSessions - }; - - int GetNumSessions() override { return nSessions; } - - static const int NonDefaultValue = 4242; - - void PreConnect() override - { - m_driller.BusConnect(); - - ReplicaPtr replica = Replica::CreateReplica(nullptr); - auto chunk = CreateAndAttachReplicaChunk(replica); - AZ_TEST_ASSERT(chunk); - - m_replicaId = m_sessions[sHost].GetReplicaMgr().AddPrimary(replica); - } - - ~CheckDataSetStreamIsntWrittenMoreThanNecessaryOnceDirty() override - { - m_driller.BusDisconnect(); - } - - CustomMarshalerTestChunk::Ptr GetHostChunk() - { - ReplicaPtr replica = m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaId); - auto chunk = replica->FindReplicaChunk(); - - return chunk; - } - - TestStatus Tick(int tick) override - { - switch (tick) - { - case 10: - { - auto rep = m_sessions[s2].GetReplicaMgr().FindReplica(m_replicaId); - AZ_TEST_ASSERT(rep); - break; - } - case 15: - { - auto chunk = GetHostChunk(); - chunk->Data1.Set(CustomInt(41)); - - const auto& m = chunk->Data1.GetMarshaler(); - // Only the initial setup call - AZ_TEST_ASSERT(m.m_marshalCalls == 1); - m.m_marshalCalls = 0; - m_driller.ResetCounts(); - - break; - } - case 42: - { - auto chunk = GetHostChunk(); - const auto& m = chunk->Data1.GetMarshaler(); - AZ_TEST_ASSERT(m.m_marshalCalls == 6 /* 5 unreliables + 1 reliable */); - - m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaId)->Destroy(); - break; - } - case 45: - { - return TestStatus::Completed; - } - default: - break; - } - return TestStatus::Running; - } - - ReplicaDrillerHook m_driller; - ReplicaId m_replicaId; - }; - - TEST(CheckDataSetStreamIsntWrittenMoreThanNecessaryOnceDirty, DISABLED_CheckDataSetStreamIsntWrittenMoreThanNecessaryOnceDirty) - { - CheckDataSetStreamIsntWrittenMoreThanNecessaryOnceDirty tester; - tester.run(); - } - - class CheckReplicaIsntSentWithNoChanges - : public SimpleBehaviorTest - { - public: - CheckReplicaIsntSentWithNoChanges() - : m_replicaId(InvalidReplicaId) - { - } - - enum - { - sHost, - s2, - nSessions - }; - - int GetNumSessions() override { return nSessions; } - - void PreConnect() override - { - m_driller.BusConnect(); - - ReplicaPtr replica = Replica::CreateReplica(nullptr); - ForcingDirtyTestChunk* chunk = CreateAndAttachReplicaChunk(replica); - AZ_TEST_ASSERT(chunk); - - m_replicaId = m_sessions[sHost].GetReplicaMgr().AddPrimary(replica); - } - - ~CheckReplicaIsntSentWithNoChanges() override - { - m_driller.BusDisconnect(); - } - - const int NewValue = 999; - const int MomentaryValue = 1; - const int ExpectedNumberReplicasSent = 6; - - ReplicaPtr GetHostReplica() - { - return m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaId); - } - - TestStatus Tick(int tick) override - { - switch (tick) - { - case 9: - { - auto rep = GetHostReplica(); - AZ_TEST_ASSERT(rep); - m_driller.ResetCounts(); - - auto chunk = rep->FindReplicaChunk(); - chunk->Data1.Set(NewValue); - - break; - } - case 15: - { - auto rep = GetHostReplica(); - AZ_TEST_ASSERT(rep); - - auto counts = m_driller.m_replicaLengths.size(); - AZ_TEST_ASSERT(counts == ExpectedNumberReplicasSent); - m_driller.ResetCounts(); - - auto chunk = rep->FindReplicaChunk(); - chunk->Data1.Set(MomentaryValue); - - break; - } - case 16: - { - auto rep = GetHostReplica(); - AZ_TEST_ASSERT(rep); - auto chunk = rep->FindReplicaChunk(); - chunk->Data1.Set(NewValue); - - auto counts = m_driller.m_replicaLengths.size(); - AZ_TEST_ASSERT(counts == 1); - m_driller.ResetCounts(); - - break; - } - case 100: - { - auto counts = m_driller.m_replicaLengths.size(); - AZ_TEST_ASSERT(counts == ExpectedNumberReplicasSent); - m_driller.ResetCounts(); - - m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaId)->Destroy(); - return TestStatus::Completed; - } - default: - break; - } - return TestStatus::Running; - } - - FilteredHook m_driller; - ReplicaId m_replicaId; - }; - - TEST(CheckReplicaIsntSentWithNoChanges, DISABLED_CheckReplicaIsntSentWithNoChanges) - { - CheckReplicaIsntSentWithNoChanges tester; - tester.run(); - } - - class CheckEntityScriptReplicaIsntSentWithNoChanges - : public SimpleBehaviorTest - { - public: - CheckEntityScriptReplicaIsntSentWithNoChanges() - : m_replicaId(InvalidReplicaId) - { - } - - enum - { - sHost, - s2, - nSessions - }; - - - int GetNumSessions() override { return nSessions; } - - void PreConnect() override - { - m_driller.BusConnect(); - - ReplicaPtr replica = Replica::CreateReplica(nullptr); - auto chunk = CreateAndAttachReplicaChunk(replica); - AZ_TEST_ASSERT(chunk); - - m_replicaId = m_sessions[sHost].GetReplicaMgr().AddPrimary(replica); - } - - ~CheckEntityScriptReplicaIsntSentWithNoChanges() override - { - m_driller.BusDisconnect(); - } - - const int NewValue = 999; - const int MomentaryValue = 1; - const int ExpectedNumberReplicasSent = 6; - - ReplicaPtr GetHostReplica() - { - return m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaId); - } - - TestStatus Tick(int tick) override - { - switch (tick) - { - case 10: - { - auto rep = GetHostReplica(); - AZ_TEST_ASSERT(rep); - m_driller.ResetCounts(); - - auto chunk = rep->FindReplicaChunk(); - - // mimicing behavior of entity script chunk - chunk->m_scriptDataSets[0].SetIsEnabled(true); - chunk->m_scriptDataSets[0].Set(NewValue); - - break; - } - case 60: - { - auto counts = m_driller.m_replicaLengths.size(); - AZ_TEST_ASSERT(counts == ExpectedNumberReplicasSent); - m_driller.ResetCounts(); - - m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaId)->Destroy(); - return TestStatus::Completed; - } - default: - break; - } - return TestStatus::Running; - } - - ReplicaDrillerHook m_driller; - ReplicaId m_replicaId; - }; - - TEST(CheckEntityScriptReplicaIsntSentWithNoChanges, DISABLED_CheckEntityScriptReplicaIsntSentWithNoChanges) - { - CheckEntityScriptReplicaIsntSentWithNoChanges tester; - tester.run(); - } - } // namespace ReplicaBehavior } // namespace UnitTest diff --git a/Code/Framework/GridMate/Tests/ReplicaMedium.cpp b/Code/Framework/GridMate/Tests/ReplicaMedium.cpp index 2e8d2a3a73..b258d7d310 100644 --- a/Code/Framework/GridMate/Tests/ReplicaMedium.cpp +++ b/Code/Framework/GridMate/Tests/ReplicaMedium.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -525,22 +524,6 @@ public: int m_deactivates; }; -class DrillerTestChunk - : public ReplicaChunk -{ -public: - GM_CLASS_ALLOCATOR(DrillerTestChunk); - typedef AZStd::intrusive_ptr Ptr; - static const char* GetChunkName() { return "DrillerTestChunk"; } - - DrillerTestChunk() { } - - bool IsReplicaMigratable() override - { - return true; - } -}; - class NonConstMarshaler { public: @@ -744,10 +727,6 @@ public: { ReplicaChunkDescriptorTable::Get().RegisterChunkType(); } - if (!ReplicaChunkDescriptorTable::Get().FindReplicaChunkDescriptor(ReplicaChunkClassId(DrillerTestChunk::GetChunkName()))) - { - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - } if (!ReplicaChunkDescriptorTable::Get().FindReplicaChunkDescriptor(ReplicaChunkClassId(NonConstMarshalerChunk::GetChunkName()))) { ReplicaChunkDescriptorTable::Get().RegisterChunkType(); @@ -1648,440 +1627,6 @@ TEST_F(ReplicaChunkEventsDeactivate, DISABLED_ReplicaChunkEventsDeactivate) }); } - -class ReplicaDriller - : public SimpleTest -{ -public: - ReplicaDriller() - : m_replicaId(InvalidReplicaId) - { - } - - enum - { - sHost, - s2, - nSessions - }; - - class ReplicaDrillerHook - : public Debug::ReplicaDrillerBus::Handler - { - public: - ReplicaDrillerHook() - : m_createdReplicas(0) - , m_destroyedReplicas(0) - , m_activatedReplicas(0) - , m_deactivatedReplicas(0) - , m_attachedChunks(0) - , m_detachedChunks(0) - , m_numReplicaBytesSent(0) - , m_numReplicaBytesReceived(0) - , m_numRequestChangeOwnership(0) - , m_numChangedOwnership(0) - , m_createdChunks(0) - , m_destroyedChunks(0) - , m_activatedChunks(0) - , m_deactivatedChunks(0) - , m_numChunkBytesSent(0) - , m_numChunkBytesReceived(0) - , m_numOutgoingDatasets(0) - , m_numIncomingDatasets(0) - , m_numRpcRequests(0) - , m_numRpcInvokes(0) - , m_outgoingRpcDataSize(0) - , m_incomingRpcDataSize(0) - , m_totalOutgoingBytes(0) - , m_totalIncomingBytes(0) - , m_curReplicaSend(nullptr) - , m_curReplicaChunkSend(nullptr) - , m_curReplicaChunkIndexSend(GM_MAX_CHUNKS_PER_REPLICA) - , m_curReplicaReceive(nullptr) - , m_curReplicaChunkReceive(nullptr) - , m_curReplicaChunkIndexReceive(GM_MAX_CHUNKS_PER_REPLICA) - { - } - - AZStd::size_t m_createdReplicas; - AZStd::size_t m_destroyedReplicas; - AZStd::size_t m_activatedReplicas; - AZStd::size_t m_deactivatedReplicas; - AZStd::size_t m_attachedChunks; - AZStd::size_t m_detachedChunks; - AZStd::size_t m_numReplicaBytesSent; - AZStd::size_t m_numReplicaBytesReceived; - AZStd::size_t m_numRequestChangeOwnership; - AZStd::size_t m_numChangedOwnership; - - AZStd::size_t m_createdChunks; - AZStd::size_t m_destroyedChunks; - AZStd::size_t m_activatedChunks; - AZStd::size_t m_deactivatedChunks; - AZStd::size_t m_numChunkBytesSent; - AZStd::size_t m_numChunkBytesReceived; - - AZStd::size_t m_numOutgoingDatasets; - AZStd::size_t m_numIncomingDatasets; - - AZStd::size_t m_numRpcRequests; - AZStd::size_t m_numRpcInvokes; - AZStd::size_t m_outgoingRpcDataSize; - AZStd::size_t m_incomingRpcDataSize; - - AZStd::size_t m_totalOutgoingBytes; - AZStd::size_t m_totalIncomingBytes; - - Replica* m_curReplicaSend; - ReplicaChunkBase* m_curReplicaChunkSend; - size_t m_curReplicaChunkIndexSend; - Replica* m_curReplicaReceive; - ReplicaChunkBase* m_curReplicaChunkReceive; - AZ::u32 m_curReplicaChunkIndexReceive; - - void OnCreateReplica(Replica* replica) override - { - AZ_TEST_ASSERT(replica); - ++m_createdReplicas; - } - - void OnDestroyReplica(Replica* replica) override - { - AZ_TEST_ASSERT(replica); - ++m_destroyedReplicas; - } - - void OnActivateReplica(Replica* replica) override - { - AZ_TEST_ASSERT(replica); - ++m_activatedReplicas; - } - - void OnDeactivateReplica(Replica* replica) override - { - AZ_TEST_ASSERT(replica); - ++m_deactivatedReplicas; - } - - void OnAttachReplicaChunk(ReplicaChunkBase* chunk) override - { - AZ_TEST_ASSERT(chunk); - ++m_attachedChunks; - } - - void OnDetachReplicaChunk(ReplicaChunkBase* chunk) override - { - AZ_TEST_ASSERT(chunk); - ++m_detachedChunks; - } - - void OnSendReplicaBegin(Replica* replica) override - { - AZ_TEST_ASSERT(replica); - AZ_TEST_ASSERT(m_curReplicaSend == nullptr); - m_curReplicaSend = replica; - } - - void OnSendReplicaEnd(Replica* replica, const void* data, size_t len) override - { - AZ_TEST_ASSERT(replica); - AZ_TEST_ASSERT(replica == m_curReplicaSend); - AZ_TEST_ASSERT(data); - AZ_TEST_ASSERT(len > 0); - m_numReplicaBytesSent += len; - m_curReplicaSend = nullptr; - } - - void OnReceiveReplicaBegin(Replica* replica, const void* data, size_t len) override - { - AZ_TEST_ASSERT(replica); - AZ_TEST_ASSERT(m_curReplicaReceive == nullptr); - AZ_TEST_ASSERT(data); - AZ_TEST_ASSERT(len > 0); - m_curReplicaReceive = replica; - m_numReplicaBytesReceived += len; - } - - void OnReceiveReplicaEnd(Replica* replica) override - { - AZ_TEST_ASSERT(replica); - AZ_TEST_ASSERT(replica == m_curReplicaReceive); - m_curReplicaReceive = nullptr; - } - - void OnRequestReplicaChangeOwnership(Replica* replica, PeerId requestor) override - { - AZ_TEST_ASSERT(replica); - AZ_TEST_ASSERT(requestor == (s2 + 1)); - ++m_numRequestChangeOwnership; - } - - void OnReplicaChangeOwnership(Replica* replica, bool wasPrimary) override - { - AZ_TEST_ASSERT(replica); - switch (m_numChangedOwnership) - { - case 0: // host loses ownership - AZ_TEST_ASSERT(replica->IsProxy() && wasPrimary == true); - break; - case 1: // peer acquires ownership - AZ_TEST_ASSERT(replica->IsPrimary() && wasPrimary == false); - break; - default: - AZ_TEST_ASSERT(0); - } - - ++m_numChangedOwnership; - } - - void OnCreateReplicaChunk(ReplicaChunkBase* chunk) override - { - AZ_TEST_ASSERT(chunk); - ++m_createdChunks; - } - - void OnDestroyReplicaChunk(ReplicaChunkBase* chunk) override - { - AZ_TEST_ASSERT(chunk); - ++m_destroyedChunks; - } - - void OnActivateReplicaChunk(ReplicaChunkBase* chunk) override - { - AZ_TEST_ASSERT(chunk); - ++m_activatedChunks; - } - - void OnDeactivateReplicaChunk(ReplicaChunkBase* chunk) override - { - AZ_TEST_ASSERT(chunk); - ++m_deactivatedChunks; - } - - void OnSendReplicaChunkBegin(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, PeerId from, PeerId to) override - { - (void)from; - (void)to; - - AZ_TEST_ASSERT(chunk); - AZ_TEST_ASSERT(m_curReplicaSend == chunk->GetReplica()); - AZ_TEST_ASSERT(m_curReplicaChunkSend == nullptr); - AZ_TEST_ASSERT(m_curReplicaChunkIndexSend == GM_MAX_CHUNKS_PER_REPLICA); - m_curReplicaChunkSend = chunk; - m_curReplicaChunkIndexSend = chunkIndex; - } - - void OnSendReplicaChunkEnd(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, const void* data, size_t len) override - { - AZ_TEST_ASSERT(chunk); - AZ_TEST_ASSERT(m_curReplicaSend == chunk->GetReplica()); - AZ_TEST_ASSERT(m_curReplicaChunkSend == chunk); - AZ_TEST_ASSERT(m_curReplicaChunkIndexSend == chunkIndex); - AZ_TEST_ASSERT(data); - AZ_TEST_ASSERT(len > 0); - m_numChunkBytesSent += len; - m_curReplicaChunkSend = nullptr; - m_curReplicaChunkIndexSend = GM_MAX_CHUNKS_PER_REPLICA; - - } - - void OnReceiveReplicaChunkBegin(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, PeerId from, PeerId to, const void* data, size_t len) override - { - AZ_TEST_ASSERT(chunk); - AZ_TEST_ASSERT(m_curReplicaReceive == chunk->GetReplica()); - AZ_TEST_ASSERT(m_curReplicaChunkReceive == nullptr); - AZ_TEST_ASSERT(m_curReplicaChunkIndexReceive == GM_MAX_CHUNKS_PER_REPLICA); - AZ_TEST_ASSERT(from); - AZ_TEST_ASSERT(to); - AZ_TEST_ASSERT(data); - AZ_TEST_ASSERT(len > 0); - m_curReplicaChunkReceive = chunk; - m_curReplicaChunkIndexReceive = chunkIndex; - m_numChunkBytesReceived += len; - } - - void OnReceiveReplicaChunkEnd(ReplicaChunkBase* chunk, AZ::u32 chunkIndex) override - { - AZ_TEST_ASSERT(chunk); - AZ_TEST_ASSERT(m_curReplicaReceive == chunk->GetReplica()); - AZ_TEST_ASSERT(m_curReplicaChunkReceive == chunk); - AZ_TEST_ASSERT(m_curReplicaChunkIndexReceive == chunkIndex); - m_curReplicaChunkReceive = nullptr; - m_curReplicaChunkIndexReceive = GM_MAX_CHUNKS_PER_REPLICA; - } - - void OnSendDataSet(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, DataSetBase* dataSet, PeerId from, PeerId to, const void* data, size_t len) override - { - AZ_TEST_ASSERT(chunk); - AZ_TEST_ASSERT(m_curReplicaChunkSend == chunk); - AZ_TEST_ASSERT(m_curReplicaChunkIndexSend == chunkIndex); - AZ_TEST_ASSERT(dataSet); - AZ_TEST_ASSERT(from); - AZ_TEST_ASSERT(to); - AZ_TEST_ASSERT(data); - AZ_TEST_ASSERT(len > 0); - - ++m_numOutgoingDatasets; - } - - void OnReceiveDataSet(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, DataSetBase* dataSet, PeerId from, PeerId to, const void* data, size_t len) override - { - AZ_TEST_ASSERT(chunk); - AZ_TEST_ASSERT(m_curReplicaChunkReceive == chunk); - AZ_TEST_ASSERT(m_curReplicaChunkIndexReceive == chunkIndex); - AZ_TEST_ASSERT(dataSet); - AZ_TEST_ASSERT(from); - AZ_TEST_ASSERT(to); - AZ_TEST_ASSERT(data); - AZ_TEST_ASSERT(len > 0); - - ++m_numIncomingDatasets; - } - - void OnRequestRpc(ReplicaChunkBase* chunk, Internal::RpcRequest* rpc) override - { - (void)chunk; - (void)rpc; - ++m_numRpcRequests; - } - - void OnInvokeRpc(ReplicaChunkBase* chunk, Internal::RpcRequest* rpc) override - { - (void)chunk; - (void)rpc; - ++m_numRpcInvokes; - } - - void OnSendRpc(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, Internal::RpcRequest* rpc, PeerId from, PeerId to, const void* data, size_t len) override - { - AZ_TEST_ASSERT(chunk); - AZ_TEST_ASSERT(m_curReplicaChunkSend == chunk); - AZ_TEST_ASSERT(m_curReplicaChunkIndexSend == chunkIndex); - AZ_TEST_ASSERT(rpc); - AZ_TEST_ASSERT(from); - AZ_TEST_ASSERT(to); - AZ_TEST_ASSERT(data); - AZ_TEST_ASSERT(len > 0); - m_outgoingRpcDataSize += len; - } - - void OnReceiveRpc(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, Internal::RpcRequest* rpc, PeerId from, PeerId to, const void* data, size_t len) override - { - AZ_TEST_ASSERT(chunk); - AZ_TEST_ASSERT(m_curReplicaChunkReceive == chunk); - AZ_TEST_ASSERT(m_curReplicaChunkIndexReceive == chunkIndex); - AZ_TEST_ASSERT(rpc); - AZ_TEST_ASSERT(from); - AZ_TEST_ASSERT(to); - AZ_TEST_ASSERT(data); - AZ_TEST_ASSERT(len > 0); - m_incomingRpcDataSize += len; - } - - void OnSend(PeerId to, const void* data, size_t len, bool isReliable) override - { - (void)to; // peerId might not be valid at this point, e.g. handshake (Cmd_Greetings) did not accomplish yet - (void)isReliable; - AZ_TEST_ASSERT(data); - AZ_TEST_ASSERT(len > 0); - m_totalOutgoingBytes += len; - } - - void OnReceive(PeerId from, const void* data, size_t len) override - { - (void)from; // peerId might not be valid at this point, e.g. handshake (Cmd_Greetings) did not accomplish yet - AZ_TEST_ASSERT(data); - AZ_TEST_ASSERT(len > 0); - m_totalIncomingBytes += len; - } - }; - - int GetNumSessions() override { return nSessions; } - - void PreConnect() override - { - m_driller.BusConnect(); - - ReplicaPtr replica = Replica::CreateReplica(nullptr); - CreateAndAttachReplicaChunk(replica); - m_replicaId = m_sessions[sHost].GetReplicaMgr().AddPrimary(replica); - } - - ~ReplicaDriller() override - { - m_driller.BusDisconnect(); - } - - ReplicaDrillerHook m_driller; - ReplicaId m_replicaId; -}; - -TEST_F(ReplicaDriller, DISABLED_ReplicaDriller) -{ - RunTickLoop([this](int tick)-> TestStatus - { - switch (tick) - { - case 10: - { - auto rep = m_sessions[s2].GetReplicaMgr().FindReplica(m_replicaId); - AZ_TEST_ASSERT(rep); - AZ_TEST_ASSERT(rep->IsProxy()); - rep->RequestChangeOwnership(); - break; - } - case 30: - { - auto rep = m_sessions[s2].GetReplicaMgr().FindReplica(m_replicaId); - AZ_TEST_ASSERT(rep); - AZ_TEST_ASSERT(rep->IsPrimary()); - rep->Destroy(); - break; - } - case 40: - // replicas - AZ_TEST_ASSERT(m_driller.m_createdReplicas > 0); - AZ_TEST_ASSERT(m_driller.m_destroyedReplicas > 0); - AZ_TEST_ASSERT(m_driller.m_activatedReplicas > 0); - AZ_TEST_ASSERT(m_driller.m_deactivatedReplicas > 0); - AZ_TEST_ASSERT(m_driller.m_numReplicaBytesSent > 0); - AZ_TEST_ASSERT(m_driller.m_numReplicaBytesReceived > 0); - AZ_TEST_ASSERT(m_driller.m_numRequestChangeOwnership == 1); - AZ_TEST_ASSERT(m_driller.m_numChangedOwnership == 2); // two because one call for host & one for peer - - // chunks - AZ_TEST_ASSERT(m_driller.m_createdChunks >= m_driller.m_createdReplicas); - AZ_TEST_ASSERT(m_driller.m_destroyedChunks >= m_driller.m_destroyedReplicas); - AZ_TEST_ASSERT(m_driller.m_activatedChunks >= m_driller.m_activatedReplicas); - AZ_TEST_ASSERT(m_driller.m_deactivatedChunks >= m_driller.m_deactivatedReplicas); - AZ_TEST_ASSERT(m_driller.m_attachedChunks > 0); - AZ_TEST_ASSERT(m_driller.m_detachedChunks > 0); - AZ_TEST_ASSERT(m_driller.m_numChunkBytesReceived > 0); - - AZ_TEST_ASSERT(m_driller.m_numChunkBytesSent > 0); - AZ_TEST_ASSERT(m_driller.m_numChunkBytesReceived > 0); - - // datasets - AZ_TEST_ASSERT(m_driller.m_numOutgoingDatasets > 0); - AZ_TEST_ASSERT(m_driller.m_numIncomingDatasets > 0); - - // rpcs - AZ_TEST_ASSERT(m_driller.m_numRpcRequests > 0); - AZ_TEST_ASSERT(m_driller.m_numRpcInvokes > 0); - AZ_TEST_ASSERT(m_driller.m_outgoingRpcDataSize > 0); - AZ_TEST_ASSERT(m_driller.m_incomingRpcDataSize > 0); - - // data - AZ_TEST_ASSERT(m_driller.m_totalOutgoingBytes > 0); - AZ_TEST_ASSERT(m_driller.m_totalIncomingBytes > 0); - return TestStatus::Completed; - default: break; - } - return TestStatus::Running; - }); -} - - class DataSetChangedTest : public SimpleTest { @@ -2403,114 +1948,6 @@ TEST_F(SourcePeerTest, DISABLED_SourcePeerTest) }); } - -class SendWithPriority - : public SimpleTest -{ -public: - enum - { - sHost, - s2, - nSessions - }; - - class PriorityChunk - : public ReplicaChunk - { - public: - GM_CLASS_ALLOCATOR(PriorityChunk); - typedef AZStd::intrusive_ptr Ptr; - static const char* GetChunkName() { return "PriorityChunk"; } - - PriorityChunk() - : m_value("Value") - { - } - - bool IsReplicaMigratable() override { return false; } - - DataSet m_value; - }; - - class ReplicaDrillerHook - : public Debug::ReplicaDrillerBus::Handler - { - public: - ReplicaDrillerHook() - : m_expectedSendValue(SendWithPriority::kNumReplicas) - , m_expectedRecvValue(SendWithPriority::kNumReplicas) - { - } - - void OnReceiveReplicaEnd(Replica* replica) override - { - auto chunk = replica->FindReplicaChunk(); - if (chunk && m_expectedRecvValue > 0) - { - AZ_TEST_ASSERT(chunk->m_value.Get() == m_expectedRecvValue); // checking reverse order - --m_expectedRecvValue; - } - } - - void OnSendReplicaEnd(Replica* replica, const void* data, size_t len) override - { - (void)data; - (void)len; - - auto chunk = replica->FindReplicaChunk(); - if (chunk && m_expectedSendValue > 0) - { - AZ_TEST_ASSERT(chunk->m_value.Get() == m_expectedSendValue); // checking reverse order - --m_expectedSendValue; - } - } - - int m_expectedSendValue; - int m_expectedRecvValue; - }; - - int GetNumSessions() override { return nSessions; } - - void PreConnect() override - { - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - - m_driller.BusConnect(); - - for (unsigned i = 0; i < kNumReplicas; ++i) - { - ReplicaPtr replica = Replica::CreateReplica(nullptr); - m_chunks[i] = CreateAndAttachReplicaChunk(replica); - m_chunks[i]->m_value.Set(i + 1); // setting dataset values to 1..kNumReplicas - m_chunks[i]->SetPriority(k_replicaPriorityNormal + static_cast(i)); // the later created - the higher priorities, so should be sent in reverse order - m_sessions[sHost].GetReplicaMgr().AddPrimary(replica); - } - } - - - static const size_t kNumReplicas = 5; - - ReplicaDrillerHook m_driller; - PriorityChunk::Ptr m_chunks[kNumReplicas]; -}; - -TEST_F(SendWithPriority, DISABLED_SendWithPriority) -{ - RunTickLoop([this](int tick)-> TestStatus - { - if (tick == 20) - { - AZ_TEST_ASSERT(m_driller.m_expectedSendValue == 0); // sent all the replicas in the right order - AZ_TEST_ASSERT(m_driller.m_expectedRecvValue == 0); // received all the replicas in the right order - return TestStatus::Completed; - } - - return TestStatus::Running; - }); -} - - class SuspendUpdatesTest : public SimpleTest { @@ -2787,75 +2224,6 @@ TEST_F(BasicHostChunkDescriptorTest, DISABLED_BasicHostChunkDescriptorTest) } } -/* - * Create and immedietly destroy primary replica - * Test that it does not result in any network sync -*/ -class CreateDestroyPrimary - : public SimpleTest - , public Debug::ReplicaDrillerBus::Handler -{ -public: - enum - { - sHost, - s2, - nSessions - }; - - int GetNumSessions() override { return nSessions; } - - - // ReplicaDrillerBus - void OnReceive(PeerId from, const void* data, size_t len) override - { - (void)from; - (void)data; - (void)len; - - AZ_TEST_ASSERT(false); // should not receive any replica data - } - - void ConnectDriller() - { - Debug::ReplicaDrillerBus::Handler::BusConnect(); - } - - void DisconnectDriller() - { - Debug::ReplicaDrillerBus::Handler::BusDisconnect(); - } -}; - -TEST_F(CreateDestroyPrimary, DISABLED_CreateDestroyPrimary) -{ - RunTickLoop([this](int tick)-> TestStatus - { - switch (tick) - { - - case 10: - { - ConnectDriller(); - auto replica = Replica::CreateReplica(nullptr); - CreateAndAttachReplicaChunk(replica); - m_sessions[sHost].GetReplicaMgr().AddPrimary(replica); - - // Destroying replica right away - replica->Destroy(); - break; - } - - case 20: - DisconnectDriller(); - return TestStatus::Completed; - default: break; - } - - return TestStatus::Running; - }); -} - /* * This test checks that when the carrier ACKs a message it feeds back to the ReplicaTarget. * The ReplicaTarget will prevent sending more updates. @@ -2884,8 +2252,6 @@ public: void PreConnect() override { - m_driller.BusConnect(); - ReplicaPtr replica = Replica::CreateReplica("ReplicaACKfeedbackTest"); LargeChunkWithDefaultsMedium* chunk = CreateAndAttachReplicaChunk(replica); AZ_TEST_ASSERT(chunk); @@ -2895,12 +2261,9 @@ public: ~ReplicaACKfeedbackTestFixture() override { - m_driller.BusDisconnect(); } - size_t m_replicaBytesSentPrev = 0; ReplicaId m_replicaId; - ReplicaDriller::ReplicaDrillerHook m_driller; }; TEST_F(ReplicaACKfeedbackTestFixture, ReplicaACKfeedbackTest) @@ -2912,7 +2275,6 @@ TEST_F(ReplicaACKfeedbackTestFixture, ReplicaACKfeedbackTest) return TestStatus::Completed; } - //AZ_Printf("GridMateTests", "%d %d\n", tick, m_driller.m_numReplicaBytesSent); // Tests the Revision stamp with Carrier ACK feedback // result is true on the immediate tick after changing, but false on the next and stays false until next change auto CheckHostReplicaChanged = [this](bool result) @@ -2963,12 +2325,10 @@ TEST_F(ReplicaACKfeedbackTestFixture, ReplicaACKfeedbackTest) updateDataSets(chunk, NonDefaultValue); - m_replicaBytesSentPrev = m_driller.m_numReplicaBytesSent; CheckHostReplicaChanged(false); //Changed now, but wont know until next prepareData() }break; case 16: { - AZ_TEST_ASSERT(m_driller.m_numReplicaBytesSent - m_replicaBytesSentPrev == k_updateBytes); CheckHostReplicaChanged(true); //Detected change. ACK feedback on next tick returns to false. }break; case 20: @@ -2978,12 +2338,10 @@ TEST_F(ReplicaACKfeedbackTestFixture, ReplicaACKfeedbackTest) updateDataSets(chunk, NonDefaultValue + 1); - m_replicaBytesSentPrev = m_driller.m_numReplicaBytesSent; CheckHostReplicaChanged(false); //Changed now, but wont know until next prepareData() }break; case 21: { - AZ_TEST_ASSERT(m_driller.m_numReplicaBytesSent - m_replicaBytesSentPrev == k_updateBytes); CheckHostReplicaChanged(true); //Detected change. ACK feedback on next tick returns to false. }break; case 25: diff --git a/Code/Framework/GridMate/Tests/ReplicaSmall.cpp b/Code/Framework/GridMate/Tests/ReplicaSmall.cpp index d71789ae90..7e058d5c6f 100644 --- a/Code/Framework/GridMate/Tests/ReplicaSmall.cpp +++ b/Code/Framework/GridMate/Tests/ReplicaSmall.cpp @@ -453,7 +453,6 @@ public: // replicaHeader += 16; //#endif // const int marshalDataSize = 48; //Data plus length - //Only for Driller ReplicaManager rm; ReplicaPeer peer(&rm); diff --git a/Code/Framework/GridMate/Tests/Tests.h b/Code/Framework/GridMate/Tests/Tests.h index 7e1638c5e5..f3583c22eb 100644 --- a/Code/Framework/GridMate/Tests/Tests.h +++ b/Code/Framework/GridMate/Tests/Tests.h @@ -18,18 +18,8 @@ #include #include -#include -#include - #include -#define GM_TEST_MEMORY_DRILLING 0 -////////////////////////////////////////////////////////////////////////// -// Drillers -#include - -#define AZ_ROOT_TEST_FOLDER "" - #include ////////////////////////////////////////////////////////////////////////// @@ -50,9 +40,6 @@ namespace UnitTest { protected: GridMate::IGridMate* m_gridMate; - AZ::Debug::DrillerSession* m_drillerSession; - AZ::Debug::DrillerOutputFileStream* m_drillerStream; - AZ::Debug::DrillerManager* m_drillerManager; private: using Platform = GridMateTestFixture_Platform; @@ -60,25 +47,15 @@ namespace UnitTest public: GridMateTestFixture([[maybe_unused]] unsigned int memorySize = 100 * 1024 * 1024) : m_gridMate(nullptr) - , m_drillerSession(nullptr) - , m_drillerStream(nullptr) - , m_drillerManager(nullptr) { GridMate::GridMateDesc desc; -#if GM_TEST_MEMORY_DRILLING - m_drillerManager = AZ::Debug::DrillerManager::Create(); - m_drillerManager->Register(aznew AZ::Debug::MemoryDriller); - - desc.m_allocatorDesc.m_allocationRecords = true; -#endif AZ::AllocatorInstance::Create(); //desc.m_autoInitPlatformNetModules = false; m_gridMate = GridMateCreate(desc); AZ_TEST_ASSERT(m_gridMate != NULL); - m_drillerSession = NULL; - + AZ::AllocatorManager::Instance().EnterProfilingMode(); AZ::Debug::AllocationRecords* records = AZ::AllocatorInstance::GetAllocator().GetRecords(); if (records) { @@ -99,12 +76,7 @@ namespace UnitTest } AZ::AllocatorInstance::Destroy(); - - if (m_drillerManager) - { - AZ::Debug::DrillerManager::Destroy(m_drillerManager); - m_drillerManager = nullptr; - } + AZ::AllocatorManager::Instance().ExitProfilingMode(); } void Update() diff --git a/Code/LauncherUnified/Platform/Android/Launcher_Android.cpp b/Code/LauncherUnified/Platform/Android/Launcher_Android.cpp index de548a49d7..0890b5a193 100644 --- a/Code/LauncherUnified/Platform/Android/Launcher_Android.cpp +++ b/Code/LauncherUnified/Platform/Android/Launcher_Android.cpp @@ -299,7 +299,7 @@ void android_main(android_app* appState) { // Adding a start up banner so you can see when the game is starting up in amongst the logcat spam LOGI("****************************************************************"); - LOGI("* Amazon Lumberyard - Launching Game... *"); + LOGI("* Launching Game... *"); LOGI("****************************************************************"); // setup the system command handler which are guaranteed to be called on the same diff --git a/Code/Legacy/CryCommon/ICmdLine.h b/Code/Legacy/CryCommon/ICmdLine.h index 6071671b02..80561fd85c 100644 --- a/Code/Legacy/CryCommon/ICmdLine.h +++ b/Code/Legacy/CryCommon/ICmdLine.h @@ -71,6 +71,14 @@ public: // The value of the argument as integer number. virtual const int GetIValue() const = 0; // + + // Description: + // Retrieve the value of the argument. + // Arguments: + // cmdLineValue. The cmdline value will be filled out if a valid boolean is found. + // Return Value: + // Returns true if the cmdline arg is actually a boolean string matching "true" or "false"; otherwise return false. + virtual const bool GetBoolValue(bool& cmdLineValue) const = 0; }; // Command line interface diff --git a/Code/Legacy/CryCommon/crycommon_files.cmake b/Code/Legacy/CryCommon/crycommon_files.cmake index 68cf579ca8..a4d87c207a 100644 --- a/Code/Legacy/CryCommon/crycommon_files.cmake +++ b/Code/Legacy/CryCommon/crycommon_files.cmake @@ -100,85 +100,8 @@ set(FILES platform_impl.cpp Win32specific.h Win64specific.h - LyShine/IDraw2d.h - LyShine/ILyShine.h - LyShine/ISprite.h - LyShine/IRenderGraph.h LyShine/UiAssetTypes.h - LyShine/UiComponentTypes.h - LyShine/UiBase.h - LyShine/UiEntityContext.h - LyShine/UiLayoutCellBase.h - LyShine/UiSerializeHelpers.h - LyShine/Animation/IUiAnimation.h - LyShine/Bus/UiAnimateEntityBus.h - LyShine/Bus/UiAnimationBus.h - LyShine/Bus/UiButtonBus.h - LyShine/Bus/UiCanvasBus.h - LyShine/Bus/UiCanvasManagerBus.h - LyShine/Bus/UiCanvasUpdateNotificationBus.h - LyShine/Bus/UiCheckboxBus.h LyShine/Bus/UiCursorBus.h - LyShine/Bus/UiDraggableBus.h - LyShine/Bus/UiDropdownBus.h - LyShine/Bus/UiDropdownOptionBus.h - LyShine/Bus/UiDropTargetBus.h - LyShine/Bus/UiDynamicLayoutBus.h - LyShine/Bus/UiDynamicScrollBoxBus.h - LyShine/Bus/UiEditorBus.h - LyShine/Bus/UiEditorCanvasBus.h - LyShine/Bus/UiEditorChangeNotificationBus.h - LyShine/Bus/UiElementBus.h - LyShine/Bus/UiEntityContextBus.h - LyShine/Bus/UiFaderBus.h - LyShine/Bus/UiFlipbookAnimationBus.h - LyShine/Bus/UiGameEntityContextBus.h - LyShine/Bus/UiImageBus.h - LyShine/Bus/UiImageSequenceBus.h - LyShine/Bus/UiIndexableImageBus.h - LyShine/Bus/UiInitializationBus.h - LyShine/Bus/UiInteractableActionsBus.h - LyShine/Bus/UiInteractableBus.h - LyShine/Bus/UiInteractableStatesBus.h - LyShine/Bus/UiInteractionMaskBus.h - LyShine/Bus/UiLayoutBus.h - LyShine/Bus/UiLayoutCellBus.h - LyShine/Bus/UiLayoutCellDefaultBus.h - LyShine/Bus/UiLayoutColumnBus.h - LyShine/Bus/UiLayoutControllerBus.h - LyShine/Bus/UiLayoutFitterBus.h - LyShine/Bus/UiLayoutGridBus.h - LyShine/Bus/UiLayoutManagerBus.h - LyShine/Bus/UiLayoutRowBus.h - LyShine/Bus/UiMarkupButtonBus.h - LyShine/Bus/UiMaskBus.h - LyShine/Bus/UiNavigationBus.h - LyShine/Bus/UiParticleEmitterBus.h - LyShine/Bus/UiRadioButtonBus.h - LyShine/Bus/UiRadioButtonCommunicationBus.h - LyShine/Bus/UiRadioButtonGroupBus.h - LyShine/Bus/UiRadioButtonGroupCommunicationBus.h - LyShine/Bus/UiRenderBus.h - LyShine/Bus/UiRenderControlBus.h - LyShine/Bus/UiScrollableBus.h - LyShine/Bus/UiScrollBarBus.h - LyShine/Bus/UiScrollBoxBus.h - LyShine/Bus/UiScrollerBus.h - LyShine/Bus/UiSliderBus.h - LyShine/Bus/UiSpawnerBus.h - LyShine/Bus/UiSystemBus.h - LyShine/Bus/UiTextBus.h - LyShine/Bus/UiTextInputBus.h - LyShine/Bus/UiTooltipBus.h - LyShine/Bus/UiTooltipDataPopulatorBus.h - LyShine/Bus/UiTooltipDisplayBus.h - LyShine/Bus/UiTransform2dBus.h - LyShine/Bus/UiTransformBus.h - LyShine/Bus/UiVisualBus.h - LyShine/Bus/Sprite/UiSpriteBus.h - LyShine/Bus/World/UiCanvasOnMeshBus.h - LyShine/Bus/World/UiCanvasRefBus.h - LyShine/Bus/Tools/UiSystemToolsBus.h Maestro/Bus/EditorSequenceAgentComponentBus.h Maestro/Bus/EditorSequenceBus.h Maestro/Bus/EditorSequenceComponentBus.h diff --git a/Code/Legacy/CrySystem/AZCoreLogSink.h b/Code/Legacy/CrySystem/AZCoreLogSink.h index 1b09c3198d..9d732b3dd4 100644 --- a/Code/Legacy/CrySystem/AZCoreLogSink.h +++ b/Code/Legacy/CrySystem/AZCoreLogSink.h @@ -36,9 +36,10 @@ public: Disconnect(); } - inline static void Connect() + inline static void Connect(bool suppressSystemOutput) { GetInstance().m_ignoredAsserts = new IgnoredAssertMap(); + GetInstance().m_suppressSystemOutput = suppressSystemOutput; GetInstance().BusConnect(); } @@ -126,7 +127,7 @@ public: CryLogAlways("%s", message); } - return true; // suppress default AzCore behavior. + return m_suppressSystemOutput; #else AZ_UNUSED(fileName); AZ_UNUSED(line); @@ -146,7 +147,7 @@ public: return false; // allow AZCore to do its default behavior. } gEnv->pLog->LogError("(%s) - %s", window, message); - return true; // suppress default AzCore behavior. + return m_suppressSystemOutput; } bool OnPreWarning(const char* window, const char* fileName, int line, const char* func, const char* message) override @@ -161,7 +162,7 @@ public: } CryWarning(VALIDATOR_MODULE_UNKNOWN, VALIDATOR_WARNING, "(%s) - %s", window, message); - return true; // suppress default AzCore behavior. + return m_suppressSystemOutput; } bool OnOutput(const char* window, const char* message) override @@ -179,12 +180,13 @@ public: { CryLog("(%s) - %s", window, message); } - - return true; // suppress default AzCore behavior. + + return m_suppressSystemOutput; } private: using IgnoredAssertMap = AZStd::unordered_map, AZStd::equal_to, AZ::OSStdAllocator>; IgnoredAssertMap* m_ignoredAsserts; + bool m_suppressSystemOutput = true; }; diff --git a/Code/Legacy/CrySystem/CmdLineArg.cpp b/Code/Legacy/CrySystem/CmdLineArg.cpp index 79d23ddae7..554e734055 100644 --- a/Code/Legacy/CrySystem/CmdLineArg.cpp +++ b/Code/Legacy/CrySystem/CmdLineArg.cpp @@ -42,5 +42,22 @@ const int CCmdLineArg::GetIValue() const { return atoi(m_value.c_str()); } - +const bool CCmdLineArg::GetBoolValue(bool& cmdLineValue) const +{ + AZStd::string lowercaseValue(m_value); + AZStd::to_lower(lowercaseValue.begin(), lowercaseValue.end()); + if (lowercaseValue == "true") + { + cmdLineValue = true; + return true; + } + + if (lowercaseValue == "false") + { + cmdLineValue = false; + return true; + } + + return false; +} diff --git a/Code/Legacy/CrySystem/CmdLineArg.h b/Code/Legacy/CrySystem/CmdLineArg.h index 5e3a629e7c..66d56be132 100644 --- a/Code/Legacy/CrySystem/CmdLineArg.h +++ b/Code/Legacy/CrySystem/CmdLineArg.h @@ -30,6 +30,7 @@ public: const ECmdLineArgType GetType() const; const float GetFValue() const; const int GetIValue() const; + const bool GetBoolValue(bool& cmdLineValue) const; private: diff --git a/Code/Legacy/CrySystem/DebugCallStack.cpp b/Code/Legacy/CrySystem/DebugCallStack.cpp index 19fe4ce8df..201582b949 100644 --- a/Code/Legacy/CrySystem/DebugCallStack.cpp +++ b/Code/Legacy/CrySystem/DebugCallStack.cpp @@ -17,7 +17,6 @@ #include "System.h" #include -#include #include #include @@ -158,8 +157,6 @@ AZStd::spin_mutex g_lockThreadDumpList; void MarkThisThreadForDebugging(const char* name) { - EBUS_EVENT(AZ::Debug::EventTraceDrillerSetupBus, SetThreadName, AZStd::this_thread::get_id(), name); - AZStd::scoped_lock lock(g_lockThreadDumpList); DWORD id = GetCurrentThreadId(); if (g_nDebugThreads == sizeof(g_idDebugThreads) / sizeof(g_idDebugThreads[0])) diff --git a/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp b/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp index 8945761184..dbe92ee6aa 100644 --- a/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp +++ b/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp @@ -18,7 +18,6 @@ #include #include -#include #include #include #include @@ -27,7 +26,6 @@ #include #include "MainThreadRenderRequestBus.h" -#include #include #include #include @@ -541,7 +539,6 @@ bool CLevelSystem::LoadLevel(const char* _levelName) ILevel* CLevelSystem::LoadLevelInternal(const char* _levelName) { gEnv->pSystem->SetSystemGlobalState(ESYSTEM_GLOBAL_STATE_LEVEL_LOAD_START); - AZ_ASSET_NAMED_SCOPE("Level: %s", _levelName); CryLog ("Level system is loading \"%s\"", _levelName); INDENT_LOG_DURING_SCOPE(); @@ -882,12 +879,6 @@ void CLevelSystem::UnloadLevel() // Normally the GC step is triggered at the end of this method (by the ESYSTEM_EVENT_LEVEL_POST_UNLOAD event). EBUS_EVENT(AZ::ScriptSystemRequestBus, GarbageCollect); - // Perform level unload procedures for the LyShine UI system - if (gEnv && gEnv->pLyShine) - { - gEnv->pLyShine->OnLevelUnload(); - } - m_bLevelLoaded = false; [[maybe_unused]] const AZ::TimeMs unloadTimeMs = AZ::GetRealElapsedTimeMs() - beginTimeMs; diff --git a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp index b91c8f2ca9..095d296373 100644 --- a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp +++ b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp @@ -12,14 +12,12 @@ #include -#include #include #include #include #include #include "MainThreadRenderRequestBus.h" -#include #include #include #include @@ -259,7 +257,6 @@ namespace LegacyLevelSystem bool SpawnableLevelSystem::LoadLevelInternal(const char* levelName) { gEnv->pSystem->SetSystemGlobalState(ESYSTEM_GLOBAL_STATE_LEVEL_LOAD_START); - AZ_ASSET_NAMED_SCOPE("Level: %s", levelName); INDENT_LOG_DURING_SCOPE(); @@ -558,12 +555,6 @@ namespace LegacyLevelSystem // Normally the GC step is triggered at the end of this method (by the ESYSTEM_EVENT_LEVEL_POST_UNLOAD event). EBUS_EVENT(AZ::ScriptSystemRequestBus, GarbageCollect); - // Perform level unload procedures for the LyShine UI system - if (gEnv && gEnv->pLyShine) - { - gEnv->pLyShine->OnLevelUnload(); - } - m_bLevelLoaded = false; [[maybe_unused]] const AZ::TimeMs unloadTimeMs = AZ::GetRealElapsedTimeMs() - beginTimeMs; diff --git a/Code/Legacy/CrySystem/System.cpp b/Code/Legacy/CrySystem/System.cpp index 6b985a3f6f..7cf066f72e 100644 --- a/Code/Legacy/CrySystem/System.cpp +++ b/Code/Legacy/CrySystem/System.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -24,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -34,6 +34,7 @@ #include #include +AZ_DEFINE_BUDGET(CrySystem); #if defined(AZ_RESTRICTED_PLATFORM) #undef AZ_RESTRICTED_SECTION @@ -116,7 +117,6 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) #include #include #include -#include #include @@ -373,14 +373,7 @@ void CSystem::ShutDown() m_pSystemEventDispatcher->OnSystemEvent(ESYSTEM_EVENT_FULL_SHUTDOWN, 0, 0); } - if (gEnv && gEnv->pLyShine) - { - gEnv->pLyShine->Release(); - gEnv->pLyShine = nullptr; - } - SAFE_RELEASE(m_env.pMovieSystem); - SAFE_RELEASE(m_env.pLyShine); SAFE_RELEASE(m_env.pCryFont); if (m_env.pConsole) { @@ -525,7 +518,7 @@ void CSystem::SleepIfNeeded() int sleepMS = (int)(1000.0f * sleepTime + 0.5f); if (sleepMS > 0) { - AZ_PROFILE_FUNCTION(System); + AZ_PROFILE_FUNCTION(CrySystem); Sleep(sleepMS); } @@ -564,7 +557,7 @@ bool CSystem::UpdatePreTickBus(int updateFlags, int nPauseMode) _mm_setcsr(_mm_getcsr() & ~0x280 | (g_cvars.sys_float_exceptions > 0 ? 0 : 0x280)); #endif //WIN32 - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(CrySystem); #ifndef EXCLUDE_UPDATE_ON_CONSOLE if (m_pUserCallback) diff --git a/Code/Legacy/CrySystem/SystemEventDispatcher.cpp b/Code/Legacy/CrySystem/SystemEventDispatcher.cpp index 8e4e36b453..b52585c5c4 100644 --- a/Code/Legacy/CrySystem/SystemEventDispatcher.cpp +++ b/Code/Legacy/CrySystem/SystemEventDispatcher.cpp @@ -9,7 +9,9 @@ #include "CrySystem_precompiled.h" #include "SystemEventDispatcher.h" -#include +#include + +AZ_DECLARE_BUDGET(CrySystem); CSystemEventDispatcher::CSystemEventDispatcher() : m_listeners(0) @@ -72,7 +74,7 @@ void CSystemEventDispatcher::OnSystemEvent(ESystemEvent event, UINT_PTR wparam, ////////////////////////////////////////////////////////////////////////// void CSystemEventDispatcher::Update() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(CrySystem); assert(gEnv && gEnv->mMainThreadId == CryGetCurrentThreadId()); SEventParams params; diff --git a/Code/Legacy/CrySystem/SystemInit.cpp b/Code/Legacy/CrySystem/SystemInit.cpp index ad29ea102f..f612972a1a 100644 --- a/Code/Legacy/CrySystem/SystemInit.cpp +++ b/Code/Legacy/CrySystem/SystemInit.cpp @@ -52,7 +52,6 @@ #include #include -#include #include #include #include @@ -77,7 +76,6 @@ #include #include #include -#include #include #include "XConsole.h" @@ -737,7 +735,17 @@ bool CSystem::Init(const SSystemInitParams& startupParams) m_pCmdLine = new CCmdLine(startupParams.szSystemCmdLine); - AZCoreLogSink::Connect(); + // Init AZCoreLogSink. Don't suppress system output if we're running as an editor-server + bool suppressSystemOutput = true; + if (const ICmdLineArg* isEditorServerArg = m_pCmdLine->FindArg(eCLAT_Pre, "editorsv_isDedicated")) + { + bool editorsv_isDedicated = false; + if (isEditorServerArg->GetBoolValue(editorsv_isDedicated) && editorsv_isDedicated) + { + suppressSystemOutput = false; + } + } + AZCoreLogSink::Connect(suppressSystemOutput); // Registers all AZ Console Variables functors specified within CrySystem if (auto azConsole = AZ::Interface::Get(); azConsole) @@ -1095,11 +1103,6 @@ AZ_POP_DISABLE_WARNING InlineInitializationProcessing("CSystem::Init Level System"); - if (m_env.pLyShine) - { - m_env.pLyShine->PostInit(); - } - InlineInitializationProcessing("CSystem::Init InitLmbrAWS"); // Az to Cry console binding diff --git a/Code/Tools/AssetProcessor/assetprocessor_static_files.cmake b/Code/Tools/AssetProcessor/assetprocessor_static_files.cmake index aa1d85d433..400a3f7ba5 100644 --- a/Code/Tools/AssetProcessor/assetprocessor_static_files.cmake +++ b/Code/Tools/AssetProcessor/assetprocessor_static_files.cmake @@ -92,8 +92,6 @@ set(FILES native/utilities/BuilderManager.inl native/utilities/ByteArrayStream.cpp native/utilities/ByteArrayStream.h - native/utilities/CommunicatorTracePrinter.cpp - native/utilities/CommunicatorTracePrinter.h native/utilities/IniConfiguration.cpp native/utilities/IniConfiguration.h native/utilities/JobDiagnosticTracker.cpp diff --git a/Code/Tools/AssetProcessor/native/resourcecompiler/RCBuilder.cpp b/Code/Tools/AssetProcessor/native/resourcecompiler/RCBuilder.cpp index 27210685fc..c463f2320e 100644 --- a/Code/Tools/AssetProcessor/native/resourcecompiler/RCBuilder.cpp +++ b/Code/Tools/AssetProcessor/native/resourcecompiler/RCBuilder.cpp @@ -20,7 +20,6 @@ #include #include -#include #include #include @@ -31,7 +30,6 @@ #include "native/utilities/assetUtils.h" #include "native/utilities/AssetBuilderInfo.h" -#include "native/utilities/CommunicatorTracePrinter.h" #include diff --git a/Code/Tools/AssetProcessor/native/tests/AssetProcessorTest.cpp b/Code/Tools/AssetProcessor/native/tests/AssetProcessorTest.cpp index 2629f7b956..5be9436145 100644 --- a/Code/Tools/AssetProcessor/native/tests/AssetProcessorTest.cpp +++ b/Code/Tools/AssetProcessor/native/tests/AssetProcessorTest.cpp @@ -10,7 +10,6 @@ #include #include -#include #include #include "BaseAssetProcessorTest.h" @@ -55,13 +54,11 @@ namespace AssetProcessor }; class LegacyTestAdapter : public AssetProcessorTest, - public ::testing::WithParamInterface, - public AZ::IO::FileIOEventBus::Handler + public ::testing::WithParamInterface { void SetUp() override { AssetProcessorTest::SetUp(); - AZ::IO::FileIOEventBus::Handler::BusConnect(); static int numParams = 1; static char processName[] = {"AssetProcessorBatch"}; @@ -91,18 +88,9 @@ namespace AssetProcessor void TearDown() override { m_application.reset(); - AZ::IO::FileIOEventBus::Handler::BusDisconnect(); AssetProcessorTest::TearDown(); } - void OnError( - [[maybe_unused]] const AZ::IO::SystemFile* file, - [[maybe_unused]] const char* fileName, - [[maybe_unused]] int errorCode) override - { - AZ_Error("LegacyTestAdapter", false, "File error detected with %s with code %d", fileName, errorCode); - } - AZStd::unique_ptr m_application; }; diff --git a/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp b/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp index eb230ce336..499e5fe4f7 100644 --- a/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp @@ -1482,7 +1482,7 @@ bool ApplicationManagerBase::WaitForBuilderExit(AzFramework::ProcessWatcher* pro AZ::u32 exitCode = 0; bool finishedOK = false; QElapsedTimer ticker; - CommunicatorTracePrinter tracer(processWatcher->GetCommunicator(), "AssetBuilder"); + ProcessCommunicatorTracePrinter tracer(processWatcher->GetCommunicator(), "AssetBuilder"); ticker.start(); diff --git a/Code/Tools/AssetProcessor/native/utilities/BuilderManager.cpp b/Code/Tools/AssetProcessor/native/utilities/BuilderManager.cpp index 751afc1a5d..aa462f7590 100644 --- a/Code/Tools/AssetProcessor/native/utilities/BuilderManager.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/BuilderManager.cpp @@ -164,7 +164,7 @@ namespace AssetProcessor return false; } - m_tracePrinter = AZStd::make_unique(m_processWatcher->GetCommunicator(), "AssetBuilder"); + m_tracePrinter = AZStd::make_unique(m_processWatcher->GetCommunicator(), "AssetBuilder"); return WaitForConnection(); } diff --git a/Code/Tools/AssetProcessor/native/utilities/BuilderManager.h b/Code/Tools/AssetProcessor/native/utilities/BuilderManager.h index 657e4c7788..440f0b3709 100644 --- a/Code/Tools/AssetProcessor/native/utilities/BuilderManager.h +++ b/Code/Tools/AssetProcessor/native/utilities/BuilderManager.h @@ -10,11 +10,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include // used in the inl file. @@ -127,7 +127,7 @@ namespace AssetProcessor AZStd::unique_ptr m_processWatcher = nullptr; //! Optional communicator, only available if we have a process watcher - AZStd::unique_ptr m_tracePrinter = nullptr; + AZStd::unique_ptr m_tracePrinter = nullptr; const AssetUtilities::QuitListener& m_quitListener; }; diff --git a/Code/Tools/AssetProcessor/native/utilities/StatsCapture.cpp b/Code/Tools/AssetProcessor/native/utilities/StatsCapture.cpp index 1174e2500c..f6b7c07a91 100644 --- a/Code/Tools/AssetProcessor/native/utilities/StatsCapture.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/StatsCapture.cpp @@ -132,6 +132,12 @@ namespace AssetProcessor // calls PrintStat on each element in the vector. void PrintStatsArray(AZStd::vector& keys, int maxToPrint, const char* header) { + // don't print anything out at all, not even a header, if the keys are empty. + if (keys.empty()) + { + return; + } + if ((m_dumpHumanReadableStats)&&(header)) { AZ_TracePrintf(AssetProcessor::ConsoleChannel,"Top %i %s\n", maxToPrint, header); diff --git a/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp b/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp index ae70ee7fe5..6bcd0dec01 100644 --- a/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp @@ -1182,7 +1182,11 @@ namespace AssetUtilities } } + // keep track of how much time we spend actually hashing files. + AZStd::string statName = AZStd::string::format("HashFile,%s", filePath); + AssetProcessor::StatsCapture::BeginCaptureStat(statName.c_str()); hash = AssetBuilderSDK::GetFileHash(filePath, bytesReadOut, hashMsDelay); + AssetProcessor::StatsCapture::EndCaptureStat(statName.c_str()); return hash; } diff --git a/Code/Tools/CMakeLists.txt b/Code/Tools/CMakeLists.txt index 8107089433..86f745fdef 100644 --- a/Code/Tools/CMakeLists.txt +++ b/Code/Tools/CMakeLists.txt @@ -17,7 +17,7 @@ add_subdirectory(DeltaCataloger) add_subdirectory(SerializeContextTools) add_subdirectory(AssetBundler) add_subdirectory(GridHub) -add_subdirectory(Standalone) +add_subdirectory(LuaIDE) add_subdirectory(TestImpactFramework) add_subdirectory(ProjectManager) add_subdirectory(BundleLauncher) diff --git a/Code/Tools/DeltaCataloger/Tests/tests_main.cpp b/Code/Tools/DeltaCataloger/Tests/tests_main.cpp index d5a344b686..a2731c498d 100644 --- a/Code/Tools/DeltaCataloger/Tests/tests_main.cpp +++ b/Code/Tools/DeltaCataloger/Tests/tests_main.cpp @@ -52,7 +52,6 @@ protected: AZ::ComponentApplication::Descriptor desc; desc.m_useExistingAllocator = true; - desc.m_enableDrilling = false; // we already created a memory driller for the test (AllocatorsFixture) app.Start(desc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Tools/Standalone/CMakeLists.txt b/Code/Tools/LuaIDE/CMakeLists.txt similarity index 96% rename from Code/Tools/Standalone/CMakeLists.txt rename to Code/Tools/LuaIDE/CMakeLists.txt index 12bdb8f453..98c8d7f04b 100644 --- a/Code/Tools/Standalone/CMakeLists.txt +++ b/Code/Tools/LuaIDE/CMakeLists.txt @@ -17,7 +17,6 @@ ly_add_target( AUTOUIC AUTORCC FILES_CMAKE - standalone_tools_files.cmake lua_ide_files.cmake Platform/${PAL_PLATFORM_NAME}/lua_ide_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake INCLUDE_DIRECTORIES diff --git a/Code/Tools/Standalone/Platform/Common/Unimplemented/Source/StandaloneApplication_Unimplemented.cpp b/Code/Tools/LuaIDE/Platform/Common/Unimplemented/Source/StandaloneApplication_Unimplemented.cpp similarity index 100% rename from Code/Tools/Standalone/Platform/Common/Unimplemented/Source/StandaloneApplication_Unimplemented.cpp rename to Code/Tools/LuaIDE/Platform/Common/Unimplemented/Source/StandaloneApplication_Unimplemented.cpp diff --git a/Code/Tools/Standalone/Platform/Linux/lua_ide_linux_files.cmake b/Code/Tools/LuaIDE/Platform/Linux/lua_ide_linux_files.cmake similarity index 100% rename from Code/Tools/Standalone/Platform/Linux/lua_ide_linux_files.cmake rename to Code/Tools/LuaIDE/Platform/Linux/lua_ide_linux_files.cmake diff --git a/Code/Tools/Standalone/Platform/Mac/Source/StandaloneApplication_Mac.cpp b/Code/Tools/LuaIDE/Platform/Mac/Source/StandaloneApplication_Mac.cpp similarity index 100% rename from Code/Tools/Standalone/Platform/Mac/Source/StandaloneApplication_Mac.cpp rename to Code/Tools/LuaIDE/Platform/Mac/Source/StandaloneApplication_Mac.cpp diff --git a/Code/Tools/Standalone/Platform/Mac/lua_ide_mac_files.cmake b/Code/Tools/LuaIDE/Platform/Mac/lua_ide_mac_files.cmake similarity index 100% rename from Code/Tools/Standalone/Platform/Mac/lua_ide_mac_files.cmake rename to Code/Tools/LuaIDE/Platform/Mac/lua_ide_mac_files.cmake diff --git a/Code/Tools/Standalone/Platform/Windows/Source/StandaloneApplication_Windows.cpp b/Code/Tools/LuaIDE/Platform/Windows/Source/StandaloneApplication_Windows.cpp similarity index 100% rename from Code/Tools/Standalone/Platform/Windows/Source/StandaloneApplication_Windows.cpp rename to Code/Tools/LuaIDE/Platform/Windows/Source/StandaloneApplication_Windows.cpp diff --git a/Code/Tools/Standalone/Platform/Windows/lua_ide_windows_files.cmake b/Code/Tools/LuaIDE/Platform/Windows/lua_ide_windows_files.cmake similarity index 100% rename from Code/Tools/Standalone/Platform/Windows/lua_ide_windows_files.cmake rename to Code/Tools/LuaIDE/Platform/Windows/lua_ide_windows_files.cmake diff --git a/Code/Tools/Standalone/Source/AssetDatabaseLocationListener.cpp b/Code/Tools/LuaIDE/Source/AssetDatabaseLocationListener.cpp similarity index 100% rename from Code/Tools/Standalone/Source/AssetDatabaseLocationListener.cpp rename to Code/Tools/LuaIDE/Source/AssetDatabaseLocationListener.cpp diff --git a/Code/Tools/Standalone/Source/AssetDatabaseLocationListener.h b/Code/Tools/LuaIDE/Source/AssetDatabaseLocationListener.h similarity index 100% rename from Code/Tools/Standalone/Source/AssetDatabaseLocationListener.h rename to Code/Tools/LuaIDE/Source/AssetDatabaseLocationListener.h diff --git a/Code/Tools/Standalone/Source/Editor/Editor.rc b/Code/Tools/LuaIDE/Source/Editor/Editor.rc similarity index 100% rename from Code/Tools/Standalone/Source/Editor/Editor.rc rename to Code/Tools/LuaIDE/Source/Editor/Editor.rc diff --git a/Code/Tools/Standalone/Source/Editor/LuaEditor.cpp b/Code/Tools/LuaIDE/Source/Editor/LuaEditor.cpp similarity index 100% rename from Code/Tools/Standalone/Source/Editor/LuaEditor.cpp rename to Code/Tools/LuaIDE/Source/Editor/LuaEditor.cpp diff --git a/Code/Tools/Standalone/Source/Editor/LuaEditor.h b/Code/Tools/LuaIDE/Source/Editor/LuaEditor.h similarity index 100% rename from Code/Tools/Standalone/Source/Editor/LuaEditor.h rename to Code/Tools/LuaIDE/Source/Editor/LuaEditor.h diff --git a/Code/Tools/Standalone/Source/Editor/LuaEditor.rc b/Code/Tools/LuaIDE/Source/Editor/LuaEditor.rc similarity index 100% rename from Code/Tools/Standalone/Source/Editor/LuaEditor.rc rename to Code/Tools/LuaIDE/Source/Editor/LuaEditor.rc diff --git a/Code/Tools/Standalone/Source/Editor/Resource.h b/Code/Tools/LuaIDE/Source/Editor/Resource.h similarity index 100% rename from Code/Tools/Standalone/Source/Editor/Resource.h rename to Code/Tools/LuaIDE/Source/Editor/Resource.h diff --git a/Code/Tools/Standalone/Source/Editor/hex_lua.ico b/Code/Tools/LuaIDE/Source/Editor/hex_lua.ico similarity index 100% rename from Code/Tools/Standalone/Source/Editor/hex_lua.ico rename to Code/Tools/LuaIDE/Source/Editor/hex_lua.ico diff --git a/Code/Tools/Standalone/Source/Editor/targetver.h b/Code/Tools/LuaIDE/Source/Editor/targetver.h similarity index 100% rename from Code/Tools/Standalone/Source/Editor/targetver.h rename to Code/Tools/LuaIDE/Source/Editor/targetver.h diff --git a/Code/Tools/Standalone/Source/LUA/BasicScriptChecker.h b/Code/Tools/LuaIDE/Source/LUA/BasicScriptChecker.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/BasicScriptChecker.h rename to Code/Tools/LuaIDE/Source/LUA/BasicScriptChecker.h diff --git a/Code/Tools/Standalone/Source/LUA/BreakpointPanel.cpp b/Code/Tools/LuaIDE/Source/LUA/BreakpointPanel.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/BreakpointPanel.cpp rename to Code/Tools/LuaIDE/Source/LUA/BreakpointPanel.cpp diff --git a/Code/Tools/Standalone/Source/LUA/BreakpointPanel.hxx b/Code/Tools/LuaIDE/Source/LUA/BreakpointPanel.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/BreakpointPanel.hxx rename to Code/Tools/LuaIDE/Source/LUA/BreakpointPanel.hxx diff --git a/Code/Tools/Standalone/Source/LUA/ClassReferenceFilter.cpp b/Code/Tools/LuaIDE/Source/LUA/ClassReferenceFilter.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/ClassReferenceFilter.cpp rename to Code/Tools/LuaIDE/Source/LUA/ClassReferenceFilter.cpp diff --git a/Code/Tools/Standalone/Source/LUA/ClassReferenceFilter.hxx b/Code/Tools/LuaIDE/Source/LUA/ClassReferenceFilter.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/ClassReferenceFilter.hxx rename to Code/Tools/LuaIDE/Source/LUA/ClassReferenceFilter.hxx diff --git a/Code/Tools/Standalone/Source/LUA/ClassReferencePanel.cpp b/Code/Tools/LuaIDE/Source/LUA/ClassReferencePanel.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/ClassReferencePanel.cpp rename to Code/Tools/LuaIDE/Source/LUA/ClassReferencePanel.cpp diff --git a/Code/Tools/Standalone/Source/LUA/ClassReferencePanel.hxx b/Code/Tools/LuaIDE/Source/LUA/ClassReferencePanel.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/ClassReferencePanel.hxx rename to Code/Tools/LuaIDE/Source/LUA/ClassReferencePanel.hxx diff --git a/Code/Tools/Standalone/Source/LUA/CodeCompletion/LUACompleter.cpp b/Code/Tools/LuaIDE/Source/LUA/CodeCompletion/LUACompleter.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/CodeCompletion/LUACompleter.cpp rename to Code/Tools/LuaIDE/Source/LUA/CodeCompletion/LUACompleter.cpp diff --git a/Code/Tools/Standalone/Source/LUA/CodeCompletion/LUACompleter.hxx b/Code/Tools/LuaIDE/Source/LUA/CodeCompletion/LUACompleter.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/CodeCompletion/LUACompleter.hxx rename to Code/Tools/LuaIDE/Source/LUA/CodeCompletion/LUACompleter.hxx diff --git a/Code/Tools/Standalone/Source/LUA/CodeCompletion/LUACompletionModel.cpp b/Code/Tools/LuaIDE/Source/LUA/CodeCompletion/LUACompletionModel.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/CodeCompletion/LUACompletionModel.cpp rename to Code/Tools/LuaIDE/Source/LUA/CodeCompletion/LUACompletionModel.cpp diff --git a/Code/Tools/Standalone/Source/LUA/CodeCompletion/LUACompletionModel.hxx b/Code/Tools/LuaIDE/Source/LUA/CodeCompletion/LUACompletionModel.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/CodeCompletion/LUACompletionModel.hxx rename to Code/Tools/LuaIDE/Source/LUA/CodeCompletion/LUACompletionModel.hxx diff --git a/Code/Tools/Standalone/Source/LUA/DebugAttachmentButton.cpp b/Code/Tools/LuaIDE/Source/LUA/DebugAttachmentButton.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/DebugAttachmentButton.cpp rename to Code/Tools/LuaIDE/Source/LUA/DebugAttachmentButton.cpp diff --git a/Code/Tools/Standalone/Source/LUA/DebugAttachmentButton.hxx b/Code/Tools/LuaIDE/Source/LUA/DebugAttachmentButton.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/DebugAttachmentButton.hxx rename to Code/Tools/LuaIDE/Source/LUA/DebugAttachmentButton.hxx diff --git a/Code/Tools/Standalone/Source/LUA/LUABreakpointTrackerMessages.cpp b/Code/Tools/LuaIDE/Source/LUA/LUABreakpointTrackerMessages.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUABreakpointTrackerMessages.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUABreakpointTrackerMessages.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUABreakpointTrackerMessages.h b/Code/Tools/LuaIDE/Source/LUA/LUABreakpointTrackerMessages.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUABreakpointTrackerMessages.h rename to Code/Tools/LuaIDE/Source/LUA/LUABreakpointTrackerMessages.h diff --git a/Code/Tools/Standalone/Source/LUA/LUAContextControlMessages.h b/Code/Tools/LuaIDE/Source/LUA/LUAContextControlMessages.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAContextControlMessages.h rename to Code/Tools/LuaIDE/Source/LUA/LUAContextControlMessages.h diff --git a/Code/Tools/Standalone/Source/LUA/LUADebuggerComponent.cpp b/Code/Tools/LuaIDE/Source/LUA/LUADebuggerComponent.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUADebuggerComponent.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUADebuggerComponent.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUADebuggerComponent.h b/Code/Tools/LuaIDE/Source/LUA/LUADebuggerComponent.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUADebuggerComponent.h rename to Code/Tools/LuaIDE/Source/LUA/LUADebuggerComponent.h diff --git a/Code/Tools/Standalone/Source/LUA/LUADebuggerMessages.h b/Code/Tools/LuaIDE/Source/LUA/LUADebuggerMessages.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUADebuggerMessages.h rename to Code/Tools/LuaIDE/Source/LUA/LUADebuggerMessages.h diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorBlockState.h b/Code/Tools/LuaIDE/Source/LUA/LUAEditorBlockState.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorBlockState.h rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorBlockState.h diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorBreakpointWidget.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorBreakpointWidget.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorBreakpointWidget.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorBreakpointWidget.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorBreakpointWidget.hxx b/Code/Tools/LuaIDE/Source/LUA/LUAEditorBreakpointWidget.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorBreakpointWidget.hxx rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorBreakpointWidget.hxx diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorContext.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorContext.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorContext.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorContext.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorContext.h b/Code/Tools/LuaIDE/Source/LUA/LUAEditorContext.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorContext.h rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorContext.h diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorContextInterface.h b/Code/Tools/LuaIDE/Source/LUA/LUAEditorContextInterface.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorContextInterface.h rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorContextInterface.h diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorContextMessages.h b/Code/Tools/LuaIDE/Source/LUA/LUAEditorContextMessages.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorContextMessages.h rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorContextMessages.h diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorDebuggerMessages.h b/Code/Tools/LuaIDE/Source/LUA/LUAEditorDebuggerMessages.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorDebuggerMessages.h rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorDebuggerMessages.h diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorFindDialog.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorFindDialog.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorFindDialog.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorFindDialog.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorFindDialog.hxx b/Code/Tools/LuaIDE/Source/LUA/LUAEditorFindDialog.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorFindDialog.hxx rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorFindDialog.hxx diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorFindDialog.ui b/Code/Tools/LuaIDE/Source/LUA/LUAEditorFindDialog.ui similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorFindDialog.ui rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorFindDialog.ui diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorFindResults.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorFindResults.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorFindResults.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorFindResults.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorFindResults.hxx b/Code/Tools/LuaIDE/Source/LUA/LUAEditorFindResults.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorFindResults.hxx rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorFindResults.hxx diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorFindResults.ui b/Code/Tools/LuaIDE/Source/LUA/LUAEditorFindResults.ui similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorFindResults.ui rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorFindResults.ui diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorFoldingWidget.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorFoldingWidget.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorFoldingWidget.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorFoldingWidget.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorFoldingWidget.hxx b/Code/Tools/LuaIDE/Source/LUA/LUAEditorFoldingWidget.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorFoldingWidget.hxx rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorFoldingWidget.hxx diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorGoToLineDialog.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorGoToLineDialog.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorGoToLineDialog.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorGoToLineDialog.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorGoToLineDialog.hxx b/Code/Tools/LuaIDE/Source/LUA/LUAEditorGoToLineDialog.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorGoToLineDialog.hxx rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorGoToLineDialog.hxx diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorGoToLineDialog.ui b/Code/Tools/LuaIDE/Source/LUA/LUAEditorGoToLineDialog.ui similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorGoToLineDialog.ui rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorGoToLineDialog.ui diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorMainWindow.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorMainWindow.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.hxx b/Code/Tools/LuaIDE/Source/LUA/LUAEditorMainWindow.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.hxx rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorMainWindow.hxx diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.ui b/Code/Tools/LuaIDE/Source/LUA/LUAEditorMainWindow.ui similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.ui rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorMainWindow.ui diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorPlainTextEdit.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorPlainTextEdit.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorPlainTextEdit.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorPlainTextEdit.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorPlainTextEdit.hxx b/Code/Tools/LuaIDE/Source/LUA/LUAEditorPlainTextEdit.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorPlainTextEdit.hxx rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorPlainTextEdit.hxx diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorSettingsDialog.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorSettingsDialog.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorSettingsDialog.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorSettingsDialog.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorSettingsDialog.hxx b/Code/Tools/LuaIDE/Source/LUA/LUAEditorSettingsDialog.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorSettingsDialog.hxx rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorSettingsDialog.hxx diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorSettingsDialog.ui b/Code/Tools/LuaIDE/Source/LUA/LUAEditorSettingsDialog.ui similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorSettingsDialog.ui rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorSettingsDialog.ui diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorStyleMessages.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorStyleMessages.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorStyleMessages.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorStyleMessages.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorStyleMessages.h b/Code/Tools/LuaIDE/Source/LUA/LUAEditorStyleMessages.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorStyleMessages.h rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorStyleMessages.h diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorSyntaxHighlighter.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorSyntaxHighlighter.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorSyntaxHighlighter.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorSyntaxHighlighter.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorSyntaxHighlighter.hxx b/Code/Tools/LuaIDE/Source/LUA/LUAEditorSyntaxHighlighter.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorSyntaxHighlighter.hxx rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorSyntaxHighlighter.hxx diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorView.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorView.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorView.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorView.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorView.hxx b/Code/Tools/LuaIDE/Source/LUA/LUAEditorView.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorView.hxx rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorView.hxx diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorView.ui b/Code/Tools/LuaIDE/Source/LUA/LUAEditorView.ui similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorView.ui rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorView.ui diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorViewMessages.h b/Code/Tools/LuaIDE/Source/LUA/LUAEditorViewMessages.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorViewMessages.h rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorViewMessages.h diff --git a/Code/Tools/Standalone/Source/LUA/LUALocalsTrackerMessages.h b/Code/Tools/LuaIDE/Source/LUA/LUALocalsTrackerMessages.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUALocalsTrackerMessages.h rename to Code/Tools/LuaIDE/Source/LUA/LUALocalsTrackerMessages.h diff --git a/Code/Tools/Standalone/Source/LUA/LUAStackTrackerMessages.h b/Code/Tools/LuaIDE/Source/LUA/LUAStackTrackerMessages.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAStackTrackerMessages.h rename to Code/Tools/LuaIDE/Source/LUA/LUAStackTrackerMessages.h diff --git a/Code/Tools/Standalone/Source/LUA/LUATargetContextTrackerMessages.cpp b/Code/Tools/LuaIDE/Source/LUA/LUATargetContextTrackerMessages.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUATargetContextTrackerMessages.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUATargetContextTrackerMessages.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUATargetContextTrackerMessages.h b/Code/Tools/LuaIDE/Source/LUA/LUATargetContextTrackerMessages.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUATargetContextTrackerMessages.h rename to Code/Tools/LuaIDE/Source/LUA/LUATargetContextTrackerMessages.h diff --git a/Code/Tools/Standalone/Source/LUA/LUAWatchesDebuggerMessages.h b/Code/Tools/LuaIDE/Source/LUA/LUAWatchesDebuggerMessages.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAWatchesDebuggerMessages.h rename to Code/Tools/LuaIDE/Source/LUA/LUAWatchesDebuggerMessages.h diff --git a/Code/Tools/Standalone/Source/LUA/ScriptCheckerAPI.h b/Code/Tools/LuaIDE/Source/LUA/ScriptCheckerAPI.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/ScriptCheckerAPI.h rename to Code/Tools/LuaIDE/Source/LUA/ScriptCheckerAPI.h diff --git a/Code/Tools/Standalone/Source/LUA/StackPanel.cpp b/Code/Tools/LuaIDE/Source/LUA/StackPanel.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/StackPanel.cpp rename to Code/Tools/LuaIDE/Source/LUA/StackPanel.cpp diff --git a/Code/Tools/Standalone/Source/LUA/StackPanel.hxx b/Code/Tools/LuaIDE/Source/LUA/StackPanel.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/StackPanel.hxx rename to Code/Tools/LuaIDE/Source/LUA/StackPanel.hxx diff --git a/Code/Tools/Standalone/Source/LUA/TargetContextButton.cpp b/Code/Tools/LuaIDE/Source/LUA/TargetContextButton.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/TargetContextButton.cpp rename to Code/Tools/LuaIDE/Source/LUA/TargetContextButton.cpp diff --git a/Code/Tools/Standalone/Source/LUA/TargetContextButton.hxx b/Code/Tools/LuaIDE/Source/LUA/TargetContextButton.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/TargetContextButton.hxx rename to Code/Tools/LuaIDE/Source/LUA/TargetContextButton.hxx diff --git a/Code/Tools/Standalone/Source/LUA/WatchesPanel.cpp b/Code/Tools/LuaIDE/Source/LUA/WatchesPanel.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/WatchesPanel.cpp rename to Code/Tools/LuaIDE/Source/LUA/WatchesPanel.cpp diff --git a/Code/Tools/Standalone/Source/LUA/WatchesPanel.hxx b/Code/Tools/LuaIDE/Source/LUA/WatchesPanel.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/WatchesPanel.hxx rename to Code/Tools/LuaIDE/Source/LUA/WatchesPanel.hxx diff --git a/Code/Tools/Standalone/Source/LuaIDEApplication.cpp b/Code/Tools/LuaIDE/Source/LuaIDEApplication.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LuaIDEApplication.cpp rename to Code/Tools/LuaIDE/Source/LuaIDEApplication.cpp diff --git a/Code/Tools/Standalone/Source/LuaIDEApplication.h b/Code/Tools/LuaIDE/Source/LuaIDEApplication.h similarity index 100% rename from Code/Tools/Standalone/Source/LuaIDEApplication.h rename to Code/Tools/LuaIDE/Source/LuaIDEApplication.h diff --git a/Code/Tools/Standalone/Source/StandaloneToolsApplication.cpp b/Code/Tools/LuaIDE/Source/StandaloneToolsApplication.cpp similarity index 100% rename from Code/Tools/Standalone/Source/StandaloneToolsApplication.cpp rename to Code/Tools/LuaIDE/Source/StandaloneToolsApplication.cpp diff --git a/Code/Tools/Standalone/Source/StandaloneToolsApplication.h b/Code/Tools/LuaIDE/Source/StandaloneToolsApplication.h similarity index 100% rename from Code/Tools/Standalone/Source/StandaloneToolsApplication.h rename to Code/Tools/LuaIDE/Source/StandaloneToolsApplication.h diff --git a/Code/Tools/Standalone/Source/Telemetry/TelemetryBus.h b/Code/Tools/LuaIDE/Source/Telemetry/TelemetryBus.h similarity index 100% rename from Code/Tools/Standalone/Source/Telemetry/TelemetryBus.h rename to Code/Tools/LuaIDE/Source/Telemetry/TelemetryBus.h diff --git a/Code/Tools/Standalone/Source/Telemetry/TelemetryComponent.cpp b/Code/Tools/LuaIDE/Source/Telemetry/TelemetryComponent.cpp similarity index 100% rename from Code/Tools/Standalone/Source/Telemetry/TelemetryComponent.cpp rename to Code/Tools/LuaIDE/Source/Telemetry/TelemetryComponent.cpp diff --git a/Code/Tools/Standalone/Source/Telemetry/TelemetryComponent.h b/Code/Tools/LuaIDE/Source/Telemetry/TelemetryComponent.h similarity index 100% rename from Code/Tools/Standalone/Source/Telemetry/TelemetryComponent.h rename to Code/Tools/LuaIDE/Source/Telemetry/TelemetryComponent.h diff --git a/Code/Tools/Standalone/Source/Telemetry/TelemetryEvent.cpp b/Code/Tools/LuaIDE/Source/Telemetry/TelemetryEvent.cpp similarity index 100% rename from Code/Tools/Standalone/Source/Telemetry/TelemetryEvent.cpp rename to Code/Tools/LuaIDE/Source/Telemetry/TelemetryEvent.cpp diff --git a/Code/Tools/Standalone/Source/Telemetry/TelemetryEvent.h b/Code/Tools/LuaIDE/Source/Telemetry/TelemetryEvent.h similarity index 100% rename from Code/Tools/Standalone/Source/Telemetry/TelemetryEvent.h rename to Code/Tools/LuaIDE/Source/Telemetry/TelemetryEvent.h diff --git a/Code/Tools/Standalone/lua_ide_files.cmake b/Code/Tools/LuaIDE/lua_ide_files.cmake similarity index 89% rename from Code/Tools/Standalone/lua_ide_files.cmake rename to Code/Tools/LuaIDE/lua_ide_files.cmake index 0b7b5c627a..e5a7948d97 100644 --- a/Code/Tools/Standalone/lua_ide_files.cmake +++ b/Code/Tools/LuaIDE/lua_ide_files.cmake @@ -7,6 +7,16 @@ # set(FILES + targetver.h + Source/StandaloneToolsApplication.cpp + Source/StandaloneToolsApplication.h + Source/Editor/Resource.h + Source/Editor/targetver.h + Source/Telemetry/TelemetryBus.h + Source/Telemetry/TelemetryComponent.cpp + Source/Telemetry/TelemetryComponent.h + Source/Telemetry/TelemetryEvent.cpp + Source/Telemetry/TelemetryEvent.h Source/LuaIDEApplication.h Source/LuaIDEApplication.cpp Source/AssetDatabaseLocationListener.h diff --git a/Code/Tools/Standalone/targetver.h b/Code/Tools/LuaIDE/targetver.h similarity index 100% rename from Code/Tools/Standalone/targetver.h rename to Code/Tools/LuaIDE/targetver.h diff --git a/Code/Tools/ProjectManager/CMakeLists.txt b/Code/Tools/ProjectManager/CMakeLists.txt index a47ccb62c9..9974125ffb 100644 --- a/Code/Tools/ProjectManager/CMakeLists.txt +++ b/Code/Tools/ProjectManager/CMakeLists.txt @@ -92,6 +92,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) AZ::AzTest AZ::AzFramework AZ::AzFrameworkTestShared + AZ::AzQtComponents AZ::ProjectManager.Static ) diff --git a/Code/Tools/ProjectManager/Source/Application.cpp b/Code/Tools/ProjectManager/Source/Application.cpp index 29e0df3c3a..08a812999f 100644 --- a/Code/Tools/ProjectManager/Source/Application.cpp +++ b/Code/Tools/ProjectManager/Source/Application.cpp @@ -21,6 +21,7 @@ #include #include #include +#include namespace O3DE::ProjectManager { @@ -111,6 +112,11 @@ namespace O3DE::ProjectManager } } + if (!RegisterEngine(interactive)) + { + return false; + } + const AZ::CommandLine* commandLine = GetCommandLine(); AZ_Assert(commandLine, "Failed to get command line"); @@ -165,6 +171,86 @@ namespace O3DE::ProjectManager return m_entity != nullptr; } + bool Application::RegisterEngine(bool interactive) + { + // get this engine's info + auto engineInfoOutcome = m_pythonBindings->GetEngineInfo(); + if (!engineInfoOutcome) + { + if (interactive) + { + QMessageBox::critical(nullptr, + QObject::tr("Failed to get engine info"), + QObject::tr("A valid engine.json could not be found or loaded. " + "Please verify a valid engine.json file exists in %1") + .arg(GetEngineRoot())); + } + + AZ_Error("Project Manager", false, "Failed to get engine info"); + return false; + } + + EngineInfo engineInfo = engineInfoOutcome.GetValue(); + if (engineInfo.m_registered) + { + return true; + } + + bool forceRegistration = false; + + // check if an engine with this name is already registered + auto existingEngineResult = m_pythonBindings->GetEngineInfo(engineInfo.m_name); + if (existingEngineResult) + { + if (!interactive) + { + AZ_Error("Project Manager", false, "An engine with the name %s is already registered with the path %s", + engineInfo.m_name.toUtf8().constData(), engineInfo.m_path.toUtf8().constData()); + return false; + } + + // get the updated engine name unless the user wants to cancel + bool okPressed = false; + const EngineInfo& otherEngineInfo = existingEngineResult.GetValue(); + + engineInfo.m_name = QInputDialog::getText(nullptr, + QObject::tr("Engine '%1' already registered").arg(engineInfo.m_name), + QObject::tr("An engine named '%1' is already registered.

" + "Current path
%2

" + "New path
%3

" + "Press 'OK' to force registration, or provide a new engine name below.
" + "Alternatively, press `Cancel` to close the Project Manager and resolve the issue manually.") + .arg(engineInfo.m_name, otherEngineInfo.m_path, engineInfo.m_path), + QLineEdit::Normal, + engineInfo.m_name, + &okPressed); + + if (!okPressed) + { + // user elected not to change the name or force registration + return false; + } + + forceRegistration = true; + } + + auto registerOutcome = m_pythonBindings->SetEngineInfo(engineInfo, forceRegistration); + if (!registerOutcome) + { + if (interactive) + { + ProjectUtils::DisplayDetailedError(QObject::tr("Failed to register engine"), registerOutcome); + } + + AZ_Error("Project Manager", false, "Failed to register engine %s : %s", + engineInfo.m_path.toUtf8().constData(), registerOutcome.GetError().first.c_str()); + + return false; + } + + return true; + } + void Application::TearDown() { if (m_entity) diff --git a/Code/Tools/ProjectManager/Source/Application.h b/Code/Tools/ProjectManager/Source/Application.h index ad55694b18..8f633b28c4 100644 --- a/Code/Tools/ProjectManager/Source/Application.h +++ b/Code/Tools/ProjectManager/Source/Application.h @@ -34,6 +34,7 @@ namespace O3DE::ProjectManager private: bool InitLog(const char* logName); + bool RegisterEngine(bool interactive); AZStd::unique_ptr m_pythonBindings; QSharedPointer m_app; diff --git a/Code/Tools/ProjectManager/Source/EngineInfo.h b/Code/Tools/ProjectManager/Source/EngineInfo.h index 5fd3faf2ea..c28aede030 100644 --- a/Code/Tools/ProjectManager/Source/EngineInfo.h +++ b/Code/Tools/ProjectManager/Source/EngineInfo.h @@ -25,13 +25,16 @@ namespace O3DE::ProjectManager QString m_name; QString m_thirdPartyPath; - // from o3de_manifest.json QString m_path; + + // from o3de_manifest.json QString m_defaultProjectsFolder; QString m_defaultGemsFolder; QString m_defaultTemplatesFolder; QString m_defaultRestrictedFolder; + bool m_registered = false; + bool IsValid() const; }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/EngineSettingsScreen.cpp b/Code/Tools/ProjectManager/Source/EngineSettingsScreen.cpp index c7df00f423..26f5b8ae11 100644 --- a/Code/Tools/ProjectManager/Source/EngineSettingsScreen.cpp +++ b/Code/Tools/ProjectManager/Source/EngineSettingsScreen.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -114,10 +115,10 @@ namespace O3DE::ProjectManager engineInfo.m_defaultGemsFolder = m_defaultGems->lineEdit()->text(); engineInfo.m_defaultTemplatesFolder = m_defaultProjectTemplates->lineEdit()->text(); - bool result = PythonBindingsInterface::Get()->SetEngineInfo(engineInfo); + auto result = PythonBindingsInterface::Get()->SetEngineInfo(engineInfo); if (!result) { - QMessageBox::critical(this, tr("Engine Settings"), tr("Failed to save engine settings.")); + ProjectUtils::DisplayDetailedError(tr("Failed to save engine settings"), result, this); } } else diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp index 1d4f354fb5..5bc0b26ca5 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp @@ -294,7 +294,7 @@ namespace O3DE::ProjectManager } else if (numChangedDependencies > 1) { - notification += tr("%1 Gem %2").arg(QString(numChangedDependencies), tr("dependencies")); + notification += tr("%1 Gem %2").arg(numChangedDependencies).arg(tr("dependencies")); } notification += (added ? tr(" activated") : tr(" deactivated")); diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h index 5c1bc90c6e..23e95cf487 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h @@ -73,10 +73,10 @@ namespace O3DE::ProjectManager QString m_path; QString m_name = "Unknown Gem Name"; - QString m_displayName = "Unknown Gem Name"; + QString m_displayName; QString m_creator = "Unknown Creator"; GemOrigin m_gemOrigin = Local; - bool m_isAdded = false; //! Is the gem currently added and enabled in the project? + bool m_isAdded = false; //! Is the gem explicitly added (not a dependency) and enabled in the project? QString m_summary = "No summary provided."; Platforms m_platforms; Types m_types; //! Asset and/or Code and/or Tool diff --git a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoScreen.cpp b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoScreen.cpp index f62c30c280..843538d9da 100644 --- a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoScreen.cpp +++ b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoScreen.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -92,8 +93,7 @@ namespace O3DE::ProjectManager return; } - AZ::Outcome < void, - AZStd::pair> addGemRepoResult = PythonBindingsInterface::Get()->AddGemRepo(repoUri); + auto addGemRepoResult = PythonBindingsInterface::Get()->AddGemRepo(repoUri); if (addGemRepoResult.IsSuccess()) { Reinit(); @@ -102,20 +102,7 @@ namespace O3DE::ProjectManager else { QString failureMessage = tr("Failed to add gem repo: %1.").arg(repoUri); - if (!addGemRepoResult.GetError().second.empty()) - { - QMessageBox addRepoError; - addRepoError.setIcon(QMessageBox::Critical); - addRepoError.setWindowTitle(failureMessage); - addRepoError.setText(addGemRepoResult.GetError().first.c_str()); - addRepoError.setDetailedText(addGemRepoResult.GetError().second.c_str()); - addRepoError.exec(); - } - else - { - QMessageBox::critical(this, failureMessage, addGemRepoResult.GetError().first.c_str()); - } - + ProjectUtils::DisplayDetailedError(failureMessage, addGemRepoResult, this); AZ_Error("Project Manager", false, failureMessage.toUtf8()); } } diff --git a/Code/Tools/ProjectManager/Source/ProjectButtonWidget.cpp b/Code/Tools/ProjectManager/Source/ProjectButtonWidget.cpp index 3225c14266..39980e1d11 100644 --- a/Code/Tools/ProjectManager/Source/ProjectButtonWidget.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectButtonWidget.cpp @@ -28,6 +28,7 @@ #include #include #include +#include namespace O3DE::ProjectManager { @@ -109,11 +110,11 @@ namespace O3DE::ProjectManager vLayout->addWidget(m_progressBar); } - void LabelButton::mousePressEvent([[maybe_unused]] QMouseEvent* event) + void LabelButton::mousePressEvent(QMouseEvent* event) { if(m_enabled) { - emit triggered(); + emit triggered(event); } } @@ -201,52 +202,64 @@ namespace O3DE::ProjectManager projectNameLabel->setToolTip(m_projectInfo.m_path); hLayout->addWidget(projectNameLabel); - QMenu* menu = new QMenu(this); - menu->addAction(tr("Edit Project Settings..."), this, [this]() { emit EditProject(m_projectInfo.m_path); }); - menu->addAction(tr("Configure Gems..."), this, [this]() { emit EditProjectGems(m_projectInfo.m_path); }); - menu->addAction(tr("Build"), this, [this]() { emit BuildProject(m_projectInfo); }); - menu->addAction(tr("Open CMake GUI..."), this, [this]() { emit OpenCMakeGUI(m_projectInfo); }); - menu->addSeparator(); - menu->addAction(tr("Open Project folder..."), this, [this]() - { - AzQtComponents::ShowFileOnDesktop(m_projectInfo.m_path); - }); - -#if AZ_TRAIT_PROJECT_MANAGER_CREATE_DESKTOP_SHORTCUT - menu->addAction(tr("Create Editor desktop shortcut..."), this, [this]() - { - AZ::IO::FixedMaxPath editorExecutablePath = ProjectUtils::GetEditorExecutablePath(m_projectInfo.m_path.toUtf8().constData()); - - const QString shortcutName = QString("%1 Editor").arg(m_projectInfo.m_displayName); - const QString arg = QString("--regset=\"/Amazon/AzCore/Bootstrap/project_path=%1\"").arg(m_projectInfo.m_path); - - auto result = ProjectUtils::CreateDesktopShortcut(shortcutName, editorExecutablePath.c_str(), { arg }); - if(result.IsSuccess()) - { - QMessageBox::information(this, tr("Desktop Shortcut Created"), result.GetValue()); - } - else - { - QMessageBox::critical(this, tr("Failed to create shortcut"), result.GetError()); - } - }); -#endif // AZ_TRAIT_PROJECT_MANAGER_CREATE_DESKTOP_SHORTCUT - - menu->addSeparator(); - menu->addAction(tr("Duplicate"), this, [this]() { emit CopyProject(m_projectInfo); }); - menu->addSeparator(); - menu->addAction(tr("Remove from O3DE"), this, [this]() { emit RemoveProject(m_projectInfo.m_path); }); - menu->addAction(tr("Delete this Project"), this, [this]() { emit DeleteProject(m_projectInfo.m_path); }); - m_projectMenuButton = new QPushButton(this); m_projectMenuButton->setObjectName("projectMenuButton"); - m_projectMenuButton->setMenu(menu); + m_projectMenuButton->setMenu(CreateProjectMenu()); hLayout->addWidget(m_projectMenuButton); } vLayout->addWidget(projectFooter); connect(m_projectImageLabel->GetOpenEditorButton(), &QPushButton::clicked, [this](){ emit OpenProject(m_projectInfo.m_path); }); + connect(m_projectImageLabel, &LabelButton::triggered, [this](QMouseEvent* event) { + if (event->button() == Qt::RightButton) + { + m_projectMenuButton->menu()->move(event->globalPos()); + m_projectMenuButton->menu()->show(); + } + }); + } + + QMenu* ProjectButton::CreateProjectMenu() + { + QMenu* menu = new QMenu(this); + menu->addAction(tr("Edit Project Settings..."), this, [this]() { emit EditProject(m_projectInfo.m_path); }); + menu->addAction(tr("Configure Gems..."), this, [this]() { emit EditProjectGems(m_projectInfo.m_path); }); + menu->addAction(tr("Build"), this, [this]() { emit BuildProject(m_projectInfo); }); + menu->addAction(tr("Open CMake GUI..."), this, [this]() { emit OpenCMakeGUI(m_projectInfo); }); + menu->addSeparator(); + menu->addAction(tr("Open Project folder..."), this, [this]() + { + AzQtComponents::ShowFileOnDesktop(m_projectInfo.m_path); + }); + +#if AZ_TRAIT_PROJECT_MANAGER_CREATE_DESKTOP_SHORTCUT + menu->addAction(tr("Create Editor desktop shortcut..."), this, [this]() + { + AZ::IO::FixedMaxPath editorExecutablePath = ProjectUtils::GetEditorExecutablePath(m_projectInfo.m_path.toUtf8().constData()); + + const QString shortcutName = QString("%1 Editor").arg(m_projectInfo.m_displayName); + const QString arg = QString("--regset=\"/Amazon/AzCore/Bootstrap/project_path=%1\"").arg(m_projectInfo.m_path); + + auto result = ProjectUtils::CreateDesktopShortcut(shortcutName, editorExecutablePath.c_str(), { arg }); + if(result.IsSuccess()) + { + QMessageBox::information(this, tr("Desktop Shortcut Created"), result.GetValue()); + } + else + { + QMessageBox::critical(this, tr("Failed to create shortcut"), result.GetError()); + } + }); +#endif // AZ_TRAIT_PROJECT_MANAGER_CREATE_DESKTOP_SHORTCUT + + menu->addSeparator(); + menu->addAction(tr("Duplicate"), this, [this]() { emit CopyProject(m_projectInfo); }); + menu->addSeparator(); + menu->addAction(tr("Remove from O3DE"), this, [this]() { emit RemoveProject(m_projectInfo.m_path); }); + menu->addAction(tr("Delete this Project"), this, [this]() { emit DeleteProject(m_projectInfo.m_path); }); + + return menu; } const ProjectInfo& ProjectButton::GetProjectInfo() const diff --git a/Code/Tools/ProjectManager/Source/ProjectButtonWidget.h b/Code/Tools/ProjectManager/Source/ProjectButtonWidget.h index ccb644c458..358c1f249a 100644 --- a/Code/Tools/ProjectManager/Source/ProjectButtonWidget.h +++ b/Code/Tools/ProjectManager/Source/ProjectButtonWidget.h @@ -24,6 +24,7 @@ QT_FORWARD_DECLARE_CLASS(QProgressBar) QT_FORWARD_DECLARE_CLASS(QLayout) QT_FORWARD_DECLARE_CLASS(QVBoxLayout) QT_FORWARD_DECLARE_CLASS(QEvent) +QT_FORWARD_DECLARE_CLASS(QMenu) namespace O3DE::ProjectManager { @@ -49,7 +50,7 @@ namespace O3DE::ProjectManager QLayout* GetBuildOverlayLayout(); signals: - void triggered(); + void triggered(QMouseEvent* event); public slots: void mousePressEvent(QMouseEvent* event) override; @@ -108,6 +109,8 @@ namespace O3DE::ProjectManager void ShowWarning(bool show, const QString& warning); void ShowDefaultBuildButton(); + QMenu* CreateProjectMenu(); + ProjectInfo m_projectInfo; LabelButton* m_projectImageLabel = nullptr; diff --git a/Code/Tools/ProjectManager/Source/ProjectUtils.cpp b/Code/Tools/ProjectManager/Source/ProjectUtils.cpp index b7748d8aa2..209140a004 100644 --- a/Code/Tools/ProjectManager/Source/ProjectUtils.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectUtils.cpp @@ -659,5 +659,24 @@ namespace O3DE::ProjectManager return AZ::Success(QString(projectBuildPath.c_str())); } + void DisplayDetailedError(const QString& title, const AZ::Outcome>& outcome, QWidget* parent) + { + const AZStd::string& generalError = outcome.GetError().first; + const AZStd::string& detailedError = outcome.GetError().second; + + if (!detailedError.empty()) + { + QMessageBox errorDialog(parent); + errorDialog.setIcon(QMessageBox::Critical); + errorDialog.setWindowTitle(title); + errorDialog.setText(generalError.c_str()); + errorDialog.setDetailedText(detailedError.c_str()); + errorDialog.exec(); + } + else + { + QMessageBox::critical(parent, title, generalError.c_str()); + } + } } // namespace ProjectUtils } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/ProjectUtils.h b/Code/Tools/ProjectManager/Source/ProjectUtils.h index 713803c20b..8602ffa692 100644 --- a/Code/Tools/ProjectManager/Source/ProjectUtils.h +++ b/Code/Tools/ProjectManager/Source/ProjectUtils.h @@ -98,5 +98,14 @@ namespace O3DE::ProjectManager */ AZ::IO::FixedMaxPath GetEditorExecutablePath(const AZ::IO::PathView& projectPath); + + /** + * Display a dialog with general and detailed sections for the given AZ::Outcome + * @param title Dialog title + * @param outcome The AZ::Outcome with general and detailed error messages + * @param parent Optional QWidget parent + */ + void DisplayDetailedError(const QString& title, const AZ::Outcome>& outcome, QWidget* parent = nullptr); + } // namespace ProjectUtils } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/PythonBindings.cpp b/Code/Tools/ProjectManager/Source/PythonBindings.cpp index 12f97e6d2e..00ece7396d 100644 --- a/Code/Tools/ProjectManager/Source/PythonBindings.cpp +++ b/Code/Tools/ProjectManager/Source/PythonBindings.cpp @@ -312,6 +312,7 @@ namespace O3DE::ProjectManager m_register = pybind11::module::import("o3de.register"); m_manifest = pybind11::module::import("o3de.manifest"); m_engineTemplate = pybind11::module::import("o3de.engine_template"); + m_engineProperties = pybind11::module::import("o3de.engine_properties"); m_enableGemProject = pybind11::module::import("o3de.enable_gem"); m_disableGemProject = pybind11::module::import("o3de.disable_gem"); m_editProjectProperties = pybind11::module::import("o3de.project_properties"); @@ -319,9 +320,6 @@ namespace O3DE::ProjectManager m_repo = pybind11::module::import("o3de.repo"); m_pathlib = pybind11::module::import("pathlib"); - // make sure the engine is registered - RegisterThisEngine(); - m_pythonStarted = !PyErr_Occurred(); return m_pythonStarted; } @@ -346,36 +344,6 @@ namespace O3DE::ProjectManager return !PyErr_Occurred(); } - bool PythonBindings::RegisterThisEngine() - { - bool registrationResult = true; // already registered is considered successful - bool pythonResult = ExecuteWithLock( - [&] - { - // check current engine path against all other registered engines - // to see if we are already registered - auto allEngines = m_manifest.attr("get_engines")(); - if (pybind11::isinstance(allEngines)) - { - for (auto engine : allEngines) - { - AZ::IO::FixedMaxPath enginePath(Py_To_String(engine)); - if (enginePath.Compare(m_enginePath) == 0) - { - return; - } - } - } - - auto result = m_register.attr("register")(QString_To_Py_Path(QString(m_enginePath.c_str()))); - registrationResult = (result.cast() == 0); - }); - - bool finalResult = (registrationResult && pythonResult); - AZ_Assert(finalResult, "Registration of this engine failed!"); - return finalResult; - } - AZ::Outcome PythonBindings::ExecuteWithLockErrorHandling(AZStd::function executionCallback) { if (!Py_IsInitialized()) @@ -407,16 +375,22 @@ namespace O3DE::ProjectManager return ExecuteWithLockErrorHandling(executionCallback).IsSuccess(); } - AZ::Outcome PythonBindings::GetEngineInfo() + EngineInfo PythonBindings::EngineInfoFromPath(pybind11::handle enginePath) { EngineInfo engineInfo; - bool result = ExecuteWithLock([&] { - auto enginePath = m_manifest.attr("get_this_engine_path")(); + try + { + auto engineData = m_manifest.attr("get_engine_json_data")(pybind11::none(), enginePath); + if (pybind11::isinstance(engineData)) + { + engineInfo.m_version = Py_To_String_Optional(engineData, "O3DEVersion", "0.0.0.0"); + engineInfo.m_name = Py_To_String_Optional(engineData, "engine_name", "O3DE"); + engineInfo.m_path = Py_To_String(enginePath); + } auto o3deData = m_manifest.attr("load_o3de_manifest")(); if (pybind11::isinstance(o3deData)) { - engineInfo.m_path = Py_To_String(enginePath); auto defaultGemsFolder = m_manifest.attr("get_o3de_gems_folder")(); engineInfo.m_defaultGemsFolder = Py_To_String_Optional(o3deData, "default_gems_folder", Py_To_String(defaultGemsFolder)); @@ -433,19 +407,36 @@ namespace O3DE::ProjectManager engineInfo.m_thirdPartyPath = Py_To_String_Optional(o3deData, "default_third_party_folder", Py_To_String(defaultThirdPartyFolder)); } - auto engineData = m_manifest.attr("get_engine_json_data")(pybind11::none(), enginePath); - if (pybind11::isinstance(engineData)) + // check if engine path is registered + auto allEngines = m_manifest.attr("get_engines")(); + if (pybind11::isinstance(allEngines)) { - try - { - engineInfo.m_version = Py_To_String_Optional(engineData, "O3DEVersion", "0.0.0.0"); - engineInfo.m_name = Py_To_String_Optional(engineData, "engine_name", "O3DE"); - } - catch ([[maybe_unused]] const std::exception& e) + const AZ::IO::FixedMaxPath enginePathFixed(Py_To_String(enginePath)); + for (auto engine : allEngines) { - AZ_Warning("PythonBindings", false, "Failed to get EngineInfo from %s", Py_To_String(enginePath)); + AZ::IO::FixedMaxPath otherEnginePath(Py_To_String(engine)); + if (otherEnginePath.Compare(enginePathFixed) == 0) + { + engineInfo.m_registered = true; + break; + } } } + } + catch ([[maybe_unused]] const std::exception& e) + { + AZ_Warning("PythonBindings", false, "Failed to get EngineInfo from %s", Py_To_String(enginePath)); + } + return engineInfo; + } + + AZ::Outcome PythonBindings::GetEngineInfo() + { + EngineInfo engineInfo; + + bool result = ExecuteWithLock([&] { + auto enginePath = m_manifest.attr("get_this_engine_path")(); + engineInfo = EngineInfoFromPath(enginePath); }); if (!result || !engineInfo.IsValid()) @@ -458,10 +449,55 @@ namespace O3DE::ProjectManager } } - bool PythonBindings::SetEngineInfo(const EngineInfo& engineInfo) + AZ::Outcome PythonBindings::GetEngineInfo(const QString& engineName) { + EngineInfo engineInfo; bool result = ExecuteWithLock([&] { - auto registrationResult = m_register.attr("register")( + auto enginePathResult = m_manifest.attr("get_registered")(QString_To_Py_String(engineName)); + + // if a valid registered object is not found None is returned + if (!pybind11::isinstance(enginePathResult)) + { + engineInfo = EngineInfoFromPath(enginePathResult); + } + }); + + if (!result || !engineInfo.IsValid()) + { + return AZ::Failure(); + } + else + { + return AZ::Success(AZStd::move(engineInfo)); + } + } + + IPythonBindings::DetailedOutcome PythonBindings::SetEngineInfo(const EngineInfo& engineInfo, bool force) + { + bool registrationSuccess = false; + bool pythonSuccess = ExecuteWithLock([&] { + + EngineInfo currentEngine = EngineInfoFromPath(QString_To_Py_Path(engineInfo.m_path)); + + // be kind to source control and avoid needlessly updating engine.json + if (currentEngine.IsValid() && + (currentEngine.m_name.compare(engineInfo.m_name) != 0 || currentEngine.m_version.compare(engineInfo.m_version) != 0)) + { + auto enginePropsResult = m_engineProperties.attr("edit_engine_props")( + QString_To_Py_Path(engineInfo.m_path), + pybind11::none(), // existing engine_name + QString_To_Py_String(engineInfo.m_name), + QString_To_Py_String(engineInfo.m_version) + ); + + if (enginePropsResult.cast() != 0) + { + // do not proceed with registration + return; + } + } + + auto result = m_register.attr("register")( QString_To_Py_Path(engineInfo.m_path), pybind11::none(), // project_path pybind11::none(), // gem_path @@ -474,16 +510,22 @@ namespace O3DE::ProjectManager QString_To_Py_Path(engineInfo.m_defaultGemsFolder), QString_To_Py_Path(engineInfo.m_defaultTemplatesFolder), pybind11::none(), // default_restricted_folder - QString_To_Py_Path(engineInfo.m_thirdPartyPath) - ); + QString_To_Py_Path(engineInfo.m_thirdPartyPath), + pybind11::none(), // external_subdir_engine_path + pybind11::none(), // external_subdir_project_path + false, // remove + force + ); - if (registrationResult.cast() != 0) - { - result = false; - } + registrationSuccess = result.cast() == 0; }); - return result; + if (pythonSuccess && registrationSuccess) + { + return AZ::Success(); + } + + return AZ::Failure(GetErrorPair()); } AZ::Outcome PythonBindings::GetGemInfo(const QString& path, const QString& projectPath) @@ -1064,7 +1106,7 @@ namespace O3DE::ProjectManager return result && refreshResult; } - AZ::Outcome> PythonBindings::AddGemRepo(const QString& repoUri) + IPythonBindings::DetailedOutcome PythonBindings::AddGemRepo(const QString& repoUri) { bool registrationResult = false; bool result = ExecuteWithLock( @@ -1080,7 +1122,7 @@ namespace O3DE::ProjectManager if (!result || !registrationResult) { - return AZ::Failure>(GetSimpleDetailedErrorPair()); + return AZ::Failure(GetErrorPair()); } return AZ::Success(); @@ -1170,13 +1212,10 @@ namespace O3DE::ProjectManager return gemRepoInfo; } -//#define MOCK_GEM_REPO_INFO true - AZ::Outcome, AZStd::string> PythonBindings::GetAllGemRepoInfos() { QVector gemRepos; -#ifndef MOCK_GEM_REPO_INFO auto result = ExecuteWithLockErrorHandling( [&] { @@ -1189,18 +1228,6 @@ namespace O3DE::ProjectManager { return AZ::Failure(result.GetError().c_str()); } -#else - GemRepoInfo mockJohnRepo("JohnCreates", "John Smith", QDateTime(QDate(2021, 8, 31), QTime(11, 57)), true); - mockJohnRepo.m_summary = "John's Summary. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce sollicitudin dapibus urna"; - mockJohnRepo.m_repoUri = "https://github.com/o3de/o3de"; - mockJohnRepo.m_additionalInfo = "John's additional info. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce sollicitu."; - gemRepos.push_back(mockJohnRepo); - - GemRepoInfo mockJaneRepo("JanesGems", "Jane Doe", QDateTime(QDate(2021, 9, 10), QTime(18, 23)), false); - mockJaneRepo.m_summary = "Jane's Summary."; - mockJaneRepo.m_repoUri = "https://github.com/o3de/o3de.org"; - gemRepos.push_back(mockJaneRepo); -#endif // MOCK_GEM_REPO_INFO std::sort(gemRepos.begin(), gemRepos.end()); return AZ::Success(AZStd::move(gemRepos)); @@ -1261,7 +1288,7 @@ namespace O3DE::ProjectManager return AZ::Success(AZStd::move(gemInfos)); } - AZ::Outcome> PythonBindings::DownloadGem( + IPythonBindings::DetailedOutcome PythonBindings::DownloadGem( const QString& gemName, std::function gemProgressCallback, bool force) { // This process is currently limited to download a single gem at a time. @@ -1290,12 +1317,12 @@ namespace O3DE::ProjectManager if (!result.IsSuccess()) { - AZStd::pair pythonRunError(result.GetError(), result.GetError()); - return AZ::Failure>(AZStd::move(pythonRunError)); + IPythonBindings::ErrorPair pythonRunError(result.GetError(), result.GetError()); + return AZ::Failure(AZStd::move(pythonRunError)); } else if (!downloadSucceeded) { - return AZ::Failure>(GetSimpleDetailedErrorPair()); + return AZ::Failure(GetErrorPair()); } return AZ::Success(); @@ -1322,13 +1349,13 @@ namespace O3DE::ProjectManager return result && updateAvaliableResult; } - AZStd::pair PythonBindings::GetSimpleDetailedErrorPair() + IPythonBindings::ErrorPair PythonBindings::GetErrorPair() { AZStd::string detailedString = m_pythonErrorStrings.size() == 1 ? "" : AZStd::accumulate(m_pythonErrorStrings.begin(), m_pythonErrorStrings.end(), AZStd::string("")); - return AZStd::pair(m_pythonErrorStrings.front(), detailedString); + return IPythonBindings::ErrorPair(m_pythonErrorStrings.front(), detailedString); } void PythonBindings::AddErrorString(AZStd::string errorString) diff --git a/Code/Tools/ProjectManager/Source/PythonBindings.h b/Code/Tools/ProjectManager/Source/PythonBindings.h index 48841b6565..e2a8109128 100644 --- a/Code/Tools/ProjectManager/Source/PythonBindings.h +++ b/Code/Tools/ProjectManager/Source/PythonBindings.h @@ -35,7 +35,8 @@ namespace O3DE::ProjectManager // Engine AZ::Outcome GetEngineInfo() override; - bool SetEngineInfo(const EngineInfo& engineInfo) override; + AZ::Outcome GetEngineInfo(const QString& engineName) override; + DetailedOutcome SetEngineInfo(const EngineInfo& engineInfo, bool force = false) override; // Gem AZ::Outcome GetGemInfo(const QString& path, const QString& projectPath = {}) override; @@ -62,12 +63,12 @@ namespace O3DE::ProjectManager // Gem Repos AZ::Outcome RefreshGemRepo(const QString& repoUri) override; bool RefreshAllGemRepos() override; - AZ::Outcome> AddGemRepo(const QString& repoUri) override; + DetailedOutcome AddGemRepo(const QString& repoUri) override; bool RemoveGemRepo(const QString& repoUri) override; AZ::Outcome, AZStd::string> GetAllGemRepoInfos() override; AZ::Outcome, AZStd::string> GetGemInfosForRepo(const QString& repoUri) override; AZ::Outcome, AZStd::string> GetGemInfosForAllRepos() override; - AZ::Outcome> DownloadGem( + DetailedOutcome DownloadGem( const QString& gemName, std::function gemProgressCallback, bool force = false) override; void CancelDownload() override; bool IsGemUpdateAvaliable(const QString& gemName, const QString& lastUpdated) override; @@ -80,14 +81,14 @@ namespace O3DE::ProjectManager AZ::Outcome ExecuteWithLockErrorHandling(AZStd::function executionCallback); bool ExecuteWithLock(AZStd::function executionCallback); + EngineInfo EngineInfoFromPath(pybind11::handle enginePath); GemInfo GemInfoFromPath(pybind11::handle path, pybind11::handle pyProjectPath); GemRepoInfo GetGemRepoInfo(pybind11::handle repoUri); ProjectInfo ProjectInfoFromPath(pybind11::handle path); ProjectTemplateInfo ProjectTemplateInfoFromPath(pybind11::handle path, pybind11::handle pyProjectPath); AZ::Outcome GemRegistration(const QString& gemPath, const QString& projectPath, bool remove = false); - bool RegisterThisEngine(); bool StopPython(); - AZStd::pair GetSimpleDetailedErrorPair(); + IPythonBindings::ErrorPair GetErrorPair(); bool m_pythonStarted = false; @@ -96,6 +97,7 @@ namespace O3DE::ProjectManager AZStd::recursive_mutex m_lock; pybind11::handle m_engineTemplate; + pybind11::handle m_engineProperties; pybind11::handle m_cmake; pybind11::handle m_register; pybind11::handle m_manifest; diff --git a/Code/Tools/ProjectManager/Source/PythonBindingsInterface.h b/Code/Tools/ProjectManager/Source/PythonBindingsInterface.h index c7c8af2ce1..a42ff310c3 100644 --- a/Code/Tools/ProjectManager/Source/PythonBindingsInterface.h +++ b/Code/Tools/ProjectManager/Source/PythonBindingsInterface.h @@ -31,6 +31,10 @@ namespace O3DE::ProjectManager IPythonBindings() = default; virtual ~IPythonBindings() = default; + //! First string in pair is general error, second is detailed + using ErrorPair = AZStd::pair; + using DetailedOutcome = AZ::Outcome; + /** * Get whether Python was started or not. All Python functionality will fail if Python * failed to start. @@ -49,17 +53,25 @@ namespace O3DE::ProjectManager // Engine /** - * Get info about the engine + * Get info about the current engine * @return an outcome with EngineInfo on success */ virtual AZ::Outcome GetEngineInfo() = 0; + /** + * Get info about an engine by name + * @param engineName The name of the engine to get info about + * @return an outcome with EngineInfo on success + */ + virtual AZ::Outcome GetEngineInfo(const QString& engineName) = 0; + /** * Set info about the engine + * @param force True to force registration even if an engine with the same name is already registered * @param engineInfo an EngineInfo object + * @return a detailed error outcome on failure. */ - virtual bool SetEngineInfo(const EngineInfo& engineInfo) = 0; - + virtual DetailedOutcome SetEngineInfo(const EngineInfo& engineInfo, bool force = false) = 0; // Gems @@ -202,7 +214,7 @@ namespace O3DE::ProjectManager * @param repoUri the absolute filesystem path or url to the gem repo. * @return an outcome with a pair of string error and detailed messages on failure. */ - virtual AZ::Outcome> AddGemRepo(const QString& repoUri) = 0; + virtual DetailedOutcome AddGemRepo(const QString& repoUri) = 0; /** * Unregisters this gem repo with the current engine. @@ -237,7 +249,7 @@ namespace O3DE::ProjectManager * @param force should we forcibly overwrite the old version of the gem. * @return an outcome with a pair of string error and detailed messages on failure. */ - virtual AZ::Outcome> DownloadGem( + virtual DetailedOutcome DownloadGem( const QString& gemName, std::function gemProgressCallback, bool force = false) = 0; /** diff --git a/Code/Tools/ProjectManager/tests/GemCatalogTests.cpp b/Code/Tools/ProjectManager/tests/GemCatalogTests.cpp index f5c6d5196a..701a1ddcef 100644 --- a/Code/Tools/ProjectManager/tests/GemCatalogTests.cpp +++ b/Code/Tools/ProjectManager/tests/GemCatalogTests.cpp @@ -8,8 +8,8 @@ #include #include -#include +#include namespace O3DE::ProjectManager { @@ -17,14 +17,22 @@ namespace O3DE::ProjectManager : public ::UnitTest::ScopedAllocatorSetupFixture { public: + void SetUp() override + { + m_gemModel.reset(new GemModel()); + } - GemCatalogTests() = default; + void TearDown() override + { + m_gemModel.release(); + } + + protected: + AZStd::unique_ptr m_gemModel; }; - TEST_F(GemCatalogTests, GemCatalog_Displays_But_Does_Not_Add_Dependencies) + TEST_F(GemCatalogTests, GemCatalog_GemWithDependencies_DisplaysButDoesNotAddDependencies) { - GemModel* gemModel = new GemModel(); - // given 3 gems a,b,c where a depends on b which depends on c GemInfo gemA, gemB, gemC; QModelIndex indexA, indexB, indexC; @@ -35,30 +43,531 @@ namespace O3DE::ProjectManager gemA.m_dependencies = QStringList({ "b" }); gemB.m_dependencies = QStringList({ "c" }); - gemModel->AddGem(gemA); - indexA = gemModel->FindIndexByNameString(gemA.m_name); - - gemModel->AddGem(gemB); - indexB = gemModel->FindIndexByNameString(gemB.m_name); + indexA = m_gemModel->AddGem(gemA); + indexB = m_gemModel->AddGem(gemB); + indexC = m_gemModel->AddGem(gemC); - gemModel->AddGem(gemC); - indexC = gemModel->FindIndexByNameString(gemC.m_name); - - gemModel->UpdateGemDependencies(); + m_gemModel->UpdateGemDependencies(); EXPECT_FALSE(GemModel::IsAdded(indexA)); EXPECT_FALSE(GemModel::IsAddedDependency(indexB) || GemModel::IsAddedDependency(indexC)); // when a is added - GemModel::SetIsAdded(*gemModel, indexA, true); + GemModel::SetIsAdded(*m_gemModel, indexA, true); // expect b and c are now dependencies of an added gem but not themselves added // cmake will handle dependencies EXPECT_TRUE(GemModel::IsAddedDependency(indexB) && GemModel::IsAddedDependency(indexC)); - EXPECT_TRUE(!GemModel::IsAdded(indexB) && !GemModel::IsAdded(indexC)); + EXPECT_FALSE(GemModel::IsAdded(indexB) || GemModel::IsAdded(indexC)); - QVector gemsToAdd = gemModel->GatherGemsToBeAdded(); + const QVector& gemsToAdd = m_gemModel->GatherGemsToBeAdded(); EXPECT_TRUE(gemsToAdd.size() == 1); EXPECT_EQ(GemModel::GetName(gemsToAdd.at(0)), gemA.m_name); } + + class GemCatalogFilterTests + : public GemCatalogTests + { + public: + void SetUp() override + { + GemCatalogTests::SetUp(); + m_proxyModel.reset(new GemSortFilterProxyModel(m_gemModel.get())); + } + + void TearDown() override + { + m_proxyModel.release(); + GemCatalogTests::TearDown(); + } + + protected: + AZStd::unique_ptr m_proxyModel; + }; + + class GemCatalogSearchFilterTests + : public GemCatalogFilterTests + { + public: + void SetUp() override + { + GemCatalogFilterTests::SetUp(); + + GemInfo gemfilterName, gemfilterDisplayName, gemfilterCreator, gemfilterSummary, gemfilterFeature; + + gemfilterName.m_name = "Name"; + gemfilterDisplayName.m_name = "D"; + gemfilterCreator.m_name = "C"; + gemfilterSummary.m_name = "S"; + gemfilterFeature.m_name = "F"; + + gemfilterDisplayName.m_displayName = "Display Name"; + gemfilterCreator.m_creator = "Johnathon Doe"; + gemfilterSummary.m_summary = "Unique Summary"; + gemfilterFeature.m_features.append("Creative Feature"); + + m_gemRows.append(m_gemModel->AddGem(gemfilterName).row()); + m_gemRows.append(m_gemModel->AddGem(gemfilterDisplayName).row()); + m_gemRows.append(m_gemModel->AddGem(gemfilterCreator).row()); + m_gemRows.append(m_gemModel->AddGem(gemfilterSummary).row()); + m_gemRows.append(m_gemModel->AddGem(gemfilterFeature).row()); + } + + protected: + enum RowOrder + { + Name, + DisplayName, + Creator, + Summary, + Features + }; + + QVector m_gemRows; + }; + + TEST_F(GemCatalogSearchFilterTests, GemCatalogFilters_SearchStringName_ShowsNameGems) + { + m_proxyModel->SetSearchString("Name"); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Name], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DisplayName], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Creator], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Summary], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Features], QModelIndex())); + } + + TEST_F(GemCatalogSearchFilterTests, GemCatalogFilters_SearchStringDisplayName_ShowsDisplayNameGem) + { + m_proxyModel->SetSearchString("Display Name"); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Name], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DisplayName], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Creator], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Summary], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Features], QModelIndex())); + } + + TEST_F(GemCatalogSearchFilterTests, GemCatalogFilters_SearchStringCreator_ShowsCreatorGem) + { + m_proxyModel->SetSearchString("Johnathon Doe"); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Name], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DisplayName], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Creator], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Summary], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Features], QModelIndex())); + } + + TEST_F(GemCatalogSearchFilterTests, GemCatalogFilters_SearchStringSummary_ShowsSummaryGem) + { + m_proxyModel->SetSearchString("Unique Summary"); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Name], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DisplayName], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Creator], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Summary], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Features], QModelIndex())); + } + + TEST_F(GemCatalogSearchFilterTests, GemCatalogFilters_SearchStringFeatures_ShowsFeatureGem) + { + m_proxyModel->SetSearchString("Creative"); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Name], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DisplayName], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Creator], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Summary], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Features], QModelIndex())); + } + + TEST_F(GemCatalogSearchFilterTests, GemCatalogFilters_SearchStringEmpty_ShowsAll) + { + m_proxyModel->SetSearchString(""); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Name], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DisplayName], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Creator], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Summary], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Features], QModelIndex())); + } + + TEST_F(GemCatalogSearchFilterTests, GemCatalogFilters_SearchStringCommonCharacter_ShowsAll) + { + // All gems contain "a" in a searchable field so all should be shown + m_proxyModel->SetSearchString("a"); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Name], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DisplayName], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Creator], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Summary], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Features], QModelIndex())); + } + + TEST_F(GemCatalogSearchFilterTests, GemCatalogFilters_SearchStringDifferentCaseCommonCharacter_ShowsAll) + { + // No gems contain the character "A" but search should be case insensitive + m_proxyModel->SetSearchString("A"); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Name], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DisplayName], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Creator], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Summary], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Features], QModelIndex())); + } + + TEST_F(GemCatalogSearchFilterTests, GemCatalogFilters_SearchStringNoneContainCharacter_ShowsNone) + { + // No gems contain the character "z" or "Z" so none should be shown + m_proxyModel->SetSearchString("z"); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Name], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DisplayName], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Creator], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Summary], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Features], QModelIndex())); + } + + TEST_F(GemCatalogSearchFilterTests, GemCatalogFilters_SearchStringPartialMatchString_ShowsNone) + { + // Token matching is currently not supported + // The whole string must match a substring + m_proxyModel->SetSearchString("Name Token"); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Name], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DisplayName], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Creator], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Summary], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Features], QModelIndex())); + } + + class GemCatalogSelectedActiveFilterTests + : public GemCatalogFilterTests + { + public: + void SetUp() override + { + GemCatalogFilterTests::SetUp(); + + GemInfo gemSelected, gemSelectedDep, gemUnselected, gemUnselectedDep, gemActive, gemInactive; + + gemSelected.m_name = "selected"; + gemSelectedDep.m_name = "selectedDep"; + gemUnselected.m_name = "unselected"; + gemUnselectedDep.m_name = "unselectedDep"; + gemActive.m_name = "active"; + gemInactive.m_name = "inactive"; + + gemSelected.m_dependencies = QStringList({ "selectedDep" }); + gemUnselected.m_dependencies = QStringList({ "unselectedDep" }); + + m_gemIndices.append(m_gemModel->AddGem(gemSelected)); + m_gemIndices.append(m_gemModel->AddGem(gemSelectedDep)); + m_gemIndices.append(m_gemModel->AddGem(gemUnselected)); + m_gemIndices.append(m_gemModel->AddGem(gemUnselectedDep)); + m_gemIndices.append(m_gemModel->AddGem(gemActive)); + m_gemIndices.append(m_gemModel->AddGem(gemInactive)); + + m_gemModel->UpdateGemDependencies(); + + // Set intial state of catalog with the to be unselected gem currently added along with active gem + GemModel::SetIsAdded(*m_gemModel, m_gemIndices[Unselected], true); + GemModel::SetWasPreviouslyAdded(*m_gemModel, m_gemIndices[Unselected], true); + GemModel::SetIsAdded(*m_gemModel, m_gemIndices[Active], true); + GemModel::SetWasPreviouslyAdded(*m_gemModel, m_gemIndices[Active], true); + + // Add selected gem and remove unselected gem + GemModel::SetIsAdded(*m_gemModel, m_gemIndices[Selected], true); + GemModel::SetIsAdded(*m_gemModel, m_gemIndices[Unselected], false); + } + + protected: + enum IndexOrder + { + Selected, + SelectedDep, + Unselected, + UnselectedDep, + Active, + Inactive + }; + + QVector m_gemIndices; + }; + + TEST_F(GemCatalogSelectedActiveFilterTests, GemCatalogFilters_SelectedActiveIntialState_AddedGemsAndDependenciesAreAdded) + { + // Check if gems are all in expected state + // if this test fails all other Selected/Active tests are invalid + EXPECT_TRUE(GemModel::IsAdded(m_gemIndices[Selected])); + EXPECT_TRUE(GemModel::IsAddedDependency(m_gemIndices[SelectedDep])); + EXPECT_FALSE(GemModel::IsAdded(m_gemIndices[Unselected])); + EXPECT_FALSE(GemModel::IsAddedDependency(m_gemIndices[UnselectedDep])); + EXPECT_TRUE(GemModel::IsAdded(m_gemIndices[Active])); + EXPECT_FALSE(GemModel::IsAdded(m_gemIndices[Inactive])); + } + + TEST_F(GemCatalogSelectedActiveFilterTests, GemCatalogFilters_SelectedActiveNoFilter_ShowsAll) + { + // Filter is clear + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Selected].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[SelectedDep].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Unselected].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[UnselectedDep].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Active].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Inactive].row(), QModelIndex())); + } + + TEST_F(GemCatalogSelectedActiveFilterTests, GemCatalogFilters_FilterSelected_ShowsSelectedAndDependencies) + { + // Check selected filter + // Selected dependencies should also be shown + m_proxyModel->SetGemSelected(GemSortFilterProxyModel::GemSelected::Selected); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Selected].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[SelectedDep].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Unselected].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[UnselectedDep].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Active].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Inactive].row(), QModelIndex())); + } + + TEST_F(GemCatalogSelectedActiveFilterTests, GemCatalogFilters_FilterUnselected_ShowsUnselectedAndDependencies) + { + // Check unselected filter + // Unselected dependencies should also be shown + m_proxyModel->SetGemSelected(GemSortFilterProxyModel::GemSelected::Unselected); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Selected].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[SelectedDep].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Unselected].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[UnselectedDep].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Active].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Inactive].row(), QModelIndex())); + } + + TEST_F(GemCatalogSelectedActiveFilterTests, GemCatalogFilters_FilterSelectedAndUnselected_ShowsAllChangesAndDependencies) + { + // Check both un/selected filter + m_proxyModel->SetGemSelected(GemSortFilterProxyModel::GemSelected::Both); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Selected].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[SelectedDep].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Unselected].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[UnselectedDep].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Active].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Inactive].row(), QModelIndex())); + } + + TEST_F(GemCatalogSelectedActiveFilterTests, GemCatalogFilters_FilterActive_ShowsActive) + { + // Check active filter + // Active dependencies should also be shown + m_proxyModel->SetGemActive(GemSortFilterProxyModel::GemActive::Active); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Selected].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[SelectedDep].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Unselected].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[UnselectedDep].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Active].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Inactive].row(), QModelIndex())); + } + + TEST_F(GemCatalogSelectedActiveFilterTests, GemCatalogFilters_FilterActive_ShowsInactive) + { + // Check inactive filter + m_proxyModel->SetGemActive(GemSortFilterProxyModel::GemActive::Inactive); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Selected].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[SelectedDep].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Unselected].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[UnselectedDep].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Active].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Inactive].row(), QModelIndex())); + } + + class GemCatalogMiscFilterTests + : public GemCatalogFilterTests + { + public: + void SetUp() override + { + GemCatalogFilterTests::SetUp(); + + GemInfo gemA, gemB, gemC; + + gemA.m_name = "Default Audio"; + gemB.m_name = "Mobile UX"; + gemC.m_name = "City Props"; + + gemA.m_gemOrigin = GemInfo::GemOrigin::Open3DEngine; + gemB.m_gemOrigin = GemInfo::GemOrigin::Local; + gemC.m_gemOrigin = GemInfo::GemOrigin::Remote; + + gemA.m_types = GemInfo::Type::Code; + gemB.m_types = GemInfo::Type::Code | GemInfo::Type::Tool; + gemC.m_types = GemInfo::Type::Asset; + + using Plat = GemInfo::Platform; + gemA.m_platforms = Plat::Windows; + gemB.m_platforms = Plat::Android | Plat::iOS; + gemC.m_platforms = Plat::Android | Plat::iOS | Plat::Linux | Plat::macOS | Plat::Windows; + + gemA.m_features = QStringList({ "Audio", "Framework", "SDK" }); + gemB.m_features = QStringList({ "Framework", "Tools", "UI" }); + gemC.m_features = QStringList({ "Assets", "Content", "Environment" }); + + m_gemRows.append(m_gemModel->AddGem(gemA).row()); + m_gemRows.append(m_gemModel->AddGem(gemB).row()); + m_gemRows.append(m_gemModel->AddGem(gemC).row()); + } + + protected: + enum RowOrder + { + DefaultAudio, + MobileUX, + CityProps + }; + + QVector m_gemRows; + }; + + TEST_F(GemCatalogMiscFilterTests, GemCatalogFilters_MiscNoFilter_ShowsAll) + { + // No filter + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + } + + TEST_F(GemCatalogMiscFilterTests, GemCatalogFilters_FilterSingleOrigin_ShowsOriginMatch) + { + m_proxyModel->SetGemOrigins(GemInfo::GemOrigin::Open3DEngine); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + + m_proxyModel->SetGemOrigins(GemInfo::GemOrigin::Local); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + + m_proxyModel->SetGemOrigins(GemInfo::GemOrigin::Remote); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + } + + TEST_F(GemCatalogMiscFilterTests, GemCatalogFilters_FilterMultipleOrigins_ShowsMultipleOriginMatches) + { + m_proxyModel->SetGemOrigins(GemInfo::GemOrigin::Open3DEngine | GemInfo::GemOrigin::Local); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + } + + TEST_F(GemCatalogMiscFilterTests, GemCatalogFilters_FilterSingleType_ShowsTypeMatch) + { + m_proxyModel->SetTypes(GemInfo::Type::Code); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + + m_proxyModel->SetTypes(GemInfo::Type::Tool); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + + m_proxyModel->SetTypes(GemInfo::Type::Asset); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + } + + TEST_F(GemCatalogMiscFilterTests, GemCatalogFilters_FilterMultipleTypes_ShowsMultipleTypeMatches) + { + m_proxyModel->SetTypes(GemInfo::Type::Tool | GemInfo::Type::Asset); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + } + + TEST_F(GemCatalogMiscFilterTests, GemCatalogFilters_FilterSinglePlatform_ShowsPlatformMatch) + { + m_proxyModel->SetPlatforms(GemInfo::Platform::Windows); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + + m_proxyModel->SetPlatforms(GemInfo::Platform::Android); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + + m_proxyModel->SetPlatforms(GemInfo::Platform::macOS); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + } + + TEST_F(GemCatalogMiscFilterTests, GemCatalogFilters_FilterMultiplePlatforms_ShowsMultiplePlatformMatches) + { + m_proxyModel->SetPlatforms(GemInfo::Platform::Android | GemInfo::Platform::iOS); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + } + + TEST_F(GemCatalogMiscFilterTests, GemCatalogFilters_FilterSingleFeature_ShowsFeatureMatch) + { + m_proxyModel->SetFeatures({ "Audio" }); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + + m_proxyModel->SetFeatures({ "Tools", }); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + + m_proxyModel->SetFeatures({ "Environment" }); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + } + + TEST_F(GemCatalogMiscFilterTests, GemCatalogFilters_FilterMultipleFeatures_ShowsMultipleFeatureMatches) + { + m_proxyModel->SetFeatures({ "Assets", "Framework" }); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + } + + TEST_F(GemCatalogMiscFilterTests, GemCatalogFilters_FilterPartialMatchFeature_ShowsNone) + { + // Features must be an exact match to filter by them directly + m_proxyModel->SetFeatures({ "Frame" }); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + } } diff --git a/Code/Tools/SceneAPI/SceneData/Behaviors/LodRuleBehavior.cpp b/Code/Tools/SceneAPI/SceneData/Behaviors/LodRuleBehavior.cpp index f51c670fc8..c47330620d 100644 --- a/Code/Tools/SceneAPI/SceneData/Behaviors/LodRuleBehavior.cpp +++ b/Code/Tools/SceneAPI/SceneData/Behaviors/LodRuleBehavior.cpp @@ -185,7 +185,7 @@ namespace AZ if (lodCount > 0) { rule->AddLod(); - selection.CopyTo(rule->GetNodeSelectionList(index)); + selection.CopyTo(rule->GetNodeSelectionList(lodLevel)); } else { diff --git a/Code/Tools/SceneAPI/SceneData/Behaviors/LodRuleBehavior.h b/Code/Tools/SceneAPI/SceneData/Behaviors/LodRuleBehavior.h index d152386940..c9416c0aa8 100644 --- a/Code/Tools/SceneAPI/SceneData/Behaviors/LodRuleBehavior.h +++ b/Code/Tools/SceneAPI/SceneData/Behaviors/LodRuleBehavior.h @@ -13,6 +13,7 @@ #include #include #include +#include namespace AZ { @@ -27,7 +28,7 @@ namespace AZ { class LodRule; - class LodRuleBehavior + class SCENE_DATA_CLASS LodRuleBehavior : public SceneCore::BehaviorComponent , public Events::ManifestMetaInfoBus::Handler , public Events::AssetImportRequestBus::Handler @@ -36,18 +37,19 @@ namespace AZ public: AZ_COMPONENT(LodRuleBehavior, "{D2E19864-9A4B-41FD-8ACC-DA6756728CB3}", SceneCore::BehaviorComponent); - ~LodRuleBehavior() override = default; + SCENE_DATA_API ~LodRuleBehavior() override = default; - void Activate() override; - void Deactivate() override; + SCENE_DATA_API void Activate() override; + SCENE_DATA_API void Deactivate() override; static void Reflect(ReflectContext* context); - void InitializeObject(const Containers::Scene& scene, DataTypes::IManifestObject& target) override; - Events::ProcessingResult UpdateManifest(Containers::Scene& scene, ManifestAction action, + SCENE_DATA_API void InitializeObject(const Containers::Scene& scene, DataTypes::IManifestObject& target) override; + SCENE_DATA_API Events::ProcessingResult UpdateManifest( + Containers::Scene& scene, ManifestAction action, RequestingApplication requester) override; - void GetVirtualTypeName(AZStd::string& name, Crc32 type) override; - void GetAllVirtualTypes(AZStd::set& types) override; + SCENE_DATA_API void GetVirtualTypeName(AZStd::string& name, Crc32 type) override; + SCENE_DATA_API void GetAllVirtualTypes(AZStd::set& types) override; private: size_t SelectLodMeshes(const Containers::Scene& scene, DataTypes::ISceneNodeSelectionList& selection, size_t lodLevel) const; diff --git a/Code/Tools/SceneAPI/SceneData/GraphData/BoneData.cpp b/Code/Tools/SceneAPI/SceneData/GraphData/BoneData.cpp index 8a3807c31a..e1a6c2608f 100644 --- a/Code/Tools/SceneAPI/SceneData/GraphData/BoneData.cpp +++ b/Code/Tools/SceneAPI/SceneData/GraphData/BoneData.cpp @@ -46,6 +46,9 @@ namespace AZ BehaviorContext* behaviorContext = azrtti_cast(context); if (behaviorContext) { + behaviorContext->Class() + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Attribute(AZ::Script::Attributes::Module, "scene"); behaviorContext->Class() ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) diff --git a/Code/Tools/SceneAPI/SceneData/Rules/LodRule.cpp b/Code/Tools/SceneAPI/SceneData/Rules/LodRule.cpp index f893751caf..a6c624397a 100644 --- a/Code/Tools/SceneAPI/SceneData/Rules/LodRule.cpp +++ b/Code/Tools/SceneAPI/SceneData/Rules/LodRule.cpp @@ -21,7 +21,6 @@ namespace AZ { const size_t LodRule::m_maxLods; - AZ_CLASS_ALLOCATOR_IMPL(LodRule, SystemAllocator, 0) SceneNodeSelectionList& LodRule::GetNodeSelectionList(size_t index) { diff --git a/Code/Tools/SceneAPI/SceneData/Rules/LodRule.h b/Code/Tools/SceneAPI/SceneData/Rules/LodRule.h index 0d9bf0a9a6..fd7d6bacd8 100644 --- a/Code/Tools/SceneAPI/SceneData/Rules/LodRule.h +++ b/Code/Tools/SceneAPI/SceneData/Rules/LodRule.h @@ -25,26 +25,26 @@ namespace AZ } namespace SceneData { - class LodRule + class SCENE_DATA_CLASS LodRule : public DataTypes::ILodRule { public: AZ_RTTI(LodRule, "{6E796AC8-1484-4909-860A-6D3F22A7346F}", DataTypes::ILodRule); - AZ_CLASS_ALLOCATOR_DECL + AZ_CLASS_ALLOCATOR(LodRule, AZ::SystemAllocator, 0) - ~LodRule() override = default; + SCENE_DATA_API ~LodRule() override = default; - SceneNodeSelectionList& GetNodeSelectionList(size_t index); + SCENE_DATA_API SceneNodeSelectionList& GetNodeSelectionList(size_t index); - DataTypes::ISceneNodeSelectionList& GetSceneNodeSelectionList(size_t index) override; - const DataTypes::ISceneNodeSelectionList& GetSceneNodeSelectionList(size_t index) const override; - size_t GetLodCount() const override; + SCENE_DATA_API DataTypes::ISceneNodeSelectionList& GetSceneNodeSelectionList(size_t index) override; + SCENE_DATA_API const DataTypes::ISceneNodeSelectionList& GetSceneNodeSelectionList(size_t index) const override; + SCENE_DATA_API size_t GetLodCount() const override; - void AddLod(); + SCENE_DATA_API void AddLod(); static void Reflect(ReflectContext* context); - //The engine supports 6 total lods. 1 for the base model then 5 more lods. - //The rule only captures lods past level 0 so this is set to 5. + //The engine supports 6 total lods. 1 for the base model then 5 more lods. + //The rule only captures lods past level 0 so this is set to 5. static const size_t m_maxLods = 5; protected: diff --git a/Code/Tools/SceneAPI/SceneData/SceneData_testing_files.cmake b/Code/Tools/SceneAPI/SceneData/SceneData_testing_files.cmake index 51f3dfc9e7..3a51180ca1 100644 --- a/Code/Tools/SceneAPI/SceneData/SceneData_testing_files.cmake +++ b/Code/Tools/SceneAPI/SceneData/SceneData_testing_files.cmake @@ -11,5 +11,6 @@ set(FILES Tests/GraphData/MeshDataTests.cpp Tests/GraphData/MeshDataPrimitiveUtilsTests.cpp Tests/GraphData/GraphDataBehaviorTests.cpp + Tests/GraphData/RulesTests.cpp Tests/SceneManifest/SceneManifestRuleTests.cpp ) diff --git a/Code/Tools/SceneAPI/SceneData/Tests/GraphData/RulesTests.cpp b/Code/Tools/SceneAPI/SceneData/Tests/GraphData/RulesTests.cpp new file mode 100644 index 0000000000..a6ccdfa59d --- /dev/null +++ b/Code/Tools/SceneAPI/SceneData/Tests/GraphData/RulesTests.cpp @@ -0,0 +1,78 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace AZ +{ + namespace SceneData + { + struct SoftNameMock + : SceneAPI::Events::GraphMetaInfoBus::Handler + { + SoftNameMock() + { + BusConnect(); + } + + ~SoftNameMock() override + { + BusDisconnect(); + } + + void GetVirtualTypes(AZStd::set& types, const SceneAPI::Containers::Scene&, SceneAPI::Containers::SceneGraph::NodeIndex) override + { + // Indicate this node is a LOD1 type + types.emplace(AZ_CRC_CE("LODMesh1")); + } + }; + + TEST(LOD, LODRuleTest) + { + // Test that UpdateManifest doesn't crash when trying to auto-add new LOD levels + SoftNameMock softNameMock; + + SceneAPI::SceneData::LodRuleBehavior lod; + SceneAPI::Containers::Scene scene("test"); + + auto lodRule = AZStd::shared_ptr(aznew SceneAPI::SceneData::LodRule()); + scene.GetManifest().AddEntry(lodRule); + + auto group = AZStd::shared_ptr(aznew SceneAPI::SceneData::MeshGroup()); + + // Add a bunch of other rules first + // This is necessary to replicate the bug condition where the index of the rule is used instead of the index of the LOD + for (int i = 0; i < 5; ++i) + { + auto tangentsRule = AZStd::shared_ptr(aznew SceneAPI::SceneData::TangentsRule()); + group->GetRuleContainer().AddRule(tangentsRule); + } + + group->GetRuleContainer().AddRule(lodRule); + scene.GetManifest().AddEntry(group); + + auto meshData = AZStd::shared_ptr(new GraphData::MeshData()); + scene.GetGraph().AddChild(scene.GetGraph().GetRoot(), "test", meshData); + + EXPECT_EQ(lodRule->GetLodCount(), 0); + + // This should auto-add 1 LOD because of the "test" node we added above along with the SoftNameMock which will report it as an LOD1 + lod.UpdateManifest(scene, SceneAPI::Events::AssetImportRequest::Update, SceneAPI::Events::AssetImportRequest::Generic); + + EXPECT_EQ(lodRule->GetLodCount(), 1); + } + } +} diff --git a/Code/Tools/SerializeContextTools/Converter.cpp b/Code/Tools/SerializeContextTools/Converter.cpp index 294bf941ac..086d444197 100644 --- a/Code/Tools/SerializeContextTools/Converter.cpp +++ b/Code/Tools/SerializeContextTools/Converter.cpp @@ -553,8 +553,6 @@ namespace AZ rapidjson::Value(descriptor.m_reservedOS), memoryDoc.GetAllocator()); memoryDoc.AddMember(rapidjson::StringRef("reservedDebug"), rapidjson::Value(descriptor.m_reservedDebug), memoryDoc.GetAllocator()); - memoryDoc.AddMember(rapidjson::StringRef("enableDrilling"), - rapidjson::Value(descriptor.m_enableDrilling), memoryDoc.GetAllocator()); documents.emplace_back(AZStd::move(memoryFilePath.Native()), AZStd::move(memoryDoc)); return true; diff --git a/Code/Tools/Standalone/Platform/Common/Unimplemented/Source/Driller/EvenTrace/EventTraceDataAggregator_Unimplemented.cpp b/Code/Tools/Standalone/Platform/Common/Unimplemented/Source/Driller/EvenTrace/EventTraceDataAggregator_Unimplemented.cpp deleted file mode 100644 index ed7b8f215d..0000000000 --- a/Code/Tools/Standalone/Platform/Common/Unimplemented/Source/Driller/EvenTrace/EventTraceDataAggregator_Unimplemented.cpp +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -class QString; - -namespace Driller -{ - namespace Platform - { - void LaunchExplorerSelect(const QString& filePath) - { - } - } -} diff --git a/Code/Tools/Standalone/Platform/Linux/profiler_linux_files.cmake b/Code/Tools/Standalone/Platform/Linux/profiler_linux_files.cmake deleted file mode 100644 index 35ab1449e2..0000000000 --- a/Code/Tools/Standalone/Platform/Linux/profiler_linux_files.cmake +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -set(FILES - ../Common/Unimplemented/Source/StandaloneApplication_Unimplemented.cpp - ../Common/Unimplemented/Source/Driller/EvenTrace/EventTraceDataAggregator_Unimplemented.cpp -) diff --git a/Code/Tools/Standalone/Platform/Mac/Source/Driller/EvenTrace/EventTraceDataAggregator_Mac.cpp b/Code/Tools/Standalone/Platform/Mac/Source/Driller/EvenTrace/EventTraceDataAggregator_Mac.cpp deleted file mode 100644 index b553a34cf4..0000000000 --- a/Code/Tools/Standalone/Platform/Mac/Source/Driller/EvenTrace/EventTraceDataAggregator_Mac.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include -#include - -namespace Driller -{ - namespace Platform - { - void LaunchExplorerSelect(const QString& filePath) - { - QProcess::startDetached("/usr/bin/osascript", {"-e", - QStringLiteral("tell application \"Finder\" to reveal POSIX file \"%1\"").arg(QDir::toNativeSeparators(filePath))}); - QProcess::startDetached("/usr/bin/osascript", {"-e", - QStringLiteral("tell application \"Finder\" to activate")}); - } - } -} diff --git a/Code/Tools/Standalone/Platform/Mac/profiler_mac_files.cmake b/Code/Tools/Standalone/Platform/Mac/profiler_mac_files.cmake deleted file mode 100644 index 287c402800..0000000000 --- a/Code/Tools/Standalone/Platform/Mac/profiler_mac_files.cmake +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -set(FILES - Source/StandaloneApplication_Mac.cpp - Source/Driller/EvenTrace/EventTraceDataAggregator_Mac.cpp -) diff --git a/Code/Tools/Standalone/Platform/Windows/Source/Driller/EvenTrace/EventTraceDataAggregator_Windows.cpp b/Code/Tools/Standalone/Platform/Windows/Source/Driller/EvenTrace/EventTraceDataAggregator_Windows.cpp deleted file mode 100644 index 2d13b89f6f..0000000000 --- a/Code/Tools/Standalone/Platform/Windows/Source/Driller/EvenTrace/EventTraceDataAggregator_Windows.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include - -namespace Driller -{ - namespace Platform - { - void LaunchExplorerSelect(const QString& filePath) - { - QString windowsPath = filePath; - windowsPath.replace('/', "\\"); - QProcess process; - process.start("explorer", { " /select," + windowsPath }); - process.waitForFinished(); - } - } -} diff --git a/Code/Tools/Standalone/Platform/Windows/profiler_windows_files.cmake b/Code/Tools/Standalone/Platform/Windows/profiler_windows_files.cmake deleted file mode 100644 index e1c9257a8e..0000000000 --- a/Code/Tools/Standalone/Platform/Windows/profiler_windows_files.cmake +++ /dev/null @@ -1,13 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -set(FILES - ../../Source/Editor/ProfilerEditor.rc - Source/StandaloneApplication_Windows.cpp - Source/Driller/EvenTrace/EventTraceDataAggregator_Windows.cpp -) diff --git a/Code/Tools/Standalone/Source/Editor/ProfilerEditor.cpp b/Code/Tools/Standalone/Source/Editor/ProfilerEditor.cpp deleted file mode 100644 index 6ad05a08b2..0000000000 --- a/Code/Tools/Standalone/Source/Editor/ProfilerEditor.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "ProfilerEditor.h" -#include - -#if defined(AZ_COMPILER_MSVC) -#include "resource.h" -#endif - -#include -#include -#include - -// Editor.cpp : Defines the entry point for the application. - -int main(int argc, char* argv[]) -{ - // here we free the console (and close the console window) in release. - - int exitCode = 0; - - { - if (!AZ::AllocatorInstance::IsReady()) - { - AZ::AllocatorInstance::Create(); - } - - AZStd::unique_ptr fileIO = AZStd::unique_ptr(aznew AZ::IO::LocalFileIO()); - AZ::IO::FileIOBase::SetInstance(fileIO.get()); - - Driller::Application app(argc, argv); - - QString procName; - { - QCoreApplication qca(argc, argv); - procName = QFileInfo(qca.applicationFilePath()).fileName(); - } - - LegacyFramework::ApplicationDesc desc(procName.toUtf8().data(), argc, argv); - desc.m_applicationModule = NULL; - desc.m_enableProjectManager = false; - - exitCode = app.Run(desc); - // this call will block until someone tells the core app to shut down via a bus message. - // the bus message is usually sent (in gui mode) in response to pressing the quit button or something. - // in an app that does not require GUI to be manufactured or use GUI windows, you should still call RUN - // but make a component which does your processing, in response to RestoreState(). in the CoreMessages bus. - // RestoreState will always be called right before the main message pump activates. - // and will then block until someone calls: - /*EBUS_EVENT(UIFramework::FrameworkMessages::Bus, UserWantsToQuit); */ - // so ideally to make a file processor or something, simply call app.Initialize(.... but with false as the gui mode ... ) - // and make at least one component which starts processing in response to CoreMessages::RestoreState(), and then sends UserWantsToQuit() once it has done its processing. - // calling UserWantsToQuit will simply queue the quit, so its safe to call from any thread. - // your components can query EBUS_EVENT_RESULT(res, LegacyFramework::FrameworkApplicationMessages::IsRunningInGUIMode) to determine - // if its in GUI mode or not. - } - - return exitCode; -} diff --git a/Code/Tools/Standalone/Source/Editor/ProfilerEditor.h b/Code/Tools/Standalone/Source/Editor/ProfilerEditor.h deleted file mode 100644 index d2963c0bf0..0000000000 --- a/Code/Tools/Standalone/Source/Editor/ProfilerEditor.h +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once diff --git a/Code/Tools/Standalone/Source/Editor/ProfilerEditor.rc b/Code/Tools/Standalone/Source/Editor/ProfilerEditor.rc deleted file mode 100644 index 558be5df81..0000000000 Binary files a/Code/Tools/Standalone/Source/Editor/ProfilerEditor.rc and /dev/null differ diff --git a/Code/Tools/Standalone/Source/Editor/profile_icon.ico b/Code/Tools/Standalone/Source/Editor/profile_icon.ico deleted file mode 100644 index 818eef381f..0000000000 --- a/Code/Tools/Standalone/Source/Editor/profile_icon.ico +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b4863291cd214b33baf55b42e4184e6e2d6de02bcc621d6b037f5d1aab7b978a -size 2238 diff --git a/Code/Tools/Standalone/standalone_tools_files.cmake b/Code/Tools/Standalone/standalone_tools_files.cmake deleted file mode 100644 index d463f932a7..0000000000 --- a/Code/Tools/Standalone/standalone_tools_files.cmake +++ /dev/null @@ -1,20 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -set(FILES - targetver.h - Source/StandaloneToolsApplication.cpp - Source/StandaloneToolsApplication.h - Source/Editor/Resource.h - Source/Editor/targetver.h - Source/Telemetry/TelemetryBus.h - Source/Telemetry/TelemetryComponent.cpp - Source/Telemetry/TelemetryComponent.h - Source/Telemetry/TelemetryEvent.cpp - Source/Telemetry/TelemetryEvent.h -) diff --git a/Gems/AWSClientAuth/Code/CMakeLists.txt b/Gems/AWSClientAuth/Code/CMakeLists.txt index bd8b174b65..1f0c119f5a 100644 --- a/Gems/AWSClientAuth/Code/CMakeLists.txt +++ b/Gems/AWSClientAuth/Code/CMakeLists.txt @@ -15,9 +15,9 @@ ly_add_target( awsclientauth_files.cmake INCLUDE_DIRECTORIES PUBLIC - Include/Public + Include PRIVATE - Include/Private + Source BUILD_DEPENDENCIES PRIVATE AZ::AzCore @@ -35,7 +35,7 @@ ly_add_target( awsclientauth_shared_files.cmake INCLUDE_DIRECTORIES PRIVATE - Include/Private + Source BUILD_DEPENDENCIES PRIVATE AZ::AzCore @@ -97,8 +97,8 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) awsclientauth_test_files.cmake INCLUDE_DIRECTORIES PRIVATE - "Include/Private" - "Include/Public" + Source + Include Tests BUILD_DEPENDENCIES PRIVATE diff --git a/Gems/AWSClientAuth/Code/Include/Public/Authentication/AuthenticationProviderBus.h b/Gems/AWSClientAuth/Code/Include/Authentication/AuthenticationProviderBus.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Public/Authentication/AuthenticationProviderBus.h rename to Gems/AWSClientAuth/Code/Include/Authentication/AuthenticationProviderBus.h diff --git a/Gems/AWSClientAuth/Code/Include/Public/Authentication/AuthenticationTokens.h b/Gems/AWSClientAuth/Code/Include/Authentication/AuthenticationTokens.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Public/Authentication/AuthenticationTokens.h rename to Gems/AWSClientAuth/Code/Include/Authentication/AuthenticationTokens.h diff --git a/Gems/AWSClientAuth/Code/Include/Public/Authorization/AWSCognitoAuthorizationBus.h b/Gems/AWSClientAuth/Code/Include/Authorization/AWSCognitoAuthorizationBus.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Public/Authorization/AWSCognitoAuthorizationBus.h rename to Gems/AWSClientAuth/Code/Include/Authorization/AWSCognitoAuthorizationBus.h diff --git a/Gems/AWSClientAuth/Code/Include/Public/Authorization/ClientAuthAWSCredentials.h b/Gems/AWSClientAuth/Code/Include/Authorization/ClientAuthAWSCredentials.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Public/Authorization/ClientAuthAWSCredentials.h rename to Gems/AWSClientAuth/Code/Include/Authorization/ClientAuthAWSCredentials.h diff --git a/Gems/AWSClientAuth/Code/Include/Public/UserManagement/AWSCognitoUserManagementBus.h b/Gems/AWSClientAuth/Code/Include/UserManagement/AWSCognitoUserManagementBus.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Public/UserManagement/AWSCognitoUserManagementBus.h rename to Gems/AWSClientAuth/Code/Include/UserManagement/AWSCognitoUserManagementBus.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthBus.h b/Gems/AWSClientAuth/Code/Source/AWSClientAuthBus.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthBus.h rename to Gems/AWSClientAuth/Code/Source/AWSClientAuthBus.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthModule.h b/Gems/AWSClientAuth/Code/Source/AWSClientAuthModule.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthModule.h rename to Gems/AWSClientAuth/Code/Source/AWSClientAuthModule.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthResourceMappingConstants.h b/Gems/AWSClientAuth/Code/Source/AWSClientAuthResourceMappingConstants.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthResourceMappingConstants.h rename to Gems/AWSClientAuth/Code/Source/AWSClientAuthResourceMappingConstants.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthSystemComponent.h b/Gems/AWSClientAuth/Code/Source/AWSClientAuthSystemComponent.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthSystemComponent.h rename to Gems/AWSClientAuth/Code/Source/AWSClientAuthSystemComponent.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/AWSCognitoAuthenticationProvider.h b/Gems/AWSClientAuth/Code/Source/Authentication/AWSCognitoAuthenticationProvider.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/AWSCognitoAuthenticationProvider.h rename to Gems/AWSClientAuth/Code/Source/Authentication/AWSCognitoAuthenticationProvider.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationNotificationBusBehaviorHandler.h b/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationNotificationBusBehaviorHandler.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationNotificationBusBehaviorHandler.h rename to Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationNotificationBusBehaviorHandler.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderInterface.h b/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderInterface.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderInterface.h rename to Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderInterface.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderManager.h b/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderManager.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderManager.h rename to Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderManager.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderScriptCanvasBus.h b/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderScriptCanvasBus.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderScriptCanvasBus.h rename to Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderScriptCanvasBus.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderTypes.h b/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderTypes.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderTypes.h rename to Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderTypes.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/GoogleAuthenticationProvider.h b/Gems/AWSClientAuth/Code/Source/Authentication/GoogleAuthenticationProvider.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/GoogleAuthenticationProvider.h rename to Gems/AWSClientAuth/Code/Source/Authentication/GoogleAuthenticationProvider.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/LWAAuthenticationProvider.h b/Gems/AWSClientAuth/Code/Source/Authentication/LWAAuthenticationProvider.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/LWAAuthenticationProvider.h rename to Gems/AWSClientAuth/Code/Source/Authentication/LWAAuthenticationProvider.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/OAuthConstants.h b/Gems/AWSClientAuth/Code/Source/Authentication/OAuthConstants.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/OAuthConstants.h rename to Gems/AWSClientAuth/Code/Source/Authentication/OAuthConstants.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h b/Gems/AWSClientAuth/Code/Source/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h rename to Gems/AWSClientAuth/Code/Source/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.h b/Gems/AWSClientAuth/Code/Source/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.h rename to Gems/AWSClientAuth/Code/Source/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSCognitoAuthorizationController.h b/Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationController.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSCognitoAuthorizationController.h rename to Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationController.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSCognitoAuthorizationNotificationBusBehaviorHandler.h b/Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationNotificationBusBehaviorHandler.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSCognitoAuthorizationNotificationBusBehaviorHandler.h rename to Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationNotificationBusBehaviorHandler.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/UserManagement/AWSCognitoUserManagementController.h b/Gems/AWSClientAuth/Code/Source/UserManagement/AWSCognitoUserManagementController.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/UserManagement/AWSCognitoUserManagementController.h rename to Gems/AWSClientAuth/Code/Source/UserManagement/AWSCognitoUserManagementController.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/UserManagement/UserManagementNotificationBusBehaviorHandler.h b/Gems/AWSClientAuth/Code/Source/UserManagement/UserManagementNotificationBusBehaviorHandler.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/UserManagement/UserManagementNotificationBusBehaviorHandler.h rename to Gems/AWSClientAuth/Code/Source/UserManagement/UserManagementNotificationBusBehaviorHandler.h diff --git a/Gems/AWSClientAuth/Code/awsclientauth_files.cmake b/Gems/AWSClientAuth/Code/awsclientauth_files.cmake index 3b07b710e7..5de71210af 100644 --- a/Gems/AWSClientAuth/Code/awsclientauth_files.cmake +++ b/Gems/AWSClientAuth/Code/awsclientauth_files.cmake @@ -7,46 +7,43 @@ # set(FILES - Include/Public/Authentication/AuthenticationProviderBus.h - Include/Public/Authentication/AuthenticationTokens.h - Include/Public/Authorization/AWSCognitoAuthorizationBus.h - Include/Public/Authorization/ClientAuthAWSCredentials.h - Include/Public/UserManagement/AWSCognitoUserManagementBus.h + Include/Authentication/AuthenticationProviderBus.h + Include/Authentication/AuthenticationTokens.h + Include/Authorization/AWSCognitoAuthorizationBus.h + Include/Authorization/ClientAuthAWSCredentials.h + Include/UserManagement/AWSCognitoUserManagementBus.h - Include/Private/AWSClientAuthSystemComponent.h - Include/Private/AWSClientAuthBus.h - Include/Private/AWSClientAuthResourceMappingConstants.h - Include/Private/Authentication/AuthenticationProviderTypes.h - Include/Private/Authentication/AuthenticationProviderScriptCanvasBus.h - Include/Private/Authentication/AuthenticationProviderManager.h - Include/Private/Authentication/AuthenticationNotificationBusBehaviorHandler.h - - Include/Private/Authorization/AWSCognitoAuthorizationController.h - Include/Private/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.h - Include/Private/Authorization/AWSCognitoAuthorizationNotificationBusBehaviorHandler.h - Include/Private/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h - - Include/Private/UserManagement/AWSCognitoUserManagementController.h - Include/Private/UserManagement/UserManagementNotificationBusBehaviorHandler.h - - Include/Private/Authentication/AuthenticationProviderInterface.h - Include/Private/Authentication/OAuthConstants.h - Include/Private/Authentication/AWSCognitoAuthenticationProvider.h - Include/Private/Authentication/LWAAuthenticationProvider.h - Include/Private/Authentication/GoogleAuthenticationProvider.h - Source/AWSClientAuthSystemComponent.cpp - Source/Authentication/AuthenticationTokens.cpp + Source/AWSClientAuthSystemComponent.h + Source/AWSClientAuthBus.h + Source/AWSClientAuthResourceMappingConstants.h + + Source/Authentication/AuthenticationNotificationBusBehaviorHandler.h Source/Authentication/AuthenticationProviderInterface.cpp + Source/Authentication/AuthenticationProviderInterface.h Source/Authentication/AuthenticationProviderManager.cpp + Source/Authentication/AuthenticationProviderManager.h + Source/Authentication/AuthenticationProviderScriptCanvasBus.h + Source/Authentication/AuthenticationProviderTypes.h + Source/Authentication/AuthenticationTokens.cpp Source/Authentication/AWSCognitoAuthenticationProvider.cpp + Source/Authentication/AWSCognitoAuthenticationProvider.h Source/Authentication/LWAAuthenticationProvider.cpp + Source/Authentication/LWAAuthenticationProvider.h Source/Authentication/GoogleAuthenticationProvider.cpp + Source/Authentication/GoogleAuthenticationProvider.h + Source/Authentication/OAuthConstants.h - Source/Authorization/ClientAuthAWSCredentials.cpp - Source/Authorization/AWSCognitoAuthorizationController.cpp - Source/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.cpp Source/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.cpp + Source/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h + Source/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.cpp + Source/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.h + Source/Authorization/AWSCognitoAuthorizationController.cpp + Source/Authorization/AWSCognitoAuthorizationController.h + Source/Authorization/AWSCognitoAuthorizationNotificationBusBehaviorHandler.h + Source/Authorization/ClientAuthAWSCredentials.cpp Source/UserManagement/AWSCognitoUserManagementController.cpp + Source/UserManagement/AWSCognitoUserManagementController.h + Source/UserManagement/UserManagementNotificationBusBehaviorHandler.h ) diff --git a/Gems/AWSClientAuth/Code/awsclientauth_shared_files.cmake b/Gems/AWSClientAuth/Code/awsclientauth_shared_files.cmake index 6297f400fd..cca6184641 100644 --- a/Gems/AWSClientAuth/Code/awsclientauth_shared_files.cmake +++ b/Gems/AWSClientAuth/Code/awsclientauth_shared_files.cmake @@ -7,6 +7,6 @@ # set(FILES - Include/Private/AWSClientAuthModule.h Source/AWSClientAuthModule.cpp + Source/AWSClientAuthModule.h ) diff --git a/Gems/AWSCore/Code/CMakeLists.txt b/Gems/AWSCore/Code/CMakeLists.txt index be7d975016..974f3f03bf 100644 --- a/Gems/AWSCore/Code/CMakeLists.txt +++ b/Gems/AWSCore/Code/CMakeLists.txt @@ -16,10 +16,10 @@ ly_add_target( ${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake INCLUDE_DIRECTORIES PUBLIC - Include/Public + Include ${pal_dir} PRIVATE - Include/Private + Source BUILD_DEPENDENCIES PRIVATE AZ::AzCore @@ -36,7 +36,7 @@ ly_add_target( awscore_shared_files.cmake INCLUDE_DIRECTORIES PRIVATE - Include/Private + Source BUILD_DEPENDENCIES PRIVATE AZ::AzCore @@ -71,10 +71,10 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS) ${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_editor_files.cmake INCLUDE_DIRECTORIES PRIVATE - Include/Private + Source ${pal_dir} PUBLIC - Include/Public + Include BUILD_DEPENDENCIES PRIVATE AZ::AzQtComponents @@ -93,7 +93,7 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS) awscore_editor_shared_files.cmake INCLUDE_DIRECTORIES PRIVATE - Include/Private + Source BUILD_DEPENDENCIES PRIVATE AZ::AzCore @@ -112,7 +112,7 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS) awscore_resourcemappingtool_files.cmake INCLUDE_DIRECTORIES PRIVATE - Include/Private + Source BUILD_DEPENDENCIES PRIVATE Gem::AWSCore.Editor.Static @@ -156,8 +156,8 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) awscore_tests_files.cmake INCLUDE_DIRECTORIES PRIVATE - Include/Private - Include/Public + Source + Include Tests BUILD_DEPENDENCIES PRIVATE @@ -190,9 +190,9 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) ${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_editor_tests_files.cmake INCLUDE_DIRECTORIES PRIVATE - Include/Private + Source ${pal_dir} - Include/Public + Include Tests COMPILE_DEFINITIONS PRIVATE diff --git a/Gems/AWSCore/Code/Include/Public/AWSCoreBus.h b/Gems/AWSCore/Code/Include/AWSCoreBus.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/AWSCoreBus.h rename to Gems/AWSCore/Code/Include/AWSCoreBus.h diff --git a/Gems/AWSCore/Code/Include/Public/Credential/AWSCredentialBus.h b/Gems/AWSCore/Code/Include/Credential/AWSCredentialBus.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Credential/AWSCredentialBus.h rename to Gems/AWSCore/Code/Include/Credential/AWSCredentialBus.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/AWSApiClientJob.h b/Gems/AWSCore/Code/Include/Framework/AWSApiClientJob.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/AWSApiClientJob.h rename to Gems/AWSCore/Code/Include/Framework/AWSApiClientJob.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/AWSApiClientJobConfig.h b/Gems/AWSCore/Code/Include/Framework/AWSApiClientJobConfig.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/AWSApiClientJobConfig.h rename to Gems/AWSCore/Code/Include/Framework/AWSApiClientJobConfig.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/AWSApiJob.h b/Gems/AWSCore/Code/Include/Framework/AWSApiJob.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/AWSApiJob.h rename to Gems/AWSCore/Code/Include/Framework/AWSApiJob.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/AWSApiJobConfig.h b/Gems/AWSCore/Code/Include/Framework/AWSApiJobConfig.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/AWSApiJobConfig.h rename to Gems/AWSCore/Code/Include/Framework/AWSApiJobConfig.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/AWSApiRequestJob.h b/Gems/AWSCore/Code/Include/Framework/AWSApiRequestJob.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/AWSApiRequestJob.h rename to Gems/AWSCore/Code/Include/Framework/AWSApiRequestJob.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/AWSApiRequestJobConfig.h b/Gems/AWSCore/Code/Include/Framework/AWSApiRequestJobConfig.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/AWSApiRequestJobConfig.h rename to Gems/AWSCore/Code/Include/Framework/AWSApiRequestJobConfig.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/Error.h b/Gems/AWSCore/Code/Include/Framework/Error.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/Error.h rename to Gems/AWSCore/Code/Include/Framework/Error.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/HttpClientComponent.h b/Gems/AWSCore/Code/Include/Framework/HttpClientComponent.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/HttpClientComponent.h rename to Gems/AWSCore/Code/Include/Framework/HttpClientComponent.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/HttpRequestJob.h b/Gems/AWSCore/Code/Include/Framework/HttpRequestJob.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/HttpRequestJob.h rename to Gems/AWSCore/Code/Include/Framework/HttpRequestJob.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/HttpRequestJobConfig.h b/Gems/AWSCore/Code/Include/Framework/HttpRequestJobConfig.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/HttpRequestJobConfig.h rename to Gems/AWSCore/Code/Include/Framework/HttpRequestJobConfig.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/JobExecuter.h b/Gems/AWSCore/Code/Include/Framework/JobExecuter.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/JobExecuter.h rename to Gems/AWSCore/Code/Include/Framework/JobExecuter.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/JsonObjectHandler.h b/Gems/AWSCore/Code/Include/Framework/JsonObjectHandler.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/JsonObjectHandler.h rename to Gems/AWSCore/Code/Include/Framework/JsonObjectHandler.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/JsonWriter.h b/Gems/AWSCore/Code/Include/Framework/JsonWriter.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/JsonWriter.h rename to Gems/AWSCore/Code/Include/Framework/JsonWriter.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/MultipartFormData.h b/Gems/AWSCore/Code/Include/Framework/MultipartFormData.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/MultipartFormData.h rename to Gems/AWSCore/Code/Include/Framework/MultipartFormData.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/RequestBuilder.h b/Gems/AWSCore/Code/Include/Framework/RequestBuilder.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/RequestBuilder.h rename to Gems/AWSCore/Code/Include/Framework/RequestBuilder.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/ServiceClientJob.h b/Gems/AWSCore/Code/Include/Framework/ServiceClientJob.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/ServiceClientJob.h rename to Gems/AWSCore/Code/Include/Framework/ServiceClientJob.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/ServiceClientJobConfig.h b/Gems/AWSCore/Code/Include/Framework/ServiceClientJobConfig.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/ServiceClientJobConfig.h rename to Gems/AWSCore/Code/Include/Framework/ServiceClientJobConfig.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/ServiceJob.h b/Gems/AWSCore/Code/Include/Framework/ServiceJob.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/ServiceJob.h rename to Gems/AWSCore/Code/Include/Framework/ServiceJob.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/ServiceJobConfig.h b/Gems/AWSCore/Code/Include/Framework/ServiceJobConfig.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/ServiceJobConfig.h rename to Gems/AWSCore/Code/Include/Framework/ServiceJobConfig.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/ServiceJobUtil.h b/Gems/AWSCore/Code/Include/Framework/ServiceJobUtil.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/ServiceJobUtil.h rename to Gems/AWSCore/Code/Include/Framework/ServiceJobUtil.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/ServiceRequestJob.h b/Gems/AWSCore/Code/Include/Framework/ServiceRequestJob.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/ServiceRequestJob.h rename to Gems/AWSCore/Code/Include/Framework/ServiceRequestJob.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/ServiceRequestJobConfig.h b/Gems/AWSCore/Code/Include/Framework/ServiceRequestJobConfig.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/ServiceRequestJobConfig.h rename to Gems/AWSCore/Code/Include/Framework/ServiceRequestJobConfig.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/Util.h b/Gems/AWSCore/Code/Include/Framework/Util.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/Util.h rename to Gems/AWSCore/Code/Include/Framework/Util.h diff --git a/Gems/AWSCore/Code/Include/Public/ResourceMapping/AWSResourceMappingBus.h b/Gems/AWSCore/Code/Include/ResourceMapping/AWSResourceMappingBus.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/ResourceMapping/AWSResourceMappingBus.h rename to Gems/AWSCore/Code/Include/ResourceMapping/AWSResourceMappingBus.h diff --git a/Gems/AWSCore/Code/Include/Public/ScriptCanvas/AWSScriptBehaviorDynamoDB.h b/Gems/AWSCore/Code/Include/ScriptCanvas/AWSScriptBehaviorDynamoDB.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/ScriptCanvas/AWSScriptBehaviorDynamoDB.h rename to Gems/AWSCore/Code/Include/ScriptCanvas/AWSScriptBehaviorDynamoDB.h diff --git a/Gems/AWSCore/Code/Include/Public/ScriptCanvas/AWSScriptBehaviorLambda.h b/Gems/AWSCore/Code/Include/ScriptCanvas/AWSScriptBehaviorLambda.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/ScriptCanvas/AWSScriptBehaviorLambda.h rename to Gems/AWSCore/Code/Include/ScriptCanvas/AWSScriptBehaviorLambda.h diff --git a/Gems/AWSCore/Code/Include/Public/ScriptCanvas/AWSScriptBehaviorS3.h b/Gems/AWSCore/Code/Include/ScriptCanvas/AWSScriptBehaviorS3.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/ScriptCanvas/AWSScriptBehaviorS3.h rename to Gems/AWSCore/Code/Include/ScriptCanvas/AWSScriptBehaviorS3.h diff --git a/Gems/AWSCore/Code/Include/Public/ScriptCanvas/AWSScriptBehaviorsComponent.h b/Gems/AWSCore/Code/Include/ScriptCanvas/AWSScriptBehaviorsComponent.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/ScriptCanvas/AWSScriptBehaviorsComponent.h rename to Gems/AWSCore/Code/Include/ScriptCanvas/AWSScriptBehaviorsComponent.h diff --git a/Gems/AWSCore/Code/Include/Private/AWSCoreEditorModule.h b/Gems/AWSCore/Code/Source/AWSCoreEditorModule.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/AWSCoreEditorModule.h rename to Gems/AWSCore/Code/Source/AWSCoreEditorModule.h diff --git a/Gems/AWSCore/Code/Include/Private/AWSCoreEditorSystemComponent.h b/Gems/AWSCore/Code/Source/AWSCoreEditorSystemComponent.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/AWSCoreEditorSystemComponent.h rename to Gems/AWSCore/Code/Source/AWSCoreEditorSystemComponent.h diff --git a/Gems/AWSCore/Code/Include/Private/AWSCoreInternalBus.h b/Gems/AWSCore/Code/Source/AWSCoreInternalBus.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/AWSCoreInternalBus.h rename to Gems/AWSCore/Code/Source/AWSCoreInternalBus.h diff --git a/Gems/AWSCore/Code/Include/Private/AWSCoreModule.h b/Gems/AWSCore/Code/Source/AWSCoreModule.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/AWSCoreModule.h rename to Gems/AWSCore/Code/Source/AWSCoreModule.h diff --git a/Gems/AWSCore/Code/Include/Private/AWSCoreSystemComponent.h b/Gems/AWSCore/Code/Source/AWSCoreSystemComponent.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/AWSCoreSystemComponent.h rename to Gems/AWSCore/Code/Source/AWSCoreSystemComponent.h diff --git a/Gems/AWSCore/Code/Include/Private/Configuration/AWSCoreConfiguration.h b/Gems/AWSCore/Code/Source/Configuration/AWSCoreConfiguration.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Configuration/AWSCoreConfiguration.h rename to Gems/AWSCore/Code/Source/Configuration/AWSCoreConfiguration.h diff --git a/Gems/AWSCore/Code/Include/Private/Credential/AWSCVarCredentialHandler.h b/Gems/AWSCore/Code/Source/Credential/AWSCVarCredentialHandler.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Credential/AWSCVarCredentialHandler.h rename to Gems/AWSCore/Code/Source/Credential/AWSCVarCredentialHandler.h diff --git a/Gems/AWSCore/Code/Include/Private/Credential/AWSCredentialManager.h b/Gems/AWSCore/Code/Source/Credential/AWSCredentialManager.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Credential/AWSCredentialManager.h rename to Gems/AWSCore/Code/Source/Credential/AWSCredentialManager.h diff --git a/Gems/AWSCore/Code/Include/Private/Credential/AWSDefaultCredentialHandler.h b/Gems/AWSCore/Code/Source/Credential/AWSDefaultCredentialHandler.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Credential/AWSDefaultCredentialHandler.h rename to Gems/AWSCore/Code/Source/Credential/AWSDefaultCredentialHandler.h diff --git a/Gems/AWSCore/Code/Include/Private/Editor/AWSCoreEditorManager.h b/Gems/AWSCore/Code/Source/Editor/AWSCoreEditorManager.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Editor/AWSCoreEditorManager.h rename to Gems/AWSCore/Code/Source/Editor/AWSCoreEditorManager.h diff --git a/Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSAttributionServiceApi.h b/Gems/AWSCore/Code/Source/Editor/Attribution/AWSAttributionServiceApi.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSAttributionServiceApi.h rename to Gems/AWSCore/Code/Source/Editor/Attribution/AWSAttributionServiceApi.h diff --git a/Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSCoreAttributionConsentDialog.h b/Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionConsentDialog.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSCoreAttributionConsentDialog.h rename to Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionConsentDialog.h diff --git a/Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSCoreAttributionConstant.h b/Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionConstant.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSCoreAttributionConstant.h rename to Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionConstant.h diff --git a/Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSCoreAttributionManager.h b/Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionManager.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSCoreAttributionManager.h rename to Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionManager.h diff --git a/Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSCoreAttributionMetric.h b/Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionMetric.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSCoreAttributionMetric.h rename to Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionMetric.h diff --git a/Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSCoreAttributionSystemComponent.h b/Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionSystemComponent.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSCoreAttributionSystemComponent.h rename to Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionSystemComponent.h diff --git a/Gems/AWSCore/Code/Include/Private/Editor/Constants/AWSCoreEditorMenuLinks.h b/Gems/AWSCore/Code/Source/Editor/Constants/AWSCoreEditorMenuLinks.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Editor/Constants/AWSCoreEditorMenuLinks.h rename to Gems/AWSCore/Code/Source/Editor/Constants/AWSCoreEditorMenuLinks.h diff --git a/Gems/AWSCore/Code/Include/Private/Editor/Constants/AWSCoreEditorMenuNames.h b/Gems/AWSCore/Code/Source/Editor/Constants/AWSCoreEditorMenuNames.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Editor/Constants/AWSCoreEditorMenuNames.h rename to Gems/AWSCore/Code/Source/Editor/Constants/AWSCoreEditorMenuNames.h diff --git a/Gems/AWSCore/Code/Include/Private/Editor/UI/AWSCoreEditorMenu.h b/Gems/AWSCore/Code/Source/Editor/UI/AWSCoreEditorMenu.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Editor/UI/AWSCoreEditorMenu.h rename to Gems/AWSCore/Code/Source/Editor/UI/AWSCoreEditorMenu.h diff --git a/Gems/AWSCore/Code/Include/Private/Editor/UI/AWSCoreResourceMappingToolAction.h b/Gems/AWSCore/Code/Source/Editor/UI/AWSCoreResourceMappingToolAction.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Editor/UI/AWSCoreResourceMappingToolAction.h rename to Gems/AWSCore/Code/Source/Editor/UI/AWSCoreResourceMappingToolAction.h diff --git a/Gems/AWSCore/Code/Include/Private/ResourceMapping/AWSResourceMappingConstants.h b/Gems/AWSCore/Code/Source/ResourceMapping/AWSResourceMappingConstants.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/ResourceMapping/AWSResourceMappingConstants.h rename to Gems/AWSCore/Code/Source/ResourceMapping/AWSResourceMappingConstants.h diff --git a/Gems/AWSCore/Code/Include/Private/ResourceMapping/AWSResourceMappingManager.h b/Gems/AWSCore/Code/Source/ResourceMapping/AWSResourceMappingManager.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/ResourceMapping/AWSResourceMappingManager.h rename to Gems/AWSCore/Code/Source/ResourceMapping/AWSResourceMappingManager.h diff --git a/Gems/AWSCore/Code/Include/Private/ResourceMapping/AWSResourceMappingUtils.h b/Gems/AWSCore/Code/Source/ResourceMapping/AWSResourceMappingUtils.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/ResourceMapping/AWSResourceMappingUtils.h rename to Gems/AWSCore/Code/Source/ResourceMapping/AWSResourceMappingUtils.h diff --git a/Gems/AWSCore/Code/Tests/Editor/Attribution/AWSCoreAttributionManagerTest.cpp b/Gems/AWSCore/Code/Tests/Editor/Attribution/AWSCoreAttributionManagerTest.cpp index 37a8c0f6d4..e996e0b9c0 100644 --- a/Gems/AWSCore/Code/Tests/Editor/Attribution/AWSCoreAttributionManagerTest.cpp +++ b/Gems/AWSCore/Code/Tests/Editor/Attribution/AWSCoreAttributionManagerTest.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include diff --git a/Gems/AWSCore/Code/awscore_editor_files.cmake b/Gems/AWSCore/Code/awscore_editor_files.cmake index 44ba91a5d3..ebca45454e 100644 --- a/Gems/AWSCore/Code/awscore_editor_files.cmake +++ b/Gems/AWSCore/Code/awscore_editor_files.cmake @@ -7,25 +7,25 @@ # set(FILES - Include/Private/AWSCoreEditorSystemComponent.h - Include/Private/Editor/Attribution/AWSCoreAttributionConstant.h - Include/Private/Editor/Attribution/AWSCoreAttributionMetric.h - Include/Private/Editor/Attribution/AWSCoreAttributionManager.h - Include/Private/Editor/Attribution/AWSCoreAttributionSystemComponent.h - Include/Private/Editor/Attribution/AWSAttributionServiceApi.h - Include/Private/Editor/Attribution/AWSCoreAttributionConsentDialog.h - Include/Private/Editor/AWSCoreEditorManager.h - Include/Private/Editor/Constants/AWSCoreEditorMenuLinks.h - Include/Private/Editor/Constants/AWSCoreEditorMenuNames.h - Include/Private/Editor/UI/AWSCoreEditorMenu.h - Include/Private/Editor/UI/AWSCoreResourceMappingToolAction.h Source/AWSCoreEditorSystemComponent.cpp - Source/Editor/AWSCoreEditorManager.cpp + Source/AWSCoreEditorSystemComponent.h + Source/Editor/Attribution/AWSCoreAttributionConstant.h Source/Editor/Attribution/AWSCoreAttributionMetric.cpp + Source/Editor/Attribution/AWSCoreAttributionMetric.h Source/Editor/Attribution/AWSCoreAttributionManager.cpp + Source/Editor/Attribution/AWSCoreAttributionManager.h Source/Editor/Attribution/AWSCoreAttributionSystemComponent.cpp + Source/Editor/Attribution/AWSCoreAttributionSystemComponent.h Source/Editor/Attribution/AWSAttributionServiceApi.cpp + Source/Editor/Attribution/AWSAttributionServiceApi.h Source/Editor/Attribution/AWSCoreAttributionConsentDialog.cpp + Source/Editor/Attribution/AWSCoreAttributionConsentDialog.h + Source/Editor/AWSCoreEditorManager.cpp + Source/Editor/AWSCoreEditorManager.h + Source/Editor/Constants/AWSCoreEditorMenuLinks.h + Source/Editor/Constants/AWSCoreEditorMenuNames.h Source/Editor/UI/AWSCoreEditorMenu.cpp + Source/Editor/UI/AWSCoreEditorMenu.h Source/Editor/UI/AWSCoreResourceMappingToolAction.cpp + Source/Editor/UI/AWSCoreResourceMappingToolAction.h ) diff --git a/Gems/AWSCore/Code/awscore_editor_shared_files.cmake b/Gems/AWSCore/Code/awscore_editor_shared_files.cmake index b44a9ffcb1..8bf2abc7e0 100644 --- a/Gems/AWSCore/Code/awscore_editor_shared_files.cmake +++ b/Gems/AWSCore/Code/awscore_editor_shared_files.cmake @@ -7,6 +7,6 @@ # set(FILES - Include/Private/AWSCoreEditorModule.h Source/AWSCoreEditorModule.cpp + Source/AWSCoreEditorModule.h ) diff --git a/Gems/AWSCore/Code/awscore_files.cmake b/Gems/AWSCore/Code/awscore_files.cmake index 34c05891a7..9abc162f8a 100644 --- a/Gems/AWSCore/Code/awscore_files.cmake +++ b/Gems/AWSCore/Code/awscore_files.cmake @@ -7,50 +7,54 @@ # set(FILES - Include/Public/AWSCoreBus.h - Include/Public/Credential/AWSCredentialBus.h - Include/Public/Framework/AWSApiClientJob.h - Include/Public/Framework/AWSApiClientJobConfig.h - Include/Public/Framework/AWSApiJob.h - Include/Public/Framework/AWSApiJobConfig.h - Include/Public/Framework/AWSApiRequestJob.h - Include/Public/Framework/AWSApiRequestJobConfig.h - Include/Public/Framework/Error.h - Include/Public/Framework/HttpClientComponent.h - Include/Public/Framework/HttpRequestJob.h - Include/Public/Framework/HttpRequestJobConfig.h - Include/Public/Framework/JobExecuter.h - Include/Public/Framework/JsonObjectHandler.h - Include/Public/Framework/JsonWriter.h - Include/Public/Framework/MultipartFormData.h - Include/Public/Framework/RequestBuilder.h - Include/Public/Framework/ServiceClientJob.h - Include/Public/Framework/ServiceClientJobConfig.h - Include/Public/Framework/ServiceJob.h - Include/Public/Framework/ServiceJobConfig.h - Include/Public/Framework/ServiceJobUtil.h - Include/Public/Framework/ServiceRequestJob.h - Include/Public/Framework/ServiceRequestJobConfig.h - Include/Public/Framework/Util.h - Include/Public/ResourceMapping/AWSResourceMappingBus.h - Include/Public/ScriptCanvas/AWSScriptBehaviorDynamoDB.h - Include/Public/ScriptCanvas/AWSScriptBehaviorLambda.h - Include/Public/ScriptCanvas/AWSScriptBehaviorS3.h - Include/Public/ScriptCanvas/AWSScriptBehaviorsComponent.h - Include/Private/AWSCoreInternalBus.h - Include/Private/AWSCoreSystemComponent.h - Include/Private/Configuration/AWSCoreConfiguration.h - Include/Private/Credential/AWSCredentialManager.h - Include/Private/Credential/AWSCVarCredentialHandler.h - Include/Private/Credential/AWSDefaultCredentialHandler.h - Include/Private/ResourceMapping/AWSResourceMappingConstants.h - Include/Private/ResourceMapping/AWSResourceMappingManager.h - Include/Private/ResourceMapping/AWSResourceMappingUtils.h + Include/AWSCoreBus.h + Include/Credential/AWSCredentialBus.h + Include/Framework/AWSApiClientJob.h + Include/Framework/AWSApiClientJobConfig.h + Include/Framework/AWSApiJob.h + Include/Framework/AWSApiJobConfig.h + Include/Framework/AWSApiRequestJob.h + Include/Framework/AWSApiRequestJobConfig.h + Include/Framework/Error.h + Include/Framework/HttpClientComponent.h + Include/Framework/HttpRequestJob.h + Include/Framework/HttpRequestJobConfig.h + Include/Framework/JobExecuter.h + Include/Framework/JsonObjectHandler.h + Include/Framework/JsonWriter.h + Include/Framework/MultipartFormData.h + Include/Framework/RequestBuilder.h + Include/Framework/ServiceClientJob.h + Include/Framework/ServiceClientJobConfig.h + Include/Framework/ServiceJob.h + Include/Framework/ServiceJobConfig.h + Include/Framework/ServiceJobUtil.h + Include/Framework/ServiceRequestJob.h + Include/Framework/ServiceRequestJobConfig.h + Include/Framework/Util.h + Include/ResourceMapping/AWSResourceMappingBus.h + Include/ScriptCanvas/AWSScriptBehaviorDynamoDB.h + Include/ScriptCanvas/AWSScriptBehaviorLambda.h + Include/ScriptCanvas/AWSScriptBehaviorS3.h + Include/ScriptCanvas/AWSScriptBehaviorsComponent.h + + Source/AWSCoreInternalBus.h Source/AWSCoreSystemComponent.cpp + Source/AWSCoreSystemComponent.h Source/Configuration/AWSCoreConfiguration.cpp + Source/Configuration/AWSCoreConfiguration.h Source/Credential/AWSCredentialManager.cpp + Source/Credential/AWSCredentialManager.h Source/Credential/AWSCVarCredentialHandler.cpp + Source/Credential/AWSCVarCredentialHandler.h Source/Credential/AWSDefaultCredentialHandler.cpp + Source/Credential/AWSDefaultCredentialHandler.h + Source/ResourceMapping/AWSResourceMappingConstants.h + Source/ResourceMapping/AWSResourceMappingManager.cpp + Source/ResourceMapping/AWSResourceMappingManager.h + Source/ResourceMapping/AWSResourceMappingUtils.cpp + Source/ResourceMapping/AWSResourceMappingUtils.h + Source/Framework/AWSApiJob.cpp Source/Framework/AWSApiJobConfig.cpp Source/Framework/Error.cpp @@ -61,8 +65,6 @@ set(FILES Source/Framework/RequestBuilder.cpp Source/Framework/ServiceJob.cpp Source/Framework/ServiceJobConfig.cpp - Source/ResourceMapping/AWSResourceMappingManager.cpp - Source/ResourceMapping/AWSResourceMappingUtils.cpp Source/ScriptCanvas/AWSScriptBehaviorDynamoDB.cpp Source/ScriptCanvas/AWSScriptBehaviorLambda.cpp Source/ScriptCanvas/AWSScriptBehaviorS3.cpp diff --git a/Gems/AWSCore/Code/awscore_shared_files.cmake b/Gems/AWSCore/Code/awscore_shared_files.cmake index efe6966b26..4ce375b95a 100644 --- a/Gems/AWSCore/Code/awscore_shared_files.cmake +++ b/Gems/AWSCore/Code/awscore_shared_files.cmake @@ -7,6 +7,6 @@ # set(FILES - Include/Private/AWSCoreModule.h Source/AWSCoreModule.cpp + Source/AWSCoreModule.h ) diff --git a/Gems/AWSMetrics/Code/CMakeLists.txt b/Gems/AWSMetrics/Code/CMakeLists.txt index 2e78ee8c42..1da4e7f96f 100644 --- a/Gems/AWSMetrics/Code/CMakeLists.txt +++ b/Gems/AWSMetrics/Code/CMakeLists.txt @@ -13,9 +13,9 @@ ly_add_target( awsmetrics_files.cmake INCLUDE_DIRECTORIES PUBLIC - Include/Public + Include PRIVATE - Include/Private + Source BUILD_DEPENDENCIES PRIVATE AZ::AzCore @@ -32,9 +32,9 @@ ly_add_target( awsmetrics_shared_files.cmake INCLUDE_DIRECTORIES PUBLIC - Include/Public + Include PRIVATE - Include/Private + Source BUILD_DEPENDENCIES PRIVATE AZ::AzCore @@ -88,8 +88,8 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) awsmetrics_tests_files.cmake INCLUDE_DIRECTORIES PRIVATE - Include/Private - Include/Public + Include + Source Tests BUILD_DEPENDENCIES PRIVATE diff --git a/Gems/AWSMetrics/Code/Include/Public/AWSMetricsBus.h b/Gems/AWSMetrics/Code/Include/AWSMetricsBus.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Public/AWSMetricsBus.h rename to Gems/AWSMetrics/Code/Include/AWSMetricsBus.h diff --git a/Gems/AWSMetrics/Code/Include/Public/MetricsAttribute.h b/Gems/AWSMetrics/Code/Include/MetricsAttribute.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Public/MetricsAttribute.h rename to Gems/AWSMetrics/Code/Include/MetricsAttribute.h diff --git a/Gems/AWSMetrics/Code/Include/Private/AWSMetricsConstant.h b/Gems/AWSMetrics/Code/Source/AWSMetricsConstant.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/AWSMetricsConstant.h rename to Gems/AWSMetrics/Code/Source/AWSMetricsConstant.h diff --git a/Gems/AWSMetrics/Code/Include/Private/AWSMetricsModule.h b/Gems/AWSMetrics/Code/Source/AWSMetricsModule.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/AWSMetricsModule.h rename to Gems/AWSMetrics/Code/Source/AWSMetricsModule.h diff --git a/Gems/AWSMetrics/Code/Include/Private/AWSMetricsServiceApi.h b/Gems/AWSMetrics/Code/Source/AWSMetricsServiceApi.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/AWSMetricsServiceApi.h rename to Gems/AWSMetrics/Code/Source/AWSMetricsServiceApi.h diff --git a/Gems/AWSMetrics/Code/Include/Private/AWSMetricsSystemComponent.h b/Gems/AWSMetrics/Code/Source/AWSMetricsSystemComponent.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/AWSMetricsSystemComponent.h rename to Gems/AWSMetrics/Code/Source/AWSMetricsSystemComponent.h diff --git a/Gems/AWSMetrics/Code/Include/Private/ClientConfiguration.h b/Gems/AWSMetrics/Code/Source/ClientConfiguration.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/ClientConfiguration.h rename to Gems/AWSMetrics/Code/Source/ClientConfiguration.h diff --git a/Gems/AWSMetrics/Code/Include/Private/DefaultClientIdProvider.h b/Gems/AWSMetrics/Code/Source/DefaultClientIdProvider.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/DefaultClientIdProvider.h rename to Gems/AWSMetrics/Code/Source/DefaultClientIdProvider.h diff --git a/Gems/AWSMetrics/Code/Include/Private/GlobalStatistics.h b/Gems/AWSMetrics/Code/Source/GlobalStatistics.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/GlobalStatistics.h rename to Gems/AWSMetrics/Code/Source/GlobalStatistics.h diff --git a/Gems/AWSMetrics/Code/Include/Private/IdentityProvider.h b/Gems/AWSMetrics/Code/Source/IdentityProvider.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/IdentityProvider.h rename to Gems/AWSMetrics/Code/Source/IdentityProvider.h diff --git a/Gems/AWSMetrics/Code/Include/Private/MetricsEvent.h b/Gems/AWSMetrics/Code/Source/MetricsEvent.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/MetricsEvent.h rename to Gems/AWSMetrics/Code/Source/MetricsEvent.h diff --git a/Gems/AWSMetrics/Code/Include/Private/MetricsEventBuilder.h b/Gems/AWSMetrics/Code/Source/MetricsEventBuilder.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/MetricsEventBuilder.h rename to Gems/AWSMetrics/Code/Source/MetricsEventBuilder.h diff --git a/Gems/AWSMetrics/Code/Include/Private/MetricsManager.h b/Gems/AWSMetrics/Code/Source/MetricsManager.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/MetricsManager.h rename to Gems/AWSMetrics/Code/Source/MetricsManager.h diff --git a/Gems/AWSMetrics/Code/Include/Private/MetricsQueue.h b/Gems/AWSMetrics/Code/Source/MetricsQueue.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/MetricsQueue.h rename to Gems/AWSMetrics/Code/Source/MetricsQueue.h diff --git a/Gems/AWSMetrics/Code/awsmetrics_files.cmake b/Gems/AWSMetrics/Code/awsmetrics_files.cmake index b1a3a647df..936c5634e1 100644 --- a/Gems/AWSMetrics/Code/awsmetrics_files.cmake +++ b/Gems/AWSMetrics/Code/awsmetrics_files.cmake @@ -7,27 +7,28 @@ # set(FILES - Include/Public/AWSMetricsBus.h - Include/Public/MetricsAttribute.h - Include/Private/AWSMetricsConstant.h - Include/Private/AWSMetricsServiceApi.h - Include/Private/AWSMetricsSystemComponent.h - Include/Private/ClientConfiguration.h - Include/Private/DefaultClientIdProvider.h - Include/Private/GlobalStatistics.h - Include/Private/IdentityProvider.h - Include/Private/MetricsEvent.h - Include/Private/MetricsEventBuilder.h - Include/Private/MetricsManager.h - Include/Private/MetricsQueue.h - Source/ClientConfiguration.cpp - Source/DefaultClientIdProvider.cpp + Include/AWSMetricsBus.h + Include/MetricsAttribute.h + + Source/AWSMetricsConstant.h Source/AWSMetricsServiceApi.cpp + Source/AWSMetricsServiceApi.h Source/AWSMetricsSystemComponent.cpp + Source/AWSMetricsSystemComponent.h + Source/ClientConfiguration.cpp + Source/ClientConfiguration.h + Source/DefaultClientIdProvider.h + Source/DefaultClientIdProvider.cpp + Source/GlobalStatistics.h Source/IdentityProvider.cpp + Source/IdentityProvider.h + Source/MetricsAttribute.cpp Source/MetricsEvent.cpp + Source/MetricsEvent.h Source/MetricsEventBuilder.cpp - Source/MetricsAttribute.cpp + Source/MetricsEventBuilder.h Source/MetricsManager.cpp + Source/MetricsManager.h Source/MetricsQueue.cpp + Source/MetricsQueue.h ) diff --git a/Gems/AWSMetrics/Code/awsmetrics_shared_files.cmake b/Gems/AWSMetrics/Code/awsmetrics_shared_files.cmake index 3366363152..fee62c6f12 100644 --- a/Gems/AWSMetrics/Code/awsmetrics_shared_files.cmake +++ b/Gems/AWSMetrics/Code/awsmetrics_shared_files.cmake @@ -7,6 +7,6 @@ # set(FILES - Include/Private/AWSMetricsModule.h Source/AWSMetricsModule.cpp + Source/AWSMetricsModule.h ) diff --git a/Gems/AssetMemoryAnalyzer/CMakeLists.txt b/Gems/AssetMemoryAnalyzer/CMakeLists.txt deleted file mode 100644 index 2bb380fae3..0000000000 --- a/Gems/AssetMemoryAnalyzer/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -add_subdirectory(Code) diff --git a/Gems/AssetMemoryAnalyzer/Code/CMakeLists.txt b/Gems/AssetMemoryAnalyzer/Code/CMakeLists.txt deleted file mode 100644 index 32eada9614..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/CMakeLists.txt +++ /dev/null @@ -1,69 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -ly_add_target( - NAME AssetMemoryAnalyzer.Static STATIC - NAMESPACE Gem - FILES_CMAKE - assetmemoryanalyzer_files.cmake - INCLUDE_DIRECTORIES - PRIVATE - Source - PUBLIC - Include - BUILD_DEPENDENCIES - PUBLIC - AZ::AzCore - Legacy::CryCommon - Gem::ImGui.Static -) - -ly_add_target( - NAME AssetMemoryAnalyzer ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE} - NAMESPACE Gem - FILES_CMAKE - assetmemoryanalyzer_shared_files.cmake - INCLUDE_DIRECTORIES - PRIVATE - Source - PUBLIC - Include - BUILD_DEPENDENCIES - PRIVATE - Gem::AssetMemoryAnalyzer.Static - RUNTIME_DEPENDENCIES - Gem::ImGui -) - -# AssetMemoryAnalyzer is available in clients and servers. -ly_create_alias(NAME AssetMemoryAnalyzer.Clients NAMESPACE Gem TARGETS Gem::AssetMemoryAnalyzer) -ly_create_alias(NAME AssetMemoryAnalyzer.Servers NAMESPACE Gem TARGETS Gem::AssetMemoryAnalyzer) - -################################################################################ -# Tests -################################################################################ -if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) - ly_add_target( - NAME AssetMemoryAnalyzer.Tests ${PAL_TRAIT_TEST_TARGET_TYPE} - NAMESPACE Gem - FILES_CMAKE - assetmemoryanalyzer_tests_files.cmake - INCLUDE_DIRECTORIES - PRIVATE - Source - Tests - BUILD_DEPENDENCIES - PRIVATE - AZ::AzTest - Gem::AssetMemoryAnalyzer.Static - ) - ly_add_googletest( - NAME Gem::AssetMemoryAnalyzer.Tests - ) -endif() - diff --git a/Gems/AssetMemoryAnalyzer/Code/Include/AssetMemoryAnalyzer/AssetMemoryAnalyzerBus.h b/Gems/AssetMemoryAnalyzer/Code/Include/AssetMemoryAnalyzer/AssetMemoryAnalyzerBus.h deleted file mode 100644 index 465fbd18a6..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Include/AssetMemoryAnalyzer/AssetMemoryAnalyzerBus.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include - -namespace AssetMemoryAnalyzer -{ - class FrameAnalysis; - - class AssetMemoryAnalyzerRequests - : public AZ::EBusTraits - { - public: - ////////////////////////////////////////////////////////////////////////// - // EBusTraits overrides - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; - ////////////////////////////////////////////////////////////////////////// - - // Enables or disables the AssetMemoryAnalyzer. - virtual void SetEnabled(bool enabled = true) = 0; - - // Exports a CSV file that may be imported into a spreadsheet. Top-level assets only, due to the limitations of CSV. Path is optional, defaults to @log@/assetmem-.csv - virtual void ExportCSVFile(const char* path = nullptr) = 0; - - // Exports a JSON file that may be viewed by the web viewer. Path is optional, defaults to @log@/assetmem-.json - virtual void ExportJSONFile(const char* path = nullptr) = 0; - - // Retrieves a frame analysis. (Generally used for testing purposes; use of the gem's private headers are required to inspect this.) - virtual AZStd::shared_ptr GetAnalysis() = 0; - }; - using AssetMemoryAnalyzerRequestBus = AZ::EBus; -} // namespace AssetMemoryAnalyzer diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzer.cpp b/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzer.cpp deleted file mode 100644 index 798da14aa1..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzer.cpp +++ /dev/null @@ -1,330 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "AssetMemoryAnalyzer.h" - -#include -#include -#include -#include -#include - -/////////////////////////////////////////////////////////////////////////////// -// CodePoint hash-table support -/////////////////////////////////////////////////////////////////////////////// - -template<> -struct AZStd::hash -{ - size_t operator()(const AssetMemoryAnalyzer::Data::CodePoint& codePoint) const - { - size_t seed = 0; - AZStd::hash_combine(seed, codePoint.m_file); - AZStd::hash_combine(seed, codePoint.m_line); - - return seed; - } -}; - -namespace AssetMemoryAnalyzer -{ - namespace Data - { - inline bool operator==(const CodePoint& lhs, const CodePoint& rhs) - { - return lhs.m_file == rhs.m_file && - lhs.m_line == rhs.m_line; - } - } -} - -/////////////////////////////////////////////////////////////////////////////// -// AnalyzerImpl class -/////////////////////////////////////////////////////////////////////////////// - -namespace AssetMemoryAnalyzer -{ - class AnalyzerImpl : - public AZ::Debug::MemoryDrillerBus::Handler - { - public: - AZ_TYPE_INFO(AnalyzerImpl, "{E460E4DE-2160-4171-A4B6-3C2DB6692C32}"); - AZ_CLASS_ALLOCATOR(AnalyzerImpl, AZ::Debug::AssetTrackingAllocator, 0); - - AnalyzerImpl(); - ~AnalyzerImpl(); - - // MemoryDrillerBus - void RegisterAllocator(AZ::IAllocator* allocator) override; - void UnregisterAllocator(AZ::IAllocator* allocator) override; - void DumpAllAllocations() override; - void RegisterAllocation(AZ::IAllocator* allocator, void* address, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, unsigned int stackSuppressCount) override; - void UnregisterAllocation(AZ::IAllocator* allocator, void* address, size_t byteSize, size_t alignment, AZ::Debug::AllocationInfo* info) override; - void ReallocateAllocation(AZ::IAllocator* allocator, void* prevAddress, void* newAddress, size_t newByteSize, size_t newAlignment) override; - void ResizeAllocation(AZ::IAllocator* allocator, void* address, size_t newSize) override; - - AZStd::shared_ptr GetAnalysis(); - - private: - void RegisterAllocationCommon(void* address, size_t byteSize, const char* fileName, int lineNum, Data::AllocationData::CategoryInfo categoryInfo, Data::AllocationCategories category); - void UnregisterAllocationCommon(void* address); - - using AssetTree = AZ::Debug::AssetTree; - using AssetTreeNode = typename AssetTree::NodeType; - using AllocationTable = AZ::Debug::AllocationTable; - using CodePoints = AZStd::unordered_set, AZStd::equal_to, AZ::Debug::AZStdAssetTrackingAllocator>; - using mutex_type = AZStd::mutex; - using lock_type = AZStd::lock_guard; - - mutex_type m_mutex; - CodePoints m_codePoints; - AssetTree m_assetTree; - AllocationTable m_allocationTable; - AZ::Debug::AssetTracking m_assetTracking; - bool m_captureUncategorizedAllocations = false; - bool m_performingAnalysis = false; - }; - - - /////////////////////////////////////////////////////////////////////////////// - // AnalyzerImpl functions - /////////////////////////////////////////////////////////////////////////////// - - AnalyzerImpl::AnalyzerImpl() : - m_allocationTable(m_mutex), - m_assetTracking(&m_assetTree, &m_allocationTable) - { - AZ::Debug::MemoryDrillerBus::Handler::BusConnect(); - } - - AnalyzerImpl::~AnalyzerImpl() - { - AZ::Debug::MemoryDrillerBus::Handler::BusDisconnect(); - } - - void AnalyzerImpl::RegisterAllocator(AZ::IAllocator* allocator) - { - AZ_UNUSED(allocator); - } - - void AnalyzerImpl::UnregisterAllocator(AZ::IAllocator* allocator) - { - AZ_UNUSED(allocator); - } - - void AnalyzerImpl::DumpAllAllocations() - { - } - - void AnalyzerImpl::RegisterAllocation(AZ::IAllocator* allocator, void* address, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, unsigned int stackSuppressCount) - { - AZ_UNUSED(name); - AZ_UNUSED(alignment); - AZ_UNUSED(stackSuppressCount); - - Data::AllocationData::CategoryInfo categoryInfo; - categoryInfo.m_heapInfo.m_allocator = allocator; - RegisterAllocationCommon(address, byteSize, fileName, lineNum, categoryInfo, Data::AllocationCategories::HEAP); - } - - void AnalyzerImpl::UnregisterAllocation(AZ::IAllocator* allocator, void* address, size_t byteSize, size_t alignment, AZ::Debug::AllocationInfo* info) - { - AZ_UNUSED(allocator); - AZ_UNUSED(byteSize); - AZ_UNUSED(alignment); - AZ_UNUSED(info); - - UnregisterAllocationCommon(address); - } - - void AnalyzerImpl::ReallocateAllocation(AZ::IAllocator* allocator, void* prevAddress, void* newAddress, size_t newByteSize, size_t newAlignment) - { - AZ_UNUSED(allocator); - AZ_UNUSED(newAlignment); - - if (m_performingAnalysis) - { - return; - } - - m_allocationTable.ReallocateAllocation(prevAddress, newAddress, newByteSize); - } - - void AnalyzerImpl::ResizeAllocation(AZ::IAllocator* allocator, void* address, size_t newSize) - { - AZ_UNUSED(allocator); - - if (m_performingAnalysis) - { - return; - } - - m_allocationTable.ResizeAllocation(address, newSize); - } - - void AnalyzerImpl::RegisterAllocationCommon(void* address, size_t byteSize, const char* fileName, int lineNum, Data::AllocationData::CategoryInfo categoryInfo, Data::AllocationCategories category) - { - if (m_performingAnalysis) - { - return; - } - - AZ::Debug::AssetTreeNodeBase* activeAsset = m_assetTracking.GetCurrentThreadAsset(); - - if (!activeAsset) - { - if (m_captureUncategorizedAllocations) - { - activeAsset = &m_assetTree.GetRoot(); - } - else - { - return; - } - } - - { - // Store a record for this allocation, at this code-point - lock_type lock(m_mutex); - auto insertResult = m_codePoints.emplace(Data::CodePoint{ fileName ? fileName : "", lineNum, category }); - Data::CodePoint* cp = &*insertResult.first; - m_allocationTable.Get().emplace(address, AllocationTable::RecordType{ activeAsset, (uint32_t)byteSize, Data::AllocationData{ cp, categoryInfo } }); - static_cast(activeAsset)->m_data.m_totalAllocations[(int)category]++; - } - } - - void AnalyzerImpl::UnregisterAllocationCommon(void* address) - { - if (m_performingAnalysis) - { - return; - } - - { - // Delete the record of this allocation if it exists - lock_type lock(m_mutex); - auto& table = m_allocationTable.Get(); - auto itr = table.find(address); - - if (itr != table.end()) - { - static_cast(itr->second.m_asset)->m_data.m_totalAllocations[(int)itr->second.m_data.m_codePoint->m_category]--; - table.erase(address); - } - } - } - - AZStd::shared_ptr AnalyzerImpl::GetAnalysis() - { - using namespace Data; - - lock_type lock(m_mutex); - m_performingAnalysis = true; // Prevent recursive allocations from disrupting our work - - auto result = AZStd::allocate_shared(AZ::Debug::AZStdAssetTrackingAllocator()); - FrameAnalysis* analysis = result.get(); - - // Walk through all allocations and record their individual contributions to the analysisData for their owning asset - for (auto& allocationInfo : m_allocationTable.Get()) - { - auto assetData = &static_cast(allocationInfo.second.m_asset)->m_data; - auto category = allocationInfo.second.m_data.m_codePoint->m_category; - - // Update total bytes for this asset - assetData->m_totalBytes[(int)category] += allocationInfo.second.m_size; - - // Locate or create a recording of this code point within the analysis for this asset - auto codePointItr = assetData->m_codePointsToAllocations.find(allocationInfo.second.m_data.m_codePoint); - - if (codePointItr == assetData->m_codePointsToAllocations.end()) - { - codePointItr = assetData->m_codePointsToAllocations.emplace(allocationInfo.second.m_data.m_codePoint, AssetData::CodePointInfo()).first; - codePointItr->second.m_category = category; - } - - // Update the code point within the analysis for this asset with information about this allocation - codePointItr->second.m_allocations.emplace_back(AllocationPoint::AllocationInfo{ allocationInfo.second.m_size }); - codePointItr->second.m_totalBytes += allocationInfo.second.m_size; - } - - // Declare function to recurse through the asset tree, converting the analysisData of every node into matching information in the public API (AssetMemory:: namespace) - AZStd::function recurse; - recurse = [&recurse](AssetInfo* outAsset, AssetTreeNode* inAsset, int depth) - { - outAsset->m_id = inAsset->m_primaryinfo ? inAsset->m_primaryinfo->m_id->m_id.c_str() : nullptr; - - // For every code point in this asset node, record its allocations - for (auto& codePointInfo : inAsset->m_data.m_codePointsToAllocations) - { - outAsset->m_allocationPoints.emplace_back(AllocationPoint()); - auto allocationPoint = &outAsset->m_allocationPoints.back(); - allocationPoint->m_codePoint = codePointInfo.first; - allocationPoint->m_allocations.swap(codePointInfo.second.m_allocations); - allocationPoint->m_totalAllocatedMemory = codePointInfo.second.m_totalBytes; - - // Add these allocations to our total count of allocations for this asset - int categoryIndex = (int)codePointInfo.first->m_category; - outAsset->m_localSummary[categoryIndex].m_allocationCount += (uint32_t)allocationPoint->m_allocations.size(); - - // Reserve memory for the next frame, as the number of allocations are unlikely to change much over time - codePointInfo.second.m_allocations.reserve(allocationPoint->m_allocations.size()); - codePointInfo.second.m_totalBytes = 0; // Reset for next frame - } - - // Initialize the local and total summary - for (int categoryIndex = 0; categoryIndex < ALLOCATION_CATEGORY_COUNT; categoryIndex++) - { - outAsset->m_localSummary[categoryIndex].m_allocatedMemory = inAsset->m_data.m_totalBytes[categoryIndex]; - outAsset->m_totalSummary[categoryIndex] = outAsset->m_localSummary[categoryIndex]; - } - - // Recurse over child assets - outAsset->m_childAssets.resize(inAsset->m_children.size()); - size_t childIdx = 0; - - for (auto& inChildItr : inAsset->m_children) - { - auto outChild = &outAsset->m_childAssets[childIdx++]; - recurse(outChild, &inChildItr.second, depth + 1); - - // Have child assets contribute to the total summary - for (int categoryIndex = 0; categoryIndex < ALLOCATION_CATEGORY_COUNT; categoryIndex++) - { - outAsset->m_totalSummary[categoryIndex].m_allocatedMemory += outChild->m_totalSummary[categoryIndex].m_allocatedMemory; - outAsset->m_totalSummary[categoryIndex].m_allocationCount += outChild->m_totalSummary[categoryIndex].m_allocationCount; - } - } - - // Clear analysis data out for the next frame - AZStd::for_each(inAsset->m_data.m_totalBytes, inAsset->m_data.m_totalBytes + ALLOCATION_CATEGORY_COUNT, [](uint32_t& x) { x = 0; }); - }; - - recurse(&analysis->m_rootAsset, static_cast(&m_assetTree.GetRoot()), 0); - - m_performingAnalysis = false; - - return result; - } - - /////////////////////////////////////////////////////////////////////////////// - // Analyzer functions - /////////////////////////////////////////////////////////////////////////////// - - Analyzer::Analyzer() : m_impl(aznew AnalyzerImpl) - { - } - - Analyzer::~Analyzer() - { - } - - AZStd::shared_ptr Analyzer::GetAnalysis() - { - return m_impl->GetAnalysis(); - } -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzer.h b/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzer.h deleted file mode 100644 index 408f2f7f7e..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzer.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include -#include -#include -#include -#include - -namespace AssetMemoryAnalyzer -{ - class AnalyzerImpl; - - namespace Data - { - enum class AllocationCategories - { - HEAP, - VRAM, - - COUNT - }; - - constexpr int ALLOCATION_CATEGORY_COUNT = (int)AllocationCategories::COUNT; - - // A location in code - struct CodePoint - { - const char* m_file; - int m_line; - AllocationCategories m_category; - }; - - // Meta-information to attach to an individual allocation - struct AllocationData - { - union CategoryInfo - { - struct - { - AZ::IAllocator* m_allocator; - } - m_heapInfo; - }; - - CodePoint* m_codePoint; - CategoryInfo m_categoryInfo; - }; - - // Information about a point in code where allocations occur - struct AllocationPoint - { - struct AllocationInfo - { - // Size in bytes - uint32_t m_size; - }; - - using AllocationInfos = AZStd::vector; - - // The point in code where allocations occur - const CodePoint* m_codePoint; - - // Total memory allocated through this code point (will be the sum of m_allocations) - uint32_t m_totalAllocatedMemory = 0; - - // Individual allocations that occurred through this code point - AllocationInfos m_allocations; - }; - - // Summary information about a group of allocations - struct Summary - { - // Total bytes allocated in the group - uint32_t m_allocatedMemory = 0; - - // Total number of separate allocations in the group - uint32_t m_allocationCount = 0; - }; - - // Information about an asset - struct AssetData - { - struct CodePointInfo - { - AllocationPoint::AllocationInfos m_allocations; - uint32_t m_totalBytes = 0; - AllocationCategories m_category; - }; - - uint32_t m_totalAllocations[ALLOCATION_CATEGORY_COUNT]; - uint32_t m_totalBytes[ALLOCATION_CATEGORY_COUNT]; - AZStd::unordered_map, AZStd::equal_to, AZ::Debug::AZStdAssetTrackingAllocator> m_codePointsToAllocations; - }; - - // Information about a specific asset. - struct AssetInfo - { - // Identifier for the asset. - const char* m_id = nullptr; - - // Total allocations/bytes for this asset, including allocations for any child assets. - Summary m_totalSummary[ALLOCATION_CATEGORY_COUNT]; - - // Total allocations/bytes for this asset alone, excluding allocations for child assets. - Summary m_localSummary[ALLOCATION_CATEGORY_COUNT]; - - // Child assets (i.e. assets that enter into scope while this asset is already in scope) - AZStd::vector m_childAssets; - - // Points in code at which this asset has made allocations - AZStd::vector m_allocationPoints; - }; - - typedef AZStd::vector AllocationPoints; - } - - // Analysis of all loaded assets at a moment in time - class FrameAnalysis - { - public: - AZ_TYPE_INFO(FrameAnalysis, "{6B7287A6-EE5E-4A9D-B219-586DAD865537}"); - AZ_CLASS_ALLOCATOR(FrameAnalysis, AZ::Debug::AssetTrackingAllocator, 0); - - const Data::AssetInfo& GetRootAsset() const - { - return m_rootAsset; - } - - const Data::AllocationPoints& GetAllocationPoints() const - { - return m_allocationPoints; - } - - private: - Data::AssetInfo m_rootAsset; - Data::AllocationPoints m_allocationPoints; - - friend AnalyzerImpl; - }; - - class Analyzer - { - public: - AZ_TYPE_INFO(Analyzer, "{00FB30E2-706C-41E6-9BDD-F52A40CF3366}"); - AZ_CLASS_ALLOCATOR(Analyzer, AZ::Debug::AssetTrackingAllocator, 0); - - Analyzer(); - ~Analyzer(); - - AZStd::shared_ptr GetAnalysis(); - - private: - AZStd::unique_ptr m_impl; - }; -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzerModule.cpp b/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzerModule.cpp deleted file mode 100644 index 668c8a5b33..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzerModule.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include - -#include - -#include "AssetMemoryAnalyzerSystemComponent.h" - -#include - -namespace AssetMemoryAnalyzer -{ - class AssetMemoryAnalyzerModule - : public CryHooksModule - { - public: - AZ_RTTI(AssetMemoryAnalyzerModule, "{899B0A20-E21D-49BF-ADAF-A2396C27CFCC}", CryHooksModule); - AZ_CLASS_ALLOCATOR(AssetMemoryAnalyzerModule, AZ::OSAllocator, 0); - - AssetMemoryAnalyzerModule() - : CryHooksModule() - { - // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here. - m_descriptors.insert(m_descriptors.end(), { - AssetMemoryAnalyzerSystemComponent::CreateDescriptor(), - }); - } - - /** - * Add required SystemComponents to the SystemEntity. - */ - AZ::ComponentTypeList GetRequiredSystemComponents() const override - { - return AZ::ComponentTypeList{ - azrtti_typeid(), - }; - } - - void OnCrySystemInitialized([[maybe_unused]] ISystem& system, [[maybe_unused]] const SSystemInitParams& systemInitParams) override - { - REGISTER_CVAR2_CB_DEV_ONLY( - "assetmem_enabled", - &m_cvarEnabled, - 0, - VF_NULL, - "AssetMemoryAnalyzer: Enable or disable the Asset Memory Analyzer.", - [](ICVar* pArgs) - { - bool enabled = pArgs->GetIVal() ? true : false; - EBUS_EVENT(AssetMemoryAnalyzerRequestBus, SetEnabled, enabled); - } - ); - - REGISTER_COMMAND_DEV_ONLY( - "assetmem_export_json", - [](IConsoleCmdArgs*) { EBUS_EVENT(AssetMemoryAnalyzerRequestBus, ExportJSONFile, nullptr); }, - 0, - "AssetMemoryAnalyzer: Export JSON analysis to @log@ directory."); - - REGISTER_COMMAND_DEV_ONLY( - "assetmem_export_csv", - [](IConsoleCmdArgs*) { EBUS_EVENT(AssetMemoryAnalyzerRequestBus, ExportCSVFile, nullptr); }, - 0, - "AssetMemoryAnalyzer: Export CSV analysis to @log@ directory. (Top-level assets only.)"); - - EBUS_EVENT(AssetMemoryAnalyzerRequestBus, SetEnabled, m_cvarEnabled != 0); - } - - private: - int m_cvarEnabled = 0; - }; -} - -// DO NOT MODIFY THIS LINE UNLESS YOU RENAME THE GEM -// The first parameter should be GemName_GemIdLower -// The second should be the fully qualified name of the class above -AZ_DECLARE_MODULE_CLASS(Gem_AssetMemoryAnalyzer, AssetMemoryAnalyzer::AssetMemoryAnalyzerModule) diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzerSystemComponent.cpp b/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzerSystemComponent.cpp deleted file mode 100644 index bf03342149..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzerSystemComponent.cpp +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include - -#include -#include // For AZ_MAX_PATH_LEN -#include -#include - -#include "AssetMemoryAnalyzerSystemComponent.h" - -#include "AssetMemoryAnalyzer.h" -#include "DebugImGUI.h" -#include "ExportCSV.h" -#include "ExportJSON.h" - -namespace AssetMemoryAnalyzer -{ - namespace - { - static const char* GetExportFile(const char* customFilename, const char* extension) - { - static char sharedBuffer[AZ_MAX_PATH_LEN]; - - if (customFilename) - { - azsnprintf(sharedBuffer, AZ_ARRAY_SIZE(sharedBuffer), "@log@/%s", customFilename); - } - else - { - time_t ltime; - time(<ime); - struct tm timeInfo; - AZ_TRAIT_CTIME_LOCALTIME(&timeInfo, <ime); - strftime(sharedBuffer, AZ_ARRAY_SIZE(sharedBuffer), "@log@/assetmem-%Y-%m-%d-%H-%M-%S.", &timeInfo); - azstrcat(sharedBuffer, AZ_ARRAY_SIZE(sharedBuffer), extension); - } - - return sharedBuffer; - } - } - - static const char* VRAM_CATEGORIES[] = - { - "Texture", - "Buffer", - "Misc" - }; - - static const char* VRAM_SUBCATEGORIES[] = - { - "Rendertarget", - "Texture", - "Dynamic", - "VB", - "IB", - "CB", - "Other", - "Misc" - }; - - class AssetMemoryAnalyzerSystemComponent::Impl - { - private: - AZStd::unique_ptr m_analyzer; - DebugImGUI m_debugImGUI; - ExportCSV m_exportCSV; - ExportJSON m_exportJSON; - - friend class AssetMemoryAnalyzerSystemComponent; - }; - - - AssetMemoryAnalyzerSystemComponent::AssetMemoryAnalyzerSystemComponent() : m_impl(new Impl) - { - AZ::AllocatorInstance::Create(); - } - - AssetMemoryAnalyzerSystemComponent::~AssetMemoryAnalyzerSystemComponent() - { - m_impl.reset(); // Must delete objects before destroying the allocator - AZ::AllocatorInstance::Destroy(); - } - - void AssetMemoryAnalyzerSystemComponent::Reflect(AZ::ReflectContext* context) - { - if (AZ::SerializeContext* serialize = azrtti_cast(context)) - { - serialize->Class() - ->Version(0); - - if (AZ::EditContext* ec = serialize->GetEditContext()) - { - ec->Class("AssetMemoryAnalyzer", "Provides access to asset memory debugging features") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("System", 0xc94d118b)) - ->Attribute(AZ::Edit::Attributes::AutoExpand, true) - ; - } - } - } - - void AssetMemoryAnalyzerSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) - { - provided.push_back(AZ_CRC("AssetMemoryAnalyzerService", 0x23c52412)); - } - - void AssetMemoryAnalyzerSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) - { - incompatible.push_back(AZ_CRC("AssetMemoryAnalyzerService", 0x23c52412)); - } - - void AssetMemoryAnalyzerSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required) - { - (void)required; - } - - void AssetMemoryAnalyzerSystemComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent) - { - (void)dependent; - } - - const char** AssetMemoryAnalyzerSystemComponent::GetVRAMCategories() - { - return VRAM_CATEGORIES; - } - - const char** AssetMemoryAnalyzerSystemComponent::GetVRAMSubCategories() - { - return VRAM_SUBCATEGORIES; - } - - bool AssetMemoryAnalyzerSystemComponent::IsEnabled() const - { - return m_impl->m_analyzer.get() != nullptr; - } - - AZStd::shared_ptr AssetMemoryAnalyzerSystemComponent::GetAnalysis() - { - AZStd::shared_ptr result; - - if (m_impl->m_analyzer) - { - result = m_impl->m_analyzer->GetAnalysis(); - } - - return result; - } - - void AssetMemoryAnalyzerSystemComponent::SetEnabled(bool enabled) - { - if (enabled) - { - if (!m_impl->m_analyzer) - { - m_impl->m_analyzer.reset(aznew Analyzer); - } - } - else - { - m_impl->m_analyzer.reset(); - } - } - - void AssetMemoryAnalyzerSystemComponent::ExportCSVFile(const char* path) - { - const char* outputPath = GetExportFile(path, "csv"); - m_impl->m_exportCSV.OutputCSV(outputPath); - } - - void AssetMemoryAnalyzerSystemComponent::ExportJSONFile(const char* path) - { - const char* outputPath = GetExportFile(path, "json"); - m_impl->m_exportJSON.OutputJSON(outputPath); - } - - void AssetMemoryAnalyzerSystemComponent::Init() - { - m_impl->m_debugImGUI.Init(this); - m_impl->m_exportCSV.Init(this); - m_impl->m_exportJSON.Init(this); - } - - void AssetMemoryAnalyzerSystemComponent::Activate() - { - AssetMemoryAnalyzerRequestBus::Handler::BusConnect(); - } - - void AssetMemoryAnalyzerSystemComponent::Deactivate() - { - AssetMemoryAnalyzerRequestBus::Handler::BusDisconnect(); - } -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzerSystemComponent.h b/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzerSystemComponent.h deleted file mode 100644 index 4255205b27..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzerSystemComponent.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include - -#include -#include - -namespace AssetMemoryAnalyzer -{ - class FrameAnalysis; - - class AssetMemoryAnalyzerSystemComponent - : public AZ::Component - , protected AssetMemoryAnalyzerRequestBus::Handler - { - public: - AZ_COMPONENT(AssetMemoryAnalyzerSystemComponent, "{84428E10-24FF-48A7-B5EC-0A28D25C3C68}"); - - AssetMemoryAnalyzerSystemComponent(); - ~AssetMemoryAnalyzerSystemComponent(); - - static void Reflect(AZ::ReflectContext* context); - - static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided); - static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible); - static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required); - static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent); - - static const char** GetVRAMCategories(); - static const char** GetVRAMSubCategories(); - - bool IsEnabled() const; - - //////////////////////////////////////////////////////////////////////// - // AssetMemoryAnalyzerRequestBus interface implementation - void SetEnabled(bool enabled) override; - void ExportCSVFile(const char* path) override; - void ExportJSONFile(const char* path) override; - AZStd::shared_ptr GetAnalysis() override; - //////////////////////////////////////////////////////////////////////// - - protected: - //////////////////////////////////////////////////////////////////////// - // AZ::Component interface implementation - void Init() override; - void Activate() override; - void Deactivate() override; - //////////////////////////////////////////////////////////////////////// - - private: - class Impl; - - private: - AZStd::unique_ptr m_impl; - }; -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/DebugImGUI.cpp b/Gems/AssetMemoryAnalyzer/Code/Source/DebugImGUI.cpp deleted file mode 100644 index c9c123cf70..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/DebugImGUI.cpp +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "AssetMemoryAnalyzer.h" -#include "AssetMemoryAnalyzerSystemComponent.h" -#include "DebugImGUI.h" -#include "FormatUtils.h" - -#include -#include -#include -#include - -namespace AssetMemoryAnalyzer -{ - namespace - { - template - struct SortFunctions - { - static bool SortChildAssetsByAllocatedMemory(const Data::AssetInfo* lhs, const Data::AssetInfo* rhs) - { - return lhs->m_totalSummary[(int)Category].m_allocatedMemory > rhs->m_totalSummary[(int)Category].m_allocatedMemory; - } - - static bool SortAllocationPointsByAllocatedMemory(const Data::AllocationPoint* lhs, const Data::AllocationPoint* rhs) - { - return (lhs->m_codePoint->m_category == rhs->m_codePoint->m_category) ? (lhs->m_totalAllocatedMemory > rhs->m_totalAllocatedMemory) : (lhs->m_codePoint->m_category == Category); - } - - static bool SortChildAssetsByAllocationCount(const Data::AssetInfo* lhs, const Data::AssetInfo* rhs) - { - return lhs->m_totalSummary[(int)Category].m_allocationCount > rhs->m_totalSummary[(int)Category].m_allocationCount; - } - - static bool SortAllocationPointsByAllocationCount(const Data::AllocationPoint* lhs, const Data::AllocationPoint* rhs) - { - return (lhs->m_codePoint->m_category == rhs->m_codePoint->m_category) ? (lhs->m_allocations.size() > rhs->m_allocations.size()) : (lhs->m_codePoint->m_category == Category); - } - - }; - } - - static const ImVec4 COLUMN_HEADER_COLOR(0.7f, 0.4f, 0.2f, 1.0f); - static const float COLUMN_WIDTH = 128.0f; - - DebugImGUI::DebugImGUI() - { - ImGui::ImGuiUpdateListenerBus::Handler::BusConnect(); - } - - DebugImGUI::~DebugImGUI() - { - ImGui::ImGuiUpdateListenerBus::Handler::BusDisconnect(); - } - - void DebugImGUI::Init(AssetMemoryAnalyzerSystemComponent* owner) - { - m_owner = owner; - m_childAssetSortFn = &SortFunctions::SortChildAssetsByAllocatedMemory; - m_allocationPointSortFn = &SortFunctions::SortAllocationPointsByAllocatedMemory; - } - - void DebugImGUI::OnImGuiUpdate() - { - using namespace Data; - - // Append to main menu at top of screen. - if (ImGui::BeginMainMenuBar()) - { - // Add new menu items. - if (ImGui::BeginMenu("AssetMemoryAnalyzer")) - { - if (ImGui::Button(m_enabled == false ? "Open" : "Close")) - { - ImGui::CloseCurrentPopup(); - m_enabled = !m_enabled; - } - - if (ImGui::Button("Export JSON")) - { - EBUS_EVENT(AssetMemoryAnalyzerRequestBus, ExportJSONFile, nullptr); - ImGui::CloseCurrentPopup(); - } - - if (ImGui::Button("Export CSV (top-level only)")) - { - EBUS_EVENT(AssetMemoryAnalyzerRequestBus, ExportCSVFile, nullptr); - ImGui::CloseCurrentPopup(); - } - - ImGui::EndMenu(); - } - - ImGui::EndMainMenuBar(); - } - - if (m_enabled) - { - // Draw the asset memory analysis window and its contents - ImGui::Begin("Asset Memory Analysis", &m_enabled); - -#ifndef AZ_TRACK_ASSET_SCOPES - ImGui::TextColored(ImColor(255, 32, 32), "Asset scope tracking disabled in code. Recompile with AZ_TRACK_ASSET_SCOPES defined (see AssetTracking.h)."); -#endif - if (!m_owner->IsEnabled()) - { - ImGui::TextColored(ImColor(255, 32, 32), "Asset memory analysis must be enabled by setting the \"assetmem_enable\" CVar to 1."); - } - - AZStd::shared_ptr analysis = m_owner->GetAnalysis(); - - if (analysis) - { - if (ImGui::Button("Heap Allocation Size")) - { - m_childAssetSortFn = &SortFunctions::SortChildAssetsByAllocatedMemory; - m_allocationPointSortFn = &SortFunctions::SortAllocationPointsByAllocatedMemory; - } - ImGui::SameLine(); - - if (ImGui::Button("Heap Allocation Count")) - { - m_childAssetSortFn = &SortFunctions::SortChildAssetsByAllocationCount; - m_allocationPointSortFn = &SortFunctions::SortAllocationPointsByAllocationCount; - } - ImGui::SameLine(); - - if (ImGui::Button("VRAM Allocation Size")) - { - m_childAssetSortFn = &SortFunctions::SortChildAssetsByAllocatedMemory; - m_allocationPointSortFn = &SortFunctions::SortAllocationPointsByAllocatedMemory; - } - ImGui::SameLine(); - - if (ImGui::Button("VRAM Allocation Count")) - { - m_childAssetSortFn = &SortFunctions::SortChildAssetsByAllocationCount; - m_allocationPointSortFn = &SortFunctions::SortAllocationPointsByAllocationCount; - } - ImGui::SameLine(); - - if (ImGui::Button("A -> Z")) - { - m_childAssetSortFn = [](const AssetInfo* lhs, const AssetInfo* rhs) { return strcmp(lhs->m_id, rhs->m_id) < 0; }; - m_allocationPointSortFn = [](const AllocationPoint* lhs, const AllocationPoint* rhs) { - int cmp = strcmp(lhs->m_codePoint->m_file, rhs->m_codePoint->m_file); - return (cmp < 0) || (cmp == 0 && lhs->m_codePoint->m_line < rhs->m_codePoint->m_line); - }; - } - - ImGui::Text("Asset/Allocation"); - ImGui::SameLine(); - ImGui::SetCursorPosX(ImGui::GetWindowWidth() - COLUMN_WIDTH * 2); - ImGui::Text("Heap (#/kB)"); - ImGui::SameLine(); - ImGui::SetCursorPosX(ImGui::GetWindowWidth() - COLUMN_WIDTH); - ImGui::Text("VRAM (#/kB)"); - ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(255, 255, 32, 1.0)); - OutputLine("Totals", analysis->GetRootAsset().m_totalSummary[(int)AllocationCategories::HEAP], analysis->GetRootAsset().m_totalSummary[(int)AllocationCategories::VRAM]); - ImGui::PopStyleColor(); - - AZStd::function recurse; - recurse = [this, &recurse](const AssetInfo* asset, int depth) - { - AZStd::vector childAssetSorter; - childAssetSorter.resize(asset->m_childAssets.size()); - AZStd::transform(asset->m_childAssets.begin(), asset->m_childAssets.end(), childAssetSorter.begin(), [](const AssetInfo& ai) { return &ai; }); - AZStd::sort(childAssetSorter.begin(), childAssetSorter.end(), m_childAssetSortFn); - - m_allocationPointSorter.resize(asset->m_allocationPoints.size()); - AZStd::transform(asset->m_allocationPoints.begin(), asset->m_allocationPoints.end(), m_allocationPointSorter.begin(), [](const AllocationPoint& ap) { return ≈ }); - AZStd::sort(m_allocationPointSorter.begin(), m_allocationPointSorter.end(), m_allocationPointSortFn); - - if (asset->m_id) - { - float prevX = ImGui::GetCursorPosX(); - OutputLine(nullptr, asset->m_totalSummary[(int)AllocationCategories::HEAP], asset->m_totalSummary[(int)AllocationCategories::VRAM]); - ImGui::SameLine(); - ImGui::SetCursorPosX(prevX); - if (ImGui::TreeNode(asset->m_id)) - { - prevX = ImGui::GetCursorPosX(); - OutputLine(nullptr, asset->m_localSummary[(int)AllocationCategories::HEAP], asset->m_localSummary[(int)AllocationCategories::VRAM]); - ImGui::SameLine(); - ImGui::SetCursorPosX(prevX); - - if (ImGui::TreeNode("Scope allocations:")) - { - for (auto ap : m_allocationPointSorter) - { - Summary heapSummary; - Summary vramSummary; - - switch (ap->m_codePoint->m_category) - { - case AllocationCategories::HEAP: - ImGui::Text("%s", FormatUtils::FormatCodePoint(*ap->m_codePoint)); - heapSummary.m_allocationCount = static_cast(ap->m_allocations.size()); - heapSummary.m_allocatedMemory = ap->m_totalAllocatedMemory; - break; - - case AllocationCategories::VRAM: - ImGui::Text("%s", ap->m_codePoint->m_file); - vramSummary.m_allocationCount = static_cast(ap->m_allocations.size()); - vramSummary.m_allocatedMemory = ap->m_totalAllocatedMemory; - break; - } - - ImGui::SameLine(); - OutputLine(nullptr, heapSummary, vramSummary); - } - - ImGui::TreePop(); - } - - for (auto child : childAssetSorter) - { - recurse(child, depth + 1); - } - - ImGui::TreePop(); - } - } - else - { - for (auto child : childAssetSorter) - { - recurse(child, depth + 1); - } - } - }; - - recurse(&analysis->GetRootAsset(), 0); - } - - ImGui::End(); - } - } - - void DebugImGUI::OutputLine(const char* text, const Data::Summary& heapSummary, const Data::Summary& vramSummary) - { - if (text) - { - ImGui::Text("%s", text); - ImGui::SameLine(); - } - - ImGui::SetCursorPosX(ImGui::GetWindowWidth() - COLUMN_WIDTH * 2); - OutputField(heapSummary); - ImGui::SameLine(); - ImGui::SetCursorPosX(ImGui::GetWindowWidth() - COLUMN_WIDTH); - OutputField(vramSummary); - } - - void DebugImGUI::OutputField(const Data::Summary& summary) - { - if (summary.m_allocationCount) - { - ImGui::Text("%u / %s", summary.m_allocationCount, FormatUtils::FormatKB(summary.m_allocatedMemory)); - } - else - { - ImGui::Text("-- / --"); - } - } -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/DebugImGUI.h b/Gems/AssetMemoryAnalyzer/Code/Source/DebugImGUI.h deleted file mode 100644 index 406e8e9a0f..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/DebugImGUI.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include -#include - -namespace AssetMemoryAnalyzer -{ - namespace Data - { - struct AllocationPoint; - struct AssetInfo; - struct Summary; - } - - class AssetMemoryAnalyzerSystemComponent; - - // This class provides debug UI for the gem using ImGUI. - class DebugImGUI - : public ImGui::ImGuiUpdateListenerBus::Handler - { - public: - AZ_TYPE_INFO(AssetMemoryAnalyzer::DebugImGUI, "{D121DA34-EF16-46C2-AFC4-A1EE69DA0851}"); - AZ_CLASS_ALLOCATOR(DebugImGUI, AZ::OSAllocator, 0); - - DebugImGUI(); - ~DebugImGUI(); - - void Init(AssetMemoryAnalyzerSystemComponent* owner); - - // ImGuiUpdateListenerBus - void OnImGuiUpdate() override; - - - private: - void OutputLine(const char* text, const Data::Summary& heapSummary, const Data::Summary& vramSummary); - void OutputField(const Data::Summary& summary); - - AssetMemoryAnalyzerSystemComponent* m_owner; - bool (*m_childAssetSortFn)(const Data::AssetInfo* lhs, const Data::AssetInfo* rhs) = nullptr; - AZStd::vector m_childAssetSorter; - bool (*m_allocationPointSortFn)(const Data::AllocationPoint* lhs, const Data::AllocationPoint* rhs) = nullptr; - AZStd::vector m_allocationPointSorter; - bool m_enabled = false; - }; -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/ExportCSV.cpp b/Gems/AssetMemoryAnalyzer/Code/Source/ExportCSV.cpp deleted file mode 100644 index d5728b9a21..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/ExportCSV.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "ExportCSV.h" - -#include "AssetMemoryAnalyzer.h" -#include "AssetMemoryAnalyzerSystemComponent.h" -#include "FormatUtils.h" - -#include - -namespace AssetMemoryAnalyzer -{ - ExportCSV::ExportCSV() - { - } - - ExportCSV::~ExportCSV() - { - } - - void ExportCSV::Init(AssetMemoryAnalyzerSystemComponent* owner) - { - m_owner = owner; - } - - void ExportCSV::OutputCSV(const char* path) - { - using namespace Data; - - AZStd::shared_ptr analysis = m_owner->GetAnalysis(); - - if (!analysis) - { - return; - } - - auto fs = AZ::IO::FileIOBase::GetDirectInstance(); - AZ::IO::HandleType hdl; - - if (!fs->Open(path, AZ::IO::OpenMode::ModeWrite, hdl)) - { - AZ_Assert(false, "Unable to open file for writing: %s", path); - } - - const AZStd::string header("Label,Heap Count,Heap kb,VRAM Count,VRAM kb\n"); - fs->Write(hdl, header.c_str(), header.length()); - char lineBuffer[4096]; - const auto& rootAsset = analysis->GetRootAsset(); - - size_t length = snprintf(lineBuffer, sizeof(lineBuffer), ",%d,%0.2f,%d,%0.2f\n", - rootAsset.m_localSummary[(int)AllocationCategories::HEAP].m_allocationCount, - rootAsset.m_localSummary[(int)AllocationCategories::HEAP].m_allocatedMemory / 1024.0f, - rootAsset.m_localSummary[(int)AllocationCategories::VRAM].m_allocationCount, - rootAsset.m_localSummary[(int)AllocationCategories::VRAM].m_allocatedMemory / 1024.0f - ); - fs->Write(hdl, lineBuffer, length); - - for (const auto& child : analysis->GetRootAsset().m_childAssets) - { - length = snprintf(lineBuffer, sizeof(lineBuffer), "%s,%d,%0.2f,%d,%0.2f\n", - child.m_id, - child.m_totalSummary[(int)AllocationCategories::HEAP].m_allocationCount, - child.m_totalSummary[(int)AllocationCategories::HEAP].m_allocatedMemory / 1024.0f, - child.m_totalSummary[(int)AllocationCategories::VRAM].m_allocationCount, - child.m_totalSummary[(int)AllocationCategories::VRAM].m_allocatedMemory / 1024.0f - ); - - fs->Write(hdl, lineBuffer, length); - } - - fs->Close(hdl); - - AZ_Printf("Debug", "Exported asset allocation list to %s", path); - } -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/ExportCSV.h b/Gems/AssetMemoryAnalyzer/Code/Source/ExportCSV.h deleted file mode 100644 index d8d5c34ba0..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/ExportCSV.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include - - -namespace AssetMemoryAnalyzer -{ - class AssetMemoryAnalyzerSystemComponent; - - // This class provides the service of exporting a capture of asset memory to a JSON file that is viewable in the web viewer. - class ExportCSV - { - public: - AZ_TYPE_INFO(AssetMemoryAnalyzer::ExportCSV, "{FEA7D137-EA93-4366-85C2-DCBCE00B3376}"); - AZ_CLASS_ALLOCATOR(ExportCSV, AZ::OSAllocator, 0); - - ExportCSV(); - ~ExportCSV(); - - void Init(AssetMemoryAnalyzerSystemComponent* owner); - void OutputCSV(const char* path); - - private: - AssetMemoryAnalyzerSystemComponent* m_owner; - }; -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/ExportJSON.cpp b/Gems/AssetMemoryAnalyzer/Code/Source/ExportJSON.cpp deleted file mode 100644 index 9f75e62454..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/ExportJSON.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "ExportJSON.h" - -#include "AssetMemoryAnalyzer.h" -#include "AssetMemoryAnalyzerSystemComponent.h" -#include "FormatUtils.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace AssetMemoryAnalyzer -{ - namespace - { - template - static void OutputAllocationInfo(WriterT& writer, size_t count, size_t bytes) - { - writer.StartObject(); - writer.Key("count"); - writer.Int((int)count); - writer.Key("kb"); - writer.String(FormatUtils::FormatKB(bytes)); - writer.EndObject(); - } - - template - static void OutputAllocationInfo(WriterT& writer, const Data::Summary& summary) - { - OutputAllocationInfo(writer, summary.m_allocationCount, summary.m_allocatedMemory); - } - } - - ExportJSON::ExportJSON() - { - } - - ExportJSON::~ExportJSON() - { - } - - void ExportJSON::Init(AssetMemoryAnalyzerSystemComponent* owner) - { - m_owner = owner; - } - - void ExportJSON::OutputJSON(const char* path) - { - using namespace Data; - using namespace rapidjson; - - AZStd::shared_ptr analysis = m_owner->GetAnalysis(); - - if (!analysis) - { - return; - } - - StringBuffer buff; - PrettyWriter writer(buff); - size_t idCounter = 0; - - AZStd::function recurse; - recurse = [&recurse, &writer, &idCounter](const AssetInfo& asset, int depth) - { - writer.StartObject(); - - writer.Key("id"); - writer.Int(static_cast(idCounter++)); - - writer.Key("label"); - writer.String(asset.m_id ? asset.m_id : "Root"); - - writer.Key("heap"); - OutputAllocationInfo(writer, asset.m_totalSummary[(int)AllocationCategories::HEAP]); - - writer.Key("vram"); - OutputAllocationInfo(writer, asset.m_totalSummary[(int)AllocationCategories::VRAM]); - - if (!asset.m_allocationPoints.empty() || !asset.m_childAssets.empty()) - { - writer.Key("_children"); - writer.StartArray(); - - if (!asset.m_allocationPoints.empty()) - { - writer.StartObject(); - writer.Key("id"); - writer.Int(static_cast(idCounter++)); - - writer.Key("label"); - writer.String(""); - - writer.Key("heap"); - OutputAllocationInfo(writer, asset.m_localSummary[(int)AllocationCategories::HEAP]); - - writer.Key("vram"); - OutputAllocationInfo(writer, asset.m_localSummary[(int)AllocationCategories::VRAM]); - - writer.Key("_children"); - writer.StartArray(); - - for (const auto& ap : asset.m_allocationPoints) - { - Summary heapSummary; - Summary vramSummary; - - writer.StartObject(); - writer.Key("id"); - writer.Int(static_cast(idCounter++)); - - writer.Key("label"); - - switch (ap.m_codePoint->m_category) - { - case AllocationCategories::HEAP: - writer.String(FormatUtils::FormatCodePoint(*ap.m_codePoint)); - heapSummary.m_allocationCount = static_cast(ap.m_allocations.size()); - heapSummary.m_allocatedMemory = ap.m_totalAllocatedMemory; - break; - - case AllocationCategories::VRAM: - writer.String(ap.m_codePoint->m_file); - vramSummary.m_allocationCount = static_cast(ap.m_allocations.size()); - vramSummary.m_allocatedMemory = ap.m_totalAllocatedMemory; - break; - } - - writer.Key("heap"); - OutputAllocationInfo(writer, heapSummary); - - writer.Key("vram"); - OutputAllocationInfo(writer, vramSummary); - - writer.EndObject(); - } - - writer.EndArray(); - writer.EndObject(); - } - - for (const auto& childInfo : asset.m_childAssets) - { - recurse(childInfo, depth + 1); - } - - writer.EndArray(); - } - - writer.EndObject(); - }; - - writer.StartArray(); - recurse(analysis->GetRootAsset(), 0); - writer.EndArray(); - - auto fs = AZ::IO::FileIOBase::GetDirectInstance(); - AZ::IO::HandleType hdl; - - if (!fs->Open(path, AZ::IO::OpenMode::ModeWrite, hdl)) - { - AZ_Assert(false, "Unable to open file for writing: %s", path); - } - - fs->Write(hdl, buff.GetString(), buff.GetSize()); - fs->Close(hdl); - - AZ_Printf("Debug", "Exported asset allocation map to %s", path); - } -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/ExportJSON.h b/Gems/AssetMemoryAnalyzer/Code/Source/ExportJSON.h deleted file mode 100644 index f8b74ec5ce..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/ExportJSON.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include - -namespace AssetMemoryAnalyzer -{ - class AssetMemoryAnalyzerSystemComponent; - - // This class provides the service of exporting a capture of asset memory to a JSON file that is viewable in the web viewer. - class ExportJSON - { - public: - AZ_TYPE_INFO(AssetMemoryAnalyzer::ExportJSON, "{AA85F7E0-8FAF-43BC-9C09-6411270AE3E7}"); - AZ_CLASS_ALLOCATOR(ExportJSON, AZ::OSAllocator, 0); - - ExportJSON(); - ~ExportJSON(); - - void Init(AssetMemoryAnalyzerSystemComponent* owner); - void OutputJSON(const char* path); - - private: - AssetMemoryAnalyzerSystemComponent* m_owner; - }; -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/FormatUtils.cpp b/Gems/AssetMemoryAnalyzer/Code/Source/FormatUtils.cpp deleted file mode 100644 index 190de6c0eb..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/FormatUtils.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "FormatUtils.h" - -#include "AssetMemoryAnalyzer.h" - -#include - -namespace AssetMemoryAnalyzer -{ - namespace FormatUtils - { - const char* FormatCodePoint(const Data::CodePoint& cp) - { - static char buff[1024]; - azsnprintf(buff, sizeof(buff), "%s:%d", cp.m_file, cp.m_line); - - return buff; - } - - const char* FormatKB(size_t bytes) - { - static char buff[32]; - int len = azsnprintf(buff, sizeof(buff), "%0.2f", bytes / 1024.0f); - AzFramework::StringFunc::NumberFormatting::GroupDigits(buff, sizeof(buff), len - 3); - - return buff; - } - } -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/FormatUtils.h b/Gems/AssetMemoryAnalyzer/Code/Source/FormatUtils.h deleted file mode 100644 index f207794e41..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/FormatUtils.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include - -namespace AssetMemoryAnalyzer -{ - namespace Data - { - struct CodePoint; - } - - namespace FormatUtils - { - // Formats a location in code to a single line of human-readable text. Returns a pointer to the resulting string. - // WARNING: Returns pointer to an internal static buffer for performance. Single-threaded access only! - extern const char* FormatCodePoint(const Data::CodePoint& cp); - - // Formats a byte value to be easily read in kilobytes. Returns a pointer to the resulting string. - // WARNING: Returns pointer to an internal static buffer for performance. Single-threaded access only! - extern const char* FormatKB(size_t bytes); - } -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Tests/AssetMemoryAnalyzerTest.cpp b/Gems/AssetMemoryAnalyzer/Code/Tests/AssetMemoryAnalyzerTest.cpp deleted file mode 100644 index 2a3ac1e4fe..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Tests/AssetMemoryAnalyzerTest.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include -#include -#include -#include <../Source/AssetMemoryAnalyzer.h> -#include <../Source/AssetMemoryAnalyzerSystemComponent.h> - -using namespace AssetMemoryAnalyzer; - -static AZ::IAllocator* testalloc = nullptr; - -class AssetMemoryAnalyzerTest - : public UnitTest::AllocatorsTestFixture -{ -protected: - void SetUp() override - { - AllocatorsTestFixture::SetUp(); - testalloc = &AZ::AllocatorInstance::GetAllocator(); - AZ::ComponentApplication::Descriptor desc; - desc.m_useExistingAllocator = true; - desc.m_enableDrilling = false; - m_app = new (&m_appStorage) AZ::ComponentApplication; - m_systemEntity = m_app->Create(desc); - m_app->RegisterComponentDescriptor(AssetMemoryAnalyzerSystemComponent::CreateDescriptor()); - m_gemSystemComponent = m_systemEntity->CreateComponent(); - m_systemEntity->Init(); - m_systemEntity->Activate(); - } - - void TearDown() override - { - m_app->Destroy(); - m_app->~ComponentApplication(); - - AllocatorsTestFixture::TearDown(); - } - - AZStd::aligned_storage_for_t m_appStorage; - AZ::ComponentApplication* m_app = nullptr; - AZ::Entity* m_systemEntity = nullptr; - AZ::Component* m_gemSystemComponent = nullptr; -}; - -TEST_F(AssetMemoryAnalyzerTest, BasicTest) -{ - AZStd::shared_ptr analysis; - AssetMemoryAnalyzerRequestBus::BroadcastResult(analysis, &AssetMemoryAnalyzerRequests::GetAnalysis); - - EXPECT_FALSE(analysis.get()); - - AssetMemoryAnalyzerRequestBus::Broadcast(&AssetMemoryAnalyzerRequests::SetEnabled, true); - AssetMemoryAnalyzerRequestBus::BroadcastResult(analysis, &AssetMemoryAnalyzerRequests::GetAnalysis); - - ASSERT_TRUE(analysis.get()); -#ifndef AZ_TRACK_ASSET_SCOPES - // No recordings should exist if analysis is disabled - ASSERT_TRUE(analysis->GetAllocationPoints().empty()); -#endif -} - -AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV); - - diff --git a/Gems/AssetMemoryAnalyzer/Code/assetmemoryanalyzer_files.cmake b/Gems/AssetMemoryAnalyzer/Code/assetmemoryanalyzer_files.cmake deleted file mode 100644 index 5b422502e1..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/assetmemoryanalyzer_files.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -set(FILES - Include/AssetMemoryAnalyzer/AssetMemoryAnalyzerBus.h - Source/AssetMemoryAnalyzer.cpp - Source/AssetMemoryAnalyzer.h - Source/AssetMemoryAnalyzerSystemComponent.cpp - Source/AssetMemoryAnalyzerSystemComponent.h - Source/DebugImGUI.cpp - Source/DebugImGUI.h - Source/ExportCSV.cpp - Source/ExportCSV.h - Source/ExportJSON.cpp - Source/ExportJSON.h - Source/FormatUtils.cpp - Source/FormatUtils.h -) diff --git a/Gems/AssetMemoryAnalyzer/Code/assetmemoryanalyzer_shared_files.cmake b/Gems/AssetMemoryAnalyzer/Code/assetmemoryanalyzer_shared_files.cmake deleted file mode 100644 index 63323a14d1..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/assetmemoryanalyzer_shared_files.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -set(FILES - Source/AssetMemoryAnalyzerModule.cpp -) diff --git a/Gems/AssetMemoryAnalyzer/Code/assetmemoryanalyzer_tests_files.cmake b/Gems/AssetMemoryAnalyzer/Code/assetmemoryanalyzer_tests_files.cmake deleted file mode 100644 index a7b08b967e..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/assetmemoryanalyzer_tests_files.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -set(FILES - Tests/AssetMemoryAnalyzerTest.cpp -) diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/.github/ISSUE_TEMPLATE/bug_report.md b/Gems/AssetMemoryAnalyzer/External/tabulator-master/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index d041460807..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - - -**Tabulator Info** -- Which version of Tabulator are you using? -- Post a copy of your construct object if possible so we can see how your table is setup - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] - -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/.github/ISSUE_TEMPLATE/feature_request.md b/Gems/AssetMemoryAnalyzer/External/tabulator-master/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d920a..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/.github/ISSUE_TEMPLATE/question.md b/Gems/AssetMemoryAnalyzer/External/tabulator-master/.github/ISSUE_TEMPLATE/question.md deleted file mode 100644 index a9a1e61214..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/.github/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: Question -about: Please ask questions on Stack Overflow, NOT on GitHub :) - ---- - -Please ask questions on www.stackoverflow.com the issues list is now reserved for feature requests and bug reports. - -Cheers - -Oli :) diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/.gitignore b/Gems/AssetMemoryAnalyzer/External/tabulator-master/.gitignore deleted file mode 100644 index 013f31d724..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -*.sublime-project -*.sublime-workspace - -node_modules/ -examples/ -npm-debug.log \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/CODE_OF_CONDUCT.md b/Gems/AssetMemoryAnalyzer/External/tabulator-master/CODE_OF_CONDUCT.md deleted file mode 100644 index 2599d16381..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/LICENSE b/Gems/AssetMemoryAnalyzer/External/tabulator-master/LICENSE deleted file mode 100644 index b1a1477df5..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2018 Oli Folkerd - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/README.md b/Gems/AssetMemoryAnalyzer/External/tabulator-master/README.md deleted file mode 100644 index 894e9f8d65..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/README.md +++ /dev/null @@ -1,84 +0,0 @@ -![Tabulator Table](http://olifolkerd.github.io/tabulator/images/tabulator.png) - -### Version 4.1 Out Now! - -An easy to use interactive table generation JavaScript library - -Full documentation & demos can be found at: [http://tabulator.info](http://tabulator.info) -*** -![Tabulator Table](http://tabulator.info/images/tabulator_table.jpg) -*** - -NPM Package Changed -================================ -jQuery was removed as a dependency in the 4.0 release, so Tabulator has moved in NPM from the old [jquery.tabulator](https://www.npmjs.com/package/jquery.tabulator) package to the new [tabulator-tables](https://www.npmjs.com/package/tabulator-tables) package. - - -Features -================================ -Tabulator allows you to create interactive tables in seconds from any HTML Table, Javascript Array or JSON formatted data. - -Simply include the library and the css in your project and you're away! - -Tabulator is packed with useful features including: - -![Tabulator Features](http://olifolkerd.github.io/tabulator/images/featurelist_share.png) - - -Frontend Framework Support -================================ -Tabulator is built to work with all the major front end JavaScript frameworks including React, Angular and Vue. - - -Setup -================================ -Setting up tabulator could not be simpler. - -Include the library and the css -```html - - -``` - -Create an element to hold the table -```html -
-``` - -Turn the element into a tabulator with some simple javascript -```js -var table = new Tabulator("#example-table", {}); -``` - - -### Bower Installation -To get Tabulator via the Bower package manager, open a terminal in your project directory and run the following commmand: -``` -bower install tabulator --save -``` - -### NPM Installation -To get Tabulator via the NPM package manager, open a terminal in your project directory and run the following commmand: -``` -npm install tabulator-tables --save -``` - -### CDN - UNPKG -To access Tabulator directly from the UNPKG CDN servers, include the following two lines at the start of your project, instead of the localy hosted versions: -```html - - -``` - -Coming Soon -================================ -Tabulator is actively under development and I plan to have even more useful features implemented soon, including: - -- Data Reactivity -- Custom Row Templates -- Additional Editors and Formatters -- Print Styling -- Multi Cell Editing -- Cell Selection - -Get in touch if there are any features you feel Tabulator needs. diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/bower.json b/Gems/AssetMemoryAnalyzer/External/tabulator-master/bower.json deleted file mode 100644 index 7004cd19c4..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/bower.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "tabulator", - "main": "dist/js/tabulator.js", - "version": "4.1.2", - "description": "Interactive table generation JavaScript library", - "keywords": [ - "table", - "grid", - "datagrid", - "tabulator", - "editable", - "cookie", - "jquery", - "jqueryui", - "sort", - "format", - "resizable", - "list", - "scrollable", - "ajax", - "json", - "widget", - "jquery", - "react", - "angular", - "vue" - ], - "authors": [ - "Oli Folkerd" - ], - "license": "MIT", - "homepage": "https://github.com/olifolkerd/tabulator", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ] -} diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap.css deleted file mode 100644 index 23513e7329..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap.css +++ /dev/null @@ -1,804 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator { - position: relative; - background-color: #fff; - overflow: hidden; - font-size: 14px; - text-align: left; - width: 100%; - max-width: 100%; - margin-bottom: 20px; - -ms-transform: translatez(0); - transform: translatez(0); -} - -.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { - min-width: 100%; -} - -.tabulator.tabulator-block-select { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.tabulator .tabulator-header { - position: relative; - box-sizing: border-box; - width: 100%; - border-bottom: 2px solid #ddd; - background-color: #fff; - font-weight: bold; - white-space: nowrap; - overflow: hidden; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-header .tabulator-col { - display: inline-block; - position: relative; - box-sizing: border-box; - background-color: #fff; - text-align: left; - vertical-align: bottom; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-moving { - position: absolute; - border: 1px solid #ddd; - background: #e6e6e6; - pointer-events: none; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content { - box-sizing: border-box; - position: relative; - padding: 8px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { - box-sizing: border-box; - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - vertical-align: bottom; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { - box-sizing: border-box; - width: 100%; - border: 1px solid #999; - padding: 1px; - background: #fff; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - display: inline-block; - position: absolute; - top: 14px; - right: 8px; - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { - position: relative; - display: -ms-flexbox; - display: flex; - border-top: 1px solid #ddd; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { - margin-right: -1px; -} - -.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { - position: absolute; - background-color: #e6e6e6 !important; - border: 1px solid #ddd; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { - position: relative; - box-sizing: border-box; - margin-top: 2px; - width: 100%; - text-align: center; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { - height: auto !important; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { - margin-top: 3px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { - width: 0; - height: 0; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { - padding-right: 25px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { - cursor: pointer; - background-color: #e6e6e6; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #666; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { - border-top: 6px solid #666; - border-bottom: none; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { - -webkit-writing-mode: vertical-rl; - -ms-writing-mode: tb-rl; - writing-mode: vertical-rl; - text-orientation: mixed; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { - padding-right: 0; - padding-top: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { - padding-right: 0; - padding-bottom: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow { - right: calc(50% - 6px); -} - -.tabulator .tabulator-header .tabulator-frozen { - display: inline-block; - position: absolute; - z-index: 10; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #ddd; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #ddd; -} - -.tabulator .tabulator-header .tabulator-calcs-holder { - box-sizing: border-box; - width: 100%; - background: white !important; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { - background: white !important; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder { - min-width: 400%; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { - display: none; -} - -.tabulator .tabulator-tableHolder { - position: relative; - width: 100%; - white-space: nowrap; - overflow: auto; - -webkit-overflow-scrolling: touch; -} - -.tabulator .tabulator-tableHolder:focus { - outline: none; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder { - box-sizing: border-box; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - width: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { - position: absolute; - top: 0; - left: 0; - height: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder span { - display: inline-block; - margin: 0 auto; - padding: 10px; - color: #000; - font-weight: bold; - font-size: 20px; -} - -.tabulator .tabulator-tableHolder .tabulator-table { - position: relative; - display: inline-block; - background-color: #fff; - white-space: nowrap; - overflow: visible; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { - font-weight: bold; - background: #ececec !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { - border-bottom: 2px solid #ddd; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { - border-top: 2px solid #ddd; -} - -.tabulator .tabulator-col-resize-handle { - position: absolute; - right: 0; - top: 0; - bottom: 0; - width: 5px; -} - -.tabulator .tabulator-col-resize-handle.prev { - left: 0; - right: auto; -} - -.tabulator .tabulator-col-resize-handle:hover { - cursor: ew-resize; -} - -.tabulator .tabulator-footer { - padding: 5px 10px; - border-top: 2px solid #ddd; - text-align: right; - font-weight: bold; - white-space: nowrap; - -ms-user-select: none; - user-select: none; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder { - box-sizing: border-box; - width: calc(100% + 20px); - margin: -5px -10px 5px -10px; - text-align: left; - background: white !important; - border-bottom: 1px solid #ddd; - border-top: 1px solid #ddd; - overflow: hidden; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { - background: white !important; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { - margin-bottom: -5px; - border-bottom: none; -} - -.tabulator .tabulator-footer .tabulator-pages { - margin: 0 7px; -} - -.tabulator .tabulator-footer .tabulator-page { - display: inline-block; - margin: 0 2px; - border: 1px solid #ddd; - border-radius: 3px; - padding: 2px 5px; - background: rgba(255, 255, 255, 0.2); - font-family: inherit; - font-weight: inherit; - font-size: inherit; -} - -.tabulator .tabulator-footer .tabulator-page.active { - color: #d00; -} - -.tabulator .tabulator-footer .tabulator-page:disabled { - opacity: .5; -} - -.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); - color: #fff; -} - -.tabulator .tabulator-loader { - position: absolute; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - top: 0; - left: 0; - z-index: 100; - height: 100%; - width: 100%; - background: rgba(0, 0, 0, 0.4); - text-align: center; -} - -.tabulator .tabulator-loader .tabulator-loader-msg { - display: inline-block; - margin: 0 auto; - padding: 10px 20px; - border-radius: 10px; - background: #fff; - font-weight: bold; - font-size: 16px; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { - border: 4px solid #333; - color: #000; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { - border: 4px solid #D00; - color: #590000; -} - -.tabulator.table-striped .tabulator-row:nth-child(even) { - background-color: #f9f9f9; -} - -.tabulator.table-bordered { - border: 1px solid #ddd; -} - -.tabulator.table-bordered .tabulator-header .tabulator-col { - border-right: 1px solid #ddd; -} - -.tabulator.table-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { - border-right: 1px solid #ddd; -} - -.tabulator.table-condensed .tabulator-header .tabulator-col .tabulator-col-content { - padding: 5px; -} - -.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row { - min-height: 24px; -} - -.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { - padding: 5px; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active { - background: #f5f5f5 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.success { - background: #dff0d8 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.info { - background: #d9edf7 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning { - background: #fcf8e3 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.danger { - background: #f2dede !important; -} - -.tabulator-row { - position: relative; - box-sizing: border-box; - min-height: 30px; - background-color: #fff; - border-bottom: 1px solid #ddd; -} - -.tabulator-row.tabulator-selectable:hover { - background-color: #f5f5f5 !important; - cursor: pointer; -} - -.tabulator-row.tabulator-selected { - background-color: #9ABCEA; -} - -.tabulator-row.tabulator-selected:hover { - background-color: #769BCC; - cursor: pointer; -} - -.tabulator-row.tabulator-moving { - position: absolute; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - pointer-events: none !important; - z-index: 15; -} - -.tabulator-row .tabulator-row-resize-handle { - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 5px; -} - -.tabulator-row .tabulator-row-resize-handle.prev { - top: 0; - bottom: auto; -} - -.tabulator-row .tabulator-row-resize-handle:hover { - cursor: ns-resize; -} - -.tabulator-row .tabulator-frozen { - display: inline-block; - position: absolute; - background-color: inherit; - z-index: 10; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #ddd; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #ddd; -} - -.tabulator-row .tabulator-responsive-collapse { - box-sizing: border-box; - padding: 5px; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; -} - -.tabulator-row .tabulator-responsive-collapse:empty { - display: none; -} - -.tabulator-row .tabulator-responsive-collapse table { - font-size: 14px; -} - -.tabulator-row .tabulator-responsive-collapse table tr td { - position: relative; -} - -.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { - padding-right: 10px; -} - -.tabulator-row .tabulator-cell { - display: inline-block; - position: relative; - box-sizing: border-box; - padding: 8px; - vertical-align: middle; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.tabulator-row .tabulator-cell:last-of-type { - border-right: none; -} - -.tabulator-row .tabulator-cell.tabulator-editing { - border: 1px solid #1D68CD; - padding: 0; -} - -.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { - border: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail { - border: 1px solid #dd0000; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { - border: 1px; - background: transparent; - color: #dd0000; -} - -.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { - width: 80%; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { - width: 100%; - height: 3px; - margin-top: 2px; - background: #666; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-branch { - display: inline-block; - vertical-align: middle; - height: 9px; - width: 7px; - margin-top: -9px; - margin-right: 5px; - border-bottom-left-radius: 1px; - border-left: 2px solid #ddd; - border-bottom: 2px solid #ddd; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-pack: center; - justify-content: center; - -ms-flex-align: center; - align-items: center; - vertical-align: middle; - height: 11px; - width: 11px; - margin-right: 5px; - border: 1px solid #333; - border-radius: 2px; - background: rgba(0, 0, 0, 0.1); - overflow: hidden; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - height: 15px; - width: 15px; - border-radius: 20px; - background: #666; - color: #fff; - font-weight: bold; - font-size: 1.1em; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { - opacity: .7; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { - display: initial; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { - display: none; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { - display: none; -} - -.tabulator-row.tabulator-group { - box-sizing: border-box; - border-bottom: 1px solid #999; - border-right: 1px solid #ddd; - border-top: 1px solid #999; - padding: 5px; - padding-left: 10px; - background: #fafafa; - font-weight: bold; - min-width: 100%; -} - -.tabulator-row.tabulator-group:hover { - cursor: pointer; - background-color: rgba(0, 0, 0, 0.1); -} - -.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { - margin-right: 10px; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-top: 6px solid #666; - border-bottom: 0; -} - -.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { - margin-left: 20px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { - margin-left: 40px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { - margin-left: 60px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { - margin-left: 80px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { - margin-left: 100px; -} - -.tabulator-row.tabulator-group .tabulator-arrow { - display: inline-block; - width: 0; - height: 0; - margin-right: 16px; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-right: 0; - border-left: 6px solid #666; - vertical-align: middle; -} - -.tabulator-row.tabulator-group span { - margin-left: 10px; - color: #666; -} - -.tabulator-edit-select-list { - position: absolute; - display: inline-block; - box-sizing: border-box; - max-height: 200px; - background: #fff; - border: 1px solid #ddd; - font-size: 14px; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - z-index: 10000; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item { - padding: 4px; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item.active { - color: #fff; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { - cursor: pointer; - color: #fff; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-group { - border-bottom: 1px solid #ddd; - padding: 4px; - padding-top: 6px; - font-weight: bold; -} diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap.min.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap.min.css deleted file mode 100644 index 47a2815c69..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap.min.css +++ /dev/null @@ -1,3 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator{position:relative;background-color:#fff;overflow:hidden;font-size:14px;text-align:left;width:100%;max-width:100%;margin-bottom:20px;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{width:100%;border-bottom:2px solid #ddd;font-weight:700;white-space:nowrap;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header,.tabulator .tabulator-header .tabulator-col{position:relative;box-sizing:border-box;background-color:#fff;overflow:hidden}.tabulator .tabulator-header .tabulator-col{display:inline-block;text-align:left;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #ddd;background:#e6e6e6;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:14px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #ddd;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#e6e6e6!important;border:1px solid #ddd}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#e6e6e6}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow{right:calc(50% - 6px)}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;width:100%;background:#fff!important;border-top:1px solid #ddd;border-bottom:1px solid #ddd;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:400%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{position:absolute;top:0;left:0;height:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#000;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#ececec!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #ddd}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #ddd}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:5px 10px;border-top:2px solid #ddd;text-align:right;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px;text-align:left;background:#fff!important;border-bottom:1px solid #ddd;border-top:1px solid #ddd;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;border:1px solid #ddd;border-radius:3px;padding:2px 5px;background:hsla(0,0%,100%,.2);font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#d00}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator.table-striped .tabulator-row:nth-child(2n){background-color:#f9f9f9}.tabulator.table-bordered{border:1px solid #ddd}.tabulator.table-bordered .tabulator-header .tabulator-col,.tabulator.table-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{border-right:1px solid #ddd}.tabulator.table-condensed .tabulator-header .tabulator-col .tabulator-col-content{padding:5px}.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row{min-height:24px}.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:5px}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active{background:#f5f5f5!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.success{background:#dff0d8!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.info{background:#d9edf7!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning{background:#fcf8e3!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.danger{background:#f2dede!important}.tabulator-row{position:relative;box-sizing:border-box;min-height:30px;background-color:#fff;border-bottom:1px solid #ddd}.tabulator-row.tabulator-selectable:hover{background-color:#f5f5f5!important;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #ddd;border-bottom:1px solid #ddd;pointer-events:none!important;z-index:2}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:8px;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #ddd;border-bottom:2px solid #ddd}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #ddd;border-top:1px solid #999;padding:5px;padding-left:10px;background:#fafafa;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:100px}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#666}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #ddd;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:4}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #ddd;padding:4px;padding-top:6px;font-weight:700} -/*# sourceMappingURL=tabulator_bootstrap.min.css.map */ diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap.min.css.map b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap.min.css.map deleted file mode 100644 index 9980be3347..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["tabulator_bootstrap.min.css"],"names":[],"mappings":"AACA,WACE,kBAAmB,AACnB,sBAAuB,AACvB,gBAAiB,AACjB,eAAgB,AAChB,gBAAiB,AACjB,WAAY,AACZ,eAAgB,AAChB,mBAAoB,AAEpB,uBAAyB,CAC1B,AAED,iFACE,cAAgB,CACjB,AAED,kCACE,yBAA0B,AACvB,sBAAuB,AACtB,qBAAsB,AAClB,gBAAkB,CAC3B,AAED,6BAGE,WAAY,AACZ,6BAA8B,AAE9B,gBAAkB,AAClB,mBAAoB,AAEpB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,yEAdE,kBAAmB,AACnB,sBAAuB,AAGvB,sBAAuB,AAGvB,eAAiB,CAOnB,AAQC,4CAPC,qBAAsB,AAItB,gBAAiB,AACjB,qBAAuB,CAExB,AAED,6DACE,kBAAmB,AACnB,sBAAuB,AACvB,mBAAoB,AACpB,mBAAqB,CACtB,AAED,mEACE,sBAAuB,AACvB,kBAAmB,AACnB,WAAa,CACd,AAED,wFACE,sBAAuB,AACvB,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,uBAAwB,AACxB,qBAAuB,CACxB,AAED,gHACE,sBAAuB,AACvB,WAAY,AACZ,sBAAuB,AACvB,YAAa,AACb,eAAiB,CAClB,AAED,oFACE,qBAAsB,AACtB,kBAAmB,AACnB,SAAU,AACV,UAAW,AACX,QAAS,AACT,SAAU,AACV,kCAAmC,AACnC,mCAAoC,AACpC,4BAA8B,CAC/B,AAED,0FACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,0BAA2B,AAC3B,eAAiB,CAClB,AAED,oHACE,iBAAmB,CACpB,AAED,0FACE,YAAc,CACf,AAED,+DACE,kBAAmB,AACnB,mCAAqC,AACrC,qBAAuB,CACxB,AAED,qEACE,kBAAmB,AACnB,sBAAuB,AACvB,eAAgB,AAChB,WAAY,AACZ,iBAAmB,CACpB,AAED,8EACE,qBAAwB,CACzB,AAED,yEACE,cAAgB,CACjB,AAED,sFACE,QAAS,AACT,QAAU,CACX,AAED,oFACE,kBAAoB,CACrB,AAED,qEACE,eAAgB,AAChB,wBAA0B,CAC3B,AAED,uHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,sHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,uHACE,0BAA2B,AAC3B,kBAAoB,CACrB,AAED,+GACE,iCAAkC,AAC9B,uBAAwB,AACpB,yBAA0B,AAClC,uBAAwB,AACxB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,sBAAwB,CAC7B,AAED,oHAEM,wBAA0B,CAC/B,AAED,2GACE,gBAAiB,AACjB,gBAAkB,CACnB,AAED,uIACE,gBAAiB,AACjB,mBAAqB,CACtB,AAED,uGACE,qBAAuB,CACxB,AAED,+CACE,qBAAsB,AACtB,kBAAmB,AACnB,SAAY,CACb,AAED,qEACE,2BAA6B,CAC9B,AAED,sEACE,0BAA4B,CAC7B,AAED,qDACE,sBAAuB,AACvB,WAAY,AACZ,0BAA6B,AAC7B,0BAA2B,AAC3B,6BAA8B,AAC9B,eAAiB,CAClB,AAED,oEACE,yBAA6B,CAC9B,AAED,iGACE,YAAc,CACf,AAED,2DACE,cAAgB,CACjB,AAED,iEACE,YAAc,CACf,AAED,kCACE,kBAAmB,AACnB,WAAY,AACZ,mBAAoB,AACpB,cAAe,AACf,gCAAkC,CACnC,AAED,wCACE,YAAc,CACf,AAED,yDACE,sBAAuB,AACvB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,UAAY,CACb,AAED,wFACE,kBAAmB,AACnB,MAAO,AACP,OAAQ,AACR,WAAa,CACd,AAED,8DACE,qBAAsB,AACtB,cAAe,AACf,aAAc,AACd,WAAY,AACZ,gBAAkB,AAClB,cAAgB,CACjB,AAED,mDACE,kBAAmB,AACnB,qBAAsB,AACtB,sBAAuB,AACvB,mBAAoB,AACpB,gBAAkB,CACnB,AAED,kFACE,gBAAkB,AAClB,4BAA+B,CAChC,AAED,sGACE,4BAA8B,CAC/B,AAED,yGACE,yBAA2B,CAC5B,AAED,wCACE,kBAAmB,AACnB,QAAS,AACT,MAAO,AACP,SAAU,AACV,SAAW,CACZ,AAED,6CACE,OAAQ,AACR,UAAY,CACb,AAED,8CACE,gBAAkB,CACnB,AAED,6BACE,iBAAkB,AAClB,0BAA2B,AAC3B,iBAAkB,AAClB,gBAAkB,AAClB,mBAAoB,AACpB,qBAAsB,AAClB,iBAAkB,AACtB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,qDACE,sBAAuB,AACvB,wBAAyB,AACzB,sBAA6B,AAC7B,gBAAiB,AACjB,0BAA6B,AAC7B,6BAA8B,AAC9B,0BAA2B,AAC3B,eAAiB,CAClB,AAED,oEACE,yBAA6B,CAC9B,AAED,iGACE,YAAc,CACf,AAED,gEACE,mBAAoB,AACpB,kBAAoB,CACrB,AAED,8CACE,YAAc,CACf,AAED,6CACE,qBAAsB,AACtB,aAAc,AACd,sBAAuB,AACvB,kBAAmB,AACnB,gBAAiB,AACjB,8BAAqC,AACrC,oBAAqB,AACrB,oBAAqB,AACrB,iBAAmB,CACpB,AAED,oDACE,UAAY,CACb,AAED,sDACE,UAAY,CACb,AAED,kEACE,eAAgB,AAChB,0BAA+B,AAC/B,UAAY,CACb,AAED,6BACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,MAAO,AACP,OAAQ,AACR,UAAa,AACb,YAAa,AACb,WAAY,AACZ,0BAA+B,AAC/B,iBAAmB,CACpB,AAED,mDACE,qBAAsB,AACtB,cAAe,AACf,kBAAmB,AACnB,mBAAoB,AACpB,gBAAiB,AACjB,gBAAkB,AAClB,cAAgB,CACjB,AAED,qEACE,sBAAuB,AACvB,UAAY,CACb,AAED,mEACE,sBAAuB,AACvB,aAAe,CAChB,AAED,sDACE,wBAA0B,CAC3B,AAED,0BACE,qBAAuB,CACxB,AAMD,4JACE,2BAA6B,CAC9B,AAED,mFACE,WAAa,CACd,AAED,kFACE,eAAiB,CAClB,AAED,kGACE,WAAa,CACd,AAED,yEACE,4BAA+B,CAChC,AAED,0EACE,4BAA+B,CAChC,AAED,uEACE,4BAA+B,CAChC,AAED,0EACE,4BAA+B,CAChC,AAED,yEACE,4BAA+B,CAChC,AAED,eACE,kBAAmB,AACnB,sBAAuB,AACvB,gBAAiB,AACjB,sBAAuB,AACvB,4BAA8B,CAC/B,AAED,0CACE,mCAAqC,AACrC,cAAgB,CACjB,AAED,kCACE,wBAA0B,CAC3B,AAED,wCACE,yBAA0B,AAC1B,cAAgB,CACjB,AAED,gCACE,kBAAmB,AACnB,0BAA2B,AAC3B,6BAA8B,AAC9B,8BAAgC,AAChC,SAAY,CACb,AAED,4CACE,kBAAmB,AACnB,QAAS,AACT,SAAU,AACV,OAAQ,AACR,UAAY,CACb,AAED,iDACE,MAAO,AACP,WAAa,CACd,AAED,kDACE,gBAAkB,CACnB,AAED,iCACE,qBAAsB,AACtB,kBAAmB,AACnB,yBAA0B,AAC1B,SAAY,CACb,AAED,uDACE,2BAA6B,CAC9B,AAED,wDACE,0BAA4B,CAC7B,AAED,8CACE,sBAAuB,AACvB,YAAa,AACb,0BAA2B,AAC3B,4BAA8B,CAC/B,AAED,oDACE,YAAc,CACf,AAED,oDACE,cAAgB,CACjB,AAED,0DACE,iBAAmB,CACpB,AAED,wEACE,kBAAoB,CACrB,AAED,+BACE,qBAAsB,AACtB,kBAAmB,AACnB,sBAAuB,AACvB,YAAa,AACb,sBAAuB,AACvB,mBAAoB,AACpB,gBAAiB,AACjB,sBAAwB,CACzB,AAED,4CACE,iBAAmB,CACpB,AAED,iDACE,yBAA0B,AAC1B,SAAW,CACZ,AAED,+GACE,WAAY,AACZ,sBAAwB,CACzB,AAED,yDACE,qBAA0B,CAC3B,AAED,+HACE,WAAY,AACZ,uBAAwB,AACxB,UAAe,CAChB,AAED,6EACE,YAAc,CACf,AAED,oDACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,8EACE,SAAW,CACZ,AAED,wGACE,WAAY,AACZ,WAAY,AACZ,eAAgB,AAChB,eAAiB,CAClB,AAED,2DACE,qBAAsB,AACtB,sBAAuB,AACvB,WAAY,AACZ,UAAW,AACX,gBAAiB,AACjB,iBAAkB,AAClB,8BAA+B,AAC/B,2BAA4B,AAC5B,4BAA8B,CAC/B,AAED,4DACE,2BAA4B,AAC5B,oBAAqB,AACrB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,YAAa,AACb,WAAY,AACZ,iBAAkB,AAClB,sBAAuB,AACvB,kBAAmB,AACnB,0BAA+B,AAC/B,eAAiB,CAClB,AAED,kEACE,eAAgB,AAChB,yBAA+B,CAChC,AAED,kGACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,sBAAwB,CACzB,AAED,wGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,gGACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,sGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,qEACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,oBAAqB,AACrB,YAAa,AACb,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,WAAY,AACZ,gBAAkB,AAClB,eAAiB,CAClB,AAED,2EACE,UAAY,CACb,AAED,sHACE,eAAiB,CAClB,AAMD,sOACE,YAAc,CACf,AAED,+BACE,sBAAuB,AACvB,6BAA8B,AAC9B,4BAA6B,AAC7B,0BAA2B,AAC3B,YAAa,AACb,kBAAmB,AACnB,mBAAoB,AACpB,gBAAkB,AAClB,cAAgB,CACjB,AAED,qCACE,eAAgB,AAChB,+BAAqC,CACtC,AAED,wEACE,kBAAmB,AACnB,kCAAmC,AACnC,mCAAoC,AACpC,0BAA2B,AAC3B,eAAiB,CAClB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,iBAAmB,CACpB,AAED,gDACE,qBAAsB,AACtB,QAAS,AACT,SAAU,AACV,kBAAmB,AACnB,iCAAkC,AAClC,oCAAqC,AACrC,eAAgB,AAChB,2BAA4B,AAC5B,qBAAuB,CACxB,AAED,oCACE,iBAAkB,AAClB,UAAY,CACb,AAED,4BACE,kBAAmB,AACnB,qBAAsB,AACtB,sBAAuB,AACvB,iBAAkB,AAClB,gBAAiB,AACjB,sBAAuB,AACvB,eAAgB,AAChB,gBAAiB,AACjB,iCAAkC,AAClC,SAAe,CAChB,AAED,6DACE,WAAa,CACd,AAED,oEACE,WAAY,AACZ,kBAAoB,CACrB,AAED,mEACE,eAAgB,AAChB,WAAY,AACZ,kBAAoB,CACrB,AAED,8DACE,6BAA8B,AAC9B,YAAa,AACb,gBAAiB,AACjB,eAAkB,CACnB","file":"tabulator_bootstrap.min.css","sourcesContent":["/* Tabulator v4.1.2 (c) Oliver Folkerd */\n.tabulator {\n position: relative;\n background-color: #fff;\n overflow: hidden;\n font-size: 14px;\n text-align: left;\n width: 100%;\n max-width: 100%;\n margin-bottom: 20px;\n -ms-transform: translatez(0);\n transform: translatez(0);\n}\n\n.tabulator[tabulator-layout=\"fitDataFill\"] .tabulator-tableHolder .tabulator-table {\n min-width: 100%;\n}\n\n.tabulator.tabulator-block-select {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.tabulator .tabulator-header {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n border-bottom: 2px solid #ddd;\n background-color: #fff;\n font-weight: bold;\n white-space: nowrap;\n overflow: hidden;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-header .tabulator-col {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n background-color: #fff;\n text-align: left;\n vertical-align: bottom;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-moving {\n position: absolute;\n border: 1px solid #ddd;\n background: #e6e6e6;\n pointer-events: none;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content {\n box-sizing: border-box;\n position: relative;\n padding: 8px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title {\n box-sizing: border-box;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: bottom;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor {\n box-sizing: border-box;\n width: 100%;\n border: 1px solid #999;\n padding: 1px;\n background: #fff;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n display: inline-block;\n position: absolute;\n top: 14px;\n right: 8px;\n width: 0;\n height: 0;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols {\n position: relative;\n display: -ms-flexbox;\n display: flex;\n border-top: 1px solid #ddd;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child {\n margin-right: -1px;\n}\n\n.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-col.ui-sortable-helper {\n position: absolute;\n background-color: #e6e6e6 !important;\n border: 1px solid #ddd;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter {\n position: relative;\n box-sizing: border-box;\n margin-top: 2px;\n width: 100%;\n text-align: center;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea {\n height: auto !important;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg {\n margin-top: 3px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear {\n width: 0;\n height: 0;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title {\n padding-right: 25px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover {\n cursor: pointer;\n background-color: #e6e6e6;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"none\"] .tabulator-col-content .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"asc\"] .tabulator-col-content .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"desc\"] .tabulator-col-content .tabulator-arrow {\n border-top: 6px solid #666;\n border-bottom: none;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title {\n -webkit-writing-mode: vertical-rl;\n -ms-writing-mode: tb-rl;\n writing-mode: vertical-rl;\n text-orientation: mixed;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title {\n -ms-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title {\n padding-right: 0;\n padding-top: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title {\n padding-right: 0;\n padding-bottom: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow {\n right: calc(50% - 6px);\n}\n\n.tabulator .tabulator-header .tabulator-frozen {\n display: inline-block;\n position: absolute;\n z-index: 10;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #ddd;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #ddd;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder {\n box-sizing: border-box;\n width: 100%;\n background: white !important;\n border-top: 1px solid #ddd;\n border-bottom: 1px solid #ddd;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row {\n background: white !important;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder {\n min-width: 400%;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty {\n display: none;\n}\n\n.tabulator .tabulator-tableHolder {\n position: relative;\n width: 100%;\n white-space: nowrap;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.tabulator .tabulator-tableHolder:focus {\n outline: none;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder {\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n width: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=\"virtual\"] {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder span {\n display: inline-block;\n margin: 0 auto;\n padding: 10px;\n color: #000;\n font-weight: bold;\n font-size: 20px;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table {\n position: relative;\n display: inline-block;\n background-color: #fff;\n white-space: nowrap;\n overflow: visible;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs {\n font-weight: bold;\n background: #ececec !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top {\n border-bottom: 2px solid #ddd;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom {\n border-top: 2px solid #ddd;\n}\n\n.tabulator .tabulator-col-resize-handle {\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n width: 5px;\n}\n\n.tabulator .tabulator-col-resize-handle.prev {\n left: 0;\n right: auto;\n}\n\n.tabulator .tabulator-col-resize-handle:hover {\n cursor: ew-resize;\n}\n\n.tabulator .tabulator-footer {\n padding: 5px 10px;\n border-top: 2px solid #ddd;\n text-align: right;\n font-weight: bold;\n white-space: nowrap;\n -ms-user-select: none;\n user-select: none;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder {\n box-sizing: border-box;\n width: calc(100% + 20px);\n margin: -5px -10px 5px -10px;\n text-align: left;\n background: white !important;\n border-bottom: 1px solid #ddd;\n border-top: 1px solid #ddd;\n overflow: hidden;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row {\n background: white !important;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder:only-child {\n margin-bottom: -5px;\n border-bottom: none;\n}\n\n.tabulator .tabulator-footer .tabulator-pages {\n margin: 0 7px;\n}\n\n.tabulator .tabulator-footer .tabulator-page {\n display: inline-block;\n margin: 0 2px;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 2px 5px;\n background: rgba(255, 255, 255, 0.2);\n font-family: inherit;\n font-weight: inherit;\n font-size: inherit;\n}\n\n.tabulator .tabulator-footer .tabulator-page.active {\n color: #d00;\n}\n\n.tabulator .tabulator-footer .tabulator-page:disabled {\n opacity: .5;\n}\n\n.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n color: #fff;\n}\n\n.tabulator .tabulator-loader {\n position: absolute;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n top: 0;\n left: 0;\n z-index: 100;\n height: 100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.4);\n text-align: center;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg {\n display: inline-block;\n margin: 0 auto;\n padding: 10px 20px;\n border-radius: 10px;\n background: #fff;\n font-weight: bold;\n font-size: 16px;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading {\n border: 4px solid #333;\n color: #000;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error {\n border: 4px solid #D00;\n color: #590000;\n}\n\n.tabulator.table-striped .tabulator-row:nth-child(even) {\n background-color: #f9f9f9;\n}\n\n.tabulator.table-bordered {\n border: 1px solid #ddd;\n}\n\n.tabulator.table-bordered .tabulator-header .tabulator-col {\n border-right: 1px solid #ddd;\n}\n\n.tabulator.table-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n border-right: 1px solid #ddd;\n}\n\n.tabulator.table-condensed .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 5px;\n}\n\n.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row {\n min-height: 24px;\n}\n\n.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 5px;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active {\n background: #f5f5f5 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.success {\n background: #dff0d8 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.info {\n background: #d9edf7 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning {\n background: #fcf8e3 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.danger {\n background: #f2dede !important;\n}\n\n.tabulator-row {\n position: relative;\n box-sizing: border-box;\n min-height: 30px;\n background-color: #fff;\n border-bottom: 1px solid #ddd;\n}\n\n.tabulator-row.tabulator-selectable:hover {\n background-color: #f5f5f5 !important;\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-selected {\n background-color: #9ABCEA;\n}\n\n.tabulator-row.tabulator-selected:hover {\n background-color: #769BCC;\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-moving {\n position: absolute;\n border-top: 1px solid #ddd;\n border-bottom: 1px solid #ddd;\n pointer-events: none !important;\n z-index: 15;\n}\n\n.tabulator-row .tabulator-row-resize-handle {\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n height: 5px;\n}\n\n.tabulator-row .tabulator-row-resize-handle.prev {\n top: 0;\n bottom: auto;\n}\n\n.tabulator-row .tabulator-row-resize-handle:hover {\n cursor: ns-resize;\n}\n\n.tabulator-row .tabulator-frozen {\n display: inline-block;\n position: absolute;\n background-color: inherit;\n z-index: 10;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #ddd;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #ddd;\n}\n\n.tabulator-row .tabulator-responsive-collapse {\n box-sizing: border-box;\n padding: 5px;\n border-top: 1px solid #ddd;\n border-bottom: 1px solid #ddd;\n}\n\n.tabulator-row .tabulator-responsive-collapse:empty {\n display: none;\n}\n\n.tabulator-row .tabulator-responsive-collapse table {\n font-size: 14px;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td {\n position: relative;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type {\n padding-right: 10px;\n}\n\n.tabulator-row .tabulator-cell {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n padding: 8px;\n vertical-align: middle;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.tabulator-row .tabulator-cell:last-of-type {\n border-right: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing {\n border: 1px solid #1D68CD;\n padding: 0;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select {\n border: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail {\n border: 1px solid #dd0000;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select {\n border: 1px;\n background: transparent;\n color: #dd0000;\n}\n\n.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box {\n width: 80%;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar {\n width: 100%;\n height: 3px;\n margin-top: 2px;\n background: #666;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-branch {\n display: inline-block;\n vertical-align: middle;\n height: 9px;\n width: 7px;\n margin-top: -9px;\n margin-right: 5px;\n border-bottom-left-radius: 1px;\n border-left: 2px solid #ddd;\n border-bottom: 2px solid #ddd;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-align: center;\n align-items: center;\n vertical-align: middle;\n height: 11px;\n width: 11px;\n margin-right: 5px;\n border: 1px solid #333;\n border-radius: 2px;\n background: rgba(0, 0, 0, 0.1);\n overflow: hidden;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #333;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: #333;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #333;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n height: 15px;\n width: 15px;\n border-radius: 20px;\n background: #666;\n color: #fff;\n font-weight: bold;\n font-size: 1.1em;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover {\n opacity: .7;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close {\n display: initial;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open {\n display: none;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close {\n display: none;\n}\n\n.tabulator-row.tabulator-group {\n box-sizing: border-box;\n border-bottom: 1px solid #999;\n border-right: 1px solid #ddd;\n border-top: 1px solid #999;\n padding: 5px;\n padding-left: 10px;\n background: #fafafa;\n font-weight: bold;\n min-width: 100%;\n}\n\n.tabulator-row.tabulator-group:hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.1);\n}\n\n.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow {\n margin-right: 10px;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #666;\n border-bottom: 0;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow {\n margin-left: 20px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow {\n margin-left: 40px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow {\n margin-left: 60px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow {\n margin-left: 80px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow {\n margin-left: 100px;\n}\n\n.tabulator-row.tabulator-group .tabulator-arrow {\n display: inline-block;\n width: 0;\n height: 0;\n margin-right: 16px;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 0;\n border-left: 6px solid #666;\n vertical-align: middle;\n}\n\n.tabulator-row.tabulator-group span {\n margin-left: 10px;\n color: #666;\n}\n\n.tabulator-edit-select-list {\n position: absolute;\n display: inline-block;\n box-sizing: border-box;\n max-height: 200px;\n background: #fff;\n border: 1px solid #ddd;\n font-size: 14px;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n z-index: 10000;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item {\n padding: 4px;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item.active {\n color: #fff;\n background: #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item:hover {\n cursor: pointer;\n color: #fff;\n background: #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-group {\n border-bottom: 1px solid #ddd;\n padding: 4px;\n padding-top: 6px;\n font-weight: bold;\n}\n"]} \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap4.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap4.css deleted file mode 100644 index 2b437802b3..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap4.css +++ /dev/null @@ -1,1008 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator { - position: relative; - background-color: transparent; - overflow: hidden; - font-size: 1rem; - text-align: left; - width: 100%; - max-width: 100%; - -ms-transform: translatez(0); - transform: translatez(0); -} - -.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { - min-width: 100%; -} - -.tabulator.tabulator-block-select { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.tabulator .tabulator-header { - position: relative; - box-sizing: border-box; - width: 100%; - border-top: 1px solid #dee2e6; - border-bottom: 2px solid #dee2e6; - background-color: #fff; - font-weight: bold; - white-space: nowrap; - overflow: hidden; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-header .tabulator-col { - display: inline-block; - position: relative; - box-sizing: border-box; - background-color: #fff; - text-align: left; - vertical-align: bottom; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-moving { - position: absolute; - border: 1px solid #dee2e6; - background: #e6e6e6; - pointer-events: none; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content { - box-sizing: border-box; - position: relative; - padding: 0.75rem; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { - box-sizing: border-box; - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - vertical-align: bottom; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { - box-sizing: border-box; - width: 100%; - border: 1px solid #999; - padding: 1px; - background: #fff; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - display: inline-block; - position: absolute; - top: 14px; - right: 8px; - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { - position: relative; - display: -ms-flexbox; - display: flex; - border-top: 1px solid #dee2e6; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { - margin-right: -1px; -} - -.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { - position: absolute; - background-color: #e6e6e6 !important; - border: 1px solid #dee2e6; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { - position: relative; - box-sizing: border-box; - margin-top: 2px; - width: 100%; - text-align: center; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { - height: auto !important; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { - margin-top: 3px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { - width: 0; - height: 0; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { - padding-right: 25px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { - cursor: pointer; - background-color: #e6e6e6; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #666; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { - border-top: 6px solid #666; - border-bottom: none; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { - -webkit-writing-mode: vertical-rl; - -ms-writing-mode: tb-rl; - writing-mode: vertical-rl; - text-orientation: mixed; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { - padding-right: 0; - padding-top: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { - padding-right: 0; - padding-bottom: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow { - right: calc(50% - 6px); -} - -.tabulator .tabulator-header .tabulator-frozen { - display: inline-block; - position: absolute; - z-index: 10; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #dee2e6; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #dee2e6; -} - -.tabulator .tabulator-header .tabulator-calcs-holder { - box-sizing: border-box; - width: 100%; - background: white !important; - border-top: 1px solid #dee2e6; - border-bottom: 1px solid #dee2e6; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { - background: white !important; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder { - min-width: 400%; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { - display: none; -} - -.tabulator .tabulator-tableHolder { - position: relative; - width: 100%; - white-space: nowrap; - overflow: auto; - -webkit-overflow-scrolling: touch; -} - -.tabulator .tabulator-tableHolder:focus { - outline: none; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder { - box-sizing: border-box; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - width: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { - position: absolute; - top: 0; - left: 0; - height: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder span { - display: inline-block; - margin: 0 auto; - padding: 10px; - color: #000; - font-weight: bold; - font-size: 20px; -} - -.tabulator .tabulator-tableHolder .tabulator-table { - position: relative; - display: inline-block; - background-color: transparent; - white-space: nowrap; - overflow: visible; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { - font-weight: bold; - background: rgba(0, 0, 0, 0.05) !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { - border-bottom: 2px solid #dee2e6; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { - border-top: 2px solid #dee2e6; -} - -.tabulator .tabulator-col-resize-handle { - position: absolute; - right: 0; - top: 0; - bottom: 0; - width: 5px; -} - -.tabulator .tabulator-col-resize-handle.prev { - left: 0; - right: auto; -} - -.tabulator .tabulator-col-resize-handle:hover { - cursor: ew-resize; -} - -.tabulator .tabulator-footer { - padding: 5px 10px; - border-top: 2px solid #dee2e6; - text-align: right; - font-weight: bold; - white-space: nowrap; - -ms-user-select: none; - user-select: none; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder { - box-sizing: border-box; - width: calc(100% + 20px); - margin: -5px -10px 5px -10px; - text-align: left; - background: rgba(13, 13, 13, 0) !important; - border-bottom: 1px solid #dee2e6; - border-top: 1px solid #dee2e6; - overflow: hidden; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { - background: rgba(13, 13, 13, 0) !important; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { - margin-bottom: -5px; - border-bottom: none; -} - -.tabulator .tabulator-footer .tabulator-page { - display: inline-block; - margin: 0; - margin-top: 5px; - padding: 8px 12px; - border: 1px solid #dee2e6; - border-right: none; - background: rgba(255, 255, 255, 0.2); - color: #007bff; - font-family: inherit; - font-weight: normal; - font-size: inherit; -} - -.tabulator .tabulator-footer .tabulator-page[data-page="first"] { - border-top-left-radius: 4px; - border-bottom-left-radius: 4px; -} - -.tabulator .tabulator-footer .tabulator-page[data-page="last"] { - border: 1px solid #dee2e6; - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; -} - -.tabulator .tabulator-footer .tabulator-page.active { - border-color: #007bff; - background-color: #007bff; - color: #fff; -} - -.tabulator .tabulator-footer .tabulator-page:disabled { - border-color: #dee2e6; - background: #fff; - color: #6c757d; -} - -.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { - cursor: pointer; - border-color: #dee2e6; - background: #e9ecef; - color: #0056b3; -} - -.tabulator .tabulator-loader { - position: absolute; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - top: 0; - left: 0; - z-index: 100; - height: 100%; - width: 100%; - background: rgba(0, 0, 0, 0.4); - text-align: center; -} - -.tabulator .tabulator-loader .tabulator-loader-msg { - display: inline-block; - margin: 0 auto; - padding: 10px 20px; - border-radius: 10px; - background: #fff; - font-weight: bold; - font-size: 16px; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { - border: 4px solid #333; - color: #000; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { - border: 4px solid #D00; - color: #590000; -} - -.tabulator.thead-dark .tabulator-header { - border-color: #32383e; - background-color: #212529; - color: #fff; -} - -.tabulator.thead-dark .tabulator-header .tabulator-col { - border-color: #32383e; - background-color: #212529; - color: #fff; -} - -.tabulator.table-dark { - background-color: #212529; -} - -.tabulator.table-dark:not(.thead-light) .tabulator-header { - border-color: #32383e; - background-color: #212529; - color: #fff; -} - -.tabulator.table-dark:not(.thead-light) .tabulator-header .tabulator-col { - border-color: #32383e; - background-color: #212529; - color: #fff; -} - -.tabulator.table-dark .tabulator-tableHolder { - color: #fff; -} - -.tabulator.table-dark .tabulator-row { - border-color: #32383e; -} - -.tabulator.table-dark .tabulator-row:hover { - background-color: rgba(255, 255, 255, 0.075) !important; -} - -.tabulator.table-striped .tabulator-row:nth-child(even) { - background-color: rgba(0, 0, 0, 0.05); -} - -.tabulator.table-striped .tabulator-row:nth-child(even).tabulator-selected { - background-color: #9ABCEA; -} - -.tabulator.table-striped .tabulator-row:nth-child(even).tabulator-selectable:hover { - background-color: rgba(0, 0, 0, 0.075); - cursor: pointer; -} - -.tabulator.table-striped .tabulator-row:nth-child(even).tabulator-selected:hover { - background-color: #769BCC; - cursor: pointer; -} - -.tabulator.table-striped.table-dark .tabulator-row:nth-child(even) { - background-color: rgba(255, 255, 255, 0.05); -} - -.tabulator.table-bordered { - border: 1px solid #dee2e6; -} - -.tabulator.table-bordered .tabulator-header .tabulator-col { - border-right: 1px solid #dee2e6; -} - -.tabulator.table-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { - border-right: 1px solid #dee2e6; -} - -.tabulator.table-borderless .tabulator-header { - border: none; -} - -.tabulator.table-borderless .tabulator-row { - border: none; -} - -.tabulator.table-sm .tabulator-header .tabulator-col .tabulator-col-content { - padding: 0.3rem !important; -} - -.tabulator.table-sm .tabulator-tableHolder .tabulator-table .tabulator-row { - min-height: 1.6rem; -} - -.tabulator.table-sm .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { - padding: 0.3rem !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-primary { - background: #b8daff !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-secondary { - background: #d6d8db !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-success { - background: #c3e6cb !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-info { - background: #bee5eb !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-warning { - background: #ffeeba !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-danger { - background: #f5c6cb !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-light { - background: #fdfdfe !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-dark { - background: #c6c8ca !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-active { - background: rgba(0, 0, 0, 0.075) !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-primary { - background: #007bff !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-secondary { - background: #6c757d !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-success { - background: #28a745 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-info { - background: #17a2b8 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-warning { - background: #ffc107 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-danger { - background: #dc3545 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-light { - background: #f8f9fa !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-dark { - background: #343a40 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-active { - background: rgba(0, 0, 0, 0.075) !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-primary { - background: #b8daff !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-secondary { - background: #d6d8db !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-success { - background: #c3e6cb !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-info { - background: #bee5eb !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-warning { - background: #ffeeba !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-danger { - background: #f5c6cb !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-light { - background: #fdfdfe !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-dark { - background: #c6c8ca !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-active { - background: rgba(0, 0, 0, 0.075) !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-primary { - background: #007bff !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-secondary { - background: #6c757d !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-success { - background: #28a745 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-info { - background: #17a2b8 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-warning { - background: #ffc107 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-danger { - background: #dc3545 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-light { - background: #f8f9fa !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-dark { - background: #343a40 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-active { - background: rgba(0, 0, 0, 0.075) !important; -} - -.tabulator-row { - position: relative; - box-sizing: border-box; - min-height: 2.5rem; - background-color: transparent; - border-bottom: 1px solid #dee2e6; -} - -.tabulator-row.tabulator-selectable:hover { - background-color: rgba(0, 0, 0, 0.075); - cursor: pointer; -} - -.tabulator-row.tabulator-selected { - background-color: #9ABCEA; -} - -.tabulator-row.tabulator-selected:hover { - background-color: #769BCC; - cursor: pointer; -} - -.tabulator-row.tabulator-moving { - position: absolute; - border-top: 1px solid #dee2e6; - border-bottom: 1px solid #dee2e6; - pointer-events: none !important; - z-index: 15; -} - -.tabulator-row .tabulator-row-resize-handle { - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 5px; -} - -.tabulator-row .tabulator-row-resize-handle.prev { - top: 0; - bottom: auto; -} - -.tabulator-row .tabulator-row-resize-handle:hover { - cursor: ns-resize; -} - -.tabulator-row .tabulator-frozen { - display: inline-block; - position: absolute; - background-color: inherit; - z-index: 10; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #dee2e6; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #dee2e6; -} - -.tabulator-row .tabulator-responsive-collapse { - box-sizing: border-box; - padding: 5px; - border-top: 1px solid #dee2e6; - border-bottom: 1px solid #dee2e6; -} - -.tabulator-row .tabulator-responsive-collapse:empty { - display: none; -} - -.tabulator-row .tabulator-responsive-collapse table { - font-size: 1rem; -} - -.tabulator-row .tabulator-responsive-collapse table tr td { - position: relative; -} - -.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { - padding-right: 10px; -} - -.tabulator-row .tabulator-cell { - display: inline-block; - position: relative; - box-sizing: border-box; - padding: 0.75rem; - vertical-align: middle; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.tabulator-row .tabulator-cell:last-of-type { - border-right: none; -} - -.tabulator-row .tabulator-cell.tabulator-editing { - border: 1px solid #1D68CD; - padding: 0; -} - -.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { - border: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail { - border: 1px solid #dd0000; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { - border: 1px; - background: transparent; - color: #dd0000; -} - -.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { - width: 80%; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { - width: 100%; - height: 3px; - margin-top: 2px; - background: #666; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-branch { - display: inline-block; - vertical-align: middle; - height: 9px; - width: 7px; - margin-top: -9px; - margin-right: 5px; - border-bottom-left-radius: 1px; - border-left: 2px solid #dee2e6; - border-bottom: 2px solid #dee2e6; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-pack: center; - justify-content: center; - -ms-flex-align: center; - align-items: center; - vertical-align: middle; - height: 11px; - width: 11px; - margin-right: 5px; - border: 1px solid #ccc; - border-radius: 2px; - background: rgba(0, 0, 0, 0.1); - overflow: hidden; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #ccc; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: #ccc; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #ccc; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - height: 15px; - width: 15px; - border-radius: 20px; - background: #666; - color: transparent; - font-weight: bold; - font-size: 1.1em; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { - opacity: .7; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { - display: initial; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { - display: none; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { - display: none; -} - -.tabulator-row.tabulator-group { - box-sizing: border-box; - border-bottom: 1px solid #999; - border-right: 1px solid #dee2e6; - border-top: 1px solid #999; - padding: 5px; - padding-left: 10px; - background: #fafafa; - font-weight: bold; - min-width: 100%; -} - -.tabulator-row.tabulator-group:hover { - cursor: pointer; - background-color: rgba(0, 0, 0, 0.1); -} - -.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { - margin-right: 10px; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-top: 6px solid #666; - border-bottom: 0; -} - -.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { - margin-left: 20px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { - margin-left: 40px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { - margin-left: 60px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { - margin-left: 80px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { - margin-left: 100px; -} - -.tabulator-row.tabulator-group .tabulator-arrow { - display: inline-block; - width: 0; - height: 0; - margin-right: 16px; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-right: 0; - border-left: 6px solid #666; - vertical-align: middle; -} - -.tabulator-row.tabulator-group span { - margin-left: 10px; - color: #666; -} - -.tabulator-edit-select-list { - position: absolute; - display: inline-block; - box-sizing: border-box; - max-height: 200px; - background: transparent; - border: 1px solid #dee2e6; - font-size: 1rem; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - z-index: 10000; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item { - padding: 4px; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item.active { - color: transparent; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { - cursor: pointer; - color: transparent; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-group { - border-bottom: 1px solid #dee2e6; - padding: 4px; - padding-top: 6px; - font-weight: bold; -} diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap4.min.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap4.min.css deleted file mode 100644 index 9385497885..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap4.min.css +++ /dev/null @@ -1,3 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator{position:relative;background-color:transparent;overflow:hidden;font-size:1rem;text-align:left;width:100%;max-width:100%;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{width:100%;border-top:1px solid #dee2e6;border-bottom:2px solid #dee2e6;font-weight:700;white-space:nowrap;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header,.tabulator .tabulator-header .tabulator-col{position:relative;box-sizing:border-box;background-color:#fff;overflow:hidden}.tabulator .tabulator-header .tabulator-col{display:inline-block;text-align:left;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #dee2e6;background:#e6e6e6;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:.75rem}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:14px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #dee2e6;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#e6e6e6!important;border:1px solid #dee2e6}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#e6e6e6}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow{right:calc(50% - 6px)}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #dee2e6}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #dee2e6}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;width:100%;background:#fff!important;border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:400%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{position:absolute;top:0;left:0;height:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#000;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:transparent;white-space:nowrap;overflow:visible}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:rgba(0,0,0,.05)!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #dee2e6}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #dee2e6}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:5px 10px;border-top:2px solid #dee2e6;text-align:right;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px;text-align:left;background:hsla(0,0%,5%,0)!important;border-bottom:1px solid #dee2e6;border-top:1px solid #dee2e6;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:hsla(0,0%,5%,0)!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0;margin-top:5px;padding:8px 12px;border:1px solid #dee2e6;border-right:none;background:hsla(0,0%,100%,.2);color:#007bff;font-family:inherit;font-weight:400;font-size:inherit}.tabulator .tabulator-footer .tabulator-page[data-page=first]{border-top-left-radius:4px;border-bottom-left-radius:4px}.tabulator .tabulator-footer .tabulator-page[data-page=last]{border:1px solid #dee2e6;border-top-right-radius:4px;border-bottom-right-radius:4px}.tabulator .tabulator-footer .tabulator-page.active{border-color:#007bff;background-color:#007bff;color:#fff}.tabulator .tabulator-footer .tabulator-page:disabled{border-color:#dee2e6;background:#fff;color:#6c757d}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;border-color:#dee2e6;background:#e9ecef;color:#0056b3}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator.thead-dark .tabulator-header,.tabulator.thead-dark .tabulator-header .tabulator-col{border-color:#32383e;background-color:#212529;color:#fff}.tabulator.table-dark{background-color:#212529}.tabulator.table-dark:not(.thead-light) .tabulator-header,.tabulator.table-dark:not(.thead-light) .tabulator-header .tabulator-col{border-color:#32383e;background-color:#212529;color:#fff}.tabulator.table-dark .tabulator-tableHolder{color:#fff}.tabulator.table-dark .tabulator-row{border-color:#32383e}.tabulator.table-dark .tabulator-row:hover{background-color:hsla(0,0%,100%,.075)!important}.tabulator.table-striped .tabulator-row:nth-child(2n){background-color:rgba(0,0,0,.05)}.tabulator.table-striped .tabulator-row:nth-child(2n).tabulator-selected{background-color:#9abcea}.tabulator.table-striped .tabulator-row:nth-child(2n).tabulator-selectable:hover{background-color:rgba(0,0,0,.075);cursor:pointer}.tabulator.table-striped .tabulator-row:nth-child(2n).tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator.table-striped.table-dark .tabulator-row:nth-child(2n){background-color:hsla(0,0%,100%,.05)}.tabulator.table-bordered{border:1px solid #dee2e6}.tabulator.table-bordered .tabulator-header .tabulator-col,.tabulator.table-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{border-right:1px solid #dee2e6}.tabulator.table-borderless .tabulator-header,.tabulator.table-borderless .tabulator-row{border:none}.tabulator.table-sm .tabulator-header .tabulator-col .tabulator-col-content{padding:.3rem!important}.tabulator.table-sm .tabulator-tableHolder .tabulator-table .tabulator-row{min-height:1.6rem}.tabulator.table-sm .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:.3rem!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-primary{background:#b8daff!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-secondary{background:#d6d8db!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-success{background:#c3e6cb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-info{background:#bee5eb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-warning{background:#ffeeba!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-danger{background:#f5c6cb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-light{background:#fdfdfe!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-dark{background:#c6c8ca!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-active{background:rgba(0,0,0,.075)!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-primary{background:#007bff!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-secondary{background:#6c757d!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-success{background:#28a745!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-info{background:#17a2b8!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-warning{background:#ffc107!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-danger{background:#dc3545!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-light{background:#f8f9fa!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-dark{background:#343a40!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-active{background:rgba(0,0,0,.075)!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-primary{background:#b8daff!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-secondary{background:#d6d8db!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-success{background:#c3e6cb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-info{background:#bee5eb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-warning{background:#ffeeba!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-danger{background:#f5c6cb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-light{background:#fdfdfe!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-dark{background:#c6c8ca!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-active{background:rgba(0,0,0,.075)!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-primary{background:#007bff!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-secondary{background:#6c757d!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-success{background:#28a745!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-info{background:#17a2b8!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-warning{background:#ffc107!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-danger{background:#dc3545!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-light{background:#f8f9fa!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-dark{background:#343a40!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-active{background:rgba(0,0,0,.075)!important}.tabulator-row{position:relative;box-sizing:border-box;min-height:2.5rem;background-color:transparent;border-bottom:1px solid #dee2e6}.tabulator-row.tabulator-selectable:hover{background-color:rgba(0,0,0,.075);cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6;pointer-events:none!important;z-index:2}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #dee2e6}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #dee2e6}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:1rem}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:.75rem;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #dee2e6;border-bottom:2px solid #dee2e6}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #ccc;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#ccc}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#ccc}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#ccc}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:transparent;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #dee2e6;border-top:1px solid #999;padding:5px;padding-left:10px;background:#fafafa;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:100px}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#666}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:transparent;border:1px solid #dee2e6;font-size:1rem;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:4}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:transparent;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:transparent;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #dee2e6;padding:4px;padding-top:6px;font-weight:700} -/*# sourceMappingURL=tabulator_bootstrap4.min.css.map */ diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap4.min.css.map b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap4.min.css.map deleted file mode 100644 index ce13175937..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap4.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["tabulator_bootstrap4.min.css"],"names":[],"mappings":"AACA,WACE,kBAAmB,AACnB,6BAA8B,AAC9B,gBAAiB,AACjB,eAAgB,AAChB,gBAAiB,AACjB,WAAY,AACZ,eAAgB,AAEhB,uBAAyB,CAC1B,AAED,iFACE,cAAgB,CACjB,AAED,kCACE,yBAA0B,AACvB,sBAAuB,AACtB,qBAAsB,AAClB,gBAAkB,CAC3B,AAED,6BAGE,WAAY,AACZ,6BAA8B,AAC9B,gCAAiC,AAEjC,gBAAkB,AAClB,mBAAoB,AAEpB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,yEAfE,kBAAmB,AACnB,sBAAuB,AAIvB,sBAAuB,AAGvB,eAAiB,CAOnB,AAQC,4CAPC,qBAAsB,AAItB,gBAAiB,AACjB,qBAAuB,CAExB,AAED,6DACE,kBAAmB,AACnB,yBAA0B,AAC1B,mBAAoB,AACpB,mBAAqB,CACtB,AAED,mEACE,sBAAuB,AACvB,kBAAmB,AACnB,cAAiB,CAClB,AAED,wFACE,sBAAuB,AACvB,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,uBAAwB,AACxB,qBAAuB,CACxB,AAED,gHACE,sBAAuB,AACvB,WAAY,AACZ,sBAAuB,AACvB,YAAa,AACb,eAAiB,CAClB,AAED,oFACE,qBAAsB,AACtB,kBAAmB,AACnB,SAAU,AACV,UAAW,AACX,QAAS,AACT,SAAU,AACV,kCAAmC,AACnC,mCAAoC,AACpC,4BAA8B,CAC/B,AAED,0FACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,6BAA8B,AAC9B,eAAiB,CAClB,AAED,oHACE,iBAAmB,CACpB,AAED,0FACE,YAAc,CACf,AAED,+DACE,kBAAmB,AACnB,mCAAqC,AACrC,wBAA0B,CAC3B,AAED,qEACE,kBAAmB,AACnB,sBAAuB,AACvB,eAAgB,AAChB,WAAY,AACZ,iBAAmB,CACpB,AAED,8EACE,qBAAwB,CACzB,AAED,yEACE,cAAgB,CACjB,AAED,sFACE,QAAS,AACT,QAAU,CACX,AAED,oFACE,kBAAoB,CACrB,AAED,qEACE,eAAgB,AAChB,wBAA0B,CAC3B,AAED,uHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,sHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,uHACE,0BAA2B,AAC3B,kBAAoB,CACrB,AAED,+GACE,iCAAkC,AAC9B,uBAAwB,AACpB,yBAA0B,AAClC,uBAAwB,AACxB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,sBAAwB,CAC7B,AAED,oHAEM,wBAA0B,CAC/B,AAED,2GACE,gBAAiB,AACjB,gBAAkB,CACnB,AAED,uIACE,gBAAiB,AACjB,mBAAqB,CACtB,AAED,uGACE,qBAAuB,CACxB,AAED,+CACE,qBAAsB,AACtB,kBAAmB,AACnB,SAAY,CACb,AAED,qEACE,8BAAgC,CACjC,AAED,sEACE,6BAA+B,CAChC,AAED,qDACE,sBAAuB,AACvB,WAAY,AACZ,0BAA6B,AAC7B,6BAA8B,AAC9B,gCAAiC,AACjC,eAAiB,CAClB,AAED,oEACE,yBAA6B,CAC9B,AAED,iGACE,YAAc,CACf,AAED,2DACE,cAAgB,CACjB,AAED,iEACE,YAAc,CACf,AAED,kCACE,kBAAmB,AACnB,WAAY,AACZ,mBAAoB,AACpB,cAAe,AACf,gCAAkC,CACnC,AAED,wCACE,YAAc,CACf,AAED,yDACE,sBAAuB,AACvB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,UAAY,CACb,AAED,wFACE,kBAAmB,AACnB,MAAO,AACP,OAAQ,AACR,WAAa,CACd,AAED,8DACE,qBAAsB,AACtB,cAAe,AACf,aAAc,AACd,WAAY,AACZ,gBAAkB,AAClB,cAAgB,CACjB,AAED,mDACE,kBAAmB,AACnB,qBAAsB,AACtB,6BAA8B,AAC9B,mBAAoB,AACpB,gBAAkB,CACnB,AAED,kFACE,gBAAkB,AAClB,oCAA2C,CAC5C,AAED,sGACE,+BAAiC,CAClC,AAED,yGACE,4BAA8B,CAC/B,AAED,wCACE,kBAAmB,AACnB,QAAS,AACT,MAAO,AACP,SAAU,AACV,SAAW,CACZ,AAED,6CACE,OAAQ,AACR,UAAY,CACb,AAED,8CACE,gBAAkB,CACnB,AAED,6BACE,iBAAkB,AAClB,6BAA8B,AAC9B,iBAAkB,AAClB,gBAAkB,AAClB,mBAAoB,AACpB,qBAAsB,AAClB,iBAAkB,AACtB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,qDACE,sBAAuB,AACvB,wBAAyB,AACzB,sBAA6B,AAC7B,gBAAiB,AACjB,qCAA2C,AAC3C,gCAAiC,AACjC,6BAA8B,AAC9B,eAAiB,CAClB,AAED,oEACE,oCAA2C,CAC5C,AAED,iGACE,YAAc,CACf,AAED,gEACE,mBAAoB,AACpB,kBAAoB,CACrB,AAED,6CACE,qBAAsB,AACtB,SAAU,AACV,eAAgB,AAChB,iBAAkB,AAClB,yBAA0B,AAC1B,kBAAmB,AACnB,8BAAqC,AACrC,cAAe,AACf,oBAAqB,AACrB,gBAAoB,AACpB,iBAAmB,CACpB,AAED,8DACE,2BAA4B,AAC5B,6BAA+B,CAChC,AAED,6DACE,yBAA0B,AAC1B,4BAA6B,AAC7B,8BAAgC,CACjC,AAED,oDACE,qBAAsB,AACtB,yBAA0B,AAC1B,UAAY,CACb,AAED,sDACE,qBAAsB,AACtB,gBAAiB,AACjB,aAAe,CAChB,AAED,kEACE,eAAgB,AAChB,qBAAsB,AACtB,mBAAoB,AACpB,aAAe,CAChB,AAED,6BACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,MAAO,AACP,OAAQ,AACR,UAAa,AACb,YAAa,AACb,WAAY,AACZ,0BAA+B,AAC/B,iBAAmB,CACpB,AAED,mDACE,qBAAsB,AACtB,cAAe,AACf,kBAAmB,AACnB,mBAAoB,AACpB,gBAAiB,AACjB,gBAAkB,AAClB,cAAgB,CACjB,AAED,qEACE,sBAAuB,AACvB,UAAY,CACb,AAED,mEACE,sBAAuB,AACvB,aAAe,CAChB,AAQD,+FACE,qBAAsB,AACtB,yBAA0B,AAC1B,UAAY,CACb,AAED,sBACE,wBAA0B,CAC3B,AAQD,mIALE,qBAAsB,AACtB,yBAA0B,AAC1B,UAAY,CAOb,AAED,6CACE,UAAY,CACb,AAED,qCACE,oBAAsB,CACvB,AAED,2CACE,+CAAwD,CACzD,AAED,sDACE,gCAAsC,CACvC,AAED,yEACE,wBAA0B,CAC3B,AAED,iFACE,kCAAuC,AACvC,cAAgB,CACjB,AAED,+EACE,yBAA0B,AAC1B,cAAgB,CACjB,AAED,iEACE,oCAA4C,CAC7C,AAED,0BACE,wBAA0B,CAC3B,AAMD,4JACE,8BAAgC,CACjC,AAMD,yFACE,WAAa,CACd,AAED,4EACE,uBAA2B,CAC5B,AAED,2EACE,iBAAmB,CACpB,AAED,2FACE,uBAA2B,CAC5B,AAED,gFACE,4BAA+B,CAChC,AAED,kFACE,4BAA+B,CAChC,AAED,gFACE,4BAA+B,CAChC,AAED,6EACE,4BAA+B,CAChC,AAED,gFACE,4BAA+B,CAChC,AAED,+EACE,4BAA+B,CAChC,AAED,8EACE,4BAA+B,CAChC,AAED,6EACE,4BAA+B,CAChC,AAED,+EACE,qCAA4C,CAC7C,AAED,6EACE,4BAA+B,CAChC,AAED,+EACE,4BAA+B,CAChC,AAED,6EACE,4BAA+B,CAChC,AAED,0EACE,4BAA+B,CAChC,AAED,6EACE,4BAA+B,CAChC,AAED,4EACE,4BAA+B,CAChC,AAED,2EACE,4BAA+B,CAChC,AAED,0EACE,4BAA+B,CAChC,AAED,4EACE,qCAA4C,CAC7C,AAED,gGACE,4BAA+B,CAChC,AAED,kGACE,4BAA+B,CAChC,AAED,gGACE,4BAA+B,CAChC,AAED,6FACE,4BAA+B,CAChC,AAED,gGACE,4BAA+B,CAChC,AAED,+FACE,4BAA+B,CAChC,AAED,8FACE,4BAA+B,CAChC,AAED,6FACE,4BAA+B,CAChC,AAED,+FACE,qCAA4C,CAC7C,AAED,6FACE,4BAA+B,CAChC,AAED,+FACE,4BAA+B,CAChC,AAED,6FACE,4BAA+B,CAChC,AAED,0FACE,4BAA+B,CAChC,AAED,6FACE,4BAA+B,CAChC,AAED,4FACE,4BAA+B,CAChC,AAED,2FACE,4BAA+B,CAChC,AAED,0FACE,4BAA+B,CAChC,AAED,4FACE,qCAA4C,CAC7C,AAED,eACE,kBAAmB,AACnB,sBAAuB,AACvB,kBAAmB,AACnB,6BAA8B,AAC9B,+BAAiC,CAClC,AAED,0CACE,kCAAuC,AACvC,cAAgB,CACjB,AAED,kCACE,wBAA0B,CAC3B,AAED,wCACE,yBAA0B,AAC1B,cAAgB,CACjB,AAED,gCACE,kBAAmB,AACnB,6BAA8B,AAC9B,gCAAiC,AACjC,8BAAgC,AAChC,SAAY,CACb,AAED,4CACE,kBAAmB,AACnB,QAAS,AACT,SAAU,AACV,OAAQ,AACR,UAAY,CACb,AAED,iDACE,MAAO,AACP,WAAa,CACd,AAED,kDACE,gBAAkB,CACnB,AAED,iCACE,qBAAsB,AACtB,kBAAmB,AACnB,yBAA0B,AAC1B,SAAY,CACb,AAED,uDACE,8BAAgC,CACjC,AAED,wDACE,6BAA+B,CAChC,AAED,8CACE,sBAAuB,AACvB,YAAa,AACb,6BAA8B,AAC9B,+BAAiC,CAClC,AAED,oDACE,YAAc,CACf,AAED,oDACE,cAAgB,CACjB,AAED,0DACE,iBAAmB,CACpB,AAED,wEACE,kBAAoB,CACrB,AAED,+BACE,qBAAsB,AACtB,kBAAmB,AACnB,sBAAuB,AACvB,eAAiB,AACjB,sBAAuB,AACvB,mBAAoB,AACpB,gBAAiB,AACjB,sBAAwB,CACzB,AAED,4CACE,iBAAmB,CACpB,AAED,iDACE,yBAA0B,AAC1B,SAAW,CACZ,AAED,+GACE,WAAY,AACZ,sBAAwB,CACzB,AAED,yDACE,qBAA0B,CAC3B,AAED,+HACE,WAAY,AACZ,uBAAwB,AACxB,UAAe,CAChB,AAED,6EACE,YAAc,CACf,AAED,oDACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,8EACE,SAAW,CACZ,AAED,wGACE,WAAY,AACZ,WAAY,AACZ,eAAgB,AAChB,eAAiB,CAClB,AAED,2DACE,qBAAsB,AACtB,sBAAuB,AACvB,WAAY,AACZ,UAAW,AACX,gBAAiB,AACjB,iBAAkB,AAClB,8BAA+B,AAC/B,8BAA+B,AAC/B,+BAAiC,CAClC,AAED,4DACE,2BAA4B,AAC5B,oBAAqB,AACrB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,YAAa,AACb,WAAY,AACZ,iBAAkB,AAClB,sBAAuB,AACvB,kBAAmB,AACnB,0BAA+B,AAC/B,eAAiB,CAClB,AAED,kEACE,eAAgB,AAChB,yBAA+B,CAChC,AAED,kGACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,sBAAwB,CACzB,AAED,wGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,gGACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,sGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,qEACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,oBAAqB,AACrB,YAAa,AACb,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,kBAAmB,AACnB,gBAAkB,AAClB,eAAiB,CAClB,AAED,2EACE,UAAY,CACb,AAED,sHACE,eAAiB,CAClB,AAMD,sOACE,YAAc,CACf,AAED,+BACE,sBAAuB,AACvB,6BAA8B,AAC9B,+BAAgC,AAChC,0BAA2B,AAC3B,YAAa,AACb,kBAAmB,AACnB,mBAAoB,AACpB,gBAAkB,AAClB,cAAgB,CACjB,AAED,qCACE,eAAgB,AAChB,+BAAqC,CACtC,AAED,wEACE,kBAAmB,AACnB,kCAAmC,AACnC,mCAAoC,AACpC,0BAA2B,AAC3B,eAAiB,CAClB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,iBAAmB,CACpB,AAED,gDACE,qBAAsB,AACtB,QAAS,AACT,SAAU,AACV,kBAAmB,AACnB,iCAAkC,AAClC,oCAAqC,AACrC,eAAgB,AAChB,2BAA4B,AAC5B,qBAAuB,CACxB,AAED,oCACE,iBAAkB,AAClB,UAAY,CACb,AAED,4BACE,kBAAmB,AACnB,qBAAsB,AACtB,sBAAuB,AACvB,iBAAkB,AAClB,uBAAwB,AACxB,yBAA0B,AAC1B,eAAgB,AAChB,gBAAiB,AACjB,iCAAkC,AAClC,SAAe,CAChB,AAED,6DACE,WAAa,CACd,AAED,oEACE,kBAAmB,AACnB,kBAAoB,CACrB,AAED,mEACE,eAAgB,AAChB,kBAAmB,AACnB,kBAAoB,CACrB,AAED,8DACE,gCAAiC,AACjC,YAAa,AACb,gBAAiB,AACjB,eAAkB,CACnB","file":"tabulator_bootstrap4.min.css","sourcesContent":["/* Tabulator v4.1.2 (c) Oliver Folkerd */\n.tabulator {\n position: relative;\n background-color: transparent;\n overflow: hidden;\n font-size: 1rem;\n text-align: left;\n width: 100%;\n max-width: 100%;\n -ms-transform: translatez(0);\n transform: translatez(0);\n}\n\n.tabulator[tabulator-layout=\"fitDataFill\"] .tabulator-tableHolder .tabulator-table {\n min-width: 100%;\n}\n\n.tabulator.tabulator-block-select {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.tabulator .tabulator-header {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n border-top: 1px solid #dee2e6;\n border-bottom: 2px solid #dee2e6;\n background-color: #fff;\n font-weight: bold;\n white-space: nowrap;\n overflow: hidden;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-header .tabulator-col {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n background-color: #fff;\n text-align: left;\n vertical-align: bottom;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-moving {\n position: absolute;\n border: 1px solid #dee2e6;\n background: #e6e6e6;\n pointer-events: none;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content {\n box-sizing: border-box;\n position: relative;\n padding: 0.75rem;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title {\n box-sizing: border-box;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: bottom;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor {\n box-sizing: border-box;\n width: 100%;\n border: 1px solid #999;\n padding: 1px;\n background: #fff;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n display: inline-block;\n position: absolute;\n top: 14px;\n right: 8px;\n width: 0;\n height: 0;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols {\n position: relative;\n display: -ms-flexbox;\n display: flex;\n border-top: 1px solid #dee2e6;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child {\n margin-right: -1px;\n}\n\n.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-col.ui-sortable-helper {\n position: absolute;\n background-color: #e6e6e6 !important;\n border: 1px solid #dee2e6;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter {\n position: relative;\n box-sizing: border-box;\n margin-top: 2px;\n width: 100%;\n text-align: center;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea {\n height: auto !important;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg {\n margin-top: 3px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear {\n width: 0;\n height: 0;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title {\n padding-right: 25px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover {\n cursor: pointer;\n background-color: #e6e6e6;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"none\"] .tabulator-col-content .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"asc\"] .tabulator-col-content .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"desc\"] .tabulator-col-content .tabulator-arrow {\n border-top: 6px solid #666;\n border-bottom: none;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title {\n -webkit-writing-mode: vertical-rl;\n -ms-writing-mode: tb-rl;\n writing-mode: vertical-rl;\n text-orientation: mixed;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title {\n -ms-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title {\n padding-right: 0;\n padding-top: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title {\n padding-right: 0;\n padding-bottom: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow {\n right: calc(50% - 6px);\n}\n\n.tabulator .tabulator-header .tabulator-frozen {\n display: inline-block;\n position: absolute;\n z-index: 10;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #dee2e6;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #dee2e6;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder {\n box-sizing: border-box;\n width: 100%;\n background: white !important;\n border-top: 1px solid #dee2e6;\n border-bottom: 1px solid #dee2e6;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row {\n background: white !important;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder {\n min-width: 400%;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty {\n display: none;\n}\n\n.tabulator .tabulator-tableHolder {\n position: relative;\n width: 100%;\n white-space: nowrap;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.tabulator .tabulator-tableHolder:focus {\n outline: none;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder {\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n width: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=\"virtual\"] {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder span {\n display: inline-block;\n margin: 0 auto;\n padding: 10px;\n color: #000;\n font-weight: bold;\n font-size: 20px;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table {\n position: relative;\n display: inline-block;\n background-color: transparent;\n white-space: nowrap;\n overflow: visible;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs {\n font-weight: bold;\n background: rgba(0, 0, 0, 0.05) !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top {\n border-bottom: 2px solid #dee2e6;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom {\n border-top: 2px solid #dee2e6;\n}\n\n.tabulator .tabulator-col-resize-handle {\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n width: 5px;\n}\n\n.tabulator .tabulator-col-resize-handle.prev {\n left: 0;\n right: auto;\n}\n\n.tabulator .tabulator-col-resize-handle:hover {\n cursor: ew-resize;\n}\n\n.tabulator .tabulator-footer {\n padding: 5px 10px;\n border-top: 2px solid #dee2e6;\n text-align: right;\n font-weight: bold;\n white-space: nowrap;\n -ms-user-select: none;\n user-select: none;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder {\n box-sizing: border-box;\n width: calc(100% + 20px);\n margin: -5px -10px 5px -10px;\n text-align: left;\n background: rgba(13, 13, 13, 0) !important;\n border-bottom: 1px solid #dee2e6;\n border-top: 1px solid #dee2e6;\n overflow: hidden;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row {\n background: rgba(13, 13, 13, 0) !important;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder:only-child {\n margin-bottom: -5px;\n border-bottom: none;\n}\n\n.tabulator .tabulator-footer .tabulator-page {\n display: inline-block;\n margin: 0;\n margin-top: 5px;\n padding: 8px 12px;\n border: 1px solid #dee2e6;\n border-right: none;\n background: rgba(255, 255, 255, 0.2);\n color: #007bff;\n font-family: inherit;\n font-weight: normal;\n font-size: inherit;\n}\n\n.tabulator .tabulator-footer .tabulator-page[data-page=\"first\"] {\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n}\n\n.tabulator .tabulator-footer .tabulator-page[data-page=\"last\"] {\n border: 1px solid #dee2e6;\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n}\n\n.tabulator .tabulator-footer .tabulator-page.active {\n border-color: #007bff;\n background-color: #007bff;\n color: #fff;\n}\n\n.tabulator .tabulator-footer .tabulator-page:disabled {\n border-color: #dee2e6;\n background: #fff;\n color: #6c757d;\n}\n\n.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover {\n cursor: pointer;\n border-color: #dee2e6;\n background: #e9ecef;\n color: #0056b3;\n}\n\n.tabulator .tabulator-loader {\n position: absolute;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n top: 0;\n left: 0;\n z-index: 100;\n height: 100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.4);\n text-align: center;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg {\n display: inline-block;\n margin: 0 auto;\n padding: 10px 20px;\n border-radius: 10px;\n background: #fff;\n font-weight: bold;\n font-size: 16px;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading {\n border: 4px solid #333;\n color: #000;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error {\n border: 4px solid #D00;\n color: #590000;\n}\n\n.tabulator.thead-dark .tabulator-header {\n border-color: #32383e;\n background-color: #212529;\n color: #fff;\n}\n\n.tabulator.thead-dark .tabulator-header .tabulator-col {\n border-color: #32383e;\n background-color: #212529;\n color: #fff;\n}\n\n.tabulator.table-dark {\n background-color: #212529;\n}\n\n.tabulator.table-dark:not(.thead-light) .tabulator-header {\n border-color: #32383e;\n background-color: #212529;\n color: #fff;\n}\n\n.tabulator.table-dark:not(.thead-light) .tabulator-header .tabulator-col {\n border-color: #32383e;\n background-color: #212529;\n color: #fff;\n}\n\n.tabulator.table-dark .tabulator-tableHolder {\n color: #fff;\n}\n\n.tabulator.table-dark .tabulator-row {\n border-color: #32383e;\n}\n\n.tabulator.table-dark .tabulator-row:hover {\n background-color: rgba(255, 255, 255, 0.075) !important;\n}\n\n.tabulator.table-striped .tabulator-row:nth-child(even) {\n background-color: rgba(0, 0, 0, 0.05);\n}\n\n.tabulator.table-striped .tabulator-row:nth-child(even).tabulator-selected {\n background-color: #9ABCEA;\n}\n\n.tabulator.table-striped .tabulator-row:nth-child(even).tabulator-selectable:hover {\n background-color: rgba(0, 0, 0, 0.075);\n cursor: pointer;\n}\n\n.tabulator.table-striped .tabulator-row:nth-child(even).tabulator-selected:hover {\n background-color: #769BCC;\n cursor: pointer;\n}\n\n.tabulator.table-striped.table-dark .tabulator-row:nth-child(even) {\n background-color: rgba(255, 255, 255, 0.05);\n}\n\n.tabulator.table-bordered {\n border: 1px solid #dee2e6;\n}\n\n.tabulator.table-bordered .tabulator-header .tabulator-col {\n border-right: 1px solid #dee2e6;\n}\n\n.tabulator.table-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n border-right: 1px solid #dee2e6;\n}\n\n.tabulator.table-borderless .tabulator-header {\n border: none;\n}\n\n.tabulator.table-borderless .tabulator-row {\n border: none;\n}\n\n.tabulator.table-sm .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 0.3rem !important;\n}\n\n.tabulator.table-sm .tabulator-tableHolder .tabulator-table .tabulator-row {\n min-height: 1.6rem;\n}\n\n.tabulator.table-sm .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 0.3rem !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-primary {\n background: #b8daff !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-secondary {\n background: #d6d8db !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-success {\n background: #c3e6cb !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-info {\n background: #bee5eb !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-warning {\n background: #ffeeba !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-danger {\n background: #f5c6cb !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-light {\n background: #fdfdfe !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-dark {\n background: #c6c8ca !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-active {\n background: rgba(0, 0, 0, 0.075) !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-primary {\n background: #007bff !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-secondary {\n background: #6c757d !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-success {\n background: #28a745 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-info {\n background: #17a2b8 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-warning {\n background: #ffc107 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-danger {\n background: #dc3545 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-light {\n background: #f8f9fa !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-dark {\n background: #343a40 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-active {\n background: rgba(0, 0, 0, 0.075) !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-primary {\n background: #b8daff !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-secondary {\n background: #d6d8db !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-success {\n background: #c3e6cb !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-info {\n background: #bee5eb !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-warning {\n background: #ffeeba !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-danger {\n background: #f5c6cb !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-light {\n background: #fdfdfe !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-dark {\n background: #c6c8ca !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-active {\n background: rgba(0, 0, 0, 0.075) !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-primary {\n background: #007bff !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-secondary {\n background: #6c757d !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-success {\n background: #28a745 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-info {\n background: #17a2b8 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-warning {\n background: #ffc107 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-danger {\n background: #dc3545 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-light {\n background: #f8f9fa !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-dark {\n background: #343a40 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-active {\n background: rgba(0, 0, 0, 0.075) !important;\n}\n\n.tabulator-row {\n position: relative;\n box-sizing: border-box;\n min-height: 2.5rem;\n background-color: transparent;\n border-bottom: 1px solid #dee2e6;\n}\n\n.tabulator-row.tabulator-selectable:hover {\n background-color: rgba(0, 0, 0, 0.075);\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-selected {\n background-color: #9ABCEA;\n}\n\n.tabulator-row.tabulator-selected:hover {\n background-color: #769BCC;\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-moving {\n position: absolute;\n border-top: 1px solid #dee2e6;\n border-bottom: 1px solid #dee2e6;\n pointer-events: none !important;\n z-index: 15;\n}\n\n.tabulator-row .tabulator-row-resize-handle {\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n height: 5px;\n}\n\n.tabulator-row .tabulator-row-resize-handle.prev {\n top: 0;\n bottom: auto;\n}\n\n.tabulator-row .tabulator-row-resize-handle:hover {\n cursor: ns-resize;\n}\n\n.tabulator-row .tabulator-frozen {\n display: inline-block;\n position: absolute;\n background-color: inherit;\n z-index: 10;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #dee2e6;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #dee2e6;\n}\n\n.tabulator-row .tabulator-responsive-collapse {\n box-sizing: border-box;\n padding: 5px;\n border-top: 1px solid #dee2e6;\n border-bottom: 1px solid #dee2e6;\n}\n\n.tabulator-row .tabulator-responsive-collapse:empty {\n display: none;\n}\n\n.tabulator-row .tabulator-responsive-collapse table {\n font-size: 1rem;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td {\n position: relative;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type {\n padding-right: 10px;\n}\n\n.tabulator-row .tabulator-cell {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n padding: 0.75rem;\n vertical-align: middle;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.tabulator-row .tabulator-cell:last-of-type {\n border-right: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing {\n border: 1px solid #1D68CD;\n padding: 0;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select {\n border: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail {\n border: 1px solid #dd0000;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select {\n border: 1px;\n background: transparent;\n color: #dd0000;\n}\n\n.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box {\n width: 80%;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar {\n width: 100%;\n height: 3px;\n margin-top: 2px;\n background: #666;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-branch {\n display: inline-block;\n vertical-align: middle;\n height: 9px;\n width: 7px;\n margin-top: -9px;\n margin-right: 5px;\n border-bottom-left-radius: 1px;\n border-left: 2px solid #dee2e6;\n border-bottom: 2px solid #dee2e6;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-align: center;\n align-items: center;\n vertical-align: middle;\n height: 11px;\n width: 11px;\n margin-right: 5px;\n border: 1px solid #ccc;\n border-radius: 2px;\n background: rgba(0, 0, 0, 0.1);\n overflow: hidden;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #ccc;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: #ccc;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #ccc;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n height: 15px;\n width: 15px;\n border-radius: 20px;\n background: #666;\n color: transparent;\n font-weight: bold;\n font-size: 1.1em;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover {\n opacity: .7;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close {\n display: initial;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open {\n display: none;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close {\n display: none;\n}\n\n.tabulator-row.tabulator-group {\n box-sizing: border-box;\n border-bottom: 1px solid #999;\n border-right: 1px solid #dee2e6;\n border-top: 1px solid #999;\n padding: 5px;\n padding-left: 10px;\n background: #fafafa;\n font-weight: bold;\n min-width: 100%;\n}\n\n.tabulator-row.tabulator-group:hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.1);\n}\n\n.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow {\n margin-right: 10px;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #666;\n border-bottom: 0;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow {\n margin-left: 20px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow {\n margin-left: 40px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow {\n margin-left: 60px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow {\n margin-left: 80px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow {\n margin-left: 100px;\n}\n\n.tabulator-row.tabulator-group .tabulator-arrow {\n display: inline-block;\n width: 0;\n height: 0;\n margin-right: 16px;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 0;\n border-left: 6px solid #666;\n vertical-align: middle;\n}\n\n.tabulator-row.tabulator-group span {\n margin-left: 10px;\n color: #666;\n}\n\n.tabulator-edit-select-list {\n position: absolute;\n display: inline-block;\n box-sizing: border-box;\n max-height: 200px;\n background: transparent;\n border: 1px solid #dee2e6;\n font-size: 1rem;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n z-index: 10000;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item {\n padding: 4px;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item.active {\n color: transparent;\n background: #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item:hover {\n cursor: pointer;\n color: transparent;\n background: #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-group {\n border-bottom: 1px solid #dee2e6;\n padding: 4px;\n padding-top: 6px;\n font-weight: bold;\n}\n"]} \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/semantic-ui/tabulator_semantic-ui.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/semantic-ui/tabulator_semantic-ui.css deleted file mode 100644 index d825e07830..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/semantic-ui/tabulator_semantic-ui.css +++ /dev/null @@ -1,1284 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -/******************************* - Site Settings -*******************************/ -/*------------------- - Fonts ---------------------*/ -/*------------------- - Base Sizes ---------------------*/ -/* This is the single variable that controls them all */ -/* The size of page text */ -/*------------------- - Exact Pixel Values ---------------------*/ -/* - These are used to specify exact pixel values in em - for things like borders that remain constantly - sized as emSize adjusts - - Since there are many more sizes than names for sizes, - these are named by their original pixel values. - -*/ -/*------------------- - Border Radius ---------------------*/ -/* See Power-user section below - for explanation of $px variables -*/ -/*------------------- - Site Colors ---------------------*/ -/*--- Colors ---*/ -/*--- Light Colors ---*/ -/*--- Neutrals ---*/ -/*--- Colored Backgrounds ---*/ -/*--- Colored Text ---*/ -/*--- Colored Headers ---*/ -/*--- Colored Border ---*/ -/*------------------- - Alpha Colors ---------------------*/ -/*------------------- - Brand Colors ---------------------*/ -/*-------------- - Page Heading ----------------*/ -/*------------------- - Page ---------------------*/ -/*-------------- - Form Input ----------------*/ -/* This adjusts the default form input across all elements */ -/* Input Text Color */ -/* Line Height Default For Inputs in Browser (Descendors are 17px at 14px base em) */ -/*------------------- - Focused Input ---------------------*/ -/* Used on inputs, textarea etc */ -/* Used on dropdowns, other larger blocks */ -/*------------------- - Sizes ---------------------*/ -/* - Sizes are all expressed in terms of 14px/em (default em) - This ensures these "ratios" remain constant despite changes in EM -*/ -/*------------------- - Paragraph ---------------------*/ -/*------------------- - Links ---------------------*/ -/*------------------- - Highlighted Text ---------------------*/ -/*------------------- - Em Sizes ---------------------*/ -/* - This rounds $size values to the closest pixel then expresses that value in (r)em. - This ensures all size values round to exact pixels -*/ -/* em */ -/* rem */ -/*------------------- - Loader ---------------------*/ -/*------------------- - Grid ---------------------*/ -/*------------------- - Transitions ---------------------*/ -/*------------------- - Breakpoints ---------------------*/ -/* Columns */ -/******************************* - Power-User -*******************************/ -/*------------------- - Emotive Colors ---------------------*/ -/* Positive */ -/* Negative */ -/* Info */ -/* Warning */ -/*------------------- - Paths ---------------------*/ -/* For source only. Modified in gulp for dist */ -/*------------------- - Icons ---------------------*/ -/* Maximum Glyph Width of Icon */ -/*------------------- - Neutral Text ---------------------*/ -/*------------------- - Brand Colors ---------------------*/ -/*------------------- - Borders ---------------------*/ -/*------------------- - Accents ---------------------*/ -/* Differentiating Neutrals */ -/* Differentiating Layers */ -/*------------------- - Derived Values ---------------------*/ -/* Loaders Position Offset */ -/* Rendered Scrollbar Width */ -/* Maximum Single Character Glyph Width, aka Capital "W" */ -/* Used to match floats with text */ -/* Header Spacing */ -/* Minimum Mobile Width */ -/* Positive / Negative Dupes */ -/* Responsive */ -/******************************* - States -*******************************/ -/*------------------- - Disabled ---------------------*/ -/*------------------- - Hover ---------------------*/ -/*--- Shadows ---*/ -/*--- Colors ---*/ -/*--- Emotive ---*/ -/*--- Brand ---*/ -/*--- Dark Tones ---*/ -/*--- Light Tones ---*/ -/*------------------- - Focus ---------------------*/ -/*--- Colors ---*/ -/*--- Emotive ---*/ -/*--- Brand ---*/ -/*--- Dark Tones ---*/ -/*--- Light Tones ---*/ -/*------------------- - Down (:active) ---------------------*/ -/*--- Colors ---*/ -/*--- Emotive ---*/ -/*--- Brand ---*/ -/*--- Dark Tones ---*/ -/*--- Light Tones ---*/ -/*------------------- - Active ---------------------*/ -/*--- Colors ---*/ -/*--- Emotive ---*/ -/*--- Brand ---*/ -/*--- Dark Tones ---*/ -/*--- Light Tones ---*/ -/******************************* - Table -*******************************/ -/*------------------- - Element ---------------------*/ -/*-------------- - Parts ----------------*/ -/* Table Row */ -/* Table Cell */ -/* Table Header */ -/* Table Footer */ -/* Responsive Size */ -/*------------------- - Types ---------------------*/ -/* Definition */ -/*-------------- - Couplings ----------------*/ -/*-------------- - States ----------------*/ -/* Positive */ -/* Negative */ -/* Error */ -/* Warning */ -/* Active */ -/*-------------- - Types ----------------*/ -/* Attached */ -/* Striped */ -/* Selectable */ -/* Sortable */ -/* Colors */ -/* Inverted */ -/* Basic */ -/* Padded */ -/* Compact */ -/* Sizes */ -.tabulator { - position: relative; - background-color: #FFFFFF; - overflow: hidden; - font-size: 14px; - text-align: left; - width: 100%; - margin: 1em 0em; - border: 1px solid rgba(34, 36, 38, 0.15); - box-shadow: none; - border-radius: 0.28571/pxrem; - color: rgba(0, 0, 0, 0.87); - -ms-transform: translatez(0); - transform: translatez(0); - /* Red */ - /* Orange */ - /* Yellow */ - /* Olive */ - /* Green */ - /* Teal */ - /* Blue */ - /* Violet */ - /* Purple */ - /* Pink */ - /* Brown */ - /* Grey */ - /* Black */ -} - -.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { - min-width: 100%; -} - -.tabulator.tabulator-block-select { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.tabulator .tabulator-header { - position: relative; - box-sizing: border-box; - width: 100%; - border-bottom: 1px solid rgba(34, 36, 38, 0.1); - background-color: #F9FAFB; - box-shadow: none; - color: rgba(0, 0, 0, 0.87); - font-style: none; - font-weight: bold; - text-transform: none; - white-space: nowrap; - overflow: hidden; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-header .tabulator-col { - display: inline-block; - position: relative; - box-sizing: border-box; - background-color: #F9FAFB; - text-align: left; - vertical-align: bottom; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-moving { - position: absolute; - border: 1px solid #999; - background: #dae1e7; - pointer-events: none; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content { - box-sizing: border-box; - position: relative; - padding: 0.92857em 0.78571em; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { - box-sizing: border-box; - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - vertical-align: bottom; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { - box-sizing: border-box; - width: 100%; - border: 1px solid #999; - padding: 1px; - background: #fff; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - display: inline-block; - position: absolute; - top: 18px; - right: 8px; - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { - position: relative; - display: -ms-flexbox; - display: flex; - border-top: 1px solid #ddd; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { - margin-right: -1px; -} - -.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { - position: absolute; - background-color: #dae1e7 !important; - border: 1px solid #ddd; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { - position: relative; - box-sizing: border-box; - margin-top: 2px; - width: 100%; - text-align: center; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { - height: auto !important; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { - margin-top: 3px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { - width: 0; - height: 0; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { - padding-right: 25px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { - cursor: pointer; - background-color: #dae1e7; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #666; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { - border-top: 6px solid #666; - border-bottom: none; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { - -webkit-writing-mode: vertical-rl; - -ms-writing-mode: tb-rl; - writing-mode: vertical-rl; - text-orientation: mixed; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { - padding-right: 0; - padding-top: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { - padding-right: 0; - padding-bottom: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow { - right: calc(50% - 6px); -} - -.tabulator .tabulator-header .tabulator-frozen { - display: inline-block; - position: absolute; - z-index: 10; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #ddd; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #ddd; -} - -.tabulator .tabulator-header .tabulator-calcs-holder { - box-sizing: border-box; - min-width: 400%; - background: white !important; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { - background: white !important; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder { - min-width: 400%; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { - display: none; -} - -.tabulator .tabulator-tableHolder { - position: relative; - width: 100%; - white-space: nowrap; - overflow: auto; - -webkit-overflow-scrolling: touch; -} - -.tabulator .tabulator-tableHolder:focus { - outline: none; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder { - box-sizing: border-box; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - width: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { - position: absolute; - top: 0; - left: 0; - height: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder span { - display: inline-block; - margin: 0 auto; - padding: 10px; - color: #000; - font-weight: bold; - font-size: 20px; -} - -.tabulator .tabulator-tableHolder .tabulator-table { - position: relative; - display: inline-block; - white-space: nowrap; - overflow: visible; - color: #333; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { - font-weight: bold; - background: #f2f2f2 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { - border-bottom: 2px solid #ddd; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { - border-top: 2px solid #ddd; -} - -.tabulator .tabulator-col-resize-handle { - position: absolute; - right: 0; - top: 0; - bottom: 0; - width: 5px; -} - -.tabulator .tabulator-col-resize-handle.prev { - left: 0; - right: auto; -} - -.tabulator .tabulator-col-resize-handle:hover { - cursor: ew-resize; -} - -.tabulator .tabulator-footer { - padding: 0.78571em 0.78571em; - border-top: 1px solid rgba(34, 36, 38, 0.15); - box-shadow: none; - background: #F9FAFB; - text-align: right; - color: rgba(0, 0, 0, 0.87); - font-style: normal; - font-weight: normal; - text-transform: none; - white-space: nowrap; - -ms-user-select: none; - user-select: none; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder { - box-sizing: border-box; - width: calc(100% + 20px); - margin: -0.78571em -0.78571em 0.78571em -0.78571em; - text-align: left; - background: white !important; - border-bottom: 1px solid #ddd; - border-top: 1px solid #ddd; - overflow: hidden; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { - font-weight: bold; - background: white !important; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { - margin-bottom: -0.78571em; - border-bottom: none; -} - -.tabulator .tabulator-footer .tabulator-pages { - margin: 0 7px; -} - -.tabulator .tabulator-footer .tabulator-page { - display: inline-block; - margin: 0 2px; - border: 1px solid #aaa; - border-radius: 3px; - padding: 2px 5px; - background: rgba(255, 255, 255, 0.2); - color: #555; - font-family: inherit; - font-weight: inherit; - font-size: inherit; -} - -.tabulator .tabulator-footer .tabulator-page.active { - color: #d00; -} - -.tabulator .tabulator-footer .tabulator-page:disabled { - opacity: .5; -} - -.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); - color: #fff; -} - -.tabulator .tabulator-loader { - position: absolute; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - top: 0; - left: 0; - z-index: 100; - height: 100%; - width: 100%; - background: rgba(0, 0, 0, 0.4); - text-align: center; -} - -.tabulator .tabulator-loader .tabulator-loader-msg { - display: inline-block; - margin: 0 auto; - padding: 10px 20px; - border-radius: 10px; - background: #fff; - font-weight: bold; - font-size: 16px; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { - border: 4px solid #333; - color: #000; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { - border: 4px solid #D00; - color: #590000; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive { - box-shadow: 0px 0px 0px #A3C293 inset; - background: #FCFFF5 !important; - color: #21BA45 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive:hover { - background: #f7ffe6 !important; - color: #13ae38 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative { - box-shadow: 0px 0px 0px #E0B4B4 inset; - background: #FFF6F6 !important; - color: #DB2828 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative:hover { - background: #ffe7e7 !important; - color: #d41616 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error { - box-shadow: 0px 0px 0px #E0B4B4 inset; - background: #FFF6F6 !important; - color: #DB2828 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error:hover { - background: #ffe7e7 !important; - color: #d12323 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning { - box-shadow: 0px 0px 0px #C9BA9B inset; - background: #FFFAF3 !important; - color: #F2C037 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning:hover { - background: #fff4e4 !important; - color: #f1bb29 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active { - box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.87) inset; - background: #E0E0E0 !important; - color: rgba(0, 0, 0, 0.87) !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active:hover { - background: #f7ffe6 !important; - color: #13ae38 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.disabled:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active { - pointer-events: none; - color: rgba(0, 0, 0, 0.2); -} - -.tabulator.inverted { - background: #333333; - color: rgba(255, 255, 255, 0.9); - border: none; -} - -.tabulator.inverted .tabulator-header { - background-color: rgba(0, 0, 0, 0.15); - border-color: rgba(255, 255, 255, 0.1) !important; - color: rgba(255, 255, 255, 0.9); -} - -.tabulator.inverted .tabulator-header .tabulator-col { - border-color: rgba(255, 255, 255, 0.1) !important; -} - -.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row { - color: rgba(255, 255, 255, 0.9); - border: none; -} - -.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { - border-color: rgba(255, 255, 255, 0.1) !important; -} - -.tabulator.inverted .tabulator-footer { - background: #FFFFFF; -} - -.tabulator.striped .tabulator-tableHolder .tabulator-table .tabulator-row:nth-child(even) { - background-color: rgba(0, 0, 0, 0.05) !important; -} - -.tabulator.celled { - border: 1px solid rgba(34, 36, 38, 0.15); -} - -.tabulator.celled .tabulator-header .tabulator-col { - border-right: 1px solid rgba(34, 36, 38, 0.1); -} - -.tabulator.celled .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { - border-right: 1px solid rgba(34, 36, 38, 0.1); -} - -.tabulator[class*="single line"] .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { - border-right: none; -} - -.tabulator.red { - border-top: 0.2em solid #DB2828; -} - -.tabulator.inverted.red { - background-color: #DB2828 !important; - color: #FFFFFF !important; -} - -.tabulator.orange { - border-top: 0.2em solid #F2711C; -} - -.tabulator.inverted.orange { - background-color: #F2711C !important; - color: #FFFFFF !important; -} - -.tabulator.yellow { - border-top: 0.2em solid #FBBD08; -} - -.tabulator.inverted.yellow { - background-color: #FBBD08 !important; - color: #FFFFFF !important; -} - -.tabulator.olive { - border-top: 0.2em solid #B5CC18; -} - -.tabulator.inverted.olive { - background-color: #B5CC18 !important; - color: #FFFFFF !important; -} - -.tabulator.green { - border-top: 0.2em solid #21BA45; -} - -.tabulator.inverted.green { - background-color: #21BA45 !important; - color: #FFFFFF !important; -} - -.tabulator.teal { - border-top: 0.2em solid #00B5AD; -} - -.tabulator.inverted.teal { - background-color: #00B5AD !important; - color: #FFFFFF !important; -} - -.tabulator.blue { - border-top: 0.2em solid #2185D0; -} - -.tabulator.inverted.blue { - background-color: #2185D0 !important; - color: #FFFFFF !important; -} - -.tabulator.violet { - border-top: 0.2em solid #6435C9; -} - -.tabulator.inverted.violet { - background-color: #6435C9 !important; - color: #FFFFFF !important; -} - -.tabulator.purple { - border-top: 0.2em solid #A333C8; -} - -.tabulator.inverted.purple { - background-color: #A333C8 !important; - color: #FFFFFF !important; -} - -.tabulator.pink { - border-top: 0.2em solid #E03997; -} - -.tabulator.inverted.pink { - background-color: #E03997 !important; - color: #FFFFFF !important; -} - -.tabulator.brown { - border-top: 0.2em solid #A5673F; -} - -.tabulator.inverted.brown { - background-color: #A5673F !important; - color: #FFFFFF !important; -} - -.tabulator.grey { - border-top: 0.2em solid #767676; -} - -.tabulator.inverted.grey { - background-color: #767676 !important; - color: #FFFFFF !important; -} - -.tabulator.black { - border-top: 0.2em solid #1B1C1D; -} - -.tabulator.inverted.black { - background-color: #1B1C1D !important; - color: #FFFFFF !important; -} - -.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content { - padding: 1em 1em; -} - -.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - top: 20px; -} - -.tabulator.padded .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { - padding: 1em 1em; -} - -.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content { - padding: 1.5em 1.5em; -} - -.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - top: 26px; -} - -.tabulator.padded.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { - padding: 1.5em 1.5em; -} - -.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content { - padding: 0.5em 0.7em; -} - -.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - top: 12px; -} - -.tabulator.compact .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { - padding: 0.5em 0.7em; -} - -.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content { - padding: 0.4em 0.6em; -} - -.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - top: 10px; -} - -.tabulator.compact.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { - padding: 0.4em 0.6em; -} - -.tabulator-row { - position: relative; - box-sizing: border-box; - min-height: 22px; - border-bottom: 1px solid rgba(34, 36, 38, 0.1); -} - -.tabulator-row.tabulator-selectable:hover { - box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.87) inset; - background: #E0E0E0 !important; - color: rgba(0, 0, 0, 0.87) !important; - cursor: pointer; -} - -.tabulator-row.tabulator-selected { - background-color: #9ABCEA; -} - -.tabulator-row.tabulator-selected:hover { - background-color: #769BCC; - cursor: pointer; -} - -.tabulator-row.tabulator-moving { - position: absolute; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - pointer-events: none !important; - z-index: 15; -} - -.tabulator-row .tabulator-row-resize-handle { - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 5px; -} - -.tabulator-row .tabulator-row-resize-handle.prev { - top: 0; - bottom: auto; -} - -.tabulator-row .tabulator-row-resize-handle:hover { - cursor: ns-resize; -} - -.tabulator-row .tabulator-frozen { - display: inline-block; - position: absolute; - background-color: inherit; - z-index: 10; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #ddd; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #ddd; -} - -.tabulator-row .tabulator-responsive-collapse { - box-sizing: border-box; - padding: 5px; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; -} - -.tabulator-row .tabulator-responsive-collapse:empty { - display: none; -} - -.tabulator-row .tabulator-responsive-collapse table { - font-size: 14px; -} - -.tabulator-row .tabulator-responsive-collapse table tr td { - position: relative; -} - -.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { - padding-right: 10px; -} - -.tabulator-row .tabulator-cell { - display: inline-block; - position: relative; - box-sizing: border-box; - padding: 0.78571em 0.78571em; - vertical-align: middle; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.tabulator-row .tabulator-cell:last-of-type { - border-right: none; -} - -.tabulator-row .tabulator-cell.tabulator-editing { - border: 1px solid #1D68CD; - padding: 0; -} - -.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { - border: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail { - border: 1px solid #DB2828; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { - border: 1px; - background: transparent; - color: #DB2828; -} - -.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { - width: 80%; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { - width: 100%; - height: 3px; - margin-top: 2px; - background: #666; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-branch { - display: inline-block; - vertical-align: middle; - height: 9px; - width: 7px; - margin-top: -9px; - margin-right: 5px; - border-bottom-left-radius: 1px; - border-left: 2px solid #ddd; - border-bottom: 2px solid #ddd; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-pack: center; - justify-content: center; - -ms-flex-align: center; - align-items: center; - vertical-align: middle; - height: 11px; - width: 11px; - margin-right: 5px; - border: 1px solid #333; - border-radius: 2px; - background: rgba(0, 0, 0, 0.1); - overflow: hidden; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - height: 15px; - width: 15px; - border-radius: 20px; - background: #666; - color: #fff; - font-weight: bold; - font-size: 1.1em; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { - opacity: .7; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { - display: initial; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { - display: none; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { - display: none; -} - -.tabulator-row.tabulator-group { - box-sizing: border-box; - border-bottom: 1px solid #999; - border-right: 1px solid #ddd; - border-top: 1px solid #999; - padding: 5px; - padding-left: 10px; - background: #fafafa; - font-weight: bold; - min-width: 100%; -} - -.tabulator-row.tabulator-group:hover { - cursor: pointer; - background-color: rgba(0, 0, 0, 0.1); -} - -.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { - margin-right: 10px; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-top: 6px solid #666; - border-bottom: 0; -} - -.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { - margin-left: 20px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { - margin-left: 40px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { - margin-left: 60px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { - margin-left: 80px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { - margin-left: 100px; -} - -.tabulator-row.tabulator-group .tabulator-arrow { - display: inline-block; - width: 0; - height: 0; - margin-right: 16px; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-right: 0; - border-left: 6px solid #666; - vertical-align: middle; -} - -.tabulator-row.tabulator-group span { - margin-left: 10px; - color: #666; -} - -.tabulator-edit-select-list { - position: absolute; - display: inline-block; - box-sizing: border-box; - max-height: 200px; - background: #FFFFFF; - border: 1px solid #ddd; - font-size: 14px; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - z-index: 10000; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item { - padding: 4px; - color: #333; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item.active { - color: #FFFFFF; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { - cursor: pointer; - color: #FFFFFF; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-group { - border-bottom: 1px solid #ddd; - padding: 4px; - padding-top: 6px; - color: #333; - font-weight: bold; -} diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/semantic-ui/tabulator_semantic-ui.min.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/semantic-ui/tabulator_semantic-ui.min.css deleted file mode 100644 index 13e8572ba7..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/semantic-ui/tabulator_semantic-ui.min.css +++ /dev/null @@ -1,3 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator{position:relative;background-color:#fff;overflow:hidden;font-size:14px;text-align:left;width:100%;margin:1em 0;border:1px solid rgba(34,36,38,.15);box-shadow:none;border-radius:.28571/pxrem;color:rgba(0,0,0,.87);transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{width:100%;border-bottom:1px solid rgba(34,36,38,.1);box-shadow:none;color:rgba(0,0,0,.87);font-style:none;font-weight:700;text-transform:none;white-space:nowrap;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header,.tabulator .tabulator-header .tabulator-col{position:relative;box-sizing:border-box;background-color:#f9fafb;overflow:hidden}.tabulator .tabulator-header .tabulator-col{display:inline-block;text-align:left;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #999;background:#dae1e7;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:.92857em .78571em}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:18px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #ddd;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#dae1e7!important;border:1px solid #ddd}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#dae1e7}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow{right:calc(50% - 6px)}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:400%;background:#fff!important;border-top:1px solid #ddd;border-bottom:1px solid #ddd;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:400%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{position:absolute;top:0;left:0;height:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#000;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#f2f2f2!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #ddd}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #ddd}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:.78571em;border-top:1px solid rgba(34,36,38,.15);box-shadow:none;background:#f9fafb;text-align:right;color:rgba(0,0,0,.87);font-style:normal;font-weight:400;text-transform:none;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-.78571em -.78571em .78571em;text-align:left;background:#fff!important;border-bottom:1px solid #ddd;border-top:1px solid #ddd;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{font-weight:700;background:#fff!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-.78571em;border-bottom:none}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;border:1px solid #aaa;border-radius:3px;padding:2px 5px;background:hsla(0,0%,100%,.2);color:#555;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#d00}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive{box-shadow:inset 0 0 0 #a3c293;background:#fcfff5!important;color:#21ba45!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive:hover{background:#f7ffe6!important;color:#13ae38!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative{box-shadow:inset 0 0 0 #e0b4b4;background:#fff6f6!important;color:#db2828!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative:hover{background:#ffe7e7!important;color:#d41616!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error{box-shadow:inset 0 0 0 #e0b4b4;background:#fff6f6!important;color:#db2828!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error:hover{background:#ffe7e7!important;color:#d12323!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning{box-shadow:inset 0 0 0 #c9ba9b;background:#fffaf3!important;color:#f2c037!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning:hover{background:#fff4e4!important;color:#f1bb29!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active{box-shadow:inset 0 0 0 rgba(0,0,0,.87);background:#e0e0e0!important;color:rgba(0,0,0,.87)!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active:hover{background:#f7ffe6!important;color:#13ae38!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.disabled:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active{pointer-events:none;color:rgba(0,0,0,.2)}.tabulator.inverted{background:#333;color:hsla(0,0%,100%,.9);border:none}.tabulator.inverted .tabulator-header{background-color:rgba(0,0,0,.15);color:hsla(0,0%,100%,.9)}.tabulator.inverted .tabulator-header,.tabulator.inverted .tabulator-header .tabulator-col{border-color:hsla(0,0%,100%,.1)!important}.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row{color:hsla(0,0%,100%,.9);border:none}.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{border-color:hsla(0,0%,100%,.1)!important}.tabulator.inverted .tabulator-footer{background:#fff}.tabulator.striped .tabulator-tableHolder .tabulator-table .tabulator-row:nth-child(2n){background-color:rgba(0,0,0,.05)!important}.tabulator.celled{border:1px solid rgba(34,36,38,.15)}.tabulator.celled .tabulator-header .tabulator-col,.tabulator.celled .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{border-right:1px solid rgba(34,36,38,.1)}.tabulator[class*="single line"] .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{border-right:none}.tabulator.red{border-top:.2em solid #db2828}.tabulator.inverted.red{background-color:#db2828!important;color:#fff!important}.tabulator.orange{border-top:.2em solid #f2711c}.tabulator.inverted.orange{background-color:#f2711c!important;color:#fff!important}.tabulator.yellow{border-top:.2em solid #fbbd08}.tabulator.inverted.yellow{background-color:#fbbd08!important;color:#fff!important}.tabulator.olive{border-top:.2em solid #b5cc18}.tabulator.inverted.olive{background-color:#b5cc18!important;color:#fff!important}.tabulator.green{border-top:.2em solid #21ba45}.tabulator.inverted.green{background-color:#21ba45!important;color:#fff!important}.tabulator.teal{border-top:.2em solid #00b5ad}.tabulator.inverted.teal{background-color:#00b5ad!important;color:#fff!important}.tabulator.blue{border-top:.2em solid #2185d0}.tabulator.inverted.blue{background-color:#2185d0!important;color:#fff!important}.tabulator.violet{border-top:.2em solid #6435c9}.tabulator.inverted.violet{background-color:#6435c9!important;color:#fff!important}.tabulator.purple{border-top:.2em solid #a333c8}.tabulator.inverted.purple{background-color:#a333c8!important;color:#fff!important}.tabulator.pink{border-top:.2em solid #e03997}.tabulator.inverted.pink{background-color:#e03997!important;color:#fff!important}.tabulator.brown{border-top:.2em solid #a5673f}.tabulator.inverted.brown{background-color:#a5673f!important;color:#fff!important}.tabulator.grey{border-top:.2em solid #767676}.tabulator.inverted.grey{background-color:#767676!important;color:#fff!important}.tabulator.black{border-top:.2em solid #1b1c1d}.tabulator.inverted.black{background-color:#1b1c1d!important;color:#fff!important}.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content{padding:1em}.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{top:20px}.tabulator.padded .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:1em}.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content{padding:1.5em}.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{top:26px}.tabulator.padded.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:1.5em}.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content{padding:.5em .7em}.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{top:12px}.tabulator.compact .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:.5em .7em}.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content{padding:.4em .6em}.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{top:10px}.tabulator.compact.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:.4em .6em}.tabulator-row{position:relative;box-sizing:border-box;min-height:22px;border-bottom:1px solid rgba(34,36,38,.1)}.tabulator-row.tabulator-selectable:hover{box-shadow:inset 0 0 0 rgba(0,0,0,.87);background:#e0e0e0!important;color:rgba(0,0,0,.87)!important;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #ddd;border-bottom:1px solid #ddd;pointer-events:none!important;z-index:2}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:.78571em;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #db2828}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#db2828}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #ddd;border-bottom:2px solid #ddd}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #ddd;border-top:1px solid #999;padding:5px;padding-left:10px;background:#fafafa;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:100px}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#666}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #ddd;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:4}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#333}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #ddd;padding:4px;padding-top:6px;color:#333;font-weight:700} -/*# sourceMappingURL=tabulator_semantic-ui.min.css.map */ diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/semantic-ui/tabulator_semantic-ui.min.css.map b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/semantic-ui/tabulator_semantic-ui.min.css.map deleted file mode 100644 index 9c420c95be..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/semantic-ui/tabulator_semantic-ui.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["tabulator_semantic-ui.min.css"],"names":[],"mappings":"AAiOA,WACE,kBAAmB,AACnB,sBAA0B,AAC1B,gBAAiB,AACjB,eAAgB,AAChB,gBAAiB,AACjB,WAAY,AACZ,aAAgB,AAChB,oCAAyC,AACzC,gBAAiB,AACjB,2BAA6B,AAC7B,sBAA2B,AAE3B,uBAAyB,CAc1B,AAED,iFACE,cAAgB,CACjB,AAED,kCACE,yBAA0B,AACvB,sBAAuB,AACtB,qBAAsB,AAClB,gBAAkB,CAC3B,AAED,6BAGE,WAAY,AACZ,0CAA+C,AAE/C,gBAAiB,AACjB,sBAA2B,AAC3B,gBAAiB,AACjB,gBAAkB,AAClB,oBAAqB,AACrB,mBAAoB,AAEpB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,yEAlBE,kBAAmB,AACnB,sBAAuB,AAGvB,yBAA0B,AAO1B,eAAiB,CAOnB,AAQC,4CAPC,qBAAsB,AAItB,gBAAiB,AACjB,qBAAuB,CAExB,AAED,6DACE,kBAAmB,AACnB,sBAAuB,AACvB,mBAAoB,AACpB,mBAAqB,CACtB,AAED,mEACE,sBAAuB,AACvB,kBAAmB,AACnB,yBAA6B,CAC9B,AAED,wFACE,sBAAuB,AACvB,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,uBAAwB,AACxB,qBAAuB,CACxB,AAED,gHACE,sBAAuB,AACvB,WAAY,AACZ,sBAAuB,AACvB,YAAa,AACb,eAAiB,CAClB,AAED,oFACE,qBAAsB,AACtB,kBAAmB,AACnB,SAAU,AACV,UAAW,AACX,QAAS,AACT,SAAU,AACV,kCAAmC,AACnC,mCAAoC,AACpC,4BAA8B,CAC/B,AAED,0FACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,0BAA2B,AAC3B,eAAiB,CAClB,AAED,oHACE,iBAAmB,CACpB,AAED,0FACE,YAAc,CACf,AAED,+DACE,kBAAmB,AACnB,mCAAqC,AACrC,qBAAuB,CACxB,AAED,qEACE,kBAAmB,AACnB,sBAAuB,AACvB,eAAgB,AAChB,WAAY,AACZ,iBAAmB,CACpB,AAED,8EACE,qBAAwB,CACzB,AAED,yEACE,cAAgB,CACjB,AAED,sFACE,QAAS,AACT,QAAU,CACX,AAED,oFACE,kBAAoB,CACrB,AAED,qEACE,eAAgB,AAChB,wBAA0B,CAC3B,AAED,uHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,sHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,uHACE,0BAA2B,AAC3B,kBAAoB,CACrB,AAED,+GACE,iCAAkC,AAC9B,uBAAwB,AACpB,yBAA0B,AAClC,uBAAwB,AACxB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,sBAAwB,CAC7B,AAED,oHAEM,wBAA0B,CAC/B,AAED,2GACE,gBAAiB,AACjB,gBAAkB,CACnB,AAED,uIACE,gBAAiB,AACjB,mBAAqB,CACtB,AAED,uGACE,qBAAuB,CACxB,AAED,+CACE,qBAAsB,AACtB,kBAAmB,AACnB,SAAY,CACb,AAED,qEACE,2BAA6B,CAC9B,AAED,sEACE,0BAA4B,CAC7B,AAED,qDACE,sBAAuB,AACvB,eAAgB,AAChB,0BAA6B,AAC7B,0BAA2B,AAC3B,6BAA8B,AAC9B,eAAiB,CAClB,AAED,oEACE,yBAA6B,CAC9B,AAED,iGACE,YAAc,CACf,AAED,2DACE,cAAgB,CACjB,AAED,iEACE,YAAc,CACf,AAED,kCACE,kBAAmB,AACnB,WAAY,AACZ,mBAAoB,AACpB,cAAe,AACf,gCAAkC,CACnC,AAED,wCACE,YAAc,CACf,AAED,yDACE,sBAAuB,AACvB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,UAAY,CACb,AAED,wFACE,kBAAmB,AACnB,MAAO,AACP,OAAQ,AACR,WAAa,CACd,AAED,8DACE,qBAAsB,AACtB,cAAe,AACf,aAAc,AACd,WAAY,AACZ,gBAAkB,AAClB,cAAgB,CACjB,AAED,mDACE,kBAAmB,AACnB,qBAAsB,AACtB,mBAAoB,AACpB,iBAAkB,AAClB,UAAY,CACb,AAED,kFACE,gBAAkB,AAClB,4BAA+B,CAChC,AAED,sGACE,4BAA8B,CAC/B,AAED,yGACE,yBAA2B,CAC5B,AAED,wCACE,kBAAmB,AACnB,QAAS,AACT,MAAO,AACP,SAAU,AACV,SAAW,CACZ,AAED,6CACE,OAAQ,AACR,UAAY,CACb,AAED,8CACE,gBAAkB,CACnB,AAED,6BACE,iBAA6B,AAC7B,wCAA6C,AAC7C,gBAAiB,AACjB,mBAAoB,AACpB,iBAAkB,AAClB,sBAA2B,AAC3B,kBAAmB,AACnB,gBAAoB,AACpB,oBAAqB,AACrB,mBAAoB,AACpB,qBAAsB,AAClB,iBAAkB,AACtB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,qDACE,sBAAuB,AACvB,wBAAyB,AACzB,oCAAmD,AACnD,gBAAiB,AACjB,0BAA6B,AAC7B,6BAA8B,AAC9B,0BAA2B,AAC3B,eAAiB,CAClB,AAED,oEACE,gBAAkB,AAClB,yBAA6B,CAC9B,AAED,iGACE,YAAc,CACf,AAED,gEACE,wBAA0B,AAC1B,kBAAoB,CACrB,AAED,8CACE,YAAc,CACf,AAED,6CACE,qBAAsB,AACtB,aAAc,AACd,sBAAuB,AACvB,kBAAmB,AACnB,gBAAiB,AACjB,8BAAqC,AACrC,WAAY,AACZ,oBAAqB,AACrB,oBAAqB,AACrB,iBAAmB,CACpB,AAED,oDACE,UAAY,CACb,AAED,sDACE,UAAY,CACb,AAED,kEACE,eAAgB,AAChB,0BAA+B,AAC/B,UAAY,CACb,AAED,6BACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,MAAO,AACP,OAAQ,AACR,UAAa,AACb,YAAa,AACb,WAAY,AACZ,0BAA+B,AAC/B,iBAAmB,CACpB,AAED,mDACE,qBAAsB,AACtB,cAAe,AACf,kBAAmB,AACnB,mBAAoB,AACpB,gBAAiB,AACjB,gBAAkB,AAClB,cAAgB,CACjB,AAED,qEACE,sBAAuB,AACvB,UAAY,CACb,AAED,mEACE,sBAAuB,AACvB,aAAe,CAChB,AAED,sKACE,+BAAsC,AACtC,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,kLACE,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,sKACE,+BAAsC,AACtC,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,kLACE,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,gKACE,+BAAsC,AACtC,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,4KACE,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,oKACE,+BAAsC,AACtC,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,gLACE,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,kKACE,uCAAkD,AAClD,6BAA+B,AAC/B,+BAAsC,CACvC,AAED,8KACE,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,mPACE,oBAAqB,AACrB,oBAA0B,CAC3B,AAED,oBACE,gBAAoB,AACpB,yBAAgC,AAChC,WAAa,CACd,AAED,sCACE,iCAAsC,AAEtC,wBAAgC,CACjC,AAED,2FAJE,yCAAkD,CAMnD,AAED,2EACE,yBAAgC,AAChC,WAAa,CACd,AAED,2FACE,yCAAkD,CACnD,AAED,sCACE,eAAoB,CACrB,AAED,wFACE,0CAAiD,CAClD,AAED,kBACE,mCAAyC,CAC1C,AAMD,4IACE,wCAA8C,CAC/C,AAED,wGACE,iBAAmB,CACpB,AAED,eACE,6BAAgC,CACjC,AAED,wBACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,kBACE,6BAAgC,CACjC,AAED,2BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,kBACE,6BAAgC,CACjC,AAED,2BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,iBACE,6BAAgC,CACjC,AAED,0BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,iBACE,6BAAgC,CACjC,AAED,0BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,gBACE,6BAAgC,CACjC,AAED,yBACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,gBACE,6BAAgC,CACjC,AAED,yBACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,kBACE,6BAAgC,CACjC,AAED,2BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,kBACE,6BAAgC,CACjC,AAED,2BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,gBACE,6BAAgC,CACjC,AAED,yBACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,iBACE,6BAAgC,CACjC,AAED,0BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,gBACE,6BAAgC,CACjC,AAED,yBACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,iBACE,6BAAgC,CACjC,AAED,0BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,0EACE,WAAiB,CAClB,AAED,2FACE,QAAU,CACX,AAED,yFACE,WAAiB,CAClB,AAED,+EACE,aAAqB,CACtB,AAED,gGACE,QAAU,CACX,AAED,8FACE,aAAqB,CACtB,AAED,2EACE,iBAAqB,CACtB,AAED,4FACE,QAAU,CACX,AAED,0FACE,iBAAqB,CACtB,AAED,gFACE,iBAAqB,CACtB,AAED,iGACE,QAAU,CACX,AAED,+FACE,iBAAqB,CACtB,AAED,eACE,kBAAmB,AACnB,sBAAuB,AACvB,gBAAiB,AACjB,yCAA+C,CAChD,AAED,0CACE,uCAAkD,AAClD,6BAA+B,AAC/B,gCAAsC,AACtC,cAAgB,CACjB,AAED,kCACE,wBAA0B,CAC3B,AAED,wCACE,yBAA0B,AAC1B,cAAgB,CACjB,AAED,gCACE,kBAAmB,AACnB,0BAA2B,AAC3B,6BAA8B,AAC9B,8BAAgC,AAChC,SAAY,CACb,AAED,4CACE,kBAAmB,AACnB,QAAS,AACT,SAAU,AACV,OAAQ,AACR,UAAY,CACb,AAED,iDACE,MAAO,AACP,WAAa,CACd,AAED,kDACE,gBAAkB,CACnB,AAED,iCACE,qBAAsB,AACtB,kBAAmB,AACnB,yBAA0B,AAC1B,SAAY,CACb,AAED,uDACE,2BAA6B,CAC9B,AAED,wDACE,0BAA4B,CAC7B,AAED,8CACE,sBAAuB,AACvB,YAAa,AACb,0BAA2B,AAC3B,4BAA8B,CAC/B,AAED,oDACE,YAAc,CACf,AAED,oDACE,cAAgB,CACjB,AAED,0DACE,iBAAmB,CACpB,AAED,wEACE,kBAAoB,CACrB,AAED,+BACE,qBAAsB,AACtB,kBAAmB,AACnB,sBAAuB,AACvB,iBAA6B,AAC7B,sBAAuB,AACvB,mBAAoB,AACpB,gBAAiB,AACjB,sBAAwB,CACzB,AAED,4CACE,iBAAmB,CACpB,AAED,iDACE,yBAA0B,AAC1B,SAAW,CACZ,AAED,+GACE,WAAY,AACZ,sBAAwB,CACzB,AAED,yDACE,wBAA0B,CAC3B,AAED,+HACE,WAAY,AACZ,uBAAwB,AACxB,aAAe,CAChB,AAED,6EACE,YAAc,CACf,AAED,oDACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,8EACE,SAAW,CACZ,AAED,wGACE,WAAY,AACZ,WAAY,AACZ,eAAgB,AAChB,eAAiB,CAClB,AAED,2DACE,qBAAsB,AACtB,sBAAuB,AACvB,WAAY,AACZ,UAAW,AACX,gBAAiB,AACjB,iBAAkB,AAClB,8BAA+B,AAC/B,2BAA4B,AAC5B,4BAA8B,CAC/B,AAED,4DACE,2BAA4B,AAC5B,oBAAqB,AACrB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,YAAa,AACb,WAAY,AACZ,iBAAkB,AAClB,sBAAuB,AACvB,kBAAmB,AACnB,0BAA+B,AAC/B,eAAiB,CAClB,AAED,kEACE,eAAgB,AAChB,yBAA+B,CAChC,AAED,kGACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,sBAAwB,CACzB,AAED,wGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,gGACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,sGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,qEACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,oBAAqB,AACrB,YAAa,AACb,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,WAAY,AACZ,gBAAkB,AAClB,eAAiB,CAClB,AAED,2EACE,UAAY,CACb,AAED,sHACE,eAAiB,CAClB,AAMD,sOACE,YAAc,CACf,AAED,+BACE,sBAAuB,AACvB,6BAA8B,AAC9B,4BAA6B,AAC7B,0BAA2B,AAC3B,YAAa,AACb,kBAAmB,AACnB,mBAAoB,AACpB,gBAAkB,AAClB,cAAgB,CACjB,AAED,qCACE,eAAgB,AAChB,+BAAqC,CACtC,AAED,wEACE,kBAAmB,AACnB,kCAAmC,AACnC,mCAAoC,AACpC,0BAA2B,AAC3B,eAAiB,CAClB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,iBAAmB,CACpB,AAED,gDACE,qBAAsB,AACtB,QAAS,AACT,SAAU,AACV,kBAAmB,AACnB,iCAAkC,AAClC,oCAAqC,AACrC,eAAgB,AAChB,2BAA4B,AAC5B,qBAAuB,CACxB,AAED,oCACE,iBAAkB,AAClB,UAAY,CACb,AAED,4BACE,kBAAmB,AACnB,qBAAsB,AACtB,sBAAuB,AACvB,iBAAkB,AAClB,gBAAoB,AACpB,sBAAuB,AACvB,eAAgB,AAChB,gBAAiB,AACjB,iCAAkC,AAClC,SAAe,CAChB,AAED,6DACE,YAAa,AACb,UAAY,CACb,AAED,oEACE,WAAe,AACf,kBAAoB,CACrB,AAED,mEACE,eAAgB,AAChB,WAAe,AACf,kBAAoB,CACrB,AAED,8DACE,6BAA8B,AAC9B,YAAa,AACb,gBAAiB,AACjB,WAAY,AACZ,eAAkB,CACnB","file":"tabulator_semantic-ui.min.css","sourcesContent":["/* Tabulator v4.1.2 (c) Oliver Folkerd */\n/*******************************\r\n Site Settings\r\n*******************************/\n/*-------------------\r\n Fonts\r\n--------------------*/\n/*-------------------\r\n Base Sizes\r\n--------------------*/\n/* This is the single variable that controls them all */\n/* The size of page text */\n/*-------------------\r\n Exact Pixel Values\r\n--------------------*/\n/*\r\n These are used to specify exact pixel values in em\r\n for things like borders that remain constantly\r\n sized as emSize adjusts\r\n\r\n Since there are many more sizes than names for sizes,\r\n these are named by their original pixel values.\r\n\r\n*/\n/*-------------------\r\n Border Radius\r\n--------------------*/\n/* See Power-user section below\r\n for explanation of $px variables\r\n*/\n/*-------------------\r\n Site Colors\r\n--------------------*/\n/*--- Colors ---*/\n/*--- Light Colors ---*/\n/*--- Neutrals ---*/\n/*--- Colored Backgrounds ---*/\n/*--- Colored Text ---*/\n/*--- Colored Headers ---*/\n/*--- Colored Border ---*/\n/*-------------------\r\n Alpha Colors\r\n--------------------*/\n/*-------------------\r\n Brand Colors\r\n--------------------*/\n/*--------------\r\n Page Heading\r\n---------------*/\n/*-------------------\r\n Page\r\n--------------------*/\n/*--------------\r\n Form Input\r\n---------------*/\n/* This adjusts the default form input across all elements */\n/* Input Text Color */\n/* Line Height Default For Inputs in Browser (Descendors are 17px at 14px base em) */\n/*-------------------\r\n Focused Input\r\n--------------------*/\n/* Used on inputs, textarea etc */\n/* Used on dropdowns, other larger blocks */\n/*-------------------\r\n Sizes\r\n--------------------*/\n/*\r\n Sizes are all expressed in terms of 14px/em (default em)\r\n This ensures these \"ratios\" remain constant despite changes in EM\r\n*/\n/*-------------------\r\n Paragraph\r\n--------------------*/\n/*-------------------\r\n Links\r\n--------------------*/\n/*-------------------\r\n Highlighted Text\r\n--------------------*/\n/*-------------------\r\n Em Sizes\r\n--------------------*/\n/*\r\n This rounds $size values to the closest pixel then expresses that value in (r)em.\r\n This ensures all size values round to exact pixels\r\n*/\n/* em */\n/* rem */\n/*-------------------\r\n Loader\r\n--------------------*/\n/*-------------------\r\n Grid\r\n--------------------*/\n/*-------------------\r\n Transitions\r\n--------------------*/\n/*-------------------\r\n Breakpoints\r\n--------------------*/\n/* Columns */\n/*******************************\r\n Power-User\r\n*******************************/\n/*-------------------\r\n Emotive Colors\r\n--------------------*/\n/* Positive */\n/* Negative */\n/* Info */\n/* Warning */\n/*-------------------\r\n Paths\r\n--------------------*/\n/* For source only. Modified in gulp for dist */\n/*-------------------\r\n Icons\r\n--------------------*/\n/* Maximum Glyph Width of Icon */\n/*-------------------\r\n Neutral Text\r\n--------------------*/\n/*-------------------\r\n Brand Colors\r\n--------------------*/\n/*-------------------\r\n Borders\r\n--------------------*/\n/*-------------------\r\n Accents\r\n--------------------*/\n/* Differentiating Neutrals */\n/* Differentiating Layers */\n/*-------------------\r\n Derived Values\r\n--------------------*/\n/* Loaders Position Offset */\n/* Rendered Scrollbar Width */\n/* Maximum Single Character Glyph Width, aka Capital \"W\" */\n/* Used to match floats with text */\n/* Header Spacing */\n/* Minimum Mobile Width */\n/* Positive / Negative Dupes */\n/* Responsive */\n/*******************************\r\n States\r\n*******************************/\n/*-------------------\r\n Disabled\r\n--------------------*/\n/*-------------------\r\n Hover\r\n--------------------*/\n/*--- Shadows ---*/\n/*--- Colors ---*/\n/*--- Emotive ---*/\n/*--- Brand ---*/\n/*--- Dark Tones ---*/\n/*--- Light Tones ---*/\n/*-------------------\r\n Focus\r\n--------------------*/\n/*--- Colors ---*/\n/*--- Emotive ---*/\n/*--- Brand ---*/\n/*--- Dark Tones ---*/\n/*--- Light Tones ---*/\n/*-------------------\r\n Down (:active)\r\n--------------------*/\n/*--- Colors ---*/\n/*--- Emotive ---*/\n/*--- Brand ---*/\n/*--- Dark Tones ---*/\n/*--- Light Tones ---*/\n/*-------------------\r\n Active\r\n--------------------*/\n/*--- Colors ---*/\n/*--- Emotive ---*/\n/*--- Brand ---*/\n/*--- Dark Tones ---*/\n/*--- Light Tones ---*/\n/*******************************\r\n Table\r\n*******************************/\n/*-------------------\r\n Element\r\n--------------------*/\n/*--------------\r\n Parts\r\n---------------*/\n/* Table Row */\n/* Table Cell */\n/* Table Header */\n/* Table Footer */\n/* Responsive Size */\n/*-------------------\r\n Types\r\n--------------------*/\n/* Definition */\n/*--------------\r\n Couplings\r\n---------------*/\n/*--------------\r\n States\r\n---------------*/\n/* Positive */\n/* Negative */\n/* Error */\n/* Warning */\n/* Active */\n/*--------------\r\n Types\r\n---------------*/\n/* Attached */\n/* Striped */\n/* Selectable */\n/* Sortable */\n/* Colors */\n/* Inverted */\n/* Basic */\n/* Padded */\n/* Compact */\n/* Sizes */\n.tabulator {\n position: relative;\n background-color: #FFFFFF;\n overflow: hidden;\n font-size: 14px;\n text-align: left;\n width: 100%;\n margin: 1em 0em;\n border: 1px solid rgba(34, 36, 38, 0.15);\n box-shadow: none;\n border-radius: 0.28571/pxrem;\n color: rgba(0, 0, 0, 0.87);\n -ms-transform: translatez(0);\n transform: translatez(0);\n /* Red */\n /* Orange */\n /* Yellow */\n /* Olive */\n /* Green */\n /* Teal */\n /* Blue */\n /* Violet */\n /* Purple */\n /* Pink */\n /* Brown */\n /* Grey */\n /* Black */\n}\n\n.tabulator[tabulator-layout=\"fitDataFill\"] .tabulator-tableHolder .tabulator-table {\n min-width: 100%;\n}\n\n.tabulator.tabulator-block-select {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.tabulator .tabulator-header {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n border-bottom: 1px solid rgba(34, 36, 38, 0.1);\n background-color: #F9FAFB;\n box-shadow: none;\n color: rgba(0, 0, 0, 0.87);\n font-style: none;\n font-weight: bold;\n text-transform: none;\n white-space: nowrap;\n overflow: hidden;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-header .tabulator-col {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n background-color: #F9FAFB;\n text-align: left;\n vertical-align: bottom;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-moving {\n position: absolute;\n border: 1px solid #999;\n background: #dae1e7;\n pointer-events: none;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content {\n box-sizing: border-box;\n position: relative;\n padding: 0.92857em 0.78571em;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title {\n box-sizing: border-box;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: bottom;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor {\n box-sizing: border-box;\n width: 100%;\n border: 1px solid #999;\n padding: 1px;\n background: #fff;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n display: inline-block;\n position: absolute;\n top: 18px;\n right: 8px;\n width: 0;\n height: 0;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols {\n position: relative;\n display: -ms-flexbox;\n display: flex;\n border-top: 1px solid #ddd;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child {\n margin-right: -1px;\n}\n\n.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-col.ui-sortable-helper {\n position: absolute;\n background-color: #dae1e7 !important;\n border: 1px solid #ddd;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter {\n position: relative;\n box-sizing: border-box;\n margin-top: 2px;\n width: 100%;\n text-align: center;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea {\n height: auto !important;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg {\n margin-top: 3px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear {\n width: 0;\n height: 0;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title {\n padding-right: 25px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover {\n cursor: pointer;\n background-color: #dae1e7;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"none\"] .tabulator-col-content .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"asc\"] .tabulator-col-content .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"desc\"] .tabulator-col-content .tabulator-arrow {\n border-top: 6px solid #666;\n border-bottom: none;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title {\n -webkit-writing-mode: vertical-rl;\n -ms-writing-mode: tb-rl;\n writing-mode: vertical-rl;\n text-orientation: mixed;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title {\n -ms-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title {\n padding-right: 0;\n padding-top: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title {\n padding-right: 0;\n padding-bottom: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow {\n right: calc(50% - 6px);\n}\n\n.tabulator .tabulator-header .tabulator-frozen {\n display: inline-block;\n position: absolute;\n z-index: 10;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #ddd;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #ddd;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder {\n box-sizing: border-box;\n min-width: 400%;\n background: white !important;\n border-top: 1px solid #ddd;\n border-bottom: 1px solid #ddd;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row {\n background: white !important;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder {\n min-width: 400%;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty {\n display: none;\n}\n\n.tabulator .tabulator-tableHolder {\n position: relative;\n width: 100%;\n white-space: nowrap;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.tabulator .tabulator-tableHolder:focus {\n outline: none;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder {\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n width: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=\"virtual\"] {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder span {\n display: inline-block;\n margin: 0 auto;\n padding: 10px;\n color: #000;\n font-weight: bold;\n font-size: 20px;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table {\n position: relative;\n display: inline-block;\n white-space: nowrap;\n overflow: visible;\n color: #333;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs {\n font-weight: bold;\n background: #f2f2f2 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top {\n border-bottom: 2px solid #ddd;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom {\n border-top: 2px solid #ddd;\n}\n\n.tabulator .tabulator-col-resize-handle {\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n width: 5px;\n}\n\n.tabulator .tabulator-col-resize-handle.prev {\n left: 0;\n right: auto;\n}\n\n.tabulator .tabulator-col-resize-handle:hover {\n cursor: ew-resize;\n}\n\n.tabulator .tabulator-footer {\n padding: 0.78571em 0.78571em;\n border-top: 1px solid rgba(34, 36, 38, 0.15);\n box-shadow: none;\n background: #F9FAFB;\n text-align: right;\n color: rgba(0, 0, 0, 0.87);\n font-style: normal;\n font-weight: normal;\n text-transform: none;\n white-space: nowrap;\n -ms-user-select: none;\n user-select: none;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder {\n box-sizing: border-box;\n width: calc(100% + 20px);\n margin: -0.78571em -0.78571em 0.78571em -0.78571em;\n text-align: left;\n background: white !important;\n border-bottom: 1px solid #ddd;\n border-top: 1px solid #ddd;\n overflow: hidden;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row {\n font-weight: bold;\n background: white !important;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder:only-child {\n margin-bottom: -0.78571em;\n border-bottom: none;\n}\n\n.tabulator .tabulator-footer .tabulator-pages {\n margin: 0 7px;\n}\n\n.tabulator .tabulator-footer .tabulator-page {\n display: inline-block;\n margin: 0 2px;\n border: 1px solid #aaa;\n border-radius: 3px;\n padding: 2px 5px;\n background: rgba(255, 255, 255, 0.2);\n color: #555;\n font-family: inherit;\n font-weight: inherit;\n font-size: inherit;\n}\n\n.tabulator .tabulator-footer .tabulator-page.active {\n color: #d00;\n}\n\n.tabulator .tabulator-footer .tabulator-page:disabled {\n opacity: .5;\n}\n\n.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n color: #fff;\n}\n\n.tabulator .tabulator-loader {\n position: absolute;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n top: 0;\n left: 0;\n z-index: 100;\n height: 100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.4);\n text-align: center;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg {\n display: inline-block;\n margin: 0 auto;\n padding: 10px 20px;\n border-radius: 10px;\n background: #fff;\n font-weight: bold;\n font-size: 16px;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading {\n border: 4px solid #333;\n color: #000;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error {\n border: 4px solid #D00;\n color: #590000;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive {\n box-shadow: 0px 0px 0px #A3C293 inset;\n background: #FCFFF5 !important;\n color: #21BA45 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive:hover {\n background: #f7ffe6 !important;\n color: #13ae38 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative {\n box-shadow: 0px 0px 0px #E0B4B4 inset;\n background: #FFF6F6 !important;\n color: #DB2828 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative:hover {\n background: #ffe7e7 !important;\n color: #d41616 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error {\n box-shadow: 0px 0px 0px #E0B4B4 inset;\n background: #FFF6F6 !important;\n color: #DB2828 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error:hover {\n background: #ffe7e7 !important;\n color: #d12323 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning {\n box-shadow: 0px 0px 0px #C9BA9B inset;\n background: #FFFAF3 !important;\n color: #F2C037 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning:hover {\n background: #fff4e4 !important;\n color: #f1bb29 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active {\n box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.87) inset;\n background: #E0E0E0 !important;\n color: rgba(0, 0, 0, 0.87) !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active:hover {\n background: #f7ffe6 !important;\n color: #13ae38 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.disabled:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active {\n pointer-events: none;\n color: rgba(0, 0, 0, 0.2);\n}\n\n.tabulator.inverted {\n background: #333333;\n color: rgba(255, 255, 255, 0.9);\n border: none;\n}\n\n.tabulator.inverted .tabulator-header {\n background-color: rgba(0, 0, 0, 0.15);\n border-color: rgba(255, 255, 255, 0.1) !important;\n color: rgba(255, 255, 255, 0.9);\n}\n\n.tabulator.inverted .tabulator-header .tabulator-col {\n border-color: rgba(255, 255, 255, 0.1) !important;\n}\n\n.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row {\n color: rgba(255, 255, 255, 0.9);\n border: none;\n}\n\n.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n border-color: rgba(255, 255, 255, 0.1) !important;\n}\n\n.tabulator.inverted .tabulator-footer {\n background: #FFFFFF;\n}\n\n.tabulator.striped .tabulator-tableHolder .tabulator-table .tabulator-row:nth-child(even) {\n background-color: rgba(0, 0, 0, 0.05) !important;\n}\n\n.tabulator.celled {\n border: 1px solid rgba(34, 36, 38, 0.15);\n}\n\n.tabulator.celled .tabulator-header .tabulator-col {\n border-right: 1px solid rgba(34, 36, 38, 0.1);\n}\n\n.tabulator.celled .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n border-right: 1px solid rgba(34, 36, 38, 0.1);\n}\n\n.tabulator[class*=\"single line\"] .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n border-right: none;\n}\n\n.tabulator.red {\n border-top: 0.2em solid #DB2828;\n}\n\n.tabulator.inverted.red {\n background-color: #DB2828 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.orange {\n border-top: 0.2em solid #F2711C;\n}\n\n.tabulator.inverted.orange {\n background-color: #F2711C !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.yellow {\n border-top: 0.2em solid #FBBD08;\n}\n\n.tabulator.inverted.yellow {\n background-color: #FBBD08 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.olive {\n border-top: 0.2em solid #B5CC18;\n}\n\n.tabulator.inverted.olive {\n background-color: #B5CC18 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.green {\n border-top: 0.2em solid #21BA45;\n}\n\n.tabulator.inverted.green {\n background-color: #21BA45 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.teal {\n border-top: 0.2em solid #00B5AD;\n}\n\n.tabulator.inverted.teal {\n background-color: #00B5AD !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.blue {\n border-top: 0.2em solid #2185D0;\n}\n\n.tabulator.inverted.blue {\n background-color: #2185D0 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.violet {\n border-top: 0.2em solid #6435C9;\n}\n\n.tabulator.inverted.violet {\n background-color: #6435C9 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.purple {\n border-top: 0.2em solid #A333C8;\n}\n\n.tabulator.inverted.purple {\n background-color: #A333C8 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.pink {\n border-top: 0.2em solid #E03997;\n}\n\n.tabulator.inverted.pink {\n background-color: #E03997 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.brown {\n border-top: 0.2em solid #A5673F;\n}\n\n.tabulator.inverted.brown {\n background-color: #A5673F !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.grey {\n border-top: 0.2em solid #767676;\n}\n\n.tabulator.inverted.grey {\n background-color: #767676 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.black {\n border-top: 0.2em solid #1B1C1D;\n}\n\n.tabulator.inverted.black {\n background-color: #1B1C1D !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 1em 1em;\n}\n\n.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n top: 20px;\n}\n\n.tabulator.padded .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 1em 1em;\n}\n\n.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 1.5em 1.5em;\n}\n\n.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n top: 26px;\n}\n\n.tabulator.padded.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 1.5em 1.5em;\n}\n\n.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 0.5em 0.7em;\n}\n\n.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n top: 12px;\n}\n\n.tabulator.compact .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 0.5em 0.7em;\n}\n\n.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 0.4em 0.6em;\n}\n\n.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n top: 10px;\n}\n\n.tabulator.compact.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 0.4em 0.6em;\n}\n\n.tabulator-row {\n position: relative;\n box-sizing: border-box;\n min-height: 22px;\n border-bottom: 1px solid rgba(34, 36, 38, 0.1);\n}\n\n.tabulator-row.tabulator-selectable:hover {\n box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.87) inset;\n background: #E0E0E0 !important;\n color: rgba(0, 0, 0, 0.87) !important;\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-selected {\n background-color: #9ABCEA;\n}\n\n.tabulator-row.tabulator-selected:hover {\n background-color: #769BCC;\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-moving {\n position: absolute;\n border-top: 1px solid #ddd;\n border-bottom: 1px solid #ddd;\n pointer-events: none !important;\n z-index: 15;\n}\n\n.tabulator-row .tabulator-row-resize-handle {\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n height: 5px;\n}\n\n.tabulator-row .tabulator-row-resize-handle.prev {\n top: 0;\n bottom: auto;\n}\n\n.tabulator-row .tabulator-row-resize-handle:hover {\n cursor: ns-resize;\n}\n\n.tabulator-row .tabulator-frozen {\n display: inline-block;\n position: absolute;\n background-color: inherit;\n z-index: 10;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #ddd;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #ddd;\n}\n\n.tabulator-row .tabulator-responsive-collapse {\n box-sizing: border-box;\n padding: 5px;\n border-top: 1px solid #ddd;\n border-bottom: 1px solid #ddd;\n}\n\n.tabulator-row .tabulator-responsive-collapse:empty {\n display: none;\n}\n\n.tabulator-row .tabulator-responsive-collapse table {\n font-size: 14px;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td {\n position: relative;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type {\n padding-right: 10px;\n}\n\n.tabulator-row .tabulator-cell {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n padding: 0.78571em 0.78571em;\n vertical-align: middle;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.tabulator-row .tabulator-cell:last-of-type {\n border-right: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing {\n border: 1px solid #1D68CD;\n padding: 0;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select {\n border: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail {\n border: 1px solid #DB2828;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select {\n border: 1px;\n background: transparent;\n color: #DB2828;\n}\n\n.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box {\n width: 80%;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar {\n width: 100%;\n height: 3px;\n margin-top: 2px;\n background: #666;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-branch {\n display: inline-block;\n vertical-align: middle;\n height: 9px;\n width: 7px;\n margin-top: -9px;\n margin-right: 5px;\n border-bottom-left-radius: 1px;\n border-left: 2px solid #ddd;\n border-bottom: 2px solid #ddd;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-align: center;\n align-items: center;\n vertical-align: middle;\n height: 11px;\n width: 11px;\n margin-right: 5px;\n border: 1px solid #333;\n border-radius: 2px;\n background: rgba(0, 0, 0, 0.1);\n overflow: hidden;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #333;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: #333;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #333;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n height: 15px;\n width: 15px;\n border-radius: 20px;\n background: #666;\n color: #fff;\n font-weight: bold;\n font-size: 1.1em;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover {\n opacity: .7;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close {\n display: initial;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open {\n display: none;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close {\n display: none;\n}\n\n.tabulator-row.tabulator-group {\n box-sizing: border-box;\n border-bottom: 1px solid #999;\n border-right: 1px solid #ddd;\n border-top: 1px solid #999;\n padding: 5px;\n padding-left: 10px;\n background: #fafafa;\n font-weight: bold;\n min-width: 100%;\n}\n\n.tabulator-row.tabulator-group:hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.1);\n}\n\n.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow {\n margin-right: 10px;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #666;\n border-bottom: 0;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow {\n margin-left: 20px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow {\n margin-left: 40px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow {\n margin-left: 60px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow {\n margin-left: 80px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow {\n margin-left: 100px;\n}\n\n.tabulator-row.tabulator-group .tabulator-arrow {\n display: inline-block;\n width: 0;\n height: 0;\n margin-right: 16px;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 0;\n border-left: 6px solid #666;\n vertical-align: middle;\n}\n\n.tabulator-row.tabulator-group span {\n margin-left: 10px;\n color: #666;\n}\n\n.tabulator-edit-select-list {\n position: absolute;\n display: inline-block;\n box-sizing: border-box;\n max-height: 200px;\n background: #FFFFFF;\n border: 1px solid #ddd;\n font-size: 14px;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n z-index: 10000;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item {\n padding: 4px;\n color: #333;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item.active {\n color: #FFFFFF;\n background: #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item:hover {\n cursor: pointer;\n color: #FFFFFF;\n background: #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-group {\n border-bottom: 1px solid #ddd;\n padding: 4px;\n padding-top: 6px;\n color: #333;\n font-weight: bold;\n}\n"]} \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator.css deleted file mode 100644 index f087924868..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator.css +++ /dev/null @@ -1,769 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator { - position: relative; - border: 1px solid #999; - background-color: #888; - font-size: 14px; - text-align: left; - overflow: hidden; - -ms-transform: translatez(0); - transform: translatez(0); -} - -.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { - min-width: 100%; -} - -.tabulator.tabulator-block-select { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.tabulator .tabulator-header { - position: relative; - box-sizing: border-box; - width: 100%; - border-bottom: 1px solid #999; - background-color: #e6e6e6; - color: #555; - font-weight: bold; - white-space: nowrap; - overflow: hidden; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-header .tabulator-col { - display: inline-block; - position: relative; - box-sizing: border-box; - border-right: 1px solid #aaa; - background: #e6e6e6; - text-align: left; - vertical-align: bottom; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-moving { - position: absolute; - border: 1px solid #999; - background: #cdcdcd; - pointer-events: none; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content { - box-sizing: border-box; - position: relative; - padding: 4px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { - box-sizing: border-box; - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - vertical-align: bottom; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { - box-sizing: border-box; - width: 100%; - border: 1px solid #999; - padding: 1px; - background: #fff; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - display: inline-block; - position: absolute; - top: 9px; - right: 8px; - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { - position: relative; - display: -ms-flexbox; - display: flex; - border-top: 1px solid #aaa; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { - margin-right: -1px; -} - -.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { - position: absolute; - background-color: #e6e6e6 !important; - border: 1px solid #aaa; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { - position: relative; - box-sizing: border-box; - margin-top: 2px; - width: 100%; - text-align: center; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { - height: auto !important; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { - margin-top: 3px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { - width: 0; - height: 0; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { - padding-right: 25px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { - cursor: pointer; - background-color: #cdcdcd; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #666; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { - border-top: 6px solid #666; - border-bottom: none; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { - -webkit-writing-mode: vertical-rl; - -ms-writing-mode: tb-rl; - writing-mode: vertical-rl; - text-orientation: mixed; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { - padding-right: 0; - padding-top: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { - padding-right: 0; - padding-bottom: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow { - right: calc(50% - 6px); -} - -.tabulator .tabulator-header .tabulator-frozen { - display: inline-block; - position: absolute; - z-index: 10; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #aaa; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #aaa; -} - -.tabulator .tabulator-header .tabulator-calcs-holder { - box-sizing: border-box; - min-width: 400%; - background: #f3f3f3 !important; - border-top: 1px solid #aaa; - border-bottom: 1px solid #aaa; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { - background: #f3f3f3 !important; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder { - min-width: 400%; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { - display: none; -} - -.tabulator .tabulator-tableHolder { - position: relative; - width: 100%; - white-space: nowrap; - overflow: auto; - -webkit-overflow-scrolling: touch; -} - -.tabulator .tabulator-tableHolder:focus { - outline: none; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder { - box-sizing: border-box; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - width: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { - position: absolute; - top: 0; - left: 0; - height: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder span { - display: inline-block; - margin: 0 auto; - padding: 10px; - color: #ccc; - font-weight: bold; - font-size: 20px; -} - -.tabulator .tabulator-tableHolder .tabulator-table { - position: relative; - display: inline-block; - background-color: #fff; - white-space: nowrap; - overflow: visible; - color: #333; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { - font-weight: bold; - background: #e2e2e2 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { - border-bottom: 2px solid #aaa; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { - border-top: 2px solid #aaa; -} - -.tabulator .tabulator-footer { - padding: 5px 10px; - border-top: 1px solid #999; - background-color: #e6e6e6; - text-align: right; - color: #555; - font-weight: bold; - white-space: nowrap; - -ms-user-select: none; - user-select: none; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder { - box-sizing: border-box; - width: calc(100% + 20px); - margin: -5px -10px 5px -10px; - text-align: left; - background: #f3f3f3 !important; - border-bottom: 1px solid #aaa; - border-top: 1px solid #aaa; - overflow: hidden; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { - background: #f3f3f3 !important; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { - margin-bottom: -5px; - border-bottom: none; -} - -.tabulator .tabulator-footer .tabulator-pages { - margin: 0 7px; -} - -.tabulator .tabulator-footer .tabulator-page { - display: inline-block; - margin: 0 2px; - padding: 2px 5px; - border: 1px solid #aaa; - border-radius: 3px; - background: rgba(255, 255, 255, 0.2); - color: #555; - font-family: inherit; - font-weight: inherit; - font-size: inherit; -} - -.tabulator .tabulator-footer .tabulator-page.active { - color: #d00; -} - -.tabulator .tabulator-footer .tabulator-page:disabled { - opacity: .5; -} - -.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); - color: #fff; -} - -.tabulator .tabulator-col-resize-handle { - position: absolute; - right: 0; - top: 0; - bottom: 0; - width: 5px; -} - -.tabulator .tabulator-col-resize-handle.prev { - left: 0; - right: auto; -} - -.tabulator .tabulator-col-resize-handle:hover { - cursor: ew-resize; -} - -.tabulator .tabulator-loader { - position: absolute; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - top: 0; - left: 0; - z-index: 100; - height: 100%; - width: 100%; - background: rgba(0, 0, 0, 0.4); - text-align: center; -} - -.tabulator .tabulator-loader .tabulator-loader-msg { - display: inline-block; - margin: 0 auto; - padding: 10px 20px; - border-radius: 10px; - background: #fff; - font-weight: bold; - font-size: 16px; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { - border: 4px solid #333; - color: #000; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { - border: 4px solid #D00; - color: #590000; -} - -.tabulator-row { - position: relative; - box-sizing: border-box; - min-height: 22px; - background-color: #fff; -} - -.tabulator-row.tabulator-row-even { - background-color: #EFEFEF; -} - -.tabulator-row.tabulator-selectable:hover { - background-color: #bbb; - cursor: pointer; -} - -.tabulator-row.tabulator-selected { - background-color: #9ABCEA; -} - -.tabulator-row.tabulator-selected:hover { - background-color: #769BCC; - cursor: pointer; -} - -.tabulator-row.tabulator-row-moving { - border: 1px solid #000; - background: #fff; -} - -.tabulator-row.tabulator-moving { - position: absolute; - border-top: 1px solid #aaa; - border-bottom: 1px solid #aaa; - pointer-events: none; - z-index: 15; -} - -.tabulator-row .tabulator-row-resize-handle { - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 5px; -} - -.tabulator-row .tabulator-row-resize-handle.prev { - top: 0; - bottom: auto; -} - -.tabulator-row .tabulator-row-resize-handle:hover { - cursor: ns-resize; -} - -.tabulator-row .tabulator-frozen { - display: inline-block; - position: absolute; - background-color: inherit; - z-index: 10; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #aaa; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #aaa; -} - -.tabulator-row .tabulator-responsive-collapse { - box-sizing: border-box; - padding: 5px; - border-top: 1px solid #aaa; - border-bottom: 1px solid #aaa; -} - -.tabulator-row .tabulator-responsive-collapse:empty { - display: none; -} - -.tabulator-row .tabulator-responsive-collapse table { - font-size: 14px; -} - -.tabulator-row .tabulator-responsive-collapse table tr td { - position: relative; -} - -.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { - padding-right: 10px; -} - -.tabulator-row .tabulator-cell { - display: inline-block; - position: relative; - box-sizing: border-box; - padding: 4px; - border-right: 1px solid #aaa; - vertical-align: middle; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.tabulator-row .tabulator-cell.tabulator-editing { - border: 1px solid #1D68CD; - padding: 0; -} - -.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { - border: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail { - border: 1px solid #dd0000; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { - border: 1px; - background: transparent; - color: #dd0000; -} - -.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { - width: 80%; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { - width: 100%; - height: 3px; - margin-top: 2px; - background: #666; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-branch { - display: inline-block; - vertical-align: middle; - height: 9px; - width: 7px; - margin-top: -9px; - margin-right: 5px; - border-bottom-left-radius: 1px; - border-left: 2px solid #aaa; - border-bottom: 2px solid #aaa; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-pack: center; - justify-content: center; - -ms-flex-align: center; - align-items: center; - vertical-align: middle; - height: 11px; - width: 11px; - margin-right: 5px; - border: 1px solid #333; - border-radius: 2px; - background: rgba(0, 0, 0, 0.1); - overflow: hidden; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - height: 15px; - width: 15px; - border-radius: 20px; - background: #666; - color: #fff; - font-weight: bold; - font-size: 1.1em; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { - opacity: .7; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { - display: initial; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { - display: none; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { - display: none; -} - -.tabulator-row.tabulator-group { - box-sizing: border-box; - border-bottom: 1px solid #999; - border-right: 1px solid #aaa; - border-top: 1px solid #999; - padding: 5px; - padding-left: 10px; - background: #ccc; - font-weight: bold; - min-width: 100%; -} - -.tabulator-row.tabulator-group:hover { - cursor: pointer; - background-color: rgba(0, 0, 0, 0.1); -} - -.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { - margin-right: 10px; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-top: 6px solid #666; - border-bottom: 0; -} - -.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { - margin-left: 20px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { - margin-left: 40px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { - margin-left: 60px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { - margin-left: 80px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { - margin-left: 100px; -} - -.tabulator-row.tabulator-group .tabulator-arrow { - display: inline-block; - width: 0; - height: 0; - margin-right: 16px; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-right: 0; - border-left: 6px solid #666; - vertical-align: middle; -} - -.tabulator-row.tabulator-group span { - margin-left: 10px; - color: #d00; -} - -.tabulator-edit-select-list { - position: absolute; - display: inline-block; - box-sizing: border-box; - max-height: 200px; - background: #fff; - border: 1px solid #aaa; - font-size: 14px; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - z-index: 10000; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item { - padding: 4px; - color: #333; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item.active { - color: #fff; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { - cursor: pointer; - color: #fff; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-group { - border-bottom: 1px solid #aaa; - padding: 4px; - padding-top: 6px; - color: #333; - font-weight: bold; -} diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator.min.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator.min.css deleted file mode 100644 index a8616f5142..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator.min.css +++ /dev/null @@ -1,3 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator{position:relative;border:1px solid #999;background-color:#888;font-size:14px;text-align:left;overflow:hidden;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{position:relative;box-sizing:border-box;width:100%;border-bottom:1px solid #999;background-color:#e6e6e6;color:#555;font-weight:700;white-space:nowrap;overflow:hidden;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header .tabulator-col{display:inline-block;position:relative;box-sizing:border-box;border-right:1px solid #aaa;background:#e6e6e6;text-align:left;vertical-align:bottom;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #999;background:#cdcdcd;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:9px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#e6e6e6!important;border:1px solid #aaa}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#cdcdcd}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow{right:calc(50% - 6px)}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:400%;background:#f3f3f3!important;border-top:1px solid #aaa;border-bottom:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#f3f3f3!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:400%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{position:absolute;top:0;left:0;height:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#ccc;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#e2e2e2!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #aaa}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #aaa}.tabulator .tabulator-footer{padding:5px 10px;border-top:1px solid #999;background-color:#e6e6e6;text-align:right;color:#555;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px;text-align:left;background:#f3f3f3!important;border-bottom:1px solid #aaa;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#f3f3f3!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;padding:2px 5px;border:1px solid #aaa;border-radius:3px;background:hsla(0,0%,100%,.2);color:#555;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#d00}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator-row{position:relative;box-sizing:border-box;min-height:22px;background-color:#fff}.tabulator-row.tabulator-row-even{background-color:#efefef}.tabulator-row.tabulator-selectable:hover{background-color:#bbb;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-row-moving{border:1px solid #000;background:#fff}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #aaa;border-bottom:1px solid #aaa;pointer-events:none;z-index:2}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #aaa;border-bottom:1px solid #aaa}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:4px;border-right:1px solid #aaa;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #aaa;border-top:1px solid #999;padding:5px;padding-left:10px;background:#ccc;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:100px}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#d00}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #aaa;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:4}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#333}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #aaa;padding:4px;padding-top:6px;color:#333;font-weight:700} -/*# sourceMappingURL=tabulator.min.css.map */ diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator.min.css.map b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator.min.css.map deleted file mode 100644 index 825baa6e12..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["tabulator.scss"],"names":[],"mappings":"AA0CA,WACC,kBAAkB,AAElB,sBAxCgB,AA0ChB,sBA3CqB,AA6CrB,eA3Ca,AA4Cb,gBAAgB,AAChB,gBAAe,AAMf,uBAAwB,CAqexB,AApfD,iFAoBI,cAAc,CACd,AArBJ,kCA0BE,yBAAiB,AAAjB,sBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AA3BF,6BA+BE,kBAAiB,AACjB,sBAAsB,AAEtB,WAAU,AAEV,6BAlEwB,AAmExB,yBAtE4B,AAuE5B,WAtEmB,AAuEnB,gBAAgB,AAEhB,mBAAmB,AACnB,gBAAe,AAEf,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CA8OpB,AA7RF,4CAmDG,qBAAoB,AACpB,kBAAiB,AACjB,sBAAqB,AACrB,4BArFoB,AAsFpB,mBAxF2B,AAyF3B,gBAAe,AACf,sBAAsB,AACtB,eAAgB,CAoLhB,AA9OH,6DA6DI,kBAAkB,AAClB,sBA5FsB,AA6FtB,mBAA8C,AAC9C,mBAAoB,CACpB,AAjEJ,mEAqEI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CAsCX,AA7GJ,wFA2EK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAarB,AA9FL,gHAqFM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,eAAgB,CAChB,AA7FN,oFAkGK,qBAAqB,AACrB,kBAAkB,AAClB,QAAO,AACP,UAAS,AACT,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BAnImB,CAoInB,AA3GL,0FAoHK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BAtJkB,AAuJlB,eAAgB,CAKhB,AA7HL,oHA2HM,iBAAiB,CACjB,AA5HN,0FAmIK,YAAa,CACb,AApIL,+DAyII,kBAAkB,AAClB,mCAAmD,AACnD,qBA1KmB,CA2KnB,AA5IJ,qEAgJI,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAiBlB,AArKJ,8EAwJK,qBAAsB,CACtB,AAzJL,yEA4JK,cAAe,CACf,AA7JL,sFAiKM,QAAS,AACT,QAAS,CACT,AAnKN,oFA0KK,kBAAkB,CAClB,AA3KL,qEA8KK,eAAc,AACd,wBAAoD,CACpD,AAhLL,uHAoLM,gBAAgB,AAChB,4BA9MkB,CA+MlB,AAtLN,sHA2LM,gBAAgB,AAChB,4BAtNgB,CAuNhB,AA7LN,uHAkMM,0BA5NgB,AA6NhB,kBAAmB,CACnB,AApMN,+GA4MM,iCAAyB,AAAzB,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AAlNN,oHAuNM,wBAAyB,CACzB,AAxNN,2GA6NM,gBAAe,AACf,gBAAgB,CAChB,AA/NN,uIAmOO,gBAAe,AACf,mBAAmB,CACnB,AArOP,uGA0OM,qBAAqB,CACrB,AA3ON,+CAiPG,qBAAqB,AACrB,kBAAkB,AAIlB,SAAW,CASX,AA/PH,qEAyPI,2BA7QgB,CA8QhB,AA1PJ,sEA6PI,0BAjRgB,CAkRhB,AA9PJ,qDAmQG,sBAAqB,AACrB,eAAc,AAEd,6BAAyD,AAUzD,0BApSiB,AAqSjB,6BAhToB,AAkTpB,eAAgB,CAChB,AApRH,oEAyQI,4BAAyD,CAKzD,AA9QJ,iGA4QK,YAAa,CACb,AA7QL,2DAuRG,cAAc,CAKd,AA5RH,iEA0RI,YAAa,CACb,AA3RJ,kCAiSE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CA2DjC,AAhWF,wCAwSG,YAAa,CACb,AAzSH,yDA6SG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AASlB,UAAU,CAYV,AApUH,wFAkTI,kBAAkB,AAClB,MAAK,AACL,OAAM,AACN,WAAW,CACX,AAtTJ,8DA2TI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,WAAU,AACV,gBAAiB,AACjB,cAAe,CACf,AAnUJ,mDAwUG,kBAAiB,AACjB,qBAAoB,AACpB,sBAhWqB,AAiWrB,mBAAmB,AACnB,iBAAgB,AAChB,UAhWe,CAkXf,AA/VH,kFAkVK,gBAAiB,AACjB,4BAAwD,CASxD,AA5VL,sGAsVM,4BA1Wc,CA2Wd,AAvVN,yGA0VM,yBA9Wc,CA+Wd,AA3VN,6BAsWE,iBAAgB,AAChB,0BA7WwB,AA8WxB,yBAjX4B,AAkX5B,iBAAiB,AACjB,WAlXmB,AAmXnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAoEpB,AAtbF,qDAqXG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAAyD,AAUzD,6BAzZiB,AA0ZjB,0BA1ZiB,AA4ZjB,eAAgB,CAMhB,AA9YH,oEA8XI,4BAAyD,CAKzD,AAnYJ,iGAiYK,YAAa,CACb,AAlYL,gEA2YI,mBAAkB,AAClB,kBAAkB,CAClB,AA7YJ,8CAkZG,YAAY,CACZ,AAnZH,6CAuZG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBAnaoB,AAoapB,kBAAiB,AAEjB,8BAA+B,AAE/B,WAzakB,AA0alB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CAiBjB,AArbH,oDAuaI,UA5amB,CA6anB,AAxaJ,sDA2aI,UAAU,CACV,AA5aJ,kEAgbK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AAnbL,wCA0bE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AAxcF,6CAicG,OAAM,AACN,UAAU,CACV,AAncH,8CAscG,gBAAgB,CAChB,AAvcH,6BA6cE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,UAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AAnfF,mDA4dG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AAlfH,qEAyeI,sBAAqB,AACrB,UAAU,CACV,AA3eJ,mEA+eI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAClB,sBAAsB,AACtB,gBAA0C,AAC1C,qBAjhBuB,CAg4BvB,AAnXD,kCAQE,wBAphB4B,CAqhB5B,AATF,0CAYE,sBArhBsB,AAshBtB,cAAe,CACf,AAdF,kCAiBE,wBAxhB6B,CAyhB7B,AAlBF,wCAqBE,yBA3hBkC,AA4hBlC,cAAe,CACf,AAvBF,oCA0BE,sBAAqB,AACrB,eAAe,CACf,AA5BF,gCA+BE,kBAAkB,AAElB,0BA5iBkB,AA6iBlB,6BA7iBkB,AA+iBlB,oBAAoB,AACpB,SAAU,CACV,AAtCF,4CA0CE,kBAAiB,AACjB,QAAO,AACP,SAAQ,AACR,OAAM,AACN,UAAU,CAUV,AAxDF,iDAiDG,MAAK,AACL,WAAW,CACX,AAnDH,kDAsDG,gBAAgB,CAChB,AAvDH,iCA2DE,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,SAAW,CASX,AAzEF,uDAmEG,2BA9kBiB,CA+kBjB,AApEH,wDAuEG,0BAllBiB,CAmlBjB,AAxEH,8CA4EE,sBAAqB,AAErB,YAAW,AAEX,0BA3lBkB,AA4lBlB,4BA5lBkB,CA+mBlB,AApGF,oDAoFG,YAAY,CACZ,AArFH,oDAwFG,cAnnBW,CA8nBX,AAnGH,0DA4FK,iBAAkB,CAKlB,AAjGL,wEA+FM,kBAAkB,CAClB,AAhGN,+BAwGE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BAvnBkB,AAwnBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CAkLtB,AAlSF,iDAoHG,yBAxnBkB,AAynBlB,SAAU,CAMV,AA3HH,+GAwHI,WAAU,AACV,sBAAsB,CACtB,AA1HJ,yDA8HG,qBAjoBgB,CAwoBhB,AArIH,+HAgII,WAAU,AACV,uBAAsB,AAEtB,UAtoBe,CAuoBf,AApIJ,6EA0II,YAAa,CACb,AA3IJ,oDAgJG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AArKH,8EA2JI,SAAS,CAST,AApKJ,wGA+JK,WAAU,AACV,WAAU,AACV,eAAc,AACd,eAAe,CACf,AAnKL,2DAwKG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BA9rBiB,AA+rBjB,4BA/rBiB,CAgsBjB,AArLH,4DAyLG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBA7sBe,AA8sBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AA1PH,kEA0MI,eAAc,AACd,yBAA4B,CAC5B,AA5MJ,kGA+MI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAlOJ,wGAwNK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA1uBa,CA2uBb,AAjOL,gGAqOI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eArvBc,CAkwBd,AAxPJ,sGA8OK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAhwBa,CAiwBb,AAvPL,qEA6PG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,YAAW,AACX,WAAU,AAEV,mBAAkB,AAClB,gBAAe,AAEf,WAzxBqB,AA0xBrB,gBAAgB,AAChB,eAAe,CAmBf,AAjSH,2EAiRI,UAAU,CACV,AAlRJ,sHAsRK,eAAe,CACf,AAvRL,sOA+RI,YAAY,CACZ,AAhSJ,+BAsSE,sBAAqB,AACrB,6BAA4B,AAC5B,4BAnzBkB,AAozBlB,0BAAyB,AACzB,YAAW,AACX,kBAAiB,AACjB,gBAAe,AACf,gBAAgB,AAEhB,cAAe,CAkEf,AAjXF,qCAkTG,eAAc,AACd,+BAA+B,CAC/B,AApTH,wEAyTI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,0BA70BkB,AA80BlB,eAAgB,CAChB,AA9TJ,wEAoUI,gBAAgB,CAChB,AArUJ,wEA0UI,gBAAgB,CAChB,AA3UJ,wEAgVI,gBAAgB,CAChB,AAjVJ,wEAsVI,gBAAgB,CAChB,AAvVJ,wEA4VI,iBAAiB,CACjB,AA7VJ,gDAkWG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,2BA13BmB,AA23BnB,qBAAqB,CACrB,AA3WH,oCA8WG,iBAAgB,AAChB,UAAU,CACV,AAKH,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,gBAz4BuB,AA04BvB,sBAx4BmB,AA04BnB,eA15Ba,AA45Bb,gBAAe,AACf,iCAAiC,AAEjC,SAAc,CA6Bd,AA5CD,6DAkBE,YAAW,AAEX,UAn5BgB,CAg6BhB,AAjCF,oEAuBG,WAz5BqB,AA05BrB,kBAj5BkB,CAk5BlB,AAzBH,mEA4BG,eAAc,AAEd,WAh6BqB,AAi6BrB,kBAx5BkB,CAy5BlB,AAhCH,8DAoCE,6BAp6BkB,AAs6BlB,YAAW,AACX,gBAAe,AAEf,WAx6BgB,AAy6BhB,eAAgB,CAChB","file":"tabulator.min.css","sourcesContent":["/* Tabulator v4.1.2 (c) Oliver Folkerd */\n\n\r\n//Main Theme Variables\r\n$backgroundColor: #888 !default; //background color of tabulator\r\n$borderColor:#999 !default; //border to tabulator\r\n$textSize:14px !default; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#e6e6e6 !default; //border to tabulator\r\n$headerTextColor:#555 !default; //header text colour\r\n$headerBorderColor:#aaa !default; //header border color\r\n$headerSeperatorColor:#999 !default; //header bottom seperator color\r\n$headerMargin:4px !default; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: #666 !default;\r\n$sortArrowInactive: #bbb !default;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#fff !default; //table row background color\r\n$rowAltBackgroundColor:#EFEFEF !default; //table row background color\r\n$rowBorderColor:#aaa !default; //table border color\r\n$rowTextColor:#333 !default; //table text color\r\n$rowHoverBackground:#bbb !default; //row background color on hover\r\n\r\n$rowSelectedBackground: #9ABCEA !default; //row background color when selected\r\n$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered\r\n\r\n$editBoxColor:#1D68CD !default; //border color for edit boxes\r\n$errorColor:#dd0000 !default; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#e6e6e6 !default; //border to tabulator\r\n$footerTextColor:#555 !default; //footer text colour\r\n$footerBorderColor:#aaa !default; //footer border color\r\n$footerSeperatorColor:#999 !default; //footer bottom seperator color\r\n$footerActiveColor:#d00 !default; //footer bottom active text color\r\n\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\r\n\tborder: 1px solid $borderColor;\r\n\r\n\tbackground-color: $backgroundColor;\r\n\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\toverflow:hidden;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:1px solid $headerSeperatorColor;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:1px solid $headerBorderColor;\r\n\t\t\tbackground:$headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:4px;\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid #999;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #fff;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:9px;\r\n\t\t\t\t\tright:8px;\r\n\t\t\t\t\twidth: 0;\r\n\t\t\t\t\theight: 0;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:1px solid $headerBorderColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\t.tabulator-col:last-child{\r\n\t\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//placeholder element for sortable columns\r\n\t\t\t&.ui-sortable-helper{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tbackground-color: $headerBackgroundColor !important;\r\n\t\t\t\tborder:1px solid $headerBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput{\r\n\t\t\t\t\t&::-ms-clear {\r\n\t\t\t\t\t\twidth : 0;\r\n\t\t\t\t\t\theight: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\t&.tabulator-col-vertical{\r\n\t\t\t\t.tabulator-col-content{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\twriting-mode: vertical-rl;\r\n\t\t\t\t\t\ttext-orientation: mixed;\r\n\r\n\t\t\t\t\t\tdisplay:flex;\r\n\t\t\t\t\t\talign-items:center;\r\n\t\t\t\t\t\tjustify-content:center;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\ttransform: rotate(180deg);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-sortable{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\tpadding-top:20px;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\t\tpadding-bottom:20px;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\tright:calc(50% - 6px);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:400%;\r\n\r\n\t\t\tbackground:lighten($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $headerBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen-rows-holder{\r\n\t\t\tmin-width:400%;\r\n\r\n\t\t\t&:empty{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t&[tabulator-render-mode=\"virtual\"]{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\ttop:0;\r\n\t\t\t\tleft:0;\r\n\t\t\t\theight:100%;\r\n\t\t\t}\r\n\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:#ccc;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t//row element\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:darken($rowAltBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t\t&.tabulator-calcs-top{\r\n\t\t\t\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-calcs-bottom{\r\n\t\t\t\t\t\tborder-top:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\r\n\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tborder-top:1px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align: right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(100% + 20px);\r\n\t\t\tmargin:-5px -10px 5px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:lighten($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 2px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\r\n\t\t\tbackground:rgba(255,255,255,.2);\r\n\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:$footerActiveColor;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tabulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//row element\r\n.tabulator-row{\r\n\tposition: relative;\r\n\tbox-sizing: border-box;\r\n\tmin-height:$textSize + ($headerMargin * 2);\r\n\tbackground-color: $rowBackgroundColor;\r\n\r\n\r\n\t&.tabulator-row-even{\r\n\t\tbackground-color: $rowAltBackgroundColor;\r\n\t}\r\n\r\n\t&.tabulator-selectable:hover{\r\n\t\tbackground-color:$rowHoverBackground;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-selected{\r\n\t\tbackground-color:$rowSelectedBackground;\r\n\t}\r\n\r\n\t&.tabulator-selected:hover{\r\n\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-row-moving{\r\n\t\tborder:1px solid #000;\r\n\t\tbackground:#fff;\r\n\t}\r\n\r\n\t&.tabulator-moving{\r\n\t\tposition: absolute;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpointer-events: none;\r\n\t\tz-index:15;\r\n\t}\r\n\r\n\t//row resize handles\r\n\t.tabulator-row-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\tbottom:0;\r\n\t\tleft:0;\r\n\t\theight:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\ttop:0;\r\n\t\t\tbottom:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ns-resize;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-frozen{\r\n\t\tdisplay: inline-block;\r\n\t\tposition: absolute;\r\n\r\n\t\tbackground-color: inherit;\r\n\r\n\t\tz-index: 10;\r\n\r\n\t\t&.tabulator-frozen-left{\r\n\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-frozen-right{\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-responsive-collapse{\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t&:empty{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\ttable{\r\n\t\t\tfont-size:$textSize;\r\n\r\n\t\t\ttr{\r\n\t\t\t\ttd{\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t&:first-of-type{\r\n\t\t\t\t\t\tpadding-right:10px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//cell element\r\n\t.tabulator-cell{\r\n\t\tdisplay:inline-block;\r\n\t\tposition: relative;\r\n\t\tbox-sizing:border-box;\r\n\t\tpadding:4px;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tvertical-align:middle;\r\n\t\twhite-space:nowrap;\r\n\t\toverflow:hidden;\r\n\t\ttext-overflow:ellipsis;\r\n\r\n\r\n\t\t&.tabulator-editing{\r\n\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\tpadding: 0;\r\n\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-validation-fail{\r\n\t\t\tborder:1px solid $errorColor;\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\tcolor: $errorColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//hide left resize handle on first column\r\n\t\t&:first-child{\r\n\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//movable row handle\r\n\t\t&.tabulator-row-handle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\t//handle holder\r\n\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t//Hamburger element\r\n\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\twidth:100%;\r\n\t\t\t\t\theight:3px;\r\n\t\t\t\t\tmargin-top:2px;\r\n\t\t\t\t\tbackground:#666;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-branch{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:9px;\r\n\t\t\twidth:7px;\r\n\r\n\t\t\tmargin-top:-9px;\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control{\r\n\r\n\t\t\tdisplay:inline-flex;\r\n\t\t\tjustify-content:center;\r\n\t\t\talign-items:center;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:11px;\r\n\t\t\twidth:11px;\r\n\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder:1px solid $rowTextColor;\r\n\t\t\tborder-radius:2px;\r\n\t\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\t\toverflow:hidden;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: transparent;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-expand{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-responsive-collapse-toggle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\theight:15px;\r\n\t\t\twidth:15px;\r\n\r\n\t\t\tborder-radius:20px;\r\n\t\t\tbackground:#666;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:1.1em;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\topacity:.7;\r\n\t\t\t}\r\n\r\n\t\t\t&.open{\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\t\tdisplay:initial;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-open{\r\n\t\t\t\t\tdisplay:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\tdisplay:none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//row grouping element\r\n\t&.tabulator-group{\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-bottom:1px solid #999;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #999;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:#ccc;\r\n\t\tfont-weight:bold;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:40px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:60px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:80px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:100px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:#d00;\r\n\t\t}\r\n\t}\r\n\r\n}\r\n\r\n.tabulator-edit-select-list{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tmax-height:200px;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-edit-select-list-item{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\r\n\t\t&.active{\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-group{\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpadding:4px;\r\n\t\tpadding-top:6px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\tfont-weight:bold;\r\n\t}\r\n}"]} \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_midnight.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_midnight.css deleted file mode 100644 index 40ae915a5a..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_midnight.css +++ /dev/null @@ -1,771 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator { - position: relative; - border: 1px solid #333; - background-color: #222; - overflow: hidden; - font-size: 14px; - text-align: left; - -ms-transform: translatez(0); - transform: translatez(0); -} - -.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { - min-width: 100%; -} - -.tabulator.tabulator-block-select { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.tabulator .tabulator-header { - position: relative; - box-sizing: border-box; - width: 100%; - border-bottom: 1px solid #999; - background-color: #333; - color: #fff; - font-weight: bold; - white-space: nowrap; - overflow: hidden; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-header .tabulator-col { - display: inline-block; - position: relative; - box-sizing: border-box; - border-right: 1px solid #aaa; - background-color: #333; - text-align: left; - vertical-align: bottom; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-moving { - position: absolute; - border: 1px solid #999; - background: #1a1a1a; - pointer-events: none; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content { - box-sizing: border-box; - position: relative; - padding: 4px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { - box-sizing: border-box; - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - vertical-align: bottom; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { - box-sizing: border-box; - width: 100%; - border: 1px solid #999; - padding: 1px; - background: #444; - color: #fff; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - display: inline-block; - position: absolute; - top: 9px; - right: 8px; - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { - position: relative; - display: -ms-flexbox; - display: flex; - border-top: 1px solid #aaa; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { - margin-right: -1px; -} - -.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { - position: absolute; - background-color: #1a1a1a !important; - border: 1px solid #aaa; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { - position: relative; - box-sizing: border-box; - margin-top: 2px; - width: 100%; - text-align: center; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { - height: auto !important; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { - margin-top: 3px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input, .tabulator .tabulator-header .tabulator-col .tabulator-header-filter select { - border: 1px solid #999; - background: #444; - color: #fff; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { - width: 0; - height: 0; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { - padding-right: 25px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { - cursor: pointer; - background-color: #1a1a1a; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #666; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { - border-top: 6px solid #666; - border-bottom: none; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { - -webkit-writing-mode: vertical-rl; - -ms-writing-mode: tb-rl; - writing-mode: vertical-rl; - text-orientation: mixed; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { - padding-right: 0; - padding-top: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { - padding-right: 0; - padding-bottom: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow { - right: calc(50% - 6px); -} - -.tabulator .tabulator-header .tabulator-frozen { - display: inline-block; - position: absolute; - z-index: 10; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #888; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #888; -} - -.tabulator .tabulator-header .tabulator-calcs-holder { - box-sizing: border-box; - min-width: 400%; - background: #1a1a1a !important; - border-top: 1px solid #888; - border-bottom: 1px solid #aaa; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { - background: #1a1a1a !important; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder { - min-width: 400%; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { - display: none; -} - -.tabulator .tabulator-tableHolder { - position: relative; - width: 100%; - white-space: nowrap; - overflow: auto; - -webkit-overflow-scrolling: touch; -} - -.tabulator .tabulator-tableHolder:focus { - outline: none; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder { - box-sizing: border-box; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - width: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { - position: absolute; - top: 0; - left: 0; - height: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder span { - display: inline-block; - margin: 0 auto; - padding: 10px; - color: #eee; - font-weight: bold; - font-size: 20px; -} - -.tabulator .tabulator-tableHolder .tabulator-table { - position: relative; - display: inline-block; - background-color: #666; - white-space: nowrap; - overflow: visible; - color: #fff; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { - font-weight: bold; - background: #373737 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { - border-bottom: 2px solid #888; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { - border-top: 2px solid #888; -} - -.tabulator .tabulator-col-resize-handle { - position: absolute; - right: 0; - top: 0; - bottom: 0; - width: 5px; -} - -.tabulator .tabulator-col-resize-handle.prev { - left: 0; - right: auto; -} - -.tabulator .tabulator-col-resize-handle:hover { - cursor: ew-resize; -} - -.tabulator .tabulator-footer { - padding: 5px 10px; - border-top: 1px solid #999; - background-color: #333; - text-align: right; - color: #333; - font-weight: bold; - white-space: nowrap; - -ms-user-select: none; - user-select: none; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder { - box-sizing: border-box; - width: calc(100% + 20px); - margin: -5px -10px 5px -10px; - text-align: left; - background: #262626 !important; - border-bottom: 1px solid #888; - border-top: 1px solid #888; - overflow: hidden; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { - background: #262626 !important; - color: #fff; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { - margin-bottom: -5px; - border-bottom: none; -} - -.tabulator .tabulator-footer .tabulator-pages { - margin: 0 7px; -} - -.tabulator .tabulator-footer .tabulator-page { - display: inline-block; - margin: 0 2px; - border: 1px solid #aaa; - border-radius: 3px; - padding: 2px 5px; - background: rgba(255, 255, 255, 0.2); - color: #333; - font-family: inherit; - font-weight: inherit; - font-size: inherit; -} - -.tabulator .tabulator-footer .tabulator-page.active { - color: #fff; -} - -.tabulator .tabulator-footer .tabulator-page:disabled { - opacity: .5; -} - -.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); - color: #fff; -} - -.tabulator .tabulator-loader { - position: absolute; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - top: 0; - left: 0; - z-index: 100; - height: 100%; - width: 100%; - background: rgba(0, 0, 0, 0.4); - text-align: center; -} - -.tabulator .tabulator-loader .tabulator-loader-msg { - display: inline-block; - margin: 0 auto; - padding: 10px 20px; - border-radius: 10px; - background: #fff; - font-weight: bold; - font-size: 16px; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { - border: 4px solid #333; - color: #000; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { - border: 4px solid #D00; - color: #590000; -} - -.tabulator-row { - position: relative; - box-sizing: border-box; - min-height: 22px; - background-color: #666; -} - -.tabulator-row:nth-child(even) { - background-color: #444; -} - -.tabulator-row.tabulator-selectable:hover { - background-color: #999; - cursor: pointer; -} - -.tabulator-row.tabulator-selected { - background-color: #000; -} - -.tabulator-row.tabulator-selected:hover { - background-color: #888; - cursor: pointer; -} - -.tabulator-row.tabulator-moving { - position: absolute; - border-top: 1px solid #888; - border-bottom: 1px solid #888; - pointer-events: none !important; - z-index: 15; -} - -.tabulator-row .tabulator-row-resize-handle { - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 5px; -} - -.tabulator-row .tabulator-row-resize-handle.prev { - top: 0; - bottom: auto; -} - -.tabulator-row .tabulator-row-resize-handle:hover { - cursor: ns-resize; -} - -.tabulator-row .tabulator-frozen { - display: inline-block; - position: absolute; - background-color: inherit; - z-index: 10; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #888; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #888; -} - -.tabulator-row .tabulator-responsive-collapse { - box-sizing: border-box; - padding: 5px; - border-top: 1px solid #888; - border-bottom: 1px solid #888; -} - -.tabulator-row .tabulator-responsive-collapse:empty { - display: none; -} - -.tabulator-row .tabulator-responsive-collapse table { - font-size: 14px; -} - -.tabulator-row .tabulator-responsive-collapse table tr td { - position: relative; -} - -.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { - padding-right: 10px; -} - -.tabulator-row .tabulator-cell { - display: inline-block; - position: relative; - box-sizing: border-box; - padding: 4px; - border-right: 1px solid #888; - vertical-align: middle; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.tabulator-row .tabulator-cell.tabulator-editing { - border: 1px solid #999; - padding: 0; -} - -.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { - border: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail { - border: 1px solid #dd0000; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { - border: 1px; - background: transparent; - color: #dd0000; -} - -.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { - width: 80%; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { - width: 100%; - height: 3px; - margin-top: 2px; - background: #666; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-branch { - display: inline-block; - vertical-align: middle; - height: 9px; - width: 7px; - margin-top: -9px; - margin-right: 5px; - border-bottom-left-radius: 1px; - border-left: 2px solid #888; - border-bottom: 2px solid #888; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-pack: center; - justify-content: center; - -ms-flex-align: center; - align-items: center; - vertical-align: middle; - height: 11px; - width: 11px; - margin-right: 5px; - border: 1px solid #fff; - border-radius: 2px; - background: rgba(0, 0, 0, 0.1); - overflow: hidden; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #fff; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: #fff; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #fff; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - height: 15px; - width: 15px; - border-radius: 20px; - background: #fff; - color: #666; - font-weight: bold; - font-size: 1.1em; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { - opacity: .7; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { - display: initial; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { - display: none; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { - display: none; -} - -.tabulator-row.tabulator-group { - box-sizing: border-box; - border-bottom: 1px solid #999; - border-right: 1px solid #888; - border-top: 1px solid #999; - padding: 5px; - padding-left: 10px; - background: #ccc; - font-weight: bold; - color: #333; - min-width: 100%; -} - -.tabulator-row.tabulator-group:hover { - cursor: pointer; - background-color: rgba(0, 0, 0, 0.1); -} - -.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { - margin-right: 10px; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-top: 6px solid #666; - border-bottom: 0; -} - -.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { - margin-left: 20px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { - margin-left: 40px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { - margin-left: 60px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { - margin-left: 80px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { - margin-left: 100px; -} - -.tabulator-row.tabulator-group .tabulator-arrow { - display: inline-block; - width: 0; - height: 0; - margin-right: 16px; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-right: 0; - border-left: 6px solid #666; - vertical-align: middle; -} - -.tabulator-row.tabulator-group span { - margin-left: 10px; - color: #666; -} - -.tabulator-edit-select-list { - position: absolute; - display: inline-block; - box-sizing: border-box; - max-height: 200px; - background: #666; - border: 1px solid #888; - font-size: 14px; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - z-index: 10000; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item { - padding: 4px; - color: #fff; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item.active { - color: #666; - background: #999; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { - cursor: pointer; - color: #666; - background: #999; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-group { - border-bottom: 1px solid #888; - padding: 4px; - padding-top: 6px; - color: #fff; - font-weight: bold; -} diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_midnight.min.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_midnight.min.css deleted file mode 100644 index a603d0cbbb..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_midnight.min.css +++ /dev/null @@ -1,3 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator{position:relative;border:1px solid #333;background-color:#222;overflow:hidden;font-size:14px;text-align:left;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{width:100%;border-bottom:1px solid #999;color:#fff;font-weight:700;white-space:nowrap;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header,.tabulator .tabulator-header .tabulator-col{position:relative;box-sizing:border-box;background-color:#333;overflow:hidden}.tabulator .tabulator-header .tabulator-col{display:inline-block;border-right:1px solid #aaa;text-align:left;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #999;background:#1a1a1a;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#444;color:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:9px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#1a1a1a!important;border:1px solid #aaa}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input,.tabulator .tabulator-header .tabulator-col .tabulator-header-filter select{border:1px solid #999;background:#444;color:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#1a1a1a}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow{right:calc(50% - 6px)}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #888}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #888}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:400%;background:#1a1a1a!important;border-top:1px solid #888;border-bottom:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#1a1a1a!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:400%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{position:absolute;top:0;left:0;height:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#eee;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#666;white-space:nowrap;overflow:visible;color:#fff}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#373737!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #888}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #888}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:5px 10px;border-top:1px solid #999;background-color:#333;text-align:right;color:#333;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px;text-align:left;background:#262626!important;border-bottom:1px solid #888;border-top:1px solid #888;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#262626!important;color:#fff}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;border:1px solid #aaa;border-radius:3px;padding:2px 5px;background:hsla(0,0%,100%,.2);color:#333;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#fff}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator-row{position:relative;box-sizing:border-box;min-height:22px;background-color:#666}.tabulator-row:nth-child(2n){background-color:#444}.tabulator-row.tabulator-selectable:hover{background-color:#999;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#000}.tabulator-row.tabulator-selected:hover{background-color:#888;cursor:pointer}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #888;border-bottom:1px solid #888;pointer-events:none!important;z-index:2}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #888}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #888}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #888;border-bottom:1px solid #888}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:4px;border-right:1px solid #888;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #999;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #888;border-bottom:2px solid #888}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #fff;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#fff}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#fff}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#fff}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#fff;color:#666;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #888;border-top:1px solid #999;padding:5px;padding-left:10px;background:#ccc;font-weight:700;color:#333;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:100px}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#666}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#666;border:1px solid #888;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:4}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#fff}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#666;background:#999}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#666;background:#999}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #888;padding:4px;padding-top:6px;color:#fff;font-weight:700} -/*# sourceMappingURL=tabulator_midnight.min.css.map */ diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_midnight.min.css.map b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_midnight.min.css.map deleted file mode 100644 index d82ee592b8..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_midnight.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["tabulator_midnight.scss"],"names":[],"mappings":"AAyCA,WACC,kBAAkB,AAClB,sBAtCgB,AAuChB,sBAxCqB,AAyCrB,gBAAe,AACf,eAxCa,AAyCb,gBAAgB,AAMhB,uBAAwB,CAwexB,AApfD,iFAiBI,cAAc,CACd,AAlBJ,kCAuBE,yBAAiB,AAAjB,sBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AAxBF,6BA+BE,WAAU,AAEV,6BA9DwB,AAgExB,WAlEmB,AAmEnB,gBAAgB,AAEhB,mBAAmB,AAGnB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAwPpB,AApSF,yEA4BE,kBAAiB,AACjB,sBAAsB,AAKtB,sBAlEyB,AAuEzB,eAAe,CAvCjB,AAoPG,4CApMA,qBAAoB,AAGpB,4BAjFoB,AAmFpB,gBAAe,AACf,qBAAsB,CA8LtB,AApPH,6DA0DI,kBAAkB,AAClB,sBAxFsB,AAyFtB,mBAA8C,AAC9C,mBAAoB,CACpB,AA9DJ,mEAkEI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CAwCX,AA5GJ,wFAwEK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAerB,AA7FL,gHAkFM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,gBAAgB,AAChB,UAAW,CACX,AA3FN,oFAiGK,qBAAqB,AACrB,kBAAkB,AAClB,QAAO,AACP,UAAS,AACT,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BAjImB,CAkInB,AA1GL,0FAmHK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BApJkB,AAqJlB,eAAgB,CAKhB,AA5HL,oHA0HM,iBAAiB,CACjB,AA3HN,0FAkIK,YAAa,CACb,AAnIL,+DAwII,kBAAkB,AAClB,mCAAgE,AAChE,qBAxKmB,CAyKnB,AA3IJ,qEA+II,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAuBlB,AA1KJ,8EAuJK,qBAAsB,CACtB,AAxJL,yEA2JK,cAAe,CACf,AA5JL,uJA+JK,sBAAqB,AACrB,gBAAgB,AAChB,UAAW,CACX,AAlKL,sFAsKO,QAAS,AACT,QAAS,CACV,AAxKN,oFA+KK,kBAAkB,CAClB,AAhLL,qEAmLK,eAAc,AACd,wBAAoD,CACpD,AArLL,uHA0LM,gBAAgB,AAChB,4BAnNkB,CAoNlB,AA5LN,sHAiMM,gBAAgB,AAChB,4BA3NgB,CA4NhB,AAnMN,uHAwMM,0BAjOgB,AAkOhB,kBAAmB,CACnB,AA1MN,+GAiNM,iCAAyB,AAAzB,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AAvNN,oHA4NM,wBAAyB,CACzB,AA7NN,2GAkOM,gBAAe,AACf,gBAAgB,CAChB,AApON,uIAwOO,gBAAe,AACf,mBAAmB,CACnB,AA1OP,uGA+OM,qBAAqB,CACrB,AAhPN,+CAuPG,qBAAqB,AACrB,kBAAkB,AAIlB,SAAW,CASX,AArQH,qEA+PI,2BAlRgB,CAmRhB,AAhQJ,sEAmQI,0BAtRgB,CAuRhB,AApQJ,qDAyQG,sBAAqB,AACrB,eAAc,AAEd,6BAAyD,AAUzD,0BAzSiB,AA0SjB,6BArToB,AAuTpB,eAAgB,CAChB,AA1RH,oEA+QI,4BAAyD,CAKzD,AApRJ,iGAkRK,YAAa,CACb,AAnRL,2DA6RG,cAAc,CAKd,AAlSH,iEAgSI,YAAa,CACb,AAjSJ,kCAwSE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CAyDjC,AArWF,wCA+SG,YAAa,CACb,AAhTH,yDAoTG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AASlB,UAAU,CAYV,AA3UH,wFAyTI,kBAAkB,AAClB,MAAK,AACL,OAAM,AACN,WAAW,CACX,AA7TJ,8DAkUI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,WAAU,AACV,gBAAiB,AACjB,cAAe,CACf,AA1UJ,mDA+UG,kBAAiB,AACjB,qBAAoB,AACpB,sBAtWqB,AAuWrB,mBAAmB,AACnB,iBAAgB,AAChB,UAtWe,CAsXf,AApWH,kFAwVK,gBAAiB,AACjB,4BAAwD,CASxD,AAlWL,sGA4VM,4BA/Wc,CAgXd,AA7VN,yGAgWM,yBAnXc,CAoXd,AAjWN,wCAyWE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AAvXF,6CAgXG,OAAM,AACN,UAAU,CACV,AAlXH,8CAqXG,gBAAgB,CAChB,AAtXH,6BA4XE,iBAAgB,AAChB,0BAlYwB,AAmYxB,sBAtYyB,AAuYzB,iBAAgB,AAChB,WAvYmB,AAwYnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAiEpB,AAzcF,qDA2YG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAAwD,AAWxD,6BA/aiB,AAgbjB,0BAhbiB,AAkbjB,eAAgB,CAMhB,AAraH,oEAoZI,6BAAwD,AACxD,UApbiB,CAybjB,AA1ZJ,iGAwZK,YAAa,CACb,AAzZL,gEAkaI,mBAAkB,AAClB,kBAAkB,CAClB,AApaJ,8CAyaG,YAAY,CACZ,AA1aH,6CA8aG,qBAAoB,AACpB,aAAY,AACZ,sBAtboB,AAubpB,kBAAiB,AACjB,gBAAe,AACf,8BAA+B,AAC/B,WA3bkB,AA4blB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CAiBjB,AAxcH,oDA0bI,UA9bmB,CA+bnB,AA3bJ,sDA8bI,UAAU,CACV,AA/bJ,kEAmcK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AAtcL,6BA6cE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,UAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AAnfF,mDA4dG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AAlfH,qEAyeI,sBAAqB,AACrB,UAAU,CACV,AA3eJ,mEA+eI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAClB,sBAAsB,AAEtB,gBAA0C,AAC1C,qBAjhBuB,CA23BvB,AA/WD,6BAQE,qBAnhByB,CAohBzB,AATF,0CAYE,sBAphBsB,AAqhBtB,cAAe,CACf,AAdF,kCAiBE,qBAvhB0B,CAwhB1B,AAlBF,wCAqBE,sBA1hB+B,AA2hB/B,cAAe,CACf,AAvBF,gCA0BE,kBAAkB,AAElB,0BAtiBkB,AAuiBlB,6BAviBkB,AAyiBlB,8BAA+B,AAC/B,SAAU,CACV,AAjCF,4CAqCE,kBAAiB,AACjB,QAAO,AACP,SAAQ,AACR,OAAM,AACN,UAAU,CAUV,AAnDF,iDA4CG,MAAK,AACL,WAAW,CACX,AA9CH,kDAiDG,gBAAgB,CAChB,AAlDH,iCAsDE,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,SAAW,CASX,AApEF,uDA8DG,2BAxkBiB,CAykBjB,AA/DH,wDAkEG,0BA5kBiB,CA6kBjB,AAnEH,8CAuEE,sBAAqB,AAErB,YAAW,AAEX,0BArlBkB,AAslBlB,4BAtlBkB,CAymBlB,AA/FF,oDA+EG,YAAY,CACZ,AAhFH,oDAmFG,cA7mBW,CAwnBX,AA9FH,0DAuFK,iBAAkB,CAKlB,AA5FL,wEA0FM,kBAAkB,CAClB,AA3FN,+BAoGE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BAlnBkB,AAmnBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CAkLtB,AA9RF,iDAgHG,sBAnnBe,AAonBf,SAAU,CAMV,AAvHH,+GAoHI,WAAU,AACV,sBAAsB,CACtB,AAtHJ,yDA0HG,qBA5nBgB,CAmoBhB,AAjIH,+HA4HI,WAAU,AACV,uBAAsB,AAEtB,UAjoBe,CAkoBf,AAhIJ,6EAsII,YAAa,CACb,AAvIJ,oDA6IG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAElB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AAjKH,8EAuJI,SAAS,CAST,AAhKJ,wGA2JK,WAAU,AACV,WAAU,AACV,eAAc,AACd,eAAe,CACf,AA/JL,2DAoKG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BAzrBiB,AA0rBjB,4BA1rBiB,CA2rBjB,AAjLH,4DAqLG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBAxsBe,AAysBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AAtPH,kEAsMI,eAAc,AACd,yBAA4B,CAC5B,AAxMJ,kGA2MI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AA9NJ,wGAoNK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAruBa,CAsuBb,AA7NL,gGAiOI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eAhvBc,CA6vBd,AApPJ,sGA0OK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA3vBa,CA4vBb,AAnPL,qEAyPG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,YAAW,AACX,WAAU,AAEV,mBAAkB,AAClB,gBAAe,AAEf,WApxBqB,AAqxBrB,gBAAgB,AAChB,eAAe,CAmBf,AA7RH,2EA6QI,UAAU,CACV,AA9QJ,sHAkRK,eAAe,CACf,AAnRL,sOA2RI,YAAY,CACZ,AA5RJ,+BAoSE,sBAAqB,AACrB,6BAA4B,AAC5B,4BAhzBkB,AAizBlB,0BAAyB,AACzB,YAAW,AACX,kBAAiB,AACjB,gBAAe,AACf,gBAAgB,AAChB,WAAU,AAEV,cAAe,CAgEf,AA9WF,qCAiTG,eAAc,AACd,+BAA+B,CAC/B,AAnTH,wEAuTI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,0BA10BkB,AA20BlB,eAAgB,CAChB,AA5TJ,wEAiUI,gBAAgB,CAChB,AAlUJ,wEAuUI,gBAAgB,CAChB,AAxUJ,wEA6UI,gBAAgB,CAChB,AA9UJ,wEAmVI,gBAAgB,CAChB,AApVJ,wEAyVI,iBAAiB,CACjB,AA1VJ,gDA+VG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,2BAt3BmB,AAu3BnB,qBAAqB,CACrB,AAxWH,oCA2WG,iBAAgB,AAChB,UAAU,CACV,AAIH,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,gBAp4BuB,AAq4BvB,sBAn4BmB,AAq4BnB,eAr5Ba,AAu5Bb,gBAAe,AACf,iCAAiC,AAEjC,SAAc,CA6Bd,AA5CD,6DAkBE,YAAW,AAEX,UA94BgB,CA25BhB,AAjCF,oEAuBG,WAp5BqB,AAq5BrB,eA54Be,CA64Bf,AAzBH,mEA4BG,eAAc,AAEd,WA35BqB,AA45BrB,eAn5Be,CAo5Bf,AAhCH,8DAoCE,6BA/5BkB,AAi6BlB,YAAW,AACX,gBAAe,AAEf,WAn6BgB,AAo6BhB,eAAgB,CAChB","file":"tabulator_midnight.min.css","sourcesContent":["/* Tabulator v4.1.2 (c) Oliver Folkerd */\n\n\r\n//Main Theme Variables\r\n$backgroundColor: #222 !default; //background color of tabulator\r\n$borderColor:#333 !default; //border to tabulator\r\n$textSize:14px !default; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#333 !default; //border to tabulator\r\n$headerTextColor:#fff !default; //header text colour\r\n$headerBorderColor:#aaa !default; //header border color\r\n$headerSeperatorColor:#999 !default; //header bottom seperator color\r\n$headerMargin:4px !default; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: #666 !default;\r\n$sortArrowInactive: #bbb !default;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#666 !default; //table row background color\r\n$rowAltBackgroundColor:#444 !default; //table row background color\r\n$rowBorderColor:#888 !default; //table border color\r\n$rowTextColor:#fff !default; //table text color\r\n$rowHoverBackground:#999 !default; //row background color on hover\r\n\r\n$rowSelectedBackground: #000 !default; //row background color when selected\r\n$rowSelectedBackgroundHover: #888 !default;//row background color when selected and hovered\r\n\r\n$editBoxColor:#999 !default; //border color for edit boxes\r\n$errorColor:#dd0000 !default; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#333 !default; //border to tabulator\r\n$footerTextColor:#333 !default; //footer text colour\r\n$footerBorderColor:#aaa !default; //footer border color\r\n$footerSeperatorColor:#999 !default; //footer bottom seperator color\r\n$footerActiveColor:#fff !default; //footer bottom active text color\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\tborder: 1px solid $borderColor;\r\n\tbackground-color: $backgroundColor;\r\n\toverflow:hidden;\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:1px solid $headerSeperatorColor;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:1px solid $headerBorderColor;\r\n\t\t\tbackground-color: $headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:4px;\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid #999;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #444;\r\n\t\t\t\t\t\tcolor: #fff;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:9px;\r\n\t\t\t\t\tright:8px;\r\n\t\t\t\t\twidth: 0;\r\n\t\t\t\t\theight: 0;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:1px solid $headerBorderColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\t.tabulator-col:last-child{\r\n\t\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//placeholder element for sortable columns\r\n\t\t\t&.ui-sortable-helper{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tbackground-color: darken($headerBackgroundColor, 10%) !important;\r\n\t\t\t\tborder:1px solid $headerBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput, select{\r\n\t\t\t\t\tborder:1px solid #999;\r\n\t\t\t\t\tbackground: #444;\r\n\t\t\t\t\tcolor: #fff;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput{\r\n\t\t\t\t\t&::-ms-clear {\r\n\t\t\t\t\t width : 0;\r\n\t\t\t\t\t height: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-col-vertical{\r\n\t\t\t\t.tabulator-col-content{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\twriting-mode: vertical-rl;\r\n\t\t\t\t\t\ttext-orientation: mixed;\r\n\r\n\t\t\t\t\t\tdisplay:flex;\r\n\t\t\t\t\t\talign-items:center;\r\n\t\t\t\t\t\tjustify-content:center;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\ttransform: rotate(180deg);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-sortable{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\tpadding-top:20px;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\t\tpadding-bottom:20px;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\tright:calc(50% - 6px);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:400%;\r\n\r\n\t\t\tbackground:darken($headerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $headerBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen-rows-holder{\r\n\t\t\tmin-width:400%;\r\n\r\n\t\t\t&:empty{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t&[tabulator-render-mode=\"virtual\"]{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\ttop:0;\r\n\t\t\t\tleft:0;\r\n\t\t\t\theight:100%;\r\n\t\t\t}\r\n\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:#eee;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:darken($rowAltBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t\t&.tabulator-calcs-top{\r\n\t\t\t\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-calcs-bottom{\r\n\t\t\t\t\t\tborder-top:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tborder-top:1px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align:right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(100% + 20px);\r\n\t\t\tmargin:-5px -10px 5px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:darken($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:darken($footerBackgroundColor, 5%) !important;\r\n\t\t\t\tcolor:$headerTextColor;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tmargin:0 2px;\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\t\t\tpadding:2px 5px;\r\n\t\t\tbackground:rgba(255,255,255,.2);\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:$footerActiveColor;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tabulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//row element\r\n.tabulator-row{\r\n\tposition: relative;\r\n\tbox-sizing: border-box;\r\n\r\n\tmin-height:$textSize + ($headerMargin * 2);\r\n\tbackground-color: $rowBackgroundColor;\r\n\r\n\t&:nth-child(even){\r\n\t\tbackground-color: $rowAltBackgroundColor;\r\n\t}\r\n\r\n\t&.tabulator-selectable:hover{\r\n\t\tbackground-color:$rowHoverBackground;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-selected{\r\n\t\tbackground-color:$rowSelectedBackground;\r\n\t}\r\n\r\n\t&.tabulator-selected:hover{\r\n\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-moving{\r\n\t\tposition: absolute;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpointer-events: none !important;\r\n\t\tz-index:15;\r\n\t}\r\n\r\n\t//row resize handles\r\n\t.tabulator-row-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\tbottom:0;\r\n\t\tleft:0;\r\n\t\theight:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\ttop:0;\r\n\t\t\tbottom:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ns-resize;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-frozen{\r\n\t\tdisplay: inline-block;\r\n\t\tposition: absolute;\r\n\r\n\t\tbackground-color: inherit;\r\n\r\n\t\tz-index: 10;\r\n\r\n\t\t&.tabulator-frozen-left{\r\n\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-frozen-right{\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-responsive-collapse{\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t&:empty{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\ttable{\r\n\t\t\tfont-size:$textSize;\r\n\r\n\t\t\ttr{\r\n\t\t\t\ttd{\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t&:first-of-type{\r\n\t\t\t\t\t\tpadding-right:10px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//cell element\r\n\t.tabulator-cell{\r\n\t\tdisplay:inline-block;\r\n\t\tposition: relative;\r\n\t\tbox-sizing:border-box;\r\n\t\tpadding:4px;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tvertical-align:middle;\r\n\t\twhite-space:nowrap;\r\n\t\toverflow:hidden;\r\n\t\ttext-overflow:ellipsis;\r\n\r\n\r\n\t\t&.tabulator-editing{\r\n\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\tpadding: 0;\r\n\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-validation-fail{\r\n\t\t\tborder:1px solid $errorColor;\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\tcolor: $errorColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//hide left resize handle on first column\r\n\t\t&:first-child{\r\n\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//movable row handle\r\n\t\t&.tabulator-row-handle{\r\n\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\t//handle holder\r\n\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t//Hamburger element\r\n\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\twidth:100%;\r\n\t\t\t\t\theight:3px;\r\n\t\t\t\t\tmargin-top:2px;\r\n\t\t\t\t\tbackground:#666;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-branch{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:9px;\r\n\t\t\twidth:7px;\r\n\r\n\t\t\tmargin-top:-9px;\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control{\r\n\r\n\t\t\tdisplay:inline-flex;\r\n\t\t\tjustify-content:center;\r\n\t\t\talign-items:center;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:11px;\r\n\t\t\twidth:11px;\r\n\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder:1px solid $rowTextColor;\r\n\t\t\tborder-radius:2px;\r\n\t\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\t\toverflow:hidden;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: transparent;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-expand{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-responsive-collapse-toggle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\theight:15px;\r\n\t\t\twidth:15px;\r\n\r\n\t\t\tborder-radius:20px;\r\n\t\t\tbackground:#fff;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:1.1em;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\topacity:.7;\r\n\t\t\t}\r\n\r\n\t\t\t&.open{\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\t\tdisplay:initial;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-open{\r\n\t\t\t\t\tdisplay:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\tdisplay:none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//row grouping element\r\n\t&.tabulator-group{\r\n\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-bottom:1px solid #999;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #999;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:#ccc;\r\n\t\tfont-weight:bold;\r\n\t\tcolor:#333;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:40px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:60px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:80px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:100px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:#666;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n.tabulator-edit-select-list{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tmax-height:200px;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-edit-select-list-item{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\r\n\t\t&.active{\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-group{\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpadding:4px;\r\n\t\tpadding-top:6px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\tfont-weight:bold;\r\n\t}\r\n}"]} \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_modern.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_modern.css deleted file mode 100644 index 662b3e842e..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_modern.css +++ /dev/null @@ -1,794 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator { - position: relative; - border: 1px solid #fff; - background-color: #fff; - overflow: hidden; - font-size: 16px; - text-align: left; - -ms-transform: translatez(0); - transform: translatez(0); -} - -.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { - min-width: 100%; -} - -.tabulator.tabulator-block-select { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.tabulator .tabulator-header { - position: relative; - box-sizing: border-box; - width: 100%; - border-bottom: 3px solid #3759D7; - margin-bottom: 4px; - background-color: #fff; - color: #3759D7; - font-weight: bold; - white-space: nowrap; - overflow: hidden; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - padding-left: 10px; - font-size: 1.1em; -} - -.tabulator .tabulator-header .tabulator-col { - display: inline-block; - position: relative; - box-sizing: border-box; - border-right: 2px solid #fff; - background-color: #fff; - text-align: left; - vertical-align: bottom; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-moving { - position: absolute; - border: 1px solid #3759D7; - background: #e6e6e6; - pointer-events: none; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content { - box-sizing: border-box; - position: relative; - padding: 4px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { - box-sizing: border-box; - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - vertical-align: bottom; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { - box-sizing: border-box; - width: 100%; - border: 1px solid #3759D7; - padding: 1px; - background: #fff; - font-size: 1em; - color: #3759D7; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - display: inline-block; - position: absolute; - top: 9px; - right: 8px; - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #b7c3f1; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { - position: relative; - display: -ms-flexbox; - display: flex; - border-top: 2px solid #3759D7; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { - margin-right: -1px; -} - -.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { - position: absolute; - background-color: #e6e6e6 !important; - border: 1px solid #fff; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { - position: relative; - box-sizing: border-box; - margin-top: 2px; - width: 100%; - text-align: center; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { - height: auto !important; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { - margin-top: 3px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { - width: 0; - height: 0; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { - padding-right: 25px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { - cursor: pointer; - background-color: #e6e6e6; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #b7c3f1; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #3759D7; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { - border-top: 6px solid #3759D7; - border-bottom: none; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { - -webkit-writing-mode: vertical-rl; - -ms-writing-mode: tb-rl; - writing-mode: vertical-rl; - text-orientation: mixed; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { - padding-right: 0; - padding-top: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { - padding-right: 0; - padding-bottom: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow { - right: calc(50% - 6px); -} - -.tabulator .tabulator-header .tabulator-frozen { - display: inline-block; - position: absolute; - z-index: 10; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { - padding-left: 10px; - border-right: 2px solid #fff; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #fff; -} - -.tabulator .tabulator-header .tabulator-calcs-holder { - box-sizing: border-box; - min-width: 400%; - border-top: 2px solid #3759D7 !important; - background: white !important; - border-top: 1px solid #fff; - border-bottom: 1px solid #fff; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { - padding-left: 0 !important; - background: white !important; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-cell { - background: none; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder { - min-width: 400%; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { - display: none; -} - -.tabulator .tabulator-tableHolder { - position: relative; - width: 100%; - white-space: nowrap; - overflow: auto; - -webkit-overflow-scrolling: touch; -} - -.tabulator .tabulator-tableHolder:focus { - outline: none; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder { - box-sizing: border-box; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - width: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { - position: absolute; - top: 0; - left: 0; - height: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder span { - display: inline-block; - margin: 0 auto; - padding: 10px; - color: #3759D7; - font-weight: bold; - font-size: 20px; -} - -.tabulator .tabulator-tableHolder .tabulator-table { - position: relative; - display: inline-block; - background-color: #f3f3f3; - white-space: nowrap; - overflow: visible; - color: #333; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { - font-weight: bold; - background: #f2f2f2 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { - border-bottom: 2px solid #3759D7; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { - border-top: 2px solid #3759D7; -} - -.tabulator .tabulator-col-resize-handle { - position: absolute; - right: 0; - top: 0; - bottom: 0; - width: 5px; -} - -.tabulator .tabulator-col-resize-handle.prev { - left: 0; - right: auto; -} - -.tabulator .tabulator-col-resize-handle:hover { - cursor: ew-resize; -} - -.tabulator .tabulator-footer { - padding: 5px 10px; - border-top: 1px solid #999; - background-color: #fff; - text-align: right; - color: #3759D7; - font-weight: bold; - white-space: nowrap; - -ms-user-select: none; - user-select: none; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder { - box-sizing: border-box; - width: calc(100% + 20px); - margin: -5px -10px 5px -10px; - text-align: left; - background: white !important; - border-top: 3px solid #3759D7 !important; - border-bottom: 2px solid #3759D7 !important; - border-bottom: 1px solid #fff; - border-top: 1px solid #fff; - overflow: hidden; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { - background: white !important; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-cell { - background: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { - margin-bottom: -5px; - border-bottom: none; - border-bottom: none !important; -} - -.tabulator .tabulator-footer .tabulator-pages { - margin: 0 7px; -} - -.tabulator .tabulator-footer .tabulator-page { - display: inline-block; - margin: 0 2px; - border: 1px solid #aaa; - border-radius: 3px; - padding: 2px 5px; - background: rgba(255, 255, 255, 0.2); - color: #3759D7; - font-family: inherit; - font-weight: inherit; - font-size: inherit; -} - -.tabulator .tabulator-footer .tabulator-page.active { - color: #3759D7; -} - -.tabulator .tabulator-footer .tabulator-page:disabled { - opacity: .5; -} - -.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); - color: #fff; -} - -.tabulator .tabulator-loader { - position: absolute; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - top: 0; - left: 0; - z-index: 100; - height: 100%; - width: 100%; - background: rgba(0, 0, 0, 0.4); - text-align: center; -} - -.tabulator .tabulator-loader .tabulator-loader-msg { - display: inline-block; - margin: 0 auto; - padding: 10px 20px; - border-radius: 10px; - background: #fff; - font-weight: bold; - font-size: 16px; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { - border: 4px solid #333; - color: #000; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { - border: 4px solid #D00; - color: #590000; -} - -.tabulator-row { - position: relative; - box-sizing: border-box; - box-sizing: border-box; - min-height: 24px; - background-color: #3759D7; - padding-left: 10px !important; - margin-bottom: 2px; -} - -.tabulator-row:nth-child(even) { - background-color: #627ce0; -} - -.tabulator-row:nth-child(even) .tabulator-cell { - background-color: #fff; -} - -.tabulator-row.tabulator-selectable:hover { - cursor: pointer; -} - -.tabulator-row.tabulator-selectable:hover .tabulator-cell { - background-color: #bbb; -} - -.tabulator-row.tabulator-selected .tabulator-cell { - background-color: #9ABCEA; -} - -.tabulator-row.tabulator-selected:hover .tabulator-cell { - background-color: #769BCC; - cursor: pointer; -} - -.tabulator-row.tabulator-moving { - position: absolute; - border-top: 1px solid #fff; - border-bottom: 1px solid #fff; - pointer-events: none !important; - z-index: 15; -} - -.tabulator-row .tabulator-row-resize-handle { - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 5px; -} - -.tabulator-row .tabulator-row-resize-handle.prev { - top: 0; - bottom: auto; -} - -.tabulator-row .tabulator-row-resize-handle:hover { - cursor: ns-resize; -} - -.tabulator-row .tabulator-frozen { - display: inline-block; - position: absolute; - background-color: inherit; - z-index: 10; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-left { - padding-left: 10px; - border-right: 2px solid #fff; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #fff; -} - -.tabulator-row .tabulator-responsive-collapse { - box-sizing: border-box; - padding: 5px; - border-top: 1px solid #fff; - border-bottom: 1px solid #fff; -} - -.tabulator-row .tabulator-responsive-collapse:empty { - display: none; -} - -.tabulator-row .tabulator-responsive-collapse table { - font-size: 16px; -} - -.tabulator-row .tabulator-responsive-collapse table tr td { - position: relative; -} - -.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { - padding-right: 10px; -} - -.tabulator-row .tabulator-cell { - display: inline-block; - position: relative; - box-sizing: border-box; - padding: 6px 4px; - border-right: 2px solid #fff; - vertical-align: middle; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - background-color: #f3f3f3; -} - -.tabulator-row .tabulator-cell.tabulator-editing { - border: 1px solid #1D68CD; - padding: 0; -} - -.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { - border: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail { - border: 1px solid #dd0000; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { - border: 1px; - background: transparent; - color: #dd0000; -} - -.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { - width: 80%; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { - width: 100%; - height: 3px; - margin-top: 2px; - background: #666; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-branch { - display: inline-block; - vertical-align: middle; - height: 9px; - width: 7px; - margin-top: -9px; - margin-right: 5px; - border-bottom-left-radius: 1px; - border-left: 2px solid #fff; - border-bottom: 2px solid #fff; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-pack: center; - justify-content: center; - -ms-flex-align: center; - align-items: center; - vertical-align: middle; - height: 11px; - width: 11px; - margin-right: 5px; - border: 1px solid #333; - border-radius: 2px; - background: rgba(0, 0, 0, 0.1); - overflow: hidden; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - height: 15px; - width: 15px; - border-radius: 20px; - background: #666; - color: #f3f3f3; - font-weight: bold; - font-size: 1.1em; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { - opacity: .7; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { - display: initial; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { - display: none; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { - display: none; -} - -.tabulator-row.tabulator-group { - box-sizing: border-box; - border-bottom: 2px solid #3759D7; - border-top: 2px solid #3759D7; - padding: 5px; - padding-left: 10px; - background: #8ca0e8; - font-weight: bold; - color: fff; - margin-bottom: 2px; - min-width: 100%; -} - -.tabulator-row.tabulator-group:hover { - cursor: pointer; - background-color: rgba(0, 0, 0, 0.1); -} - -.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { - margin-right: 10px; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-top: 6px solid #3759D7; - border-bottom: 0; -} - -.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { - margin-left: 20px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { - margin-left: 40px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { - margin-left: 60px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { - margin-left: 80px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { - margin-left: 100px; -} - -.tabulator-row.tabulator-group .tabulator-arrow { - display: inline-block; - width: 0; - height: 0; - margin-right: 16px; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-right: 0; - border-left: 6px solid #3759D7; - vertical-align: middle; -} - -.tabulator-row.tabulator-group span { - margin-left: 10px; - color: #3759D7; -} - -.tabulator-edit-select-list { - position: absolute; - display: inline-block; - box-sizing: border-box; - max-height: 200px; - background: #f3f3f3; - border: 1px solid #fff; - font-size: 16px; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - z-index: 10000; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item { - padding: 4px; - color: #333; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item.active { - color: #f3f3f3; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { - cursor: pointer; - color: #f3f3f3; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-group { - border-bottom: 1px solid #fff; - padding: 4px; - padding-top: 6px; - color: #333; - font-weight: bold; -} diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_modern.min.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_modern.min.css deleted file mode 100644 index b7cb65fa9a..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_modern.min.css +++ /dev/null @@ -1,3 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator{position:relative;border:1px solid #fff;background-color:#fff;overflow:hidden;font-size:16px;text-align:left;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{width:100%;border-bottom:3px solid #3759d7;margin-bottom:4px;color:#3759d7;font-weight:700;white-space:nowrap;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;padding-left:10px;font-size:1.1em}.tabulator .tabulator-header,.tabulator .tabulator-header .tabulator-col{position:relative;box-sizing:border-box;background-color:#fff;overflow:hidden}.tabulator .tabulator-header .tabulator-col{display:inline-block;border-right:2px solid #fff;text-align:left;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #3759d7;background:#e6e6e6;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #3759d7;padding:1px;background:#fff;font-size:1em;color:#3759d7}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:9px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #b7c3f1}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:2px solid #3759d7;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#e6e6e6!important;border:1px solid #fff}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#e6e6e6}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #b7c3f1}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #3759d7}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #3759d7;border-bottom:none}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow{right:calc(50% - 6px)}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{padding-left:10px;border-right:2px solid #fff}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #fff}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:400%;border-top:2px solid #3759d7!important;background:#fff!important;border-top:1px solid #fff;border-bottom:1px solid #fff;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{padding-left:0!important;background:#fff!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-cell{background:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:400%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{position:absolute;top:0;left:0;height:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#3759d7;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#f3f3f3;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#f2f2f2!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #3759d7}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #3759d7}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:5px 10px;border-top:1px solid #999;background-color:#fff;text-align:right;color:#3759d7;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px;text-align:left;background:#fff!important;border-top:3px solid #3759d7!important;border-bottom:2px solid #3759d7!important;border-bottom:1px solid #fff;border-top:1px solid #fff;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-cell{background:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none;border-bottom:none!important}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;border:1px solid #aaa;border-radius:3px;padding:2px 5px;background:hsla(0,0%,100%,.2);color:#3759d7;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#3759d7}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator-row{position:relative;box-sizing:border-box;min-height:24px;background-color:#3759d7;padding-left:10px!important;margin-bottom:2px}.tabulator-row:nth-child(2n){background-color:#627ce0}.tabulator-row:nth-child(2n) .tabulator-cell{background-color:#fff}.tabulator-row.tabulator-selectable:hover{cursor:pointer}.tabulator-row.tabulator-selectable:hover .tabulator-cell{background-color:#bbb}.tabulator-row.tabulator-selected .tabulator-cell{background-color:#9abcea}.tabulator-row.tabulator-selected:hover .tabulator-cell{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #fff;border-bottom:1px solid #fff;pointer-events:none!important;z-index:2}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator-row .tabulator-frozen.tabulator-frozen-left{padding-left:10px;border-right:2px solid #fff}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #fff}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #fff;border-bottom:1px solid #fff}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:16px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:6px 4px;border-right:2px solid #fff;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background-color:#f3f3f3}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #fff;border-bottom:2px solid #fff}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#f3f3f3;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:2px solid #3759d7;border-top:2px solid #3759d7;padding:5px;padding-left:10px;background:#8ca0e8;font-weight:700;color:fff;margin-bottom:2px;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #3759d7;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:100px}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #3759d7;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#3759d7}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#f3f3f3;border:1px solid #fff;font-size:16px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:4}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#333}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#f3f3f3;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#f3f3f3;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #fff;padding:4px;padding-top:6px;color:#333;font-weight:700} -/*# sourceMappingURL=tabulator_modern.min.css.map */ diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_modern.min.css.map b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_modern.min.css.map deleted file mode 100644 index 95bd98527e..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_modern.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["tabulator_modern.scss"],"names":[],"mappings":"AA+CA,WACC,kBAAkB,AAClB,sBA1CgB,AA2ChB,sBA5CqB,AA6CrB,gBAAe,AACf,eA5Ca,AA6Cb,gBAAgB,AAMhB,uBAAwB,CAyfxB,AArgBD,iFAiBI,cAAc,CACd,AAlBJ,kCAuBE,yBAAiB,AAAjB,sBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AAxBF,6BA+BE,WAAU,AAEV,gCA7Ee,AA8Ef,kBAAiB,AAEjB,cAhFe,AAiFf,gBAAgB,AAEhB,mBAAmB,AAGnB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,kBArDe,AAuDf,eAAgB,CA4PhB,AA7SF,yEA4BE,kBAAiB,AACjB,sBAAsB,AAMtB,sBAvEyB,AA4EzB,eAAe,CAxCjB,AAqPG,4CAhMA,qBAAoB,AAGpB,4BA1FoB,AA4FpB,gBAAe,AACf,qBAAsB,CA0LtB,AArPH,6DA+DI,kBAAkB,AAClB,yBA5Ga,AA6Gb,mBAA8C,AAC9C,mBAAoB,CACpB,AAnEJ,mEAuEI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CAyCX,AAlHJ,wFA6EK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAgBrB,AAnGL,gHAuFM,sBAAsB,AACtB,WAAW,AAEX,yBAtIW,AAwIX,YAAW,AAEX,gBAAgB,AAEhB,cAAc,AACd,aA7IW,CA8IX,AAlGN,oFAuGK,qBAAqB,AACrB,kBAAkB,AAClB,QAAO,AACP,UAAS,AACT,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,+BA3IqC,CA4IrC,AAhHL,0FAyHK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,6BAxKY,AAyKZ,eAAgB,CAKhB,AAlIL,oHAgIM,iBAAiB,CACjB,AAjIN,0FAyIK,YAAa,CACb,AA1IL,+DA+II,kBAAkB,AAClB,mCAAgE,AAChE,qBAnLmB,CAoLnB,AAlJJ,qEAsJI,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAiBlB,AA3KJ,8EA8JK,qBAAsB,CACtB,AA/JL,yEAkKK,cAAe,CACf,AAnKL,sFAuKO,QAAS,AACT,QAAS,CACV,AAzKN,oFAgLK,kBAAkB,CAClB,AAjLL,qEAoLK,eAAc,AACd,wBAAoD,CACpD,AAtLL,uHA2LM,gBAAgB,AAChB,+BAxNoC,CAyNpC,AA7LN,sHAkMM,gBAAgB,AAChB,+BA/OW,CAgPX,AApMN,uHAyMM,6BArPW,AAsPX,kBAAmB,CACnB,AA3MN,+GAkNM,iCAAyB,AAAzB,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AAxNN,oHA6NM,wBAAyB,CACzB,AA9NN,2GAmOM,gBAAe,AACf,gBAAgB,CAChB,AArON,uIAyOO,gBAAe,AACf,mBAAmB,CACnB,AA3OP,uGAgPM,qBAAqB,CACrB,AAjPN,+CAwPG,qBAAqB,AACrB,kBAAkB,AAIlB,SAAW,CAWX,AAxQH,qEAgQI,kBAtQa,AAwQb,2BAzRgB,CA0RhB,AAnQJ,sEAsQI,0BA7RgB,CA8RhB,AAvQJ,qDA2QG,sBAAqB,AACrB,eAAc,AAEd,uCAAqD,AAErD,0BAAyD,AAgBzD,0BAvTiB,AAwTjB,6BAnUoB,AAqUpB,eAAgB,CAChB,AApSH,oEAmRI,yBAA0B,AAE1B,yBAAyD,CASzD,AA9RJ,iGAwRK,YAAa,CACb,AAzRL,oFA4RK,eAAe,CACf,AA7RL,2DAuSG,cAAc,CAKd,AA5SH,iEA0SI,YAAa,CACb,AA3SJ,kCAiTE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CAyDjC,AA9WF,wCAwTG,YAAa,CACb,AAzTH,yDA6TG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AASlB,UAAU,CAYV,AApVH,wFAkUI,kBAAkB,AAClB,MAAK,AACL,OAAM,AACN,WAAW,CACX,AAtUJ,8DA2UI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,cA5Xa,AA6Xb,gBAAiB,AACjB,cAAe,CACf,AAnVJ,mDAwVG,kBAAiB,AACjB,qBAAoB,AACpB,yBAnXwB,AAoXxB,mBAAmB,AACnB,iBAAgB,AAChB,UAnXe,CAmYf,AA7WH,kFAiWK,gBAAiB,AACjB,4BAAwD,CASxD,AA3WL,sGAqWM,+BAjZW,CAkZX,AAtWN,yGAyWM,4BArZW,CAsZX,AA1WN,wCAmXE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AAjYF,6CA0XG,OAAM,AACN,UAAU,CACV,AA5XH,8CA+XG,gBAAgB,CAChB,AAhYH,6BAsYE,iBAAgB,AAChB,0BAhZwB,AAiZxB,sBApZyB,AAqZzB,iBAAgB,AAChB,cAtbe,AAubf,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAwEpB,AA1dF,qDAqZG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,0BAAyD,AAEzD,uCAAqD,AACrD,0CAAwD,AAcxD,6BAnciB,AAocjB,0BApciB,AAscjB,eAAgB,CAOhB,AAtbH,oEAiaI,yBAAyD,CASzD,AA1aJ,iGAoaK,YAAa,CACb,AAraL,oFAwaK,eAAe,CACf,AAzaL,gEAkbI,mBAAkB,AAClB,mBAAkB,AAClB,4BAA6B,CAC7B,AArbJ,8CA0bG,YAAY,CACZ,AA3bH,6CA+bG,qBAAoB,AACpB,aAAY,AACZ,sBA3coB,AA4cpB,kBAAiB,AACjB,gBAAe,AACf,8BAA+B,AAC/B,cAjfc,AAkfd,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CAiBjB,AAzdH,oDA2cI,aAvfa,CAwfb,AA5cJ,sDA+cI,UAAU,CACV,AAhdJ,kEAodK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AAvdL,6BA8dE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,UAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AApgBF,mDA6eG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AAngBH,qEA0fI,sBAAqB,AACrB,UAAU,CACV,AA5fJ,mEAggBI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAGlB,sBAAsB,AACtB,gBAA0C,AAE1C,yBA3jBgB,AA6jBhB,4BAAqC,AAErC,iBAAkB,CAsXlB,AAjYD,6BAcE,wBA1hBqC,CA+hBrC,AAnBF,6CAiBG,qBAjjBwB,CAkjBxB,AAlBH,0CAsBE,cAAe,CAKf,AA3BF,0DAyBG,qBAtjBqB,CAujBrB,AA1BH,kDA+BG,wBA1jB4B,CA2jB5B,AAhCH,wDAqCG,yBA/jBiC,AAgkBjC,cAAe,CACf,AAvCH,gCA2CE,kBAAkB,AAElB,0BA5kBkB,AA6kBlB,6BA7kBkB,AA+kBlB,8BAA+B,AAC/B,SAAU,CACV,AAlDF,4CAsDE,kBAAiB,AACjB,QAAO,AACP,SAAQ,AACR,OAAM,AACN,UAAU,CAUV,AApEF,iDA6DG,MAAK,AACL,WAAW,CACX,AA/DH,kDAkEG,gBAAgB,CAChB,AAnEH,iCAuEE,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,SAAW,CAUX,AAtFF,uDA+EG,kBA7lBc,AA8lBd,2BA/mBiB,CAgnBjB,AAjFH,wDAoFG,0BAnnBiB,CAonBjB,AArFH,8CAyFE,sBAAqB,AAErB,YAAW,AAEX,0BA5nBkB,AA6nBlB,4BA7nBkB,CAgpBlB,AAjHF,oDAiGG,YAAY,CACZ,AAlGH,oDAqGG,cAppBW,CA+pBX,AAhHH,0DAyGK,iBAAkB,CAKlB,AA9GL,wEA4GM,kBAAkB,CAClB,AA7GN,+BAqHE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,gBAAe,AACf,4BAxpBkB,AAypBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,uBAAsB,AAEtB,wBAhqByB,CAi1BzB,AAhTF,iDAkIG,yBA1pBkB,AA2pBlB,SAAU,CAMV,AAzIH,+GAsII,WAAU,AACV,sBAAsB,CACtB,AAxIJ,yDA4IG,qBAnqBgB,CA0qBhB,AAnJH,+HA8II,WAAU,AACV,uBAAsB,AAEtB,UAxqBe,CAyqBf,AAlJJ,6EAwJI,YAAa,CACb,AAzJJ,oDA+JG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAElB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AAnLH,8EAyKI,SAAS,CAST,AAlLJ,wGA6KK,WAAU,AACV,WAAU,AACV,eAAc,AACd,eAAe,CACf,AAjLL,2DAsLG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BAhuBiB,AAiuBjB,4BAjuBiB,CAkuBjB,AAnMH,4DAuMG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBA/uBe,AAgvBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AAxQH,kEAwNI,eAAc,AACd,yBAA4B,CAC5B,AA1NJ,kGA6NI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAhPJ,wGAsOK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA5wBa,CA6wBb,AA/OL,gGAmPI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eAvxBc,CAoyBd,AAtQJ,sGA4PK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAlyBa,CAmyBb,AArQL,qEA2QG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,YAAW,AACX,WAAU,AAEV,mBAAkB,AAClB,gBAAe,AAEf,cA3zBwB,AA4zBxB,gBAAgB,AAChB,eAAe,CAmBf,AA/SH,2EA+RI,UAAU,CACV,AAhSJ,sHAoSK,eAAe,CACf,AArSL,sOA6SI,YAAY,CACZ,AA9SJ,+BAqTE,sBAAqB,AACrB,gCA12Be,AA22Bf,6BA32Be,AA42Bf,YAAW,AACX,kBAAiB,AACjB,mBAAiC,AACjC,gBAAgB,AAChB,UAAS,AACT,kBAAkB,AAElB,cAAe,CAiEf,AAhYF,qCAkUG,eAAc,AACd,+BAA+B,CAC/B,AApUH,wEAyUI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,6BAh4Ba,AAi4Bb,eAAgB,CAChB,AA9UJ,wEAmVI,gBAAgB,CAChB,AApVJ,wEAyVI,gBAAgB,CAChB,AA1VJ,wEA+VI,gBAAgB,CAChB,AAhWJ,wEAqWI,gBAAgB,CAChB,AAtWJ,wEA2WI,iBAAiB,CACjB,AA5WJ,gDAiXG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,8BA56Bc,AA66Bd,qBAAqB,CACrB,AA1XH,oCA6XG,iBAAgB,AAChB,aAl7Bc,CAm7Bd,AAIH,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,mBA36B0B,AA46B1B,sBA16BmB,AA46BnB,eA57Ba,AA87Bb,gBAAe,AACf,iCAAiC,AAEjC,SAAc,CA6Bd,AA5CD,6DAkBE,YAAW,AAEX,UAr7BgB,CAk8BhB,AAjCF,oEAuBG,cA37BwB,AA47BxB,kBAn7BkB,CAo7BlB,AAzBH,mEA4BG,eAAc,AAEd,cAl8BwB,AAm8BxB,kBA17BkB,CA27BlB,AAhCH,8DAoCE,6BAt8BkB,AAw8BlB,YAAW,AACX,gBAAe,AAEf,WA18BgB,AA28BhB,eAAgB,CAChB","file":"tabulator_modern.min.css","sourcesContent":["/* Tabulator v4.1.2 (c) Oliver Folkerd */\n\n\r\n$primary: #3759D7 !default; //the base text color from which the rest of the theme derives\r\n\r\n//Main Theme Variables\r\n$backgroundColor: #fff !default; //background color of tabulator\r\n$borderColor:#fff !default; //border to tabulator\r\n$textSize:16px !default; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#fff !default; //border to tabulator\r\n$headerTextColor:$primary !default; //header text colour\r\n$headerBorderColor:#fff !default; //header border color\r\n$headerSeperatorColor:$primary !default; //header bottom seperator color\r\n$headerMargin:4px !default; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: $primary !default;\r\n$sortArrowInactive: lighten($primary, 30%) !default;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#f3f3f3 !default; //table row background color\r\n$rowAltBackgroundColor:#fff !default; //table row background color\r\n$rowBorderColor:#fff !default; //table border color\r\n$rowTextColor:#333 !default; //table text color\r\n$rowHoverBackground:#bbb !default; //row background color on hover\r\n\r\n$rowSelectedBackground: #9ABCEA !default; //row background color when selected\r\n$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered\r\n\r\n$editBoxColor:#1D68CD !default; //border color for edit boxes\r\n$errorColor:#dd0000 !default; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#fff !default; //border to tabulator\r\n$footerTextColor:$primary !default; //footer text colour\r\n$footerBorderColor:#aaa !default; //footer border color\r\n$footerSeperatorColor:#999 !default; //footer bottom seperator color\r\n$footerActiveColor:$primary !default; //footer bottom active text color\r\n\r\n$handleWidth:10px !default; //width of the row handle\r\n$handleColor: $primary !default; //color for odd numbered rows\r\n$handleColorAlt: lighten($primary, 10%) !default; //color for even numbered rows\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\tborder: 1px solid $borderColor;\r\n\tbackground-color: $backgroundColor;\r\n\toverflow:hidden;\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:3px solid $headerSeperatorColor;\r\n\t\tmargin-bottom:4px;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\tpadding-left:$handleWidth;\r\n\r\n\t\tfont-size: 1.1em;\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:2px solid $headerBorderColor;\r\n\t\t\tbackground-color: $headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:4px;\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid $primary;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #fff;\r\n\r\n\t\t\t\t\t\tfont-size: 1em;\r\n\t\t\t\t\t\tcolor: $primary;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:9px;\r\n\t\t\t\t\tright:8px;\r\n\t\t\t\t\twidth: 0;\r\n\t\t\t\t\theight: 0;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:2px solid $headerSeperatorColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\t.tabulator-col:last-child{\r\n\t\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//placeholder element for sortable columns\r\n\t\t\t&.ui-sortable-helper{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tbackground-color: darken($headerBackgroundColor, 10%) !important;\r\n\t\t\t\tborder:1px solid $headerBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput{\r\n\t\t\t\t\t&::-ms-clear {\r\n\t\t\t\t\t width : 0;\r\n\t\t\t\t\t height: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-col-vertical{\r\n\t\t\t\t.tabulator-col-content{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\twriting-mode: vertical-rl;\r\n\t\t\t\t\t\ttext-orientation: mixed;\r\n\r\n\t\t\t\t\t\tdisplay:flex;\r\n\t\t\t\t\t\talign-items:center;\r\n\t\t\t\t\t\tjustify-content:center;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\ttransform: rotate(180deg);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-sortable{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\tpadding-top:20px;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\t\tpadding-bottom:20px;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\tright:calc(50% - 6px);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tpadding-left: $handleWidth;\r\n\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:400%;\r\n\r\n\t\t\tborder-top:2px solid $headerSeperatorColor !important;\r\n\r\n\t\t\tbackground:lighten($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tpadding-left: 0 !important;\r\n\r\n\t\t\t\tbackground:lighten($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-cell{\r\n\t\t\t\t\tbackground:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $headerBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen-rows-holder{\r\n\t\t\tmin-width:400%;\r\n\r\n\t\t\t&:empty{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t&[tabulator-render-mode=\"virtual\"]{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\ttop:0;\r\n\t\t\t\tleft:0;\r\n\t\t\t\theight:100%;\r\n\t\t\t}\r\n\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:$primary;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:darken($rowAltBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t\t&.tabulator-calcs-top{\r\n\t\t\t\t\t\tborder-bottom:2px solid $headerSeperatorColor;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-calcs-bottom{\r\n\t\t\t\t\t\tborder-top:2px solid $headerSeperatorColor;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tborder-top:1px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align:right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(100% + 20px);\r\n\t\t\tmargin:-5px -10px 5px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:lighten($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\tborder-top:3px solid $headerSeperatorColor !important;\r\n\t\t\tborder-bottom:2px solid $headerSeperatorColor !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-cell{\r\n\t\t\t\t\tbackground:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t\tborder-bottom:none !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tmargin:0 2px;\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\t\t\tpadding:2px 5px;\r\n\t\t\tbackground:rgba(255,255,255,.2);\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:$footerActiveColor;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tabulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//row element\r\n.tabulator-row{\r\n\tposition: relative;\r\n\tbox-sizing: border-box;\r\n\r\n\tbox-sizing: border-box;\r\n\tmin-height:$textSize + ($headerMargin * 2);\r\n\r\n\tbackground-color: $handleColor;\r\n\r\n\tpadding-left: $handleWidth !important;\r\n\r\n\tmargin-bottom: 2px;\r\n\r\n\t&:nth-child(even){\r\n\t\tbackground-color: $handleColorAlt;\r\n\r\n\t\t.tabulator-cell{\r\n\t\t\tbackground-color: $rowAltBackgroundColor;\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-selectable:hover{\r\n\t\tcursor: pointer;\r\n\r\n\t\t.tabulator-cell{\r\n\t\t\tbackground-color:$rowHoverBackground;\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-selected{\r\n\t\t.tabulator-cell{\r\n\t\t\tbackground-color:$rowSelectedBackground;\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-selected:hover{\r\n\t\t.tabulator-cell{\r\n\t\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\t\tcursor: pointer;\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-moving{\r\n\t\tposition: absolute;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpointer-events: none !important;\r\n\t\tz-index:15;\r\n\t}\r\n\r\n\t//row resize handles\r\n\t.tabulator-row-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\tbottom:0;\r\n\t\tleft:0;\r\n\t\theight:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\ttop:0;\r\n\t\t\tbottom:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ns-resize;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-frozen{\r\n\t\tdisplay: inline-block;\r\n\t\tposition: absolute;\r\n\r\n\t\tbackground-color: inherit;\r\n\r\n\t\tz-index: 10;\r\n\r\n\t\t&.tabulator-frozen-left{\r\n\t\t\tpadding-left: $handleWidth;\r\n\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-frozen-right{\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-responsive-collapse{\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t&:empty{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\ttable{\r\n\t\t\tfont-size:$textSize;\r\n\r\n\t\t\ttr{\r\n\t\t\t\ttd{\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t&:first-of-type{\r\n\t\t\t\t\t\tpadding-right:10px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//cell element\r\n\t.tabulator-cell{\r\n\t\tdisplay:inline-block;\r\n\t\tposition: relative;\r\n\t\tbox-sizing:border-box;\r\n\t\tpadding:6px 4px;\r\n\t\tborder-right:2px solid $rowBorderColor;\r\n\t\tvertical-align:middle;\r\n\t\twhite-space:nowrap;\r\n\t\toverflow:hidden;\r\n\t\ttext-overflow:ellipsis;\r\n\r\n\t\tbackground-color: $rowBackgroundColor;\r\n\r\n\t\t&.tabulator-editing{\r\n\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\tpadding: 0;\r\n\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-validation-fail{\r\n\t\t\tborder:1px solid $errorColor;\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\tcolor: $errorColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//hide left resize handle on first column\r\n\t\t&:first-child{\r\n\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//movable row handle\r\n\t\t&.tabulator-row-handle{\r\n\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\t//handle holder\r\n\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t//Hamburger element\r\n\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\twidth:100%;\r\n\t\t\t\t\theight:3px;\r\n\t\t\t\t\tmargin-top:2px;\r\n\t\t\t\t\tbackground:#666;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-branch{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:9px;\r\n\t\t\twidth:7px;\r\n\r\n\t\t\tmargin-top:-9px;\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control{\r\n\r\n\t\t\tdisplay:inline-flex;\r\n\t\t\tjustify-content:center;\r\n\t\t\talign-items:center;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:11px;\r\n\t\t\twidth:11px;\r\n\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder:1px solid $rowTextColor;\r\n\t\t\tborder-radius:2px;\r\n\t\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\t\toverflow:hidden;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: transparent;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-expand{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-responsive-collapse-toggle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\theight:15px;\r\n\t\t\twidth:15px;\r\n\r\n\t\t\tborder-radius:20px;\r\n\t\t\tbackground:#666;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:1.1em;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\topacity:.7;\r\n\t\t\t}\r\n\r\n\t\t\t&.open{\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\t\tdisplay:initial;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-open{\r\n\t\t\t\t\tdisplay:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\tdisplay:none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//row grouping element\r\n\t&.tabulator-group{\r\n\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-bottom:2px solid $primary;\r\n\t\tborder-top:2px solid $primary;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:lighten($primary, 20%);\r\n\t\tfont-weight:bold;\r\n\t\tcolor:fff;\r\n\t\tmargin-bottom: 2px;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t}\r\n\r\n\r\n\t\t&.tabulator-group-visible{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:40px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:60px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:80px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:100px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:$primary;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n.tabulator-edit-select-list{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tmax-height:200px;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-edit-select-list-item{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\r\n\t\t&.active{\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-group{\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpadding:4px;\r\n\t\tpadding-top:6px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\tfont-weight:bold;\r\n\t}\r\n}"]} \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_simple.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_simple.css deleted file mode 100644 index 51aca5bbca..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_simple.css +++ /dev/null @@ -1,766 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator { - position: relative; - background-color: #fff; - overflow: hidden; - font-size: 14px; - text-align: left; - -ms-transform: translatez(0); - transform: translatez(0); -} - -.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { - min-width: 100%; -} - -.tabulator.tabulator-block-select { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.tabulator .tabulator-header { - position: relative; - box-sizing: border-box; - width: 100%; - border-bottom: 1px solid #999; - background-color: #fff; - color: #555; - font-weight: bold; - white-space: nowrap; - overflow: hidden; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-header .tabulator-col { - display: inline-block; - position: relative; - box-sizing: border-box; - border-right: 1px solid #ddd; - background-color: #fff; - text-align: left; - vertical-align: bottom; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-moving { - position: absolute; - border: 1px solid #999; - background: #e6e6e6; - pointer-events: none; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content { - box-sizing: border-box; - position: relative; - padding: 4px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { - box-sizing: border-box; - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - vertical-align: bottom; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { - box-sizing: border-box; - width: 100%; - border: 1px solid #999; - padding: 1px; - background: #fff; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - display: inline-block; - position: absolute; - top: 9px; - right: 8px; - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { - position: relative; - display: -ms-flexbox; - display: flex; - border-top: 1px solid #ddd; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { - margin-right: -1px; -} - -.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { - position: absolute; - background-color: #e6e6e6 !important; - border: 1px solid #ddd; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { - position: relative; - box-sizing: border-box; - margin-top: 2px; - width: 100%; - text-align: center; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { - height: auto !important; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { - margin-top: 3px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { - width: 0; - height: 0; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { - padding-right: 25px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { - cursor: pointer; - background-color: #e6e6e6; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #666; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { - border-top: 6px solid #666; - border-bottom: none; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { - -webkit-writing-mode: vertical-rl; - -ms-writing-mode: tb-rl; - writing-mode: vertical-rl; - text-orientation: mixed; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { - padding-right: 0; - padding-top: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { - padding-right: 0; - padding-bottom: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow { - right: calc(50% - 6px); -} - -.tabulator .tabulator-header .tabulator-frozen { - display: inline-block; - position: absolute; - z-index: 10; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #ddd; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #ddd; -} - -.tabulator .tabulator-header .tabulator-calcs-holder { - box-sizing: border-box; - min-width: 400%; - background: #f2f2f2 !important; - border-top: 1px solid #ddd; - border-bottom: 1px solid #999; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { - background: #f2f2f2 !important; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder { - min-width: 400%; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { - display: none; -} - -.tabulator .tabulator-tableHolder { - position: relative; - width: 100%; - white-space: nowrap; - overflow: auto; - -webkit-overflow-scrolling: touch; -} - -.tabulator .tabulator-tableHolder:focus { - outline: none; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder { - box-sizing: border-box; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - width: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { - position: absolute; - top: 0; - left: 0; - height: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder span { - display: inline-block; - margin: 0 auto; - padding: 10px; - color: #000; - font-weight: bold; - font-size: 20px; -} - -.tabulator .tabulator-tableHolder .tabulator-table { - position: relative; - display: inline-block; - background-color: #fff; - white-space: nowrap; - overflow: visible; - color: #333; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { - font-weight: bold; - background: #f2f2f2 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { - border-bottom: 2px solid #ddd; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { - border-top: 2px solid #ddd; -} - -.tabulator .tabulator-col-resize-handle { - position: absolute; - right: 0; - top: 0; - bottom: 0; - width: 5px; -} - -.tabulator .tabulator-col-resize-handle.prev { - left: 0; - right: auto; -} - -.tabulator .tabulator-col-resize-handle:hover { - cursor: ew-resize; -} - -.tabulator .tabulator-footer { - padding: 5px 10px; - border-top: 1px solid #999; - background-color: #fff; - text-align: right; - color: #555; - font-weight: bold; - white-space: nowrap; - -ms-user-select: none; - user-select: none; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder { - box-sizing: border-box; - width: calc(100% + 20px); - margin: -5px -10px 5px -10px; - text-align: left; - background: #f2f2f2 !important; - border-bottom: 1px solid #fff; - border-top: 1px solid #ddd; - overflow: hidden; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { - background: #f2f2f2 !important; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { - margin-bottom: -5px; - border-bottom: none; -} - -.tabulator .tabulator-footer .tabulator-pages { - margin: 0 7px; -} - -.tabulator .tabulator-footer .tabulator-page { - display: inline-block; - margin: 0 2px; - border: 1px solid #aaa; - border-radius: 3px; - padding: 2px 5px; - background: rgba(255, 255, 255, 0.2); - color: #555; - font-family: inherit; - font-weight: inherit; - font-size: inherit; -} - -.tabulator .tabulator-footer .tabulator-page.active { - color: #d00; -} - -.tabulator .tabulator-footer .tabulator-page:disabled { - opacity: .5; -} - -.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); - color: #fff; -} - -.tabulator .tabulator-loader { - position: absolute; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - top: 0; - left: 0; - z-index: 100; - height: 100%; - width: 100%; - background: rgba(0, 0, 0, 0.4); - text-align: center; -} - -.tabulator .tabulator-loader .tabulator-loader-msg { - display: inline-block; - margin: 0 auto; - padding: 10px 20px; - border-radius: 10px; - background: #fff; - font-weight: bold; - font-size: 16px; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { - border: 4px solid #333; - color: #000; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { - border: 4px solid #D00; - color: #590000; -} - -.tabulator-row { - position: relative; - box-sizing: border-box; - min-height: 22px; - background-color: #fff; - border-bottom: 1px solid #ddd; -} - -.tabulator-row:nth-child(even) { - background-color: #fff; -} - -.tabulator-row.tabulator-selectable:hover { - background-color: #bbb; - cursor: pointer; -} - -.tabulator-row.tabulator-selected { - background-color: #9ABCEA; -} - -.tabulator-row.tabulator-selected:hover { - background-color: #769BCC; - cursor: pointer; -} - -.tabulator-row.tabulator-moving { - position: absolute; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - pointer-events: none !important; - z-index: 15; -} - -.tabulator-row .tabulator-row-resize-handle { - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 5px; -} - -.tabulator-row .tabulator-row-resize-handle.prev { - top: 0; - bottom: auto; -} - -.tabulator-row .tabulator-row-resize-handle:hover { - cursor: ns-resize; -} - -.tabulator-row .tabulator-frozen { - display: inline-block; - position: absolute; - background-color: inherit; - z-index: 10; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #ddd; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #ddd; -} - -.tabulator-row .tabulator-responsive-collapse { - box-sizing: border-box; - padding: 5px; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; -} - -.tabulator-row .tabulator-responsive-collapse:empty { - display: none; -} - -.tabulator-row .tabulator-responsive-collapse table { - font-size: 14px; -} - -.tabulator-row .tabulator-responsive-collapse table tr td { - position: relative; -} - -.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { - padding-right: 10px; -} - -.tabulator-row .tabulator-cell { - display: inline-block; - position: relative; - box-sizing: border-box; - padding: 4px; - border-right: 1px solid #ddd; - vertical-align: middle; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.tabulator-row .tabulator-cell:last-of-type { - border-right: none; -} - -.tabulator-row .tabulator-cell.tabulator-editing { - border: 1px solid #1D68CD; - padding: 0; -} - -.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { - border: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail { - border: 1px solid #dd0000; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { - border: 1px; - background: transparent; - color: #dd0000; -} - -.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { - width: 80%; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { - width: 100%; - height: 3px; - margin-top: 2px; - background: #666; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-branch { - display: inline-block; - vertical-align: middle; - height: 9px; - width: 7px; - margin-top: -9px; - margin-right: 5px; - border-bottom-left-radius: 1px; - border-left: 2px solid #ddd; - border-bottom: 2px solid #ddd; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-pack: center; - justify-content: center; - -ms-flex-align: center; - align-items: center; - vertical-align: middle; - height: 11px; - width: 11px; - margin-right: 5px; - border: 1px solid #333; - border-radius: 2px; - background: rgba(0, 0, 0, 0.1); - overflow: hidden; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - height: 15px; - width: 15px; - border-radius: 20px; - background: #666; - color: #fff; - font-weight: bold; - font-size: 1.1em; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { - opacity: .7; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { - display: initial; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { - display: none; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { - display: none; -} - -.tabulator-row.tabulator-group { - box-sizing: border-box; - border-bottom: 1px solid #999; - border-right: 1px solid #ddd; - border-top: 1px solid #999; - padding: 5px; - padding-left: 10px; - background: #fafafa; - font-weight: bold; - min-width: 100%; -} - -.tabulator-row.tabulator-group:hover { - cursor: pointer; - background-color: rgba(0, 0, 0, 0.1); -} - -.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { - margin-right: 10px; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-top: 6px solid #666; - border-bottom: 0; -} - -.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { - margin-left: 20px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { - margin-left: 40px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { - margin-left: 60px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { - margin-left: 80px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { - margin-left: 100px; -} - -.tabulator-row.tabulator-group .tabulator-arrow { - display: inline-block; - width: 0; - height: 0; - margin-right: 16px; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-right: 0; - border-left: 6px solid #666; - vertical-align: middle; -} - -.tabulator-row.tabulator-group span { - margin-left: 10px; - color: #666; -} - -.tabulator-edit-select-list { - position: absolute; - display: inline-block; - box-sizing: border-box; - max-height: 200px; - background: #fff; - border: 1px solid #ddd; - font-size: 14px; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - z-index: 10000; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item { - padding: 4px; - color: #333; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item.active { - color: #fff; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { - cursor: pointer; - color: #fff; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-group { - border-bottom: 1px solid #ddd; - padding: 4px; - padding-top: 6px; - color: #333; - font-weight: bold; -} diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_simple.min.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_simple.min.css deleted file mode 100644 index 13b1828bba..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_simple.min.css +++ /dev/null @@ -1,3 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator{position:relative;background-color:#fff;overflow:hidden;font-size:14px;text-align:left;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{width:100%;border-bottom:1px solid #999;color:#555;font-weight:700;white-space:nowrap;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header,.tabulator .tabulator-header .tabulator-col{position:relative;box-sizing:border-box;background-color:#fff;overflow:hidden}.tabulator .tabulator-header .tabulator-col{display:inline-block;border-right:1px solid #ddd;text-align:left;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #999;background:#e6e6e6;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:9px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #ddd;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#e6e6e6!important;border:1px solid #ddd}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#e6e6e6}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow{right:calc(50% - 6px)}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:400%;background:#f2f2f2!important;border-top:1px solid #ddd;border-bottom:1px solid #999;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#f2f2f2!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:400%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{position:absolute;top:0;left:0;height:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#000;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#f2f2f2!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #ddd}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #ddd}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:5px 10px;border-top:1px solid #999;background-color:#fff;text-align:right;color:#555;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px;text-align:left;background:#f2f2f2!important;border-bottom:1px solid #fff;border-top:1px solid #ddd;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#f2f2f2!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;border:1px solid #aaa;border-radius:3px;padding:2px 5px;background:hsla(0,0%,100%,.2);color:#555;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#d00}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator-row{position:relative;box-sizing:border-box;min-height:22px;border-bottom:1px solid #ddd}.tabulator-row,.tabulator-row:nth-child(2n){background-color:#fff}.tabulator-row.tabulator-selectable:hover{background-color:#bbb;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #ddd;border-bottom:1px solid #ddd;pointer-events:none!important;z-index:2}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:4px;border-right:1px solid #ddd;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #ddd;border-bottom:2px solid #ddd}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #ddd;border-top:1px solid #999;padding:5px;padding-left:10px;background:#fafafa;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:100px}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#666}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #ddd;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:4}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#333}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #ddd;padding:4px;padding-top:6px;color:#333;font-weight:700} -/*# sourceMappingURL=tabulator_simple.min.css.map */ diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_simple.min.css.map b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_simple.min.css.map deleted file mode 100644 index 193e31c7ad..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_simple.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["tabulator_simple.scss"],"names":[],"mappings":"AA0CA,WACC,kBAAkB,AAClB,sBAxCqB,AAyCrB,gBAAe,AACf,eAxCa,AAyCb,gBAAgB,AAMhB,uBAAwB,CAkexB,AA7eD,iFAgBI,cAAc,CACd,AAjBJ,kCAsBE,yBAAiB,AAAjB,sBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AAvBF,6BA8BE,WAAU,AAEV,6BA9DwB,AAgExB,WAlEmB,AAmEnB,gBAAgB,AAEhB,mBAAmB,AAGnB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAgPpB,AA3RF,yEA2BE,kBAAiB,AACjB,sBAAsB,AAKtB,sBAlEyB,AAuEzB,eAAe,CAtCjB,AA6OG,4CA9LA,qBAAoB,AAGpB,4BAjFoB,AAmFpB,gBAAe,AACf,qBAAsB,CAwLtB,AA7OH,6DAyDI,kBAAkB,AAClB,sBAxFsB,AAyFtB,mBAA8C,AAC9C,mBAAoB,CACpB,AA7DJ,mEAiEI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CAsCX,AAzGJ,wFAuEK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAarB,AA1FL,gHAiFM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,eAAgB,CAChB,AAzFN,oFA8FK,qBAAqB,AACrB,kBAAkB,AAClB,QAAO,AACP,UAAS,AACT,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BA/HmB,CAgInB,AAvGL,0FAgHK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BAlJkB,AAmJlB,eAAgB,CAKhB,AAzHL,oHAuHM,iBAAiB,CACjB,AAxHN,0FAgIK,YAAa,CACb,AAjIL,+DAsII,kBAAkB,AAClB,mCAA+D,AAC/D,qBAvKmB,CAwKnB,AAzIJ,qEA6II,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAiBlB,AAlKJ,8EAqJK,qBAAsB,CACtB,AAtJL,yEAyJK,cAAe,CACf,AA1JL,sFA8JO,QAAS,AACT,QAAS,CACV,AAhKN,oFAwKK,kBAAkB,CAClB,AAzKL,qEA4KK,eAAc,AACd,wBAAoD,CACpD,AA9KL,uHAmLM,gBAAgB,AAChB,4BA7MkB,CA8MlB,AArLN,sHA0LM,gBAAgB,AAChB,4BArNgB,CAsNhB,AA5LN,uHAiMM,0BA3NgB,AA4NhB,kBAAmB,CACnB,AAnMN,+GA0MM,iCAAyB,AAAzB,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AAhNN,oHAqNM,wBAAyB,CACzB,AAtNN,2GA2NM,gBAAe,AACf,gBAAgB,CAChB,AA7NN,uIAiOO,gBAAe,AACf,mBAAmB,CACnB,AAnOP,uGAwOM,qBAAqB,CACrB,AAzON,+CAgPG,qBAAqB,AACrB,kBAAkB,AAIlB,SAAW,CASX,AA9PH,qEAwPI,2BA5QgB,CA6QhB,AAzPJ,sEA4PI,0BAhRgB,CAiRhB,AA7PJ,qDAiQG,sBAAqB,AACrB,eAAc,AAEd,6BAAwD,AAUxD,0BAlSiB,AAmSjB,6BA7SuB,AA+SvB,eAAgB,CAChB,AAlRH,oEAuQI,4BAAwD,CAKxD,AA5QJ,iGA0QK,YAAa,CACb,AA3QL,2DAqRG,cAAc,CAKd,AA1RH,iEAwRI,YAAa,CACb,AAzRJ,kCAiSE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CA0DjC,AA/VF,wCAwSG,YAAa,CACb,AAzSH,yDA6SG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AASlB,UAAU,CAYV,AApUH,wFAkTI,kBAAkB,AAClB,MAAK,AACL,OAAM,AACN,WAAW,CACX,AAtTJ,8DA2TI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,WAAU,AACV,gBAAiB,AACjB,cAAe,CACf,AAnUJ,mDAwUG,kBAAiB,AACjB,qBAAoB,AACpB,sBAhWqB,AAiWrB,mBAAmB,AACnB,iBAAgB,AAChB,UAhWe,CAiXf,AA9VH,kFAiVK,gBAAiB,AACjB,4BAAwD,CASxD,AA3VL,sGAqVM,4BAzWc,CA0Wd,AAtVN,yGAyVM,yBA7Wc,CA8Wd,AA1VN,wCAmWE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AAjXF,6CA0WG,OAAM,AACN,UAAU,CACV,AA5WH,8CA+WG,gBAAgB,CAChB,AAhXH,6BAsXE,iBAAgB,AAChB,0BA5XwB,AA6XxB,sBAhYyB,AAiYzB,iBAAgB,AAChB,WAjYmB,AAkYnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAgEpB,AAlcF,qDAqYG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAAwD,AAUxD,6BA7ZwB,AA8ZxB,0BA1aiB,AA4ajB,eAAgB,CAMhB,AA9ZH,oEA8YI,4BAAwD,CAKxD,AAnZJ,iGAiZK,YAAa,CACb,AAlZL,gEA2ZI,mBAAkB,AAClB,kBAAkB,CAClB,AA7ZJ,8CAkaG,YAAY,CACZ,AAnaH,6CAuaG,qBAAoB,AACpB,aAAY,AACZ,sBA/aoB,AAgbpB,kBAAiB,AACjB,gBAAe,AACf,8BAA+B,AAC/B,WApbkB,AAqblB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CAiBjB,AAjcH,oDAmbI,UAvbmB,CAwbnB,AApbJ,sDAubI,UAAU,CACV,AAxbJ,kEA4bK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AA/bL,6BAscE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,UAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AA5eF,mDAqdG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AA3eH,qEAkeI,sBAAqB,AACrB,UAAU,CACV,AApeJ,mEAweI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAClB,sBAAsB,AAEtB,gBAA0C,AAE1C,4BA1gBmB,CAo3BnB,AAhXD,4CAKC,qBA3gBuB,CAghBtB,AAVF,0CAaE,sBA/gBsB,AAghBtB,cAAe,CACf,AAfF,kCAkBE,wBAlhB6B,CAmhB7B,AAnBF,wCAsBE,yBArhBkC,AAshBlC,cAAe,CACf,AAxBF,gCA2BE,kBAAkB,AAElB,0BAjiBkB,AAkiBlB,6BAliBkB,AAoiBlB,8BAA+B,AAC/B,SAAU,CACV,AAlCF,4CAsCE,kBAAiB,AACjB,QAAO,AACP,SAAQ,AACR,OAAM,AACN,UAAU,CAUV,AApDF,iDA6CG,MAAK,AACL,WAAW,CACX,AA/CH,kDAkDG,gBAAgB,CAChB,AAnDH,iCAuDE,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,SAAW,CASX,AArEF,uDA+DG,2BAnkBiB,CAokBjB,AAhEH,wDAmEG,0BAvkBiB,CAwkBjB,AApEH,8CAwEE,sBAAqB,AAErB,YAAW,AAEX,0BAhlBkB,AAilBlB,4BAjlBkB,CAomBlB,AAhGF,oDAgFG,YAAY,CACZ,AAjFH,oDAoFG,cAxmBW,CAmnBX,AA/FH,0DAwFK,iBAAkB,CAKlB,AA7FL,wEA2FM,kBAAkB,CAClB,AA5FN,+BAoGE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BA5mBkB,AA6mBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CAqLtB,AAjSF,4CA+GG,iBAAkB,CAClB,AAhHH,iDAmHG,yBA/mBkB,AAgnBlB,SAAU,CAMV,AA1HH,+GAuHI,WAAU,AACV,sBAAsB,CACtB,AAzHJ,yDA6HG,qBAxnBgB,CA+nBhB,AApIH,+HA+HI,WAAU,AACV,uBAAsB,AAEtB,UA7nBe,CA8nBf,AAnIJ,6EAyII,YAAa,CACb,AA1IJ,oDAgJG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAElB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AApKH,8EA0JI,SAAS,CAST,AAnKJ,wGA8JK,WAAU,AACV,WAAU,AACV,eAAc,AACd,eAAe,CACf,AAlKL,2DAuKG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BAtrBiB,AAurBjB,4BAvrBiB,CAwrBjB,AApLH,4DAwLG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBArsBe,AAssBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AAzPH,kEAyMI,eAAc,AACd,yBAA4B,CAC5B,AA3MJ,kGA8MI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAjOJ,wGAuNK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAluBa,CAmuBb,AAhOL,gGAoOI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eA7uBc,CA0vBd,AAvPJ,sGA6OK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAxvBa,CAyvBb,AAtPL,qEA4PG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,YAAW,AACX,WAAU,AAEV,mBAAkB,AAClB,gBAAe,AAEf,WAjxBqB,AAkxBrB,gBAAgB,AAChB,eAAe,CAmBf,AAhSH,2EAgRI,UAAU,CACV,AAjRJ,sHAqRK,eAAe,CACf,AAtRL,sOA8RI,YAAY,CACZ,AA/RJ,+BAsSE,sBAAqB,AACrB,6BAA4B,AAC5B,4BA5yBkB,AA6yBlB,0BAAyB,AACzB,YAAW,AACX,kBAAiB,AACjB,mBAAkB,AAClB,gBAAgB,AAEhB,cAAe,CAgEf,AA/WF,qCAkTG,eAAc,AACd,+BAA+B,CAC/B,AApTH,wEAwTI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,0BAr0BkB,AAs0BlB,eAAgB,CAChB,AA7TJ,wEAkUI,gBAAgB,CAChB,AAnUJ,wEAwUI,gBAAgB,CAChB,AAzUJ,wEA8UI,gBAAgB,CAChB,AA/UJ,wEAoVI,gBAAgB,CAChB,AArVJ,wEA0VI,iBAAiB,CACjB,AA3VJ,gDAgWG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,2BAj3BmB,AAk3BnB,qBAAqB,CACrB,AAzWH,oCA4WG,iBAAgB,AAChB,UAAU,CACV,AAIH,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,gBA/3BuB,AAg4BvB,sBA93BmB,AAg4BnB,eAh5Ba,AAk5Bb,gBAAe,AACf,iCAAiC,AAEjC,SAAc,CA6Bd,AA5CD,6DAkBE,YAAW,AAEX,UAz4BgB,CAs5BhB,AAjCF,oEAuBG,WA/4BqB,AAg5BrB,kBAt4BkB,CAu4BlB,AAzBH,mEA4BG,eAAc,AAEd,WAt5BqB,AAu5BrB,kBA74BkB,CA84BlB,AAhCH,8DAoCE,6BA15BkB,AA45BlB,YAAW,AACX,gBAAe,AAEf,WA95BgB,AA+5BhB,eAAgB,CAChB","file":"tabulator_simple.min.css","sourcesContent":["/* Tabulator v4.1.2 (c) Oliver Folkerd */\n\n\r\n//Main Theme Variables\r\n$backgroundColor: #fff !default; //background color of tabulator\r\n$borderColor:#999 !default; //border to tabulator\r\n$textSize:14px !default; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#fff !default; //border to tabulator\r\n$headerTextColor:#555 !default; //header text colour\r\n$headerBorderColor:#ddd !default; //header border color\r\n$headerSeperatorColor:#999 !default; //header bottom seperator color\r\n$headerMargin:4px !default; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: #666 !default;\r\n$sortArrowInactive: #bbb !default;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#fff !default; //table row background color\r\n$rowAltBackgroundColor:#fff !default; //table row background color\r\n$rowBorderColor:#ddd !default; //table border color\r\n$rowTextColor:#333 !default; //table text color\r\n$rowHoverBackground:#bbb !default; //row background color on hover\r\n\r\n$rowSelectedBackground: #9ABCEA !default; //row background color when selected\r\n$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered\r\n\r\n\r\n$editBoxColor:#1D68CD !default; //border color for edit boxes\r\n$errorColor:#dd0000 !default; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#fff !default; //border to tabulator\r\n$footerTextColor:#555 !default; //footer text colour\r\n$footerBorderColor:#aaa !default; //footer border color\r\n$footerSeperatorColor:#999 !default; //footer bottom seperator color\r\n$footerActiveColor:#d00 !default; //footer bottom active text color\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\tbackground-color: $backgroundColor;\r\n\toverflow:hidden;\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:1px solid $headerSeperatorColor;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:1px solid $headerBorderColor;\r\n\t\t\tbackground-color: $headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:4px;\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid #999;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #fff;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:9px;\r\n\t\t\t\t\tright:8px;\r\n\t\t\t\t\twidth: 0;\r\n\t\t\t\t\theight: 0;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:1px solid $headerBorderColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\t.tabulator-col:last-child{\r\n\t\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//placeholder element for sortable columns\r\n\t\t\t&.ui-sortable-helper{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%) !important;\r\n\t\t\t\tborder:1px solid $headerBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput{\r\n\t\t\t\t\t&::-ms-clear {\r\n\t\t\t\t\t width : 0;\r\n\t\t\t\t\t height: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-col-vertical{\r\n\t\t\t\t.tabulator-col-content{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\twriting-mode: vertical-rl;\r\n\t\t\t\t\t\ttext-orientation: mixed;\r\n\r\n\t\t\t\t\t\tdisplay:flex;\r\n\t\t\t\t\t\talign-items:center;\r\n\t\t\t\t\t\tjustify-content:center;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\ttransform: rotate(180deg);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-sortable{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\tpadding-top:20px;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\t\tpadding-bottom:20px;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\tright:calc(50% - 6px);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:400%;\r\n\r\n\t\t\tbackground:darken($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $headerSeperatorColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen-rows-holder{\r\n\t\t\tmin-width:400%;\r\n\r\n\t\t\t&:empty{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t&[tabulator-render-mode=\"virtual\"]{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\ttop:0;\r\n\t\t\t\tleft:0;\r\n\t\t\t\theight:100%;\r\n\t\t\t}\r\n\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:#000;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:darken($rowAltBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t\t&.tabulator-calcs-top{\r\n\t\t\t\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-calcs-bottom{\r\n\t\t\t\t\t\tborder-top:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tborder-top:1px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align:right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(100% + 20px);\r\n\t\t\tmargin:-5px -10px 5px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:darken($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:darken($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-bottom:1px solid $footerBackgroundColor;\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tmargin:0 2px;\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\t\t\tpadding:2px 5px;\r\n\t\t\tbackground:rgba(255,255,255,.2);\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:$footerActiveColor;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tabulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//row element\r\n.tabulator-row{\r\n\tposition: relative;\r\n\tbox-sizing: border-box;\r\n\r\n\tmin-height:$textSize + ($headerMargin * 2);\r\n\tbackground-color: $rowBackgroundColor;\r\n\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t&:nth-child(even){\r\n\t\tbackground-color: $rowAltBackgroundColor;\r\n\t}\r\n\r\n\t&.tabulator-selectable:hover{\r\n\t\tbackground-color:$rowHoverBackground;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-selected{\r\n\t\tbackground-color:$rowSelectedBackground;\r\n\t}\r\n\r\n\t&.tabulator-selected:hover{\r\n\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-moving{\r\n\t\tposition: absolute;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpointer-events: none !important;\r\n\t\tz-index:15;\r\n\t}\r\n\r\n\t//row resize handles\r\n\t.tabulator-row-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\tbottom:0;\r\n\t\tleft:0;\r\n\t\theight:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\ttop:0;\r\n\t\t\tbottom:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ns-resize;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-frozen{\r\n\t\tdisplay: inline-block;\r\n\t\tposition: absolute;\r\n\r\n\t\tbackground-color: inherit;\r\n\r\n\t\tz-index: 10;\r\n\r\n\t\t&.tabulator-frozen-left{\r\n\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-frozen-right{\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-responsive-collapse{\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t&:empty{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\ttable{\r\n\t\t\tfont-size:$textSize;\r\n\r\n\t\t\ttr{\r\n\t\t\t\ttd{\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t&:first-of-type{\r\n\t\t\t\t\t\tpadding-right:10px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//cell element\r\n\t.tabulator-cell{\r\n\t\tdisplay:inline-block;\r\n\t\tposition: relative;\r\n\t\tbox-sizing:border-box;\r\n\t\tpadding:4px;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tvertical-align:middle;\r\n\t\twhite-space:nowrap;\r\n\t\toverflow:hidden;\r\n\t\ttext-overflow:ellipsis;\r\n\r\n\t\t&:last-of-type{\r\n\t\t\tborder-right: none;\r\n\t\t}\r\n\r\n\t\t&.tabulator-editing{\r\n\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\tpadding: 0;\r\n\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-validation-fail{\r\n\t\t\tborder:1px solid $errorColor;\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\tcolor: $errorColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//hide left resize handle on first column\r\n\t\t&:first-child{\r\n\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//movable row handle\r\n\t\t&.tabulator-row-handle{\r\n\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\t//handle holder\r\n\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t//Hamburger element\r\n\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\twidth:100%;\r\n\t\t\t\t\theight:3px;\r\n\t\t\t\t\tmargin-top:2px;\r\n\t\t\t\t\tbackground:#666;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-branch{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:9px;\r\n\t\t\twidth:7px;\r\n\r\n\t\t\tmargin-top:-9px;\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control{\r\n\r\n\t\t\tdisplay:inline-flex;\r\n\t\t\tjustify-content:center;\r\n\t\t\talign-items:center;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:11px;\r\n\t\t\twidth:11px;\r\n\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder:1px solid $rowTextColor;\r\n\t\t\tborder-radius:2px;\r\n\t\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\t\toverflow:hidden;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: transparent;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-expand{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-responsive-collapse-toggle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\theight:15px;\r\n\t\t\twidth:15px;\r\n\r\n\t\t\tborder-radius:20px;\r\n\t\t\tbackground:#666;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:1.1em;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\topacity:.7;\r\n\t\t\t}\r\n\r\n\t\t\t&.open{\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\t\tdisplay:initial;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-open{\r\n\t\t\t\t\tdisplay:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\tdisplay:none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//row grouping element\r\n\t&.tabulator-group{\r\n\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-bottom:1px solid #999;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #999;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:#fafafa;\r\n\t\tfont-weight:bold;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:40px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:60px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:80px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:100px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:#666;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n.tabulator-edit-select-list{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tmax-height:200px;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-edit-select-list-item{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\r\n\t\t&.active{\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-group{\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpadding:4px;\r\n\t\tpadding-top:6px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\tfont-weight:bold;\r\n\t}\r\n}"]} \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_site.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_site.css deleted file mode 100644 index 0b3137a32b..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_site.css +++ /dev/null @@ -1,765 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator { - position: relative; - border-bottom: 5px solid #222; - background-color: #fff; - font-size: 14px; - text-align: left; - overflow: hidden; - -ms-transform: translatez(0); - transform: translatez(0); -} - -.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { - min-width: 100%; -} - -.tabulator[tabulator-layout="fitColumns"] .tabulator-row .tabulator-cell:last-of-type { - border-right: none; -} - -.tabulator.tabulator-block-select { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.tabulator .tabulator-header { - position: relative; - box-sizing: border-box; - width: 100%; - border-bottom: 3px solid #3FB449; - background-color: #222; - color: #fff; - font-weight: bold; - white-space: nowrap; - overflow: hidden; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-header .tabulator-col { - display: inline-block; - position: relative; - box-sizing: border-box; - border-right: 1px solid #aaa; - background-color: #222; - text-align: left; - vertical-align: bottom; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-moving { - position: absolute; - border: 1px solid #3FB449; - background: #090909; - pointer-events: none; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content { - box-sizing: border-box; - position: relative; - padding: 8px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { - box-sizing: border-box; - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - vertical-align: bottom; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { - box-sizing: border-box; - width: 100%; - border: 1px solid #999; - padding: 1px; - background: #fff; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - display: inline-block; - position: absolute; - top: 14px; - right: 8px; - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { - position: relative; - display: -ms-flexbox; - display: flex; - border-top: 1px solid #aaa; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { - margin-right: -1px; -} - -.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { - position: absolute; - background-color: #222 !important; - border: 1px solid #aaa; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { - position: relative; - box-sizing: border-box; - margin-top: 2px; - width: 100%; - text-align: center; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { - height: auto !important; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { - margin-top: 3px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { - width: 0; - height: 0; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { - padding-right: 25px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { - cursor: pointer; - background-color: #090909; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #3FB449; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { - border-top: 6px solid #3FB449; - border-bottom: none; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { - -webkit-writing-mode: vertical-rl; - -ms-writing-mode: tb-rl; - writing-mode: vertical-rl; - text-orientation: mixed; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { - padding-right: 0; - padding-top: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { - padding-right: 0; - padding-bottom: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow { - right: calc(50% - 6px); -} - -.tabulator .tabulator-header .tabulator-frozen { - display: inline-block; - position: absolute; - z-index: 10; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #aaa; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #aaa; -} - -.tabulator .tabulator-header .tabulator-calcs-holder { - box-sizing: border-box; - min-width: 400%; - background: #3c3c3c !important; - border-top: 1px solid #aaa; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { - background: #3c3c3c !important; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder { - min-width: 400%; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { - display: none; -} - -.tabulator .tabulator-tableHolder { - position: relative; - width: 100%; - white-space: nowrap; - overflow: auto; - -webkit-overflow-scrolling: touch; -} - -.tabulator .tabulator-tableHolder:focus { - outline: none; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder { - box-sizing: border-box; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - width: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { - position: absolute; - top: 0; - left: 0; - height: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder span { - display: inline-block; - margin: 0 auto; - padding: 10px; - color: #3FB449; - font-weight: bold; - font-size: 20px; -} - -.tabulator .tabulator-tableHolder .tabulator-table { - position: relative; - display: inline-block; - background-color: #fff; - white-space: nowrap; - overflow: visible; - color: #333; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { - font-weight: bold; - background: #484848 !important; - color: #fff; -} - -.tabulator .tabulator-footer { - padding: 5px 10px; - padding-top: 8px; - border-top: 3px solid #3FB449; - background-color: #222; - text-align: right; - color: #222; - font-weight: bold; - white-space: nowrap; - -ms-user-select: none; - user-select: none; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder { - box-sizing: border-box; - width: calc(100% + 20px); - margin: -8px -10px 8px -10px; - text-align: left; - background: #3c3c3c !important; - border-bottom: 1px solid #aaa; - overflow: hidden; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { - background: #3c3c3c !important; - color: #fff !important; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { - margin-bottom: -5px; - border-bottom: none; -} - -.tabulator .tabulator-footer .tabulator-pages { - margin: 0 7px; -} - -.tabulator .tabulator-footer .tabulator-page { - display: inline-block; - margin: 0 2px; - padding: 2px 5px; - border: 1px solid #aaa; - border-radius: 3px; - background: #fff; - color: #222; - font-family: inherit; - font-weight: inherit; - font-size: inherit; -} - -.tabulator .tabulator-footer .tabulator-page.active { - color: #3FB449; -} - -.tabulator .tabulator-footer .tabulator-page:disabled { - opacity: .5; -} - -.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); - color: #fff; -} - -.tabulator .tabulator-col-resize-handle { - position: absolute; - right: 0; - top: 0; - bottom: 0; - width: 5px; -} - -.tabulator .tabulator-col-resize-handle.prev { - left: 0; - right: auto; -} - -.tabulator .tabulator-col-resize-handle:hover { - cursor: ew-resize; -} - -.tabulator .tabulator-loader { - position: absolute; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - top: 0; - left: 0; - z-index: 100; - height: 100%; - width: 100%; - background: rgba(0, 0, 0, 0.4); - text-align: center; -} - -.tabulator .tabulator-loader .tabulator-loader-msg { - display: inline-block; - margin: 0 auto; - padding: 10px 20px; - border-radius: 10px; - background: #fff; - font-weight: bold; - font-size: 16px; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { - border: 4px solid #333; - color: #000; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { - border: 4px solid #D00; - color: #590000; -} - -.tabulator-row { - position: relative; - box-sizing: border-box; - min-height: 22px; - background-color: #fff; -} - -.tabulator-row.tabulator-row-even { - background-color: #EFEFEF; -} - -.tabulator-row.tabulator-selectable:hover { - background-color: #bbb; - cursor: pointer; -} - -.tabulator-row.tabulator-selected { - background-color: #9ABCEA; -} - -.tabulator-row.tabulator-selected:hover { - background-color: #769BCC; - cursor: pointer; -} - -.tabulator-row.tabulator-row-moving { - border: 1px solid #000; - background: #fff; -} - -.tabulator-row.tabulator-moving { - position: absolute; - border-top: 1px solid #aaa; - border-bottom: 1px solid #aaa; - pointer-events: none !important; - z-index: 15; -} - -.tabulator-row .tabulator-row-resize-handle { - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 5px; -} - -.tabulator-row .tabulator-row-resize-handle.prev { - top: 0; - bottom: auto; -} - -.tabulator-row .tabulator-row-resize-handle:hover { - cursor: ns-resize; -} - -.tabulator-row .tabulator-frozen { - display: inline-block; - position: absolute; - background-color: inherit; - z-index: 10; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #aaa; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #aaa; -} - -.tabulator-row .tabulator-responsive-collapse { - box-sizing: border-box; - padding: 5px; - border-top: 1px solid #aaa; - border-bottom: 1px solid #aaa; -} - -.tabulator-row .tabulator-responsive-collapse:empty { - display: none; -} - -.tabulator-row .tabulator-responsive-collapse table { - font-size: 14px; -} - -.tabulator-row .tabulator-responsive-collapse table tr td { - position: relative; -} - -.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { - padding-right: 10px; -} - -.tabulator-row .tabulator-cell { - display: inline-block; - position: relative; - box-sizing: border-box; - padding: 6px; - border-right: 1px solid #aaa; - vertical-align: middle; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.tabulator-row .tabulator-cell.tabulator-editing { - border: 1px solid #1D68CD; - padding: 0; -} - -.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { - border: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail { - border: 1px solid #dd0000; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { - border: 1px; - background: transparent; - color: #dd0000; -} - -.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { - width: 80%; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { - width: 100%; - height: 3px; - margin-top: 2px; - background: #3FB449; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-branch { - display: inline-block; - vertical-align: middle; - height: 9px; - width: 7px; - margin-top: -9px; - margin-right: 5px; - border-bottom-left-radius: 1px; - border-left: 2px solid #aaa; - border-bottom: 2px solid #aaa; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-pack: center; - justify-content: center; - -ms-flex-align: center; - align-items: center; - vertical-align: middle; - height: 11px; - width: 11px; - margin-right: 5px; - border: 1px solid #333; - border-radius: 2px; - background: rgba(0, 0, 0, 0.1); - overflow: hidden; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - height: 15px; - width: 15px; - border-radius: 20px; - background: #666; - color: #fff; - font-weight: bold; - font-size: 1.1em; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { - opacity: .7; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { - display: initial; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { - display: none; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { - display: none; -} - -.tabulator-row.tabulator-group { - box-sizing: border-box; - border-right: 1px solid #aaa; - border-top: 1px solid #000; - border-bottom: 2px solid #3FB449; - padding: 5px; - padding-left: 10px; - background: #222; - color: #fff; - font-weight: bold; - min-width: 100%; -} - -.tabulator-row.tabulator-group:hover { - cursor: pointer; - background-color: #090909; -} - -.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { - margin-right: 10px; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-top: 6px solid #3FB449; - border-bottom: 0; -} - -.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { - margin-left: 20px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { - margin-left: 40px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { - margin-left: 60px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { - margin-left: 80px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { - margin-left: 100px; -} - -.tabulator-row.tabulator-group .tabulator-arrow { - display: inline-block; - width: 0; - height: 0; - margin-right: 16px; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-right: 0; - border-left: 6px solid #3FB449; - vertical-align: middle; -} - -.tabulator-row.tabulator-group span { - margin-left: 10px; - color: #3FB449; -} - -.tabulator-edit-select-list { - position: absolute; - display: inline-block; - box-sizing: border-box; - max-height: 200px; - background: #fff; - border: 1px solid #aaa; - font-size: 14px; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - z-index: 10000; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item { - padding: 4px; - color: #333; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item.active { - color: #fff; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { - cursor: pointer; - color: #fff; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-group { - border-bottom: 1px solid #aaa; - padding: 4px; - padding-top: 6px; - color: #333; - font-weight: bold; -} diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_site.min.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_site.min.css deleted file mode 100644 index c2a598371e..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_site.min.css +++ /dev/null @@ -1,3 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator{position:relative;border-bottom:5px solid #222;background-color:#fff;font-size:14px;text-align:left;overflow:hidden;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator[tabulator-layout=fitColumns] .tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{width:100%;border-bottom:3px solid #3fb449;color:#fff;font-weight:700;white-space:nowrap;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header,.tabulator .tabulator-header .tabulator-col{position:relative;box-sizing:border-box;background-color:#222;overflow:hidden}.tabulator .tabulator-header .tabulator-col{display:inline-block;border-right:1px solid #aaa;text-align:left;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #3fb449;background:#090909;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:14px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#222!important;border:1px solid #aaa}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#090909}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #3fb449}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #3fb449;border-bottom:none}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow{right:calc(50% - 6px)}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:400%;background:#3c3c3c!important;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#3c3c3c!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:400%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{position:absolute;top:0;left:0;height:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#3fb449;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#484848!important;color:#fff}.tabulator .tabulator-footer{padding:5px 10px;padding-top:8px;border-top:3px solid #3fb449;background-color:#222;text-align:right;color:#222;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-8px -10px 8px;text-align:left;background:#3c3c3c!important;border-bottom:1px solid #aaa;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#3c3c3c!important;color:#fff!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;padding:2px 5px;border:1px solid #aaa;border-radius:3px;background:#fff;color:#222;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#3fb449}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator-row{position:relative;box-sizing:border-box;min-height:22px;background-color:#fff}.tabulator-row.tabulator-row-even{background-color:#efefef}.tabulator-row.tabulator-selectable:hover{background-color:#bbb;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-row-moving{border:1px solid #000;background:#fff}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #aaa;border-bottom:1px solid #aaa;pointer-events:none!important;z-index:2}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #aaa;border-bottom:1px solid #aaa}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:6px;border-right:1px solid #aaa;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#3fb449}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row.tabulator-group{box-sizing:border-box;border-right:1px solid #aaa;border-top:1px solid #000;border-bottom:2px solid #3fb449;padding:5px;padding-left:10px;background:#222;color:#fff;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:#090909}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #3fb449;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:100px}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #3fb449;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#3fb449}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #aaa;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:4}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#333}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #aaa;padding:4px;padding-top:6px;color:#333;font-weight:700} -/*# sourceMappingURL=tabulator_site.min.css.map */ diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_site.min.css.map b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_site.min.css.map deleted file mode 100644 index 39e4544875..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_site.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["tabulator_site.scss"],"names":[],"mappings":"AAyCA,WACC,kBAAkB,AAElB,6BAvCgB,AAyChB,sBA1CqB,AA4CrB,eA1Ca,AA2Cb,gBAAgB,AAChB,gBAAe,AAMf,uBAAwB,CAwexB,AAvfD,iFAoBI,cAAc,CACd,AArBJ,oFA6BK,iBAAkB,CAClB,AA9BL,kCAqCE,yBAAiB,AAAjB,sBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AAtCF,6BA6CE,WAAU,AAEV,gCA5E2B,AA8E3B,WAhFmB,AAiFnB,gBAAgB,AAEhB,mBAAmB,AAGnB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CA8OpB,AAxSF,yEA0CE,kBAAiB,AACjB,sBAAsB,AAKtB,sBAhFyB,AAqFzB,eAAe,CArDjB,AA0PG,4CA5LA,qBAAoB,AAIpB,4BAhGoB,AAkGpB,gBAAe,AACf,qBAAsB,CAqLtB,AA1PH,6DAyEI,kBAAkB,AAClB,yBAvGyB,AAwGzB,mBAA8C,AAC9C,mBAAoB,CACpB,AA7EJ,mEAiFI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CAsCX,AAzHJ,wFAuFK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAarB,AA1GL,gHAiGM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,eAAgB,CAChB,AAzGN,oFA8GK,qBAAqB,AACrB,kBAAkB,AAClB,SAAQ,AACR,UAAS,AACT,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BA9ImB,CA+InB,AAvHL,0FAgIK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BAjKkB,AAkKlB,eAAgB,CAKhB,AAzIL,oHAuIM,iBAAiB,CACjB,AAxIN,0FA+IK,YAAa,CACb,AAhJL,+DAqJI,kBAAkB,AAClB,gCAAmD,AACnD,qBArLmB,CAsLnB,AAxJJ,qEA4JI,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAiBlB,AAjLJ,8EAoKK,qBAAsB,CACtB,AArKL,yEAwKK,cAAe,CACf,AAzKL,sFA6KO,QAAS,AACT,QAAS,CACV,AA/KN,oFAsLK,kBAAkB,CAClB,AAvLL,qEA0LK,eAAc,AACd,wBAAoD,CACpD,AA5LL,uHAgMM,gBAAgB,AAChB,4BAzNkB,CA0NlB,AAlMN,sHAuMM,gBAAgB,AAChB,+BAjOmB,CAkOnB,AAzMN,uHA8MM,6BAvOmB,AAwOnB,kBAAmB,CACnB,AAhNN,+GAuNM,iCAAyB,AAAzB,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AA7NN,oHAkOM,wBAAyB,CACzB,AAnON,2GAwOM,gBAAe,AACf,gBAAgB,CAChB,AA1ON,uIA8OO,gBAAe,AACf,mBAAmB,CACnB,AAhPP,uGAqPM,qBAAqB,CACrB,AAtPN,+CA6PG,qBAAqB,AACrB,kBAAkB,AAIlB,SAAW,CASX,AA3QH,qEAqQI,2BAxRgB,CAyRhB,AAtQJ,sEAyQI,0BA5RgB,CA6RhB,AA1QJ,qDA8QG,sBAAqB,AACrB,eAAc,AAEd,6BAA0D,AAU1D,0BA9SiB,AAiTjB,eAAgB,CAChB,AA/RH,oEAoRI,4BAA0D,CAK1D,AAzRJ,iGAuRK,YAAa,CACb,AAxRL,2DAkSG,cAAc,CAKd,AAvSH,iEAqSI,YAAa,CACb,AAtSJ,kCA4SE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CAkDjC,AAlWF,wCAmTG,YAAa,CACb,AApTH,yDAwTG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AASlB,UAAU,CAYV,AA/UH,wFA6TI,kBAAkB,AAClB,MAAK,AACL,OAAM,AACN,WAAW,CACX,AAjUJ,8DAsUI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,cAxWyB,AAyWzB,gBAAiB,AACjB,cAAe,CACf,AA9UJ,mDAmVG,kBAAiB,AACjB,qBAAoB,AACpB,sBA1WqB,AA2WrB,mBAAmB,AACnB,iBAAgB,AAChB,UA1We,CAmXf,AAjWH,kFA4VK,gBAAiB,AACjB,6BAA0D,AAC1D,UA7XgB,CA8XhB,AA/VL,6BAuWE,iBAAgB,AAChB,gBAAe,AACf,6BA9W2B,AA+W3B,sBAlXyB,AAmXzB,iBAAgB,AAChB,WAnXmB,AAoXnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAqEpB,AAzbF,qDAuXG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAA0D,AAY1D,6BA5ZiB,AA8ZjB,eAAgB,CAMhB,AAjZH,oEAgYI,6BAA0D,AAC1D,oBAAiC,CAKjC,AAtYJ,iGAoYK,YAAa,CACb,AArYL,gEA8YI,mBAAkB,AAClB,kBAAkB,CAClB,AAhZJ,8CAqZG,YAAY,CACZ,AAtZH,6CA0ZG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBAraoB,AAsapB,kBAAiB,AAEjB,gBAAe,AAEf,WA3akB,AA4alB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CAiBjB,AAxbH,oDA0aI,aA/ayB,CAgbzB,AA3aJ,sDA8aI,UAAU,CACV,AA/aJ,kEAmbK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AAtbL,wCA6bE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AA3cF,6CAocG,OAAM,AACN,UAAU,CACV,AAtcH,8CAycG,gBAAgB,CAChB,AA1cH,6BAgdE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,UAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AAtfF,mDA+dG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AArfH,qEA4eI,sBAAqB,AACrB,UAAU,CACV,AA9eJ,mEAkfI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAClB,sBAAsB,AACtB,gBAA0C,AAC1C,qBAnhBuB,CAi4BvB,AAlXD,kCAQE,wBAthB4B,CAuhB5B,AATF,0CAYE,sBAvhBsB,AAwhBtB,cAAe,CACf,AAdF,kCAiBE,wBA1hB6B,CA2hB7B,AAlBF,wCAqBE,yBA7hBkC,AA8hBlC,cAAe,CACf,AAvBF,oCA0BE,sBAAqB,AACrB,eAAe,CACf,AA5BF,gCA+BE,kBAAkB,AAElB,0BA9iBkB,AA+iBlB,6BA/iBkB,AAijBlB,8BAA+B,AAC/B,SAAU,CACV,AAtCF,4CA0CE,kBAAiB,AACjB,QAAO,AACP,SAAQ,AACR,OAAM,AACN,UAAU,CAUV,AAxDF,iDAiDG,MAAK,AACL,WAAW,CACX,AAnDH,kDAsDG,gBAAgB,CAChB,AAvDH,iCA2DE,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,SAAW,CASX,AAzEF,uDAmEG,2BAhlBiB,CAilBjB,AApEH,wDAuEG,0BAplBiB,CAqlBjB,AAxEH,8CA4EE,sBAAqB,AAErB,YAAW,AAEX,0BA7lBkB,AA8lBlB,4BA9lBkB,CAinBlB,AApGF,oDAoFG,YAAY,CACZ,AArFH,oDAwFG,cArnBW,CAgoBX,AAnGH,0DA4FK,iBAAkB,CAKlB,AAjGL,wEA+FM,kBAAkB,CAClB,AAhGN,+BAwGE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BAznBkB,AA0nBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CAkLtB,AAlSF,iDAoHG,yBA1nBkB,AA2nBlB,SAAU,CAMV,AA3HH,+GAwHI,WAAU,AACV,sBAAsB,CACtB,AA1HJ,yDA8HG,qBAnoBgB,CA0oBhB,AArIH,+HAgII,WAAU,AACV,uBAAsB,AAEtB,UAxoBe,CAyoBf,AApIJ,6EA0II,YAAa,CACb,AA3IJ,oDAiJG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAElB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AArKH,8EA2JI,SAAS,CAST,AApKJ,wGA+JK,WAAU,AACV,WAAU,AACV,eAAc,AACd,kBArrBoB,CAsrBpB,AAnKL,2DAwKG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BAhsBiB,AAisBjB,4BAjsBiB,CAksBjB,AArLH,4DAyLG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBA/sBe,AAgtBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AA1PH,kEA0MI,eAAc,AACd,yBAA4B,CAC5B,AA5MJ,kGA+MI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAlOJ,wGAwNK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA5uBa,CA6uBb,AAjOL,gGAqOI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eAvvBc,CAowBd,AAxPJ,sGA8OK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAlwBa,CAmwBb,AAvPL,qEA6PG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,YAAW,AACX,WAAU,AAEV,mBAAkB,AAClB,gBAAe,AAEf,WA3xBqB,AA4xBrB,gBAAgB,AAChB,eAAe,CAmBf,AAjSH,2EAiRI,UAAU,CACV,AAlRJ,sHAsRK,eAAe,CACf,AAvRL,sOA+RI,YAAY,CACZ,AAhSJ,+BAsSE,sBAAqB,AACrB,4BApzBkB,AAqzBlB,0BAAyB,AACzB,gCAh0B2B,AAi0B3B,YAAW,AACX,kBAAiB,AACjB,gBAt0ByB,AAu0BzB,WAt0BmB,AAu0BnB,gBAAgB,AAEhB,cAAe,CAgEf,AAhXF,qCAmTG,eAAc,AACd,wBAAoD,CACpD,AArTH,wEAyTI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,6BA/0BqB,AAg1BrB,eAAgB,CAChB,AA9TJ,wEAmUI,gBAAgB,CAChB,AApUJ,wEAyUI,gBAAgB,CAChB,AA1UJ,wEA+UI,gBAAgB,CAChB,AAhVJ,wEAqVI,gBAAgB,CAChB,AAtVJ,wEA2VI,iBAAiB,CACjB,AA5VJ,gDAiWG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,8BA33BsB,AA43BtB,qBAAqB,CACrB,AA1WH,oCA6WG,iBAAgB,AAChB,aAr4B0B,CAs4B1B,AAKH,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,gBA14BuB,AA24BvB,sBAz4BmB,AA24BnB,eA35Ba,AA65Bb,gBAAe,AACf,iCAAiC,AAEjC,SAAc,CA6Bd,AA5CD,6DAkBE,YAAW,AAEX,UAp5BgB,CAi6BhB,AAjCF,oEAuBG,WA15BqB,AA25BrB,kBAl5BkB,CAm5BlB,AAzBH,mEA4BG,eAAc,AAEd,WAj6BqB,AAk6BrB,kBAz5BkB,CA05BlB,AAhCH,8DAoCE,6BAr6BkB,AAu6BlB,YAAW,AACX,gBAAe,AAEf,WAz6BgB,AA06BhB,eAAgB,CAChB","file":"tabulator_site.min.css","sourcesContent":["/* Tabulator v4.1.2 (c) Oliver Folkerd */\n\n\r\n//Main Theme Variables\r\n$backgroundColor: #fff !default; //background color of tabulator\r\n$borderColor:#222 !default; //border to tabulator\r\n$textSize:14px !default; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#222 !default; //border to tabulator\r\n$headerTextColor:#fff !default; //header text colour\r\n$headerBorderColor:#aaa !default; //header border color\r\n$headerSeperatorColor:#3FB449 !default; //header bottom seperator color\r\n$headerMargin:4px !default; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: #3FB449 !default;\r\n$sortArrowInactive: #bbb !default;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#fff !default; //table row background color\r\n$rowAltBackgroundColor:#EFEFEF !default; //table row background color\r\n$rowBorderColor:#aaa !default; //table border color\r\n$rowTextColor:#333 !default; //table text color\r\n$rowHoverBackground:#bbb !default; //row background color on hover\r\n\r\n$rowSelectedBackground: #9ABCEA !default; //row background color when selected\r\n$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered\r\n\r\n$editBoxColor:#1D68CD !default; //border color for edit boxes\r\n$errorColor:#dd0000 !default; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#222 !default; //border to tabulator\r\n$footerTextColor:#222 !default; //footer text colour\r\n$footerBorderColor:#aaa !default; //footer border color\r\n$footerSeperatorColor:#3FB449 !default; //footer bottom seperator color\r\n$footerActiveColor:$footerSeperatorColor !default; //footer bottom active text color\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\r\n\tborder-bottom: 5px solid $borderColor;\r\n\r\n\tbackground-color: $backgroundColor;\r\n\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\toverflow:hidden;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&[tabulator-layout=\"fitColumns\"]{\r\n\t\t.tabulator-row{\r\n\t\t\t.tabulator-cell{\r\n\t\t\t\t&:last-of-type{\r\n\t\t\t\t\tborder-right: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:3px solid $headerSeperatorColor;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:1px solid $headerBorderColor;\r\n\t\t\tbackground-color: $headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:8px;\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid #999;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #fff;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:14px;\r\n\t\t\t\t\tright:8px;\r\n\t\t\t\t\twidth: 0;\r\n\t\t\t\t\theight: 0;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:1px solid $headerBorderColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\t.tabulator-col:last-child{\r\n\t\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//placeholder element for sortable columns\r\n\t\t\t&.ui-sortable-helper{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tbackground-color: $headerBackgroundColor !important;\r\n\t\t\t\tborder:1px solid $headerBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput{\r\n\t\t\t\t\t&::-ms-clear {\r\n\t\t\t\t\t width : 0;\r\n\t\t\t\t\t height: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-col-vertical{\r\n\t\t\t\t.tabulator-col-content{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\twriting-mode: vertical-rl;\r\n\t\t\t\t\t\ttext-orientation: mixed;\r\n\r\n\t\t\t\t\t\tdisplay:flex;\r\n\t\t\t\t\t\talign-items:center;\r\n\t\t\t\t\t\tjustify-content:center;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\ttransform: rotate(180deg);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-sortable{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\tpadding-top:20px;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\t\tpadding-bottom:20px;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\tright:calc(50% - 6px);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:400%;\r\n\r\n\t\t\tbackground:lighten($headerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($headerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\t// border-bottom:1px solid $headerBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen-rows-holder{\r\n\t\t\tmin-width:400%;\r\n\r\n\t\t\t&:empty{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t&[tabulator-render-mode=\"virtual\"]{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\ttop:0;\r\n\t\t\t\tleft:0;\r\n\t\t\t\theight:100%;\r\n\t\t\t}\r\n\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:$headerSeperatorColor;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:lighten($headerBackgroundColor, 15%) !important;\r\n\t\t\t\t\tcolor:$headerTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tpadding-top:8px;\r\n\t\tborder-top:3px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align:right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(100% + 20px);\r\n\t\t\tmargin:-8px -10px 8px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:lighten($footerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($footerBackgroundColor, 10%) !important;\r\n\t\t\t\tcolor:$headerTextColor !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// border-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 2px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\r\n\t\t\tbackground:#fff;\r\n\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:$footerActiveColor;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tabulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//row element\r\n.tabulator-row{\r\n\tposition: relative;\r\n\tbox-sizing: border-box;\r\n\tmin-height:$textSize + ($headerMargin * 2);\r\n\tbackground-color: $rowBackgroundColor;\r\n\r\n\r\n\t&.tabulator-row-even{\r\n\t\tbackground-color: $rowAltBackgroundColor;\r\n\t}\r\n\r\n\t&.tabulator-selectable:hover{\r\n\t\tbackground-color:$rowHoverBackground;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-selected{\r\n\t\tbackground-color:$rowSelectedBackground;\r\n\t}\r\n\r\n\t&.tabulator-selected:hover{\r\n\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-row-moving{\r\n\t\tborder:1px solid #000;\r\n\t\tbackground:#fff;\r\n\t}\r\n\r\n\t&.tabulator-moving{\r\n\t\tposition: absolute;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpointer-events: none !important;\r\n\t\tz-index:15;\r\n\t}\r\n\r\n\t//row resize handles\r\n\t.tabulator-row-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\tbottom:0;\r\n\t\tleft:0;\r\n\t\theight:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\ttop:0;\r\n\t\t\tbottom:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ns-resize;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-frozen{\r\n\t\tdisplay: inline-block;\r\n\t\tposition: absolute;\r\n\r\n\t\tbackground-color: inherit;\r\n\r\n\t\tz-index: 10;\r\n\r\n\t\t&.tabulator-frozen-left{\r\n\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-frozen-right{\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-responsive-collapse{\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t&:empty{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\ttable{\r\n\t\t\tfont-size:$textSize;\r\n\r\n\t\t\ttr{\r\n\t\t\t\ttd{\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t&:first-of-type{\r\n\t\t\t\t\t\tpadding-right:10px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//cell element\r\n\t.tabulator-cell{\r\n\t\tdisplay:inline-block;\r\n\t\tposition: relative;\r\n\t\tbox-sizing:border-box;\r\n\t\tpadding:6px;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tvertical-align:middle;\r\n\t\twhite-space:nowrap;\r\n\t\toverflow:hidden;\r\n\t\ttext-overflow:ellipsis;\r\n\r\n\r\n\t\t&.tabulator-editing{\r\n\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\tpadding: 0;\r\n\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-validation-fail{\r\n\t\t\tborder:1px solid $errorColor;\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\tcolor: $errorColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//hide left resize handle on first column\r\n\t\t&:first-child{\r\n\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//movable row handle\r\n\t\t&.tabulator-row-handle{\r\n\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\t//handle holder\r\n\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t//Hamburger element\r\n\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\twidth:100%;\r\n\t\t\t\t\theight:3px;\r\n\t\t\t\t\tmargin-top:2px;\r\n\t\t\t\t\tbackground:$sortArrowActive;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-branch{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:9px;\r\n\t\t\twidth:7px;\r\n\r\n\t\t\tmargin-top:-9px;\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control{\r\n\r\n\t\t\tdisplay:inline-flex;\r\n\t\t\tjustify-content:center;\r\n\t\t\talign-items:center;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:11px;\r\n\t\t\twidth:11px;\r\n\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder:1px solid $rowTextColor;\r\n\t\t\tborder-radius:2px;\r\n\t\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\t\toverflow:hidden;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: transparent;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-expand{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-responsive-collapse-toggle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\theight:15px;\r\n\t\t\twidth:15px;\r\n\r\n\t\t\tborder-radius:20px;\r\n\t\t\tbackground:#666;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:1.1em;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\topacity:.7;\r\n\t\t\t}\r\n\r\n\t\t\t&.open{\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\t\tdisplay:initial;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-open{\r\n\t\t\t\t\tdisplay:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\tdisplay:none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//row grouping element\r\n\t&.tabulator-group{\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #000;\r\n\t\tborder-bottom:2px solid $headerSeperatorColor;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:$headerBackgroundColor;\r\n\t\tcolor:$headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:40px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:60px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:80px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:100px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:$headerSeperatorColor;\r\n\t\t}\r\n\t}\r\n\r\n}\r\n\r\n.tabulator-edit-select-list{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tmax-height:200px;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-edit-select-list-item{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\r\n\t\t&.active{\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-group{\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpadding:4px;\r\n\t\tpadding-top:6px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\tfont-weight:bold;\r\n\t}\r\n}"]} \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/jquery_wrapper.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/jquery_wrapper.js deleted file mode 100644 index cd36e31085..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/jquery_wrapper.js +++ /dev/null @@ -1,46 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -/* - * This file is part of the Tabulator package. - * - * (c) Oliver Folkerd - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Full Documentation & Demos can be found at: http://olifolkerd.github.io/tabulator/ - * - */ - -(function (factory) { - "use strict"; - - if (typeof define === 'function' && define.amd) { - define(['jquery'], factory); - } else if (typeof module !== 'undefined' && module.exports) { - module.exports = factory(require('jquery')); - } else { - factory(jQuery); - } -})(function ($, undefined) { - $.widget("ui.tabulator", { - _create: function _create() { - this.table = new Tabulator(this.element[0], this.options); - - //map tabulator functions to jquery wrapper - for (var key in Tabulator.prototype) { - if (typeof Tabulator.prototype[key] === "function" && key.charAt(0) !== "_") { - this[key] = this.table[key].bind(this.table); - } - } - }, - - _setOption: function _setOption(option, value) { - console.error("Tabulator jQuery wrapper does not support setting options after the table has been instantiated"); - }, - - _destroy: function _destroy(option, value) { - this.table.destroy(); - } - }); -}); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/jquery_wrapper.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/jquery_wrapper.min.js deleted file mode 100644 index 1d9922b9b5..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/jquery_wrapper.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(t,e){t.widget("ui.tabulator",{_create:function(){this.table=new Tabulator(this.element[0],this.options);for(var t in Tabulator.prototype)"function"==typeof Tabulator.prototype[t]&&"_"!==t.charAt(0)&&(this[t]=this.table[t].bind(this.table))},_setOption:function(t,e){console.error("Tabulator jQuery wrapper does not support setting options after the table has been instantiated")},_destroy:function(t,e){this.table.destroy()}})}); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/accessor.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/accessor.js deleted file mode 100644 index 24899b54e3..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/accessor.js +++ /dev/null @@ -1,91 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var Accessor = function Accessor(table) { - this.table = table; //hold Tabulator object - this.allowedTypes = ["", "data", "download", "clipboard"]; //list of accessor types -}; - -//initialize column accessor -Accessor.prototype.initializeColumn = function (column) { - var self = this, - match = false, - config = {}; - - this.allowedTypes.forEach(function (type) { - var key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)), - accessor; - - if (column.definition[key]) { - accessor = self.lookupAccessor(column.definition[key]); - - if (accessor) { - match = true; - - config[key] = { - accessor: accessor, - params: column.definition[key + "Params"] || {} - }; - } - } - }); - - if (match) { - column.modules.accessor = config; - } -}, Accessor.prototype.lookupAccessor = function (value) { - var accessor = false; - - //set column accessor - switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { - case "string": - if (this.accessors[value]) { - accessor = this.accessors[value]; - } else { - console.warn("Accessor Error - No such accessor found, ignoring: ", value); - } - break; - - case "function": - accessor = value; - break; - } - - return accessor; -}; - -//apply accessor to row -Accessor.prototype.transformRow = function (dataIn, type) { - var self = this, - key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)); - - //clone data object with deep copy to isolate internal data from returned result - var data = Tabulator.prototype.helpers.deepClone(dataIn || {}); - - self.table.columnManager.traverse(function (column) { - var value, accessor, params, component; - - if (column.modules.accessor) { - - accessor = column.modules.accessor[key] || column.modules.accessor.accessor || false; - - if (accessor) { - value = column.getFieldValue(data); - - if (value != "undefined") { - component = column.getComponent(); - params = typeof accessor.params === "function" ? accessor.params(value, data, type, component) : accessor.params; - column.setFieldValue(data, accessor.accessor(value, data, type, params, component)); - } - } - } - }); - - return data; -}, - -//default accessors -Accessor.prototype.accessors = {}; - -Tabulator.prototype.registerModule("accessor", Accessor); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/accessor.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/accessor.min.js deleted file mode 100644 index f09aa24560..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/accessor.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Accessor=function(o){this.table=o,this.allowedTypes=["","data","download","clipboard"]};Accessor.prototype.initializeColumn=function(o){var e=this,s=!1,r={};this.allowedTypes.forEach(function(c){var t,a="accessor"+(c.charAt(0).toUpperCase()+c.slice(1));o.definition[a]&&(t=e.lookupAccessor(o.definition[a]))&&(s=!0,r[a]={accessor:t,params:o.definition[a+"Params"]||{}})}),s&&(o.modules.accessor=r)},Accessor.prototype.lookupAccessor=function(o){var e=!1;switch(void 0===o?"undefined":_typeof(o)){case"string":this.accessors[o]?e=this.accessors[o]:console.warn("Accessor Error - No such accessor found, ignoring: ",o);break;case"function":e=o}return e},Accessor.prototype.transformRow=function(o,e){var s=this,r="accessor"+(e.charAt(0).toUpperCase()+e.slice(1)),c=Tabulator.prototype.helpers.deepClone(o||{});return s.table.columnManager.traverse(function(o){var s,t,a,n;o.modules.accessor&&(t=o.modules.accessor[r]||o.modules.accessor.accessor||!1)&&"undefined"!=(s=o.getFieldValue(c))&&(n=o.getComponent(),a="function"==typeof t.params?t.params(s,c,e,n):t.params,o.setFieldValue(c,t.accessor(s,c,e,a,n)))}),c},Accessor.prototype.accessors={},Tabulator.prototype.registerModule("accessor",Accessor); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/ajax.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/ajax.js deleted file mode 100644 index 692b4418c8..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/ajax.js +++ /dev/null @@ -1,429 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var Ajax = function Ajax(table) { - - this.table = table; //hold Tabulator object - this.config = false; //hold config object for ajax request - this.url = ""; //request URL - this.urlGenerator = false; - this.params = false; //request parameters - - this.loaderElement = this.createLoaderElement(); //loader message div - this.msgElement = this.createMsgElement(); //message element - this.loadingElement = false; - this.errorElement = false; - this.loaderPromise = false; - - this.progressiveLoad = false; - this.loading = false; - - this.requestOrder = 0; //prevent requests comming out of sequence if overridden by another load request -}; - -//initialize setup options -Ajax.prototype.initialize = function () { - this.loaderElement.appendChild(this.msgElement); - - if (this.table.options.ajaxLoaderLoading) { - this.loadingElement = this.table.options.ajaxLoaderLoading; - } - - this.loaderPromise = this.table.options.ajaxRequestFunc || this.defaultLoaderPromise; - - this.urlGenerator = this.table.options.ajaxURLGenerator || this.defaultURLGenerator; - - if (this.table.options.ajaxLoaderError) { - this.errorElement = this.table.options.ajaxLoaderError; - } - - if (this.table.options.ajaxParams) { - this.setParams(this.table.options.ajaxParams); - } - - if (this.table.options.ajaxConfig) { - this.setConfig(this.table.options.ajaxConfig); - } - - if (this.table.options.ajaxURL) { - this.setUrl(this.table.options.ajaxURL); - } - - if (this.table.options.ajaxProgressiveLoad) { - if (this.table.options.pagination) { - this.progressiveLoad = false; - console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"); - } else { - if (this.table.modExists("page")) { - this.progressiveLoad = this.table.options.ajaxProgressiveLoad; - this.table.modules.page.initializeProgressive(this.progressiveLoad); - } else { - console.error("Pagination plugin is required for progressive ajax loading"); - } - } - } -}; - -Ajax.prototype.createLoaderElement = function () { - var el = document.createElement("div"); - el.classList.add("tabulator-loader"); - return el; -}; - -Ajax.prototype.createMsgElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-loader-msg"); - el.setAttribute("role", "alert"); - - return el; -}; - -//set ajax params -Ajax.prototype.setParams = function (params, update) { - if (update) { - this.params = this.params || {}; - - for (var key in params) { - this.params[key] = params[key]; - } - } else { - this.params = params; - } -}; - -Ajax.prototype.getParams = function () { - return this.params || {}; -}; - -//load config object -Ajax.prototype.setConfig = function (config) { - this._loadDefaultConfig(); - - if (typeof config == "string") { - this.config.method = config; - } else { - for (var key in config) { - this.config[key] = config[key]; - } - } -}; - -//create config object from default -Ajax.prototype._loadDefaultConfig = function (force) { - var self = this; - if (!self.config || force) { - - self.config = {}; - - //load base config from defaults - for (var key in self.defaultConfig) { - self.config[key] = self.defaultConfig[key]; - } - } -}; - -//set request url -Ajax.prototype.setUrl = function (url) { - this.url = url; -}; - -//get request url -Ajax.prototype.getUrl = function () { - return this.url; -}; - -//lstandard loading function -Ajax.prototype.loadData = function (inPosition) { - var self = this; - - if (this.progressiveLoad) { - return this._loadDataProgressive(); - } else { - return this._loadDataStandard(inPosition); - } -}; - -Ajax.prototype.nextPage = function (diff) { - var margin; - - if (!this.loading) { - - margin = this.table.options.ajaxProgressiveLoadScrollMargin || this.table.rowManager.getElement().clientHeight * 2; - - if (diff < margin) { - this.table.modules.page.nextPage().then(function () {}).catch(function () {}); - } - } -}; - -Ajax.prototype.blockActiveRequest = function () { - this.requestOrder++; -}; - -Ajax.prototype._loadDataProgressive = function () { - this.table.rowManager.setData([]); - return this.table.modules.page.setPage(1); -}; - -Ajax.prototype._loadDataStandard = function (inPosition) { - var _this = this; - - return new Promise(function (resolve, reject) { - _this.sendRequest(inPosition).then(function (data) { - _this.table.rowManager.setData(data, inPosition); - resolve(); - }).catch(function (e) { - reject(); - }); - }); -}; - -Ajax.prototype.generateParamsList = function (data, prefix) { - var self = this, - output = []; - - prefix = prefix || ""; - - if (Array.isArray(data)) { - data.forEach(function (item, i) { - output = output.concat(self.generateParamsList(item, prefix ? prefix + "[" + i + "]" : i)); - }); - } else if ((typeof data === "undefined" ? "undefined" : _typeof(data)) === "object") { - for (var key in data) { - output = output.concat(self.generateParamsList(data[key], prefix ? prefix + "[" + key + "]" : key)); - } - } else { - output.push({ key: prefix, value: data }); - } - - return output; -}; - -Ajax.prototype.serializeParams = function (params) { - var output = this.generateParamsList(params), - encoded = []; - - output.forEach(function (item) { - encoded.push(encodeURIComponent(item.key) + "=" + encodeURIComponent(item.value)); - }); - - return encoded.join("&"); -}; - -//send ajax request -Ajax.prototype.sendRequest = function (silent) { - var _this2 = this; - - var self = this, - url = self.url, - requestNo, - esc, - query; - - self.requestOrder++; - requestNo = self.requestOrder; - - self._loadDefaultConfig(); - - return new Promise(function (resolve, reject) { - if (self.table.options.ajaxRequesting.call(_this2.table, self.url, self.params) !== false) { - - self.loading = true; - - if (!silent) { - self.showLoader(); - } - - _this2.loaderPromise(url, self.config, self.params).then(function (data) { - if (requestNo === self.requestOrder) { - if (self.table.options.ajaxResponse) { - data = self.table.options.ajaxResponse.call(self.table, self.url, self.params, data); - } - resolve(data); - } else { - console.warn("Ajax Response Blocked - An active ajax request was blocked by an attempt to change table data while the request was being made"); - } - - self.hideLoader(); - - self.loading = false; - }).catch(function (error) { - console.error("Ajax Load Error: ", error); - self.table.options.ajaxError.call(self.table, error); - - self.showError(); - - setTimeout(function () { - self.hideLoader(); - }, 3000); - - self.loading = false; - - reject(); - }); - } else { - reject(); - } - }); -}; - -Ajax.prototype.showLoader = function () { - var shouldLoad = typeof this.table.options.ajaxLoader === "function" ? this.table.options.ajaxLoader() : this.table.options.ajaxLoader; - - if (shouldLoad) { - - this.hideLoader(); - - while (this.msgElement.firstChild) { - this.msgElement.removeChild(this.msgElement.firstChild); - }this.msgElement.classList.remove("tabulator-error"); - this.msgElement.classList.add("tabulator-loading"); - - if (this.loadingElement) { - this.msgElement.appendChild(this.loadingElement); - } else { - this.msgElement.innerHTML = this.table.modules.localize.getText("ajax|loading"); - } - - this.table.element.appendChild(this.loaderElement); - } -}; - -Ajax.prototype.showError = function () { - this.hideLoader(); - - while (this.msgElement.firstChild) { - this.msgElement.removeChild(this.msgElement.firstChild); - }this.msgElement.classList.remove("tabulator-loading"); - this.msgElement.classList.add("tabulator-error"); - - if (this.errorElement) { - this.msgElement.appendChild(this.errorElement); - } else { - this.msgElement.innerHTML = this.table.modules.localize.getText("ajax|error"); - } - - this.table.element.appendChild(this.loaderElement); -}; - -Ajax.prototype.hideLoader = function () { - if (this.loaderElement.parentNode) { - this.loaderElement.parentNode.removeChild(this.loaderElement); - } -}; - -//default ajax config object -Ajax.prototype.defaultConfig = { - method: "GET" -}; - -Ajax.prototype.defaultURLGenerator = function (url, config, params) { - if (params && Object.keys(params).length) { - if (!config.method || config.method.toLowerCase() == "get") { - config.method = "get"; - url += "?" + this.serializeParams(params); - } - } - - return url; -}; - -Ajax.prototype.defaultLoaderPromise = function (url, config, params) { - var self = this, - contentType; - - return new Promise(function (resolve, reject) { - - //set url - url = self.urlGenerator(url, config, params); - - //set body content if not GET request - if (config.method != "get") { - contentType = _typeof(self.table.options.ajaxContentType) === "object" ? self.table.options.ajaxContentType : self.contentTypeFormatters[self.table.options.ajaxContentType]; - if (contentType) { - - for (var key in contentType.headers) { - if (!config.headers) { - config.headers = {}; - } - - if (typeof config.headers[key] === "undefined") { - config.headers[key] = contentType.headers[key]; - } - } - - config.body = contentType.body.call(self, url, config, params); - } else { - console.warn("Ajax Error - Invalid ajaxContentType value:", self.table.options.ajaxContentType); - } - } - - if (url) { - - //configure headers - if (typeof config.credentials === "undefined") { - config.credentials = 'include'; - } - - if (typeof config.headers === "undefined") { - config.headers = {}; - } - - if (typeof config.headers.Accept === "undefined") { - config.headers.Accept = "application/json"; - } - - if (typeof config.headers["X-Requested-With"] === "undefined") { - config.headers["X-Requested-With"] = "XMLHttpRequest"; - } - - //send request - fetch(url, config).then(function (response) { - if (response.ok) { - response.json().then(function (data) { - resolve(data); - }).catch(function (error) { - reject(error); - console.warn("Ajax Load Error - Invalid JSON returned", error); - }); - } else { - console.error("Ajax Load Error - Connection Error: " + response.status, response.statusText); - reject(response); - } - }).catch(function (error) { - console.error("Ajax Load Error - Connection Error: ", error); - reject(error); - }); - } else { - reject("No URL Set"); - } - }); -}; - -Ajax.prototype.contentTypeFormatters = { - "json": { - headers: { - 'Content-Type': 'application/json' - }, - body: function body(url, config, params) { - return JSON.stringify(params); - } - }, - "form": { - headers: {}, - body: function body(url, config, params) { - var output = this.generateParamsList(params), - form = new FormData(); - - output.forEach(function (item) { - form.append(item.key, item.value); - }); - - return form; - } - } -}; - -Tabulator.prototype.registerModule("ajax", Ajax); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/ajax.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/ajax.min.js deleted file mode 100644 index 33ba12c9c6..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/ajax.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ajax=function(e){this.table=e,this.config=!1,this.url="",this.urlGenerator=!1,this.params=!1,this.loaderElement=this.createLoaderElement(),this.msgElement=this.createMsgElement(),this.loadingElement=!1,this.errorElement=!1,this.loaderPromise=!1,this.progressiveLoad=!1,this.loading=!1,this.requestOrder=0};Ajax.prototype.initialize=function(){this.loaderElement.appendChild(this.msgElement),this.table.options.ajaxLoaderLoading&&(this.loadingElement=this.table.options.ajaxLoaderLoading),this.loaderPromise=this.table.options.ajaxRequestFunc||this.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||this.defaultURLGenerator,this.table.options.ajaxLoaderError&&(this.errorElement=this.table.options.ajaxLoaderError),this.table.options.ajaxParams&&this.setParams(this.table.options.ajaxParams),this.table.options.ajaxConfig&&this.setConfig(this.table.options.ajaxConfig),this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.table.options.ajaxProgressiveLoad&&(this.table.options.pagination?(this.progressiveLoad=!1,console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time")):this.table.modExists("page")?(this.progressiveLoad=this.table.options.ajaxProgressiveLoad,this.table.modules.page.initializeProgressive(this.progressiveLoad)):console.error("Pagination plugin is required for progressive ajax loading"))},Ajax.prototype.createLoaderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-loader"),e},Ajax.prototype.createMsgElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-loader-msg"),e.setAttribute("role","alert"),e},Ajax.prototype.setParams=function(e,t){if(t){this.params=this.params||{};for(var o in e)this.params[o]=e[o]}else this.params=e},Ajax.prototype.getParams=function(){return this.params||{}},Ajax.prototype.setConfig=function(e){if(this._loadDefaultConfig(),"string"==typeof e)this.config.method=e;else for(var t in e)this.config[t]=e[t]},Ajax.prototype._loadDefaultConfig=function(e){var t=this;if(!t.config||e){t.config={};for(var o in t.defaultConfig)t.config[o]=t.defaultConfig[o]}},Ajax.prototype.setUrl=function(e){this.url=e},Ajax.prototype.getUrl=function(){return this.url},Ajax.prototype.loadData=function(e){return this.progressiveLoad?this._loadDataProgressive():this._loadDataStandard(e)},Ajax.prototype.nextPage=function(e){var t;this.loading||(t=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.getElement().clientHeight,e output || output === null) { - output = value; - } - }); - - return output !== null ? precision !== false ? output.toFixed(precision) : output : ""; - }, - "min": function min(values, data, calcParams) { - var output = null, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; - - values.forEach(function (value) { - - value = Number(value); - - if (value < output || output === null) { - output = value; - } - }); - - return output !== null ? precision !== false ? output.toFixed(precision) : output : ""; - }, - "sum": function sum(values, data, calcParams) { - var output = 0, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; - - if (values.length) { - values.forEach(function (value) { - value = Number(value); - - output += !isNaN(value) ? Number(value) : 0; - }); - } - - return precision !== false ? output.toFixed(precision) : output; - }, - "concat": function concat(values, data, calcParams) { - var output = 0; - - if (values.length) { - output = values.reduce(function (sum, value) { - return String(sum) + String(value); - }); - } - - return output; - }, - "count": function count(values, data, calcParams) { - var output = 0; - - if (values.length) { - values.forEach(function (value) { - if (value) { - output++; - } - }); - } - - return output; - } -}; - -Tabulator.prototype.registerModule("columnCalcs", ColumnCalcs); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/calculation_colums.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/calculation_colums.min.js deleted file mode 100644 index a6a3442887..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/calculation_colums.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ColumnCalcs=function(t){this.table=t,this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.initialize()};ColumnCalcs.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-calcs-holder"),t},ColumnCalcs.prototype.initialize=function(){this.genColumn=new Column({field:"value"},this)},ColumnCalcs.prototype.registerColumnField=function(){},ColumnCalcs.prototype.initializeColumn=function(t){var o=t.definition,e={topCalcParams:o.topCalcParams||{},botCalcParams:o.bottomCalcParams||{}};if(o.topCalc){switch(_typeof(o.topCalc)){case"string":this.calculations[o.topCalc]?e.topCalc=this.calculations[o.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",o.topCalc);break;case"function":e.topCalc=o.topCalc}e.topCalc&&(t.modules.columnCalcs=e,this.topCalcs.push(t),"group"!=this.table.options.columnCalcs&&this.initializeTopRow())}if(o.bottomCalc){switch(_typeof(o.bottomCalc)){case"string":this.calculations[o.bottomCalc]?e.botCalc=this.calculations[o.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",o.bottomCalc);break;case"function":e.botCalc=o.bottomCalc}e.botCalc&&(t.modules.columnCalcs=e,this.botCalcs.push(t),"group"!=this.table.options.columnCalcs&&this.initializeBottomRow())}},ColumnCalcs.prototype.removeCalcs=function(){var t=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),t=!0),this.botInitialized&&(this.botInitialized=!1,this.table.footerManager.remove(this.botElement),t=!0),t&&this.table.rowManager.adjustTableSize()},ColumnCalcs.prototype.initializeTopRow=function(){this.topInitialized||(this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)},ColumnCalcs.prototype.initializeBottomRow=function(){this.botInitialized||(this.table.footerManager.prepend(this.botElement),this.botInitialized=!0)},ColumnCalcs.prototype.scrollHorizontal=function(t){this.table.columnManager.getElement().scrollWidth,this.table.element.clientWidth;this.botInitialized&&(this.botRow.getElement().style.marginLeft=-t+"px")},ColumnCalcs.prototype.recalc=function(t){var o;if(this.topInitialized||this.botInitialized){if(this.rowsToData(t),this.topInitialized){for(o=this.generateRow("top",this.rowsToData(t)),this.topRow=o;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(o.getElement()),o.initialize(!0)}if(this.botInitialized){for(o=this.generateRow("bottom",this.rowsToData(t)),this.botRow=o;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(o.getElement()),o.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}},ColumnCalcs.prototype.recalcRowGroup=function(t){this.recalcGroup(this.table.modules.groupRows.getRowGroup(t))},ColumnCalcs.prototype.recalcGroup=function(t){var o,e;t&&t.calcs&&(t.calcs.bottom&&(o=this.rowsToData(t.rows),e=this.generateRowData("bottom",o),t.calcs.bottom.updateData(e),t.calcs.bottom.reinitialize()),t.calcs.top&&(o=this.rowsToData(t.rows),e=this.generateRowData("top",o),t.calcs.top.updateData(e),t.calcs.top.reinitialize()))},ColumnCalcs.prototype.generateTopRow=function(t){return this.generateRow("top",this.rowsToData(t))},ColumnCalcs.prototype.generateBottomRow=function(t){return this.generateRow("bottom",this.rowsToData(t))},ColumnCalcs.prototype.rowsToData=function(t){var o=[];return t.forEach(function(t){o.push(t.getData())}),o},ColumnCalcs.prototype.generateRow=function(t,o){var e,i=this,l=this.generateRowData(t,o);return i.table.modExists("mutator")&&i.table.modules.mutator.disable(),e=new Row(l,this),i.table.modExists("mutator")&&i.table.modules.mutator.enable(),e.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+t),e.type="calc",e.generateCells=function(){var o=[];i.table.columnManager.columnsByIndex.forEach(function(l){if(l.visible){i.genColumn.setField(l.getField()),i.genColumn.hozAlign=l.hozAlign,l.definition[t+"CalcFormatter"]&&i.table.modExists("format")?i.genColumn.modules.format={formatter:i.table.modules.format.getFormatter(l.definition[t+"CalcFormatter"]),params:l.definition[t+"CalcFormatterParams"]}:i.genColumn.modules.format={formatter:i.table.modules.format.getFormatter("plaintext"),params:{}};var a=new Cell(i.genColumn,e);a.column=l,a.setWidth(l.width),l.cells.push(a),o.push(a)}}),this.cells=o},e},ColumnCalcs.prototype.generateRowData=function(t,o){var e,i,l={},a="top"==t?this.topCalcs:this.botCalcs,n="top"==t?"topCalc":"botCalc";return a.forEach(function(t){var a=[];t.modules.columnCalcs&&t.modules.columnCalcs[n]&&(o.forEach(function(o){a.push(t.getFieldValue(o))}),i=n+"Params",e="function"==typeof t.modules.columnCalcs[i]?t.modules.columnCalcs[i](value,o):t.modules.columnCalcs[i],t.setFieldValue(l,t.modules.columnCalcs[n](a,o,e)))}),l},ColumnCalcs.prototype.hasTopCalcs=function(){return!!this.topCalcs.length},ColumnCalcs.prototype.hasBottomCalcs=function(){return!!this.botCalcs.length},ColumnCalcs.prototype.redraw=function(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)},ColumnCalcs.prototype.getResults=function(){var t,o=this,e={};return this.table.options.groupBy&&this.table.modExists("groupRows")?(t=this.table.modules.groupRows.getGroups(!0),t.forEach(function(t){e[t.getKey()]=o.getGroupResults(t)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e},ColumnCalcs.prototype.getGroupResults=function(t){var o=this,e=t._getSelf(),i=t.getSubGroups(),l={};return i.forEach(function(t){l[t.getKey()]=o.getGroupResults(t)}),{top:e.calcs.top?e.calcs.top.getData():{},bottom:e.calcs.bottom?e.calcs.bottom.getData():{},groups:l}},ColumnCalcs.prototype.calculations={avg:function(t,o,e){var i=0,l=void 0!==e.precision?e.precision:2;return t.length&&(i=t.reduce(function(t,o){return o=Number(o),t+o}),i/=t.length,i=!1!==l?i.toFixed(l):i),parseFloat(i).toString()},max:function(t,o,e){var i=null,l=void 0!==e.precision&&e.precision;return t.forEach(function(t){((t=Number(t))>i||null===i)&&(i=t)}),null!==i?!1!==l?i.toFixed(l):i:""},min:function(t,o,e){var i=null,l=void 0!==e.precision&&e.precision;return t.forEach(function(t){((t=Number(t)) max) { - max = len; - } - }); - - headers.forEach(function (title) { - var len = title.length; - if (len < max) { - for (var i = len; i < max; i++) { - title.push(""); - } - } - }); - } - - columns.forEach(function (column) { - parseColumnGroup(column, 0); - }); - - return headers; -}; - -Clipboard.prototype.rowsToData = function (rows, config, params) { - var columns = this.table.columnManager.columnsByIndex, - data = []; - - rows.forEach(function (row) { - var rowArray = [], - rowData = row.getData("clipboard"); - - columns.forEach(function (column) { - var value = column.getFieldValue(rowData); - - switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - rowArray.push(value); - }); - - data.push(rowArray); - }); - - return data; -}; - -Clipboard.prototype.buildComplexRows = function (config) { - var _this3 = this; - - var output = [], - groups = this.table.modules.groupRows.getGroups(); - - groups.forEach(function (group) { - output.push(_this3.processGroupData(group)); - }); - - return output; -}; - -Clipboard.prototype.processGroupData = function (group) { - var _this4 = this; - - var subGroups = group.getSubGroups(); - - var groupData = { - type: "group", - key: group.key - }; - - if (subGroups.length) { - groupData.subGroups = []; - - subGroups.forEach(function (subGroup) { - groupData.subGroups.push(_this4.processGroupData(subGroup)); - }); - } else { - groupData.rows = group.getRows(true); - } - - return groupData; -}; - -Clipboard.prototype.buildOutput = function (rows, config, params) { - var _this5 = this; - - var output = [], - columns = this.table.columnManager.columnsByIndex; - - if (config.columnHeaders) { - - if (config.columnHeaders == "groups") { - columns = this.generateColumnGroupHeaders(this.table.columnManager.columns); - - output = output.concat(this.groupHeadersToRows(columns)); - } else { - output.push(this.generateSimpleHeaders(columns)); - } - } - - //generate styled content - if (this.table.options.clipboardCopyStyled) { - this.generateHTML(rows, columns, config, params); - } - - //generate unstyled content - if (config.rowGroups) { - rows.forEach(function (row) { - output = output.concat(_this5.parseRowGroupData(row, config, params)); - }); - } else { - output = output.concat(this.rowsToData(rows, config, params)); - } - - return output; -}; - -Clipboard.prototype.parseRowGroupData = function (group, config, params) { - var _this6 = this; - - var groupData = []; - - groupData.push([group.key]); - - if (group.subGroups) { - group.subGroups.forEach(function (subGroup) { - groupData = groupData.concat(_this6.parseRowGroupData(subGroup, config, params)); - }); - } else { - - groupData = groupData.concat(this.rowsToData(group.rows, config, params)); - } - - return groupData; -}; - -Clipboard.prototype.generateHTML = function (rows, columns, config, params) { - var self = this, - data = [], - headers = [], - body, - oddRow, - evenRow, - firstRow, - firstCell, - firstGroup, - lastCell, - styleCells; - - //create table element - this.htmlElement = document.createElement("table"); - self.mapElementStyles(this.table.element, this.htmlElement, ["border-top", "border-left", "border-right", "border-bottom"]); - - function generateSimpleHeaders() { - var headerEl = document.createElement("tr"); - - columns.forEach(function (column) { - var columnEl = document.createElement("th"); - columnEl.innerHTML = column.definition.title; - - self.mapElementStyles(column.getElement(), columnEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - headerEl.appendChild(columnEl); - }); - - self.mapElementStyles(self.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - self.htmlElement.appendChild(document.createElement("thead").appendChild(headerEl)); - } - - function generateHeaders(headers) { - - var headerHolderEl = document.createElement("thead"); - - headers.forEach(function (columns) { - var headerEl = document.createElement("tr"); - - columns.forEach(function (column) { - var columnEl = document.createElement("th"); - - if (column.width > 1) { - columnEl.colSpan = column.width; - } - - if (column.height > 1) { - columnEl.rowSpan = column.height; - } - - columnEl.innerHTML = column.title; - - self.mapElementStyles(column.element, columnEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - headerEl.appendChild(columnEl); - }); - - self.mapElementStyles(self.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - headerHolderEl.appendChild(headerEl); - }); - - self.htmlElement.appendChild(headerHolderEl); - } - - function parseColumnGroup(column, level) { - - if (typeof headers[level] === "undefined") { - headers[level] = []; - } - - headers[level].push({ - title: column.title, - width: column.width, - height: 1, - children: !!column.subGroups, - element: column.column.getElement() - }); - - if (column.subGroups) { - column.subGroups.forEach(function (subGroup) { - parseColumnGroup(subGroup, level + 1); - }); - } - } - - function padVerticalColumnheaders() { - headers.forEach(function (row, index) { - row.forEach(function (header) { - if (!header.children) { - header.height = headers.length - index; - } - }); - }); - } - - //create headers if needed - if (config.columnHeaders) { - if (config.columnHeaders == "groups") { - columns.forEach(function (column) { - parseColumnGroup(column, 0); - }); - - padVerticalColumnheaders(); - generateHeaders(headers); - } else { - generateSimpleHeaders(); - } - } - - columns = this.table.columnManager.columnsByIndex; - - //create table body - body = document.createElement("tbody"); - - //lookup row styles - if (window.getComputedStyle) { - oddRow = this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"); - evenRow = this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"); - firstRow = this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"); - firstGroup = this.table.element.getElementsByClassName("tabulator-group")[0]; - - if (firstRow) { - styleCells = firstRow.getElementsByClassName("tabulator-cell"); - firstCell = styleCells[0]; - lastCell = styleCells[styleCells.length - 1]; - } - } - - function processRows(rowArray) { - //add rows to table - rowArray.forEach(function (row, i) { - var rowEl = document.createElement("tr"), - rowData = row.getData("clipboard"), - styleRow = firstRow; - - columns.forEach(function (column, j) { - var cellEl = document.createElement("td"), - value = column.getFieldValue(rowData); - - switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - cellEl.innerHTML = value; - - if (column.definition.align) { - cellEl.style.textAlign = column.definition.align; - } - - if (j < columns.length - 1) { - if (firstCell) { - self.mapElementStyles(firstCell, cellEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); - } - } else { - if (firstCell) { - self.mapElementStyles(firstCell, cellEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); - } - } - - rowEl.appendChild(cellEl); - }); - - if (!(i % 2) && oddRow) { - styleRow = oddRow; - } - - if (i % 2 && evenRow) { - styleRow = evenRow; - } - - if (styleRow) { - self.mapElementStyles(styleRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); - } - - body.appendChild(rowEl); - }); - } - - function processGroup(group) { - var groupEl = document.createElement("tr"), - groupCellEl = document.createElement("td"); - - groupCellEl.colSpan = columns.length; - - groupCellEl.innerHTML = group.key; - - groupEl.appendChild(groupCellEl); - body.appendChild(groupEl); - - self.mapElementStyles(firstGroup, groupEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); - - if (group.subGroups) { - group.subGroups.forEach(function (subGroup) { - processGroup(subGroup); - }); - } else { - processRows(group.rows); - } - } - - if (config.rowGroups) { - rows.forEach(function (group) { - processGroup(group); - }); - } else { - processRows(rows); - } - - this.htmlElement.appendChild(body); -}; - -Clipboard.prototype.mapElementStyles = function (from, to, props) { - - var lookup = { - "background-color": "backgroundColor", - "color": "fontColor", - "font-weight": "fontWeight", - "font-family": "fontFamily", - "font-size": "fontSize", - "border-top": "borderTop", - "border-left": "borderLeft", - "border-right": "borderRight", - "border-bottom": "borderBottom" - }; - - if (window.getComputedStyle) { - var fromStyle = window.getComputedStyle(from); - - props.forEach(function (prop) { - to.style[lookup[prop]] = fromStyle.getPropertyValue(prop); - }); - } - - // return window.getComputedStyle ? window.getComputedStyle(element, null).getPropertyValue(property) : element.style[property.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); })]; -}; - -Clipboard.prototype.copySelectors = { - userSelection: function userSelection(config, params) { - return params; - }, - selected: function selected(config, params) { - var rows = []; - - if (this.table.modExists("selectRow", true)) { - rows = this.table.modules.selectRow.getSelectedRows(); - } - - if (config.rowGroups) { - console.warn("Clipboard Warning - select coptSelector does not support row groups"); - } - - return this.buildOutput(rows, config, params); - }, - table: function table(config, params) { - if (config.rowGroups) { - console.warn("Clipboard Warning - table coptSelector does not support row groups"); - } - - return this.buildOutput(this.table.rowManager.getComponents(), config, params); - }, - active: function active(config, params) { - var rows; - - if (config.rowGroups) { - rows = this.buildComplexRows(config); - } else { - rows = this.table.rowManager.getComponents(true); - } - - return this.buildOutput(rows, config, params); - } -}; - -Clipboard.prototype.copyFormatters = { - raw: function raw(data, params) { - return data; - }, - table: function table(data, params) { - var output = []; - - data.forEach(function (row) { - row.forEach(function (value) { - if (typeof value == "undefined") { - value = ""; - } - - value = typeof value == "undefined" || value === null ? "" : value.toString(); - - if (value.match(/\r|\n/)) { - value = value.split('"').join('""'); - value = '"' + value + '"'; - } - }); - - output.push(row.join("\t")); - }); - - return output.join("\n"); - } -}; - -Clipboard.prototype.pasteParsers = { - table: function table(clipboard) { - var data = [], - success = false, - headerFindSuccess = true, - columns = this.table.columnManager.columns, - columnMap = [], - rows = []; - - //get data from clipboard into array of columns and rows. - clipboard = clipboard.split("\n"); - - clipboard.forEach(function (row) { - data.push(row.split("\t")); - }); - - if (data.length && !(data.length === 1 && data[0].length < 2)) { - success = true; - - //check if headers are present by title - data[0].forEach(function (value) { - var column = columns.find(function (column) { - return value && column.definition.title && value.trim() && column.definition.title.trim() === value.trim(); - }); - - if (column) { - columnMap.push(column); - } else { - headerFindSuccess = false; - } - }); - - //check if column headers are present by field - if (!headerFindSuccess) { - headerFindSuccess = true; - columnMap = []; - - data[0].forEach(function (value) { - var column = columns.find(function (column) { - return value && column.field && value.trim() && column.field.trim() === value.trim(); - }); - - if (column) { - columnMap.push(column); - } else { - headerFindSuccess = false; - } - }); - - if (!headerFindSuccess) { - columnMap = this.table.columnManager.columnsByIndex; - } - } - - //remove header row if found - if (headerFindSuccess) { - data.shift(); - } - - data.forEach(function (item) { - var row = {}; - - item.forEach(function (value, i) { - if (columnMap[i]) { - row[columnMap[i].field] = value; - } - }); - - rows.push(row); - }); - - return rows; - } else { - return false; - } - } -}; - -Clipboard.prototype.pasteActions = { - replace: function replace(rows) { - return this.table.setData(rows); - }, - update: function update(rows) { - return this.table.updateOrAddData(rows); - }, - insert: function insert(rows) { - return this.table.addData(rows); - } -}; - -Tabulator.prototype.registerModule("clipboard", Clipboard); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/clipboard.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/clipboard.min.js deleted file mode 100644 index c96952168c..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/clipboard.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Clipboard=function(t){this.table=t,this.mode=!0,this.copySelector=!1,this.copySelectorParams={},this.copyFormatter=!1,this.copyFormatterParams={},this.pasteParser=function(){},this.pasteAction=function(){},this.htmlElement=!1,this.config={},this.blocked=!0};Clipboard.prototype.initialize=function(){var t=this;this.mode=this.table.options.clipboard,!0!==this.mode&&"copy"!==this.mode||this.table.element.addEventListener("copy",function(e){var o;t.processConfig(),t.blocked||(e.preventDefault(),o=t.generateContent(),window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",o):e.clipboardData&&e.clipboardData.setData?(e.clipboardData.setData("text/plain",o),t.htmlElement&&e.clipboardData.setData("text/html",t.htmlElement.outerHTML)):e.originalEvent&&e.originalEvent.clipboardData.setData&&(e.originalEvent.clipboardData.setData("text/plain",o),t.htmlElement&&e.originalEvent.clipboardData.setData("text/html",t.htmlElement.outerHTML)),t.table.options.clipboardCopied.call(this.table,o),t.reset())}),!0!==this.mode&&"paste"!==this.mode||this.table.element.addEventListener("paste",function(e){t.paste(e)}),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction)},Clipboard.prototype.processConfig=function(){var t={columnHeaders:"groups",rowGroups:!0};if(void 0!==this.table.options.clipboardCopyHeader&&(t.columnHeaders=this.table.options.clipboardCopyHeader,console.warn("DEPRECATION WANRING - clipboardCopyHeader option has been depricated, please use the columnHeaders property on the clipboardCopyConfig option")),this.table.options.clipboardCopyConfig)for(var e in this.table.options.clipboardCopyConfig)t[e]=this.table.options.clipboardCopyConfig[e];t.rowGroups&&this.table.options.groupBy&&this.table.modExists("groupRows")&&(this.config.rowGroups=!0),t.columnHeaders?"groups"!==t.columnHeaders&&!0!==t||this.table.columnManager.columns.length==this.table.columnManager.columnsByIndex.length?this.config.columnHeaders="columns":this.config.columnHeaders="groups":this.config.columnHeaders=!1},Clipboard.prototype.reset=function(){this.blocked=!1,this.originalSelectionText=""},Clipboard.prototype.setPasteAction=function(t){switch(void 0===t?"undefined":_typeof(t)){case"string":this.pasteAction=this.pasteActions[t],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",t);break;case"function":this.pasteAction=t}},Clipboard.prototype.setPasteParser=function(t){switch(void 0===t?"undefined":_typeof(t)){case"string":this.pasteParser=this.pasteParsers[t],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",t);break;case"function":this.pasteParser=t}},Clipboard.prototype.paste=function(t){var e,o,r;this.checkPaseOrigin(t)&&(e=this.getPasteData(t),o=this.pasteParser.call(this,e),o?(t.preventDefault(),this.table.modExists("mutator")&&(o=this.mutateData(o)),r=this.pasteAction.call(this,o),this.table.options.clipboardPasted.call(this.table,e,o,r)):this.table.options.clipboardPasteError.call(this.table,e))},Clipboard.prototype.mutateData=function(t){var e=this,o=[];return Array.isArray(t)?t.forEach(function(t){o.push(e.table.modules.mutator.transformRow(t,"clipboard"))}):o=t,o},Clipboard.prototype.checkPaseOrigin=function(t){var e=!0;return("DIV"!=t.target.tagName||this.table.modules.edit.currentCell)&&(e=!1),e},Clipboard.prototype.getPasteData=function(t){var e;return window.clipboardData&&window.clipboardData.getData?e=window.clipboardData.getData("Text"):t.clipboardData&&t.clipboardData.getData?e=t.clipboardData.getData("text/plain"):t.originalEvent&&t.originalEvent.clipboardData.getData&&(e=t.originalEvent.clipboardData.getData("text/plain")),e},Clipboard.prototype.copy=function(t,e,o,r,a){var n,i;this.blocked=!1,!0!==this.mode&&"copy"!==this.mode||(void 0!==window.getSelection&&void 0!==document.createRange?(n=document.createRange(),n.selectNodeContents(this.table.element),i=window.getSelection(),i.toString()&&a&&(t="userSelection",o="raw",e=i.toString()),i.removeAllRanges(),i.addRange(n)):void 0!==document.selection&&void 0!==document.body.createTextRange&&(textRange=document.body.createTextRange(),textRange.moveToElementText(this.table.element),textRange.select()),this.setSelector(t),this.copySelectorParams=void 0!==e&&null!=e?e:this.config.columnHeaders,this.setFormatter(o),this.copyFormatterParams=void 0!==r&&null!=r?r:{},document.execCommand("copy"),i&&i.removeAllRanges())},Clipboard.prototype.setSelector=function(t){switch(t=t||this.table.options.clipboardCopySelector,void 0===t?"undefined":_typeof(t)){case"string":this.copySelectors[t]?this.copySelector=this.copySelectors[t]:console.warn("Clipboard Error - No such selector found:",t);break;case"function":this.copySelector=t}},Clipboard.prototype.setFormatter=function(t){switch(t=t||this.table.options.clipboardCopyFormatter,void 0===t?"undefined":_typeof(t)){case"string":this.copyFormatters[t]?this.copyFormatter=this.copyFormatters[t]:console.warn("Clipboard Error - No such formatter found:",t);break;case"function":this.copyFormatter=t}},Clipboard.prototype.generateContent=function(){var t;return this.htmlElement=!1,t=this.copySelector.call(this,this.config,this.copySelectorParams),this.copyFormatter.call(this,t,this.config,this.copyFormatterParams)},Clipboard.prototype.generateSimpleHeaders=function(t){var e=[];return t.forEach(function(t){e.push(t.definition.title)}),e},Clipboard.prototype.generateColumnGroupHeaders=function(t){var e=this,o=[];return this.table.columnManager.columns.forEach(function(t){var r=e.processColumnGroup(t);r&&o.push(r)}),o},Clipboard.prototype.processColumnGroup=function(t){var e=this,o=t.columns,r={type:"group",title:t.definition.title,column:t};if(o.length){if(r.subGroups=[],r.width=0,o.forEach(function(t){var o=e.processColumnGroup(t);o&&(r.width+=o.width,r.subGroups.push(o))}),!r.width)return!1}else{if(!t.field||!t.visible)return!1;r.width=1}return r},Clipboard.prototype.groupHeadersToRows=function(t){function e(t,a){void 0===r[a]&&(r[a]=[]),r[a].push(t.title),t.subGroups?t.subGroups.forEach(function(t){e(t,a+1)}):o()}function o(){var t=0;r.forEach(function(e){var o=e.length;o>t&&(t=o)}),r.forEach(function(e){var o=e.length;if(o1&&(e.colSpan=t.width),t.height>1&&(e.rowSpan=t.height),e.innerHTML=t.title,b.mapElementStyles(t.element,e,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),o.appendChild(e)}),b.mapElementStyles(b.table.columnManager.getHeadersElement(),o,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.appendChild(o)}),b.htmlElement.appendChild(e)}(f)):function(){var t=document.createElement("tr");e.forEach(function(e){var o=document.createElement("th");o.innerHTML=e.definition.title,b.mapElementStyles(e.getElement(),o,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),t.appendChild(o)}),b.mapElementStyles(b.table.columnManager.getHeadersElement(),t,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),b.htmlElement.appendChild(document.createElement("thead").appendChild(t))}()),e=this.table.columnManager.columnsByIndex,l=document.createElement("tbody"),window.getComputedStyle&&(s=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),c=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),p=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),d=this.table.element.getElementsByClassName("tabulator-group")[0],p&&(h=p.getElementsByClassName("tabulator-cell"),u=h[0],h[h.length-1])),o.rowGroups?t.forEach(function(t){i(t)}):n(t),this.htmlElement.appendChild(l)},Clipboard.prototype.mapElementStyles=function(t,e,o){var r={"background-color":"backgroundColor",color:"fontColor","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom"};if(window.getComputedStyle){var a=window.getComputedStyle(t);o.forEach(function(t){e.style[r[t]]=a.getPropertyValue(t)})}},Clipboard.prototype.copySelectors={userSelection:function(t,e){return e},selected:function(t,e){var o=[];return this.table.modExists("selectRow",!0)&&(o=this.table.modules.selectRow.getSelectedRows()),t.rowGroups&&console.warn("Clipboard Warning - select coptSelector does not support row groups"),this.buildOutput(o,t,e)},table:function(t,e){return t.rowGroups&&console.warn("Clipboard Warning - table coptSelector does not support row groups"),this.buildOutput(this.table.rowManager.getComponents(),t,e)},active:function(t,e){var o;return o=t.rowGroups?this.buildComplexRows(t):this.table.rowManager.getComponents(!0),this.buildOutput(o,t,e)}},Clipboard.prototype.copyFormatters={raw:function(t,e){return t},table:function(t,e){var o=[];return t.forEach(function(t){t.forEach(function(t){void 0===t&&(t=""),t=void 0===t||null===t?"":t.toString(),t.match(/\r|\n/)&&(t=t.split('"').join('""'),t='"'+t+'"')}),o.push(t.join("\t"))}),o.join("\n")}},Clipboard.prototype.pasteParsers={table:function(t){var e=[],o=!0,r=this.table.columnManager.columns,a=[],n=[];return t=t.split("\n"),t.forEach(function(t){e.push(t.split("\t"))}),!(!e.length||1===e.length&&e[0].length<2)&&(!0,e[0].forEach(function(t){var e=r.find(function(e){return t&&e.definition.title&&t.trim()&&e.definition.title.trim()===t.trim()});e?a.push(e):o=!1}),o||(o=!0,a=[],e[0].forEach(function(t){var e=r.find(function(e){return t&&e.field&&t.trim()&&e.field.trim()===t.trim()});e?a.push(e):o=!1}),o||(a=this.table.columnManager.columnsByIndex)),o&&e.shift(),e.forEach(function(t){var e={};t.forEach(function(t,o){a[o]&&(e[a[o].field]=t)}),n.push(e)}),n)}},Clipboard.prototype.pasteActions={replace:function(t){return this.table.setData(t)},update:function(t){return this.table.updateOrAddData(t)},insert:function(t){return this.table.addData(t)}},Tabulator.prototype.registerModule("clipboard",Clipboard); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/data_tree.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/data_tree.js deleted file mode 100644 index c65efe312f..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/data_tree.js +++ /dev/null @@ -1,301 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var DataTree = function DataTree(table) { - this.table = table; - this.indent = 10; - this.field = ""; - this.collapseEl = null; - this.expandEl = null; - this.branchEl = null; - - this.startOpen = function () {}; - - this.displayIndex = 0; -}; - -DataTree.prototype.initialize = function () { - var dummyEl = null, - options = this.table.options; - - this.field = options.dataTreeChildField; - this.indent = options.dataTreeChildIndent; - - if (options.dataTreeBranchElement) { - - if (options.dataTreeBranchElement === true) { - this.branchEl = document.createElement("div"); - this.branchEl.classList.add("tabulator-data-tree-branch"); - } else { - if (typeof options.dataTreeBranchElement === "string") { - dummyEl = document.createElement("div"); - dummyEl.innerHTML = options.dataTreeBranchElement; - this.branchEl = dummyEl.firstChild; - } else { - this.branchEl = options.dataTreeBranchElement; - } - } - } - - if (options.dataTreeCollapseElement) { - if (typeof options.dataTreeCollapseElement === "string") { - dummyEl = document.createElement("div"); - dummyEl.innerHTML = options.dataTreeCollapseElement; - this.collapseEl = dummyEl.firstChild; - } else { - this.collapseEl = options.dataTreeCollapseElement; - } - } else { - this.collapseEl = document.createElement("div"); - this.collapseEl.classList.add("tabulator-data-tree-control"); - this.collapseEl.innerHTML = "
"; - } - - if (options.dataTreeExpandElement) { - if (typeof options.dataTreeExpandElement === "string") { - dummyEl = document.createElement("div"); - dummyEl.innerHTML = options.dataTreeExpandElement; - this.expandEl = dummyEl.firstChild; - } else { - this.expandEl = options.dataTreeExpandElement; - } - } else { - this.expandEl = document.createElement("div"); - this.expandEl.classList.add("tabulator-data-tree-control"); - this.expandEl.innerHTML = "
"; - } - - switch (_typeof(options.dataTreeStartExpanded)) { - case "boolean": - this.startOpen = function (row, index) { - return options.dataTreeStartExpanded; - }; - break; - - case "function": - this.startOpen = options.dataTreeStartExpanded; - break; - - default: - this.startOpen = function (row, index) { - return options.dataTreeStartExpanded[index]; - }; - break; - } -}; - -DataTree.prototype.initializeRow = function (row) { - - var children = typeof row.getData()[this.field] !== "undefined"; - - row.modules.dataTree = { - index: 0, - open: children ? this.startOpen(row.getComponent(), 0) : false, - controlEl: false, - branchEl: false, - parent: false, - children: children - }; -}; - -DataTree.prototype.layoutRow = function (row) { - var cell = row.getCells()[0], - el = cell.getElement(), - config = row.modules.dataTree; - - el.style.paddingLeft = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-left')) + config.index * this.indent + "px"; - - if (config.branchEl) { - config.branchEl.parentNode.removeChild(config.branchEl); - } - - this.generateControlElement(row, el); - - if (config.index && this.branchEl) { - config.branchEl = this.branchEl.cloneNode(true); - el.insertBefore(config.branchEl, el.firstChild); - el.style.paddingLeft = parseInt(el.style.paddingLeft) + (config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1) + "px"; - } -}; - -DataTree.prototype.generateControlElement = function (row, el) { - var _this = this; - - var config = row.modules.dataTree, - el = el || row.getCells()[0].getElement(), - oldControl = config.controlEl; - - if (config.children !== false) { - - if (config.open) { - config.controlEl = this.collapseEl.cloneNode(true); - config.controlEl.addEventListener("click", function (e) { - e.stopPropagation(); - _this.collapseRow(row); - }); - } else { - config.controlEl = this.expandEl.cloneNode(true); - config.controlEl.addEventListener("click", function (e) { - e.stopPropagation(); - _this.expandRow(row); - }); - } - - config.controlEl.addEventListener("mousedown", function (e) { - e.stopPropagation(); - }); - - if (oldControl && oldControl.parentNode === el) { - oldControl.parentNode.replaceChild(config.controlEl, oldControl); - } else { - el.insertBefore(config.controlEl, el.firstChild); - } - } -}; - -DataTree.prototype.setDisplayIndex = function (index) { - this.displayIndex = index; -}; - -DataTree.prototype.getDisplayIndex = function () { - return this.displayIndex; -}; - -DataTree.prototype.getRows = function (rows) { - var _this2 = this; - - var output = []; - - rows.forEach(function (row, i) { - var config = row.modules.dataTree.children, - children; - - output.push(row); - - if (!config.index && config.children !== false) { - children = _this2.getChildren(row); - - children.forEach(function (child) { - output.push(child); - }); - } - }); - - return output; -}; - -DataTree.prototype.getChildren = function (row) { - var _this3 = this; - - var config = row.modules.dataTree, - output = []; - - if (config.children !== false && config.open) { - if (!Array.isArray(config.children)) { - config.children = this.generateChildren(row); - } - - config.children.forEach(function (child) { - output.push(child); - - var subChildren = _this3.getChildren(child); - - subChildren.forEach(function (sub) { - output.push(sub); - }); - }); - } - - return output; -}; - -DataTree.prototype.generateChildren = function (row) { - var _this4 = this; - - var children = []; - - row.getData()[this.field].forEach(function (childData) { - var childRow = new Row(childData || {}, _this4.table.rowManager); - childRow.modules.dataTree.index = row.modules.dataTree.index + 1; - childRow.modules.dataTree.parent = row; - childRow.modules.dataTree.open = _this4.startOpen(row, childRow.modules.dataTree.index); - children.push(childRow); - }); - - return children; -}; - -DataTree.prototype.expandRow = function (row, silent) { - var config = row.modules.dataTree; - - if (config.children !== false) { - config.open = true; - - row.reinitialize(); - - this.table.rowManager.refreshActiveData("tree", false, true); - - this.table.options.dataTreeRowExpanded(row.getComponent(), row.modules.dataTree.index); - } -}; - -DataTree.prototype.collapseRow = function (row) { - var config = row.modules.dataTree; - - if (config.children !== false) { - config.open = false; - - row.reinitialize(); - - this.table.rowManager.refreshActiveData("tree", false, true); - - this.table.options.dataTreeRowCollapsed(row.getComponent(), row.modules.dataTree.index); - } -}; - -DataTree.prototype.toggleRow = function (row) { - var config = row.modules.dataTree; - - if (config.children !== false) { - if (config.open) { - this.collapseRow(row); - } else { - this.expandRow(row); - } - } -}; - -DataTree.prototype.getTreeParent = function (row) { - return row.modules.dataTree.parent ? row.modules.dataTree.parent.getComponent() : false; -}; - -DataTree.prototype.getTreeChildren = function (row) { - var config = row.modules.dataTree, - output = []; - - if (config.children) { - - if (!Array.isArray(config.children)) { - config.children = this.generateChildren(row); - } - - config.children.forEach(function (childRow) { - if (childRow instanceof Row) { - output.push(childRow.getComponent()); - } - }); - } - - return output; -}; - -DataTree.prototype.checkForRestyle = function (cell) { - if (!cell.row.cells.indexOf(cell)) { - if (cell.row.modules.dataTree.children !== false) { - cell.row.reinitialize(); - } - } -}; - -Tabulator.prototype.registerModule("dataTree", DataTree); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/data_tree.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/data_tree.min.js deleted file mode 100644 index 0cb62526c9..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/data_tree.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},DataTree=function(e){this.table=e,this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.startOpen=function(){},this.displayIndex=0};DataTree.prototype.initialize=function(){var e=null,t=this.table.options;switch(this.field=t.dataTreeChildField,this.indent=t.dataTreeChildIndent,t.dataTreeBranchElement&&(!0===t.dataTreeBranchElement?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):"string"==typeof t.dataTreeBranchElement?(e=document.createElement("div"),e.innerHTML=t.dataTreeBranchElement,this.branchEl=e.firstChild):this.branchEl=t.dataTreeBranchElement),t.dataTreeCollapseElement?"string"==typeof t.dataTreeCollapseElement?(e=document.createElement("div"),e.innerHTML=t.dataTreeCollapseElement,this.collapseEl=e.firstChild):this.collapseEl=t.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.innerHTML="
"),t.dataTreeExpandElement?"string"==typeof t.dataTreeExpandElement?(e=document.createElement("div"),e.innerHTML=t.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=t.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.innerHTML="
"),_typeof(t.dataTreeStartExpanded)){case"boolean":this.startOpen=function(e,a){return t.dataTreeStartExpanded};break;case"function":this.startOpen=t.dataTreeStartExpanded;break;default:this.startOpen=function(e,a){return t.dataTreeStartExpanded[a]}}},DataTree.prototype.initializeRow=function(e){var t=void 0!==e.getData()[this.field];e.modules.dataTree={index:0,open:!!t&&this.startOpen(e.getComponent(),0),controlEl:!1,branchEl:!1,parent:!1,children:t}},DataTree.prototype.layoutRow=function(e){var t=e.getCells()[0],a=t.getElement(),n=e.modules.dataTree;a.style.paddingLeft=parseInt(window.getComputedStyle(a,null).getPropertyValue("padding-left"))+n.index*this.indent+"px",n.branchEl&&n.branchEl.parentNode.removeChild(n.branchEl),this.generateControlElement(e,a),n.index&&this.branchEl&&(n.branchEl=this.branchEl.cloneNode(!0),a.insertBefore(n.branchEl,a.firstChild),a.style.paddingLeft=parseInt(a.style.paddingLeft)+(n.branchEl.offsetWidth+n.branchEl.style.marginRight)*(n.index-1)+"px")},DataTree.prototype.generateControlElement=function(e,t){var a=this,n=e.modules.dataTree,t=t||e.getCells()[0].getElement(),r=n.controlEl;!1!==n.children&&(n.open?(n.controlEl=this.collapseEl.cloneNode(!0),n.controlEl.addEventListener("click",function(t){t.stopPropagation(),a.collapseRow(e)})):(n.controlEl=this.expandEl.cloneNode(!0),n.controlEl.addEventListener("click",function(t){t.stopPropagation(),a.expandRow(e)})),n.controlEl.addEventListener("mousedown",function(e){e.stopPropagation()}),r&&r.parentNode===t?r.parentNode.replaceChild(n.controlEl,r):t.insertBefore(n.controlEl,t.firstChild))},DataTree.prototype.setDisplayIndex=function(e){this.displayIndex=e},DataTree.prototype.getDisplayIndex=function(){return this.displayIndex},DataTree.prototype.getRows=function(e){var t=this,a=[];return e.forEach(function(e,n){var r,o=e.modules.dataTree.children;a.push(e),o.index||!1===o.children||(r=t.getChildren(e),r.forEach(function(e){a.push(e)}))}),a},DataTree.prototype.getChildren=function(e){var t=this,a=e.modules.dataTree,n=[];return!1!==a.children&&a.open&&(Array.isArray(a.children)||(a.children=this.generateChildren(e)),a.children.forEach(function(e){n.push(e),t.getChildren(e).forEach(function(e){n.push(e)})})),n},DataTree.prototype.generateChildren=function(e){var t=this,a=[];return e.getData()[this.field].forEach(function(n){var r=new Row(n||{},t.table.rowManager);r.modules.dataTree.index=e.modules.dataTree.index+1,r.modules.dataTree.parent=e,r.modules.dataTree.open=t.startOpen(e,r.modules.dataTree.index),a.push(r)}),a},DataTree.prototype.expandRow=function(e,t){var a=e.modules.dataTree;!1!==a.children&&(a.open=!0,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowExpanded(e.getComponent(),e.modules.dataTree.index))},DataTree.prototype.collapseRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open=!1,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowCollapsed(e.getComponent(),e.modules.dataTree.index))},DataTree.prototype.toggleRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open?this.collapseRow(e):this.expandRow(e))},DataTree.prototype.getTreeParent=function(e){return!!e.modules.dataTree.parent&&e.modules.dataTree.parent.getComponent()},DataTree.prototype.getTreeChildren=function(e){var t=e.modules.dataTree,a=[];return t.children&&(Array.isArray(t.children)||(t.children=this.generateChildren(e)),t.children.forEach(function(e){e instanceof Row&&a.push(e.getComponent())})),a},DataTree.prototype.checkForRestyle=function(e){e.row.cells.indexOf(e)||!1!==e.row.modules.dataTree.children&&e.row.reinitialize()},Tabulator.prototype.registerModule("dataTree",DataTree); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/download.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/download.js deleted file mode 100644 index f8af88236a..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/download.js +++ /dev/null @@ -1,736 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var Download = function Download(table) { - this.table = table; //hold Tabulator object - this.fields = {}; //hold filed multi dimension arrays - this.columnsByIndex = []; //hold columns in their order in the table - this.columnsByField = {}; //hold columns with lookup by field name - this.config = {}; -}; - -//trigger file download -Download.prototype.download = function (type, filename, options, interceptCallback) { - var self = this, - downloadFunc = false; - this.processConfig(); - - function buildLink(data, mime) { - if (interceptCallback) { - interceptCallback(data); - } else { - self.triggerDownload(data, mime, type, filename); - } - } - - if (typeof type == "function") { - downloadFunc = type; - } else { - if (self.downloaders[type]) { - downloadFunc = self.downloaders[type]; - } else { - console.warn("Download Error - No such download type found: ", type); - } - } - - this.processColumns(); - - if (downloadFunc) { - downloadFunc.call(this, self.processDefinitions(), self.processData(), options || {}, buildLink, this.config); - } -}; - -Download.prototype.processConfig = function () { - var config = { //download config - columnGroups: true, - rowGroups: true - }; - - if (this.table.options.downloadConfig) { - for (var key in this.table.options.downloadConfig) { - config[key] = this.table.options.downloadConfig[key]; - } - } - - if (config.rowGroups && this.table.options.groupBy && this.table.modExists("groupRows")) { - this.config.rowGroups = true; - } - - if (config.columnGroups && this.table.columnManager.columns.length != this.table.columnManager.columnsByIndex.length) { - this.config.columnGroups = true; - } -}; - -Download.prototype.processColumns = function () { - var self = this; - - self.columnsByIndex = []; - self.columnsByField = {}; - - self.table.columnManager.columnsByIndex.forEach(function (column) { - - if (column.field && column.visible && column.definition.download !== false) { - self.columnsByIndex.push(column); - self.columnsByField[column.field] = column; - } - }); -}; - -Download.prototype.processDefinitions = function () { - var self = this, - processedDefinitions = []; - - if (this.config.columnGroups) { - self.table.columnManager.columns.forEach(function (column) { - var colData = self.processColumnGroup(column); - - if (colData) { - processedDefinitions.push(colData); - } - }); - } else { - self.columnsByIndex.forEach(function (column) { - if (column.download !== false) { - //isolate definiton from defintion object - processedDefinitions.push(self.processDefinition(column)); - } - }); - } - - return processedDefinitions; -}; - -Download.prototype.processColumnGroup = function (column) { - var _this = this; - - var subGroups = column.columns; - - var groupData = { - type: "group", - title: column.definition.title - }; - - if (subGroups.length) { - groupData.subGroups = []; - groupData.width = 0; - - subGroups.forEach(function (subGroup) { - var subGroupData = _this.processColumnGroup(subGroup); - - if (subGroupData) { - groupData.width += subGroupData.width; - groupData.subGroups.push(subGroupData); - } - }); - - if (!groupData.width) { - return false; - } - } else { - if (column.field && column.visible && column.definition.download !== false) { - groupData.width = 1; - groupData.definition = this.processDefinition(column); - } else { - return false; - } - } - - return groupData; -}; - -Download.prototype.processDefinition = function (column) { - var def = {}; - - for (var key in column.definition) { - def[key] = column.definition[key]; - } - - if (typeof column.definition.downloadTitle != "undefined") { - def.title = column.definition.downloadTitle; - } - - return def; -}; - -Download.prototype.processData = function () { - var _this2 = this; - - var self = this, - data = [], - groups = []; - - if (this.config.rowGroups) { - groups = this.table.modules.groupRows.getGroups(); - - groups.forEach(function (group) { - data.push(_this2.processGroupData(group)); - }); - } else { - data = self.table.rowManager.getData(true, "download"); - } - - //bulk data processing - if (typeof self.table.options.downloadDataFormatter == "function") { - data = self.table.options.downloadDataFormatter(data); - } - - return data; -}; - -Download.prototype.processGroupData = function (group) { - var _this3 = this; - - var subGroups = group.getSubGroups(); - - var groupData = { - type: "group", - key: group.key - }; - - if (subGroups.length) { - groupData.subGroups = []; - - subGroups.forEach(function (subGroup) { - groupData.subGroups.push(_this3.processGroupData(subGroup)); - }); - } else { - groupData.rows = group.getData(true, "download"); - } - - return groupData; -}; - -Download.prototype.triggerDownload = function (data, mime, type, filename) { - var element = document.createElement('a'), - blob = new Blob([data], { type: mime }), - filename = filename || "Tabulator." + (typeof type === "function" ? "txt" : type); - - blob = this.table.options.downloadReady.call(this.table, data, blob); - - if (blob) { - - if (navigator.msSaveOrOpenBlob) { - navigator.msSaveOrOpenBlob(blob, filename); - } else { - element.setAttribute('href', window.URL.createObjectURL(blob)); - - //set file title - element.setAttribute('download', filename); - - //trigger download - element.style.display = 'none'; - document.body.appendChild(element); - element.click(); - - //remove temporary link element - document.body.removeChild(element); - } - - if (this.table.options.downloadComplete) { - this.table.options.downloadComplete(); - } - } -}; - -//nested field lookup -Download.prototype.getFieldValue = function (field, data) { - var column = this.columnsByField[field]; - - if (column) { - return column.getFieldValue(data); - } - - return false; -}; - -Download.prototype.commsReceived = function (table, action, data) { - switch (action) { - case "intercept": - this.download(data.type, "", data.options, data.intercept); - break; - } -}; - -//downloaders -Download.prototype.downloaders = { - csv: function csv(columns, data, options, setFileContents, config) { - var self = this, - titles = [], - fields = [], - delimiter = options && options.delimiter ? options.delimiter : ",", - fileContents; - - //build column headers - function parseSimpleTitles() { - columns.forEach(function (column) { - titles.push('"' + String(column.title).split('"').join('""') + '"'); - fields.push(column.field); - }); - } - - function parseColumnGroup(column, level) { - if (column.subGroups) { - column.subGroups.forEach(function (subGroup) { - parseColumnGroup(subGroup, level + 1); - }); - } else { - titles.push('"' + String(column.title).split('"').join('""') + '"'); - fields.push(column.definition.field); - } - } - - if (config.columnGroups) { - console.warn("Download Warning - CSV downloader cannot process column groups"); - - columns.forEach(function (column) { - parseColumnGroup(column, 0); - }); - } else { - parseSimpleTitles(); - } - - //generate header row - fileContents = [titles.join(delimiter)]; - - function parseRows(data) { - //generate each row of the table - data.forEach(function (row) { - var rowData = []; - - fields.forEach(function (field) { - var value = self.getFieldValue(field, row); - - switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - //escape quotation marks - rowData.push('"' + String(value).split('"').join('""') + '"'); - }); - - fileContents.push(rowData.join(delimiter)); - }); - } - - function parseGroup(group) { - if (group.subGroups) { - group.subGroups.forEach(function (subGroup) { - parseGroup(subGroup); - }); - } else { - parseRows(group.rows); - } - } - - if (config.rowGroups) { - console.warn("Download Warning - CSV downloader cannot process row groups"); - - data.forEach(function (group) { - parseGroup(group); - }); - } else { - parseRows(data); - } - - setFileContents(fileContents.join("\n"), "text/csv"); - }, - - json: function json(columns, data, options, setFileContents, config) { - var fileContents = JSON.stringify(data, null, '\t'); - - setFileContents(fileContents, "application/json"); - }, - - pdf: function pdf(columns, data, options, setFileContents, config) { - var self = this, - fields = [], - header = [], - body = [], - table = "", - groupRowIndexs = [], - autoTableParams = {}, - rowGroupStyles = {}, - jsPDFParams = options.jsPDF || {}, - title = options && options.title ? options.title : ""; - - if (!jsPDFParams.orientation) { - jsPDFParams.orientation = options.orientation || "landscape"; - } - - if (!jsPDFParams.unit) { - jsPDFParams.unit = "pt"; - } - - //build column headers - function parseSimpleTitles() { - columns.forEach(function (column) { - if (column.field) { - header.push(column.title || ""); - fields.push(column.field); - } - }); - } - - function parseColumnGroup(column, level) { - if (column.subGroups) { - column.subGroups.forEach(function (subGroup) { - parseColumnGroup(subGroup, level + 1); - }); - } else { - header.push(column.title || ""); - fields.push(column.definition.field); - } - } - - if (config.columnGroups) { - console.warn("Download Warning - PDF downloader cannot process column groups"); - - columns.forEach(function (column) { - parseColumnGroup(column, 0); - }); - } else { - parseSimpleTitles(); - } - - function parseValue(value) { - switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - return value; - } - - function parseRows(data) { - //build table rows - data.forEach(function (row) { - var rowData = []; - - fields.forEach(function (field) { - var value = self.getFieldValue(field, row); - rowData.push(parseValue(value)); - }); - - body.push(rowData); - }); - } - - function parseGroup(group) { - var groupData = []; - - groupData.push(parseValue(group.key)); - - groupRowIndexs.push(body.length); - - body.push(groupData); - - if (group.subGroups) { - group.subGroups.forEach(function (subGroup) { - parseGroup(subGroup); - }); - } else { - parseRows(group.rows); - } - } - - if (config.rowGroups) { - data.forEach(function (group) { - parseGroup(group); - }); - } else { - parseRows(data); - } - - var doc = new jsPDF(jsPDFParams); //set document to landscape, better for most tables - - if (options && options.autoTable) { - if (typeof options.autoTable === "function") { - autoTableParams = options.autoTable(doc) || {}; - } else { - autoTableParams = options.autoTable; - } - } - - if (config.rowGroups) { - var createdCell = function createdCell(cell, data) { - if (groupRowIndexs.indexOf(data.row.index) > -1) { - for (var key in rowGroupStyles) { - cell.styles[key] = rowGroupStyles[key]; - } - } - }; - - rowGroupStyles = options.rowGroupStyles || { - fontStyle: "bold", - fontSize: 12, - cellPadding: 6, - fillColor: 220 - }; - - if (!autoTableParams.createdCell) { - autoTableParams.createdCell = createdCell; - } else { - var createdCellHolder = autoTableParams.createdCell; - - autoTableParams.createdCell = function (cell, data) { - createdCell(cell, data); - createdCellHolder(cell, data); - }; - } - } - - if (title) { - autoTableParams.addPageContent = function (data) { - doc.text(title, 40, 30); - }; - } - - doc.autoTable(header, body, autoTableParams); - - setFileContents(doc.output("arraybuffer"), "application/pdf"); - }, - - xlsx: function xlsx(columns, data, options, setFileContents, config) { - var self = this, - sheetName = options.sheetName || "Sheet1", - workbook = { SheetNames: [], Sheets: {} }, - groupRowIndexs = [], - groupColumnIndexs = [], - output; - - function generateSheet() { - var titles = [], - fields = [], - rows = [], - worksheet; - - //convert rows to worksheet - function rowsToSheet() { - var sheet = {}; - var range = { s: { c: 0, r: 0 }, e: { c: fields.length, r: rows.length } }; - - XLSX.utils.sheet_add_aoa(sheet, rows); - - sheet['!ref'] = XLSX.utils.encode_range(range); - - var merges = generateMerges(); - - if (merges.length) { - sheet["!merges"] = merges; - } - - return sheet; - } - - function parseSimpleTitles() { - //get field lists - columns.forEach(function (column) { - titles.push(column.title); - fields.push(column.field); - }); - - rows.push(titles); - } - - function parseColumnGroup(column, level) { - - if (typeof titles[level] === "undefined") { - titles[level] = []; - } - - if (typeof groupColumnIndexs[level] === "undefined") { - groupColumnIndexs[level] = []; - } - - if (column.width > 1) { - - groupColumnIndexs[level].push({ - type: "hoz", - start: titles[level].length, - end: titles[level].length + column.width - 1 - }); - } - - titles[level].push(column.title); - - if (column.subGroups) { - column.subGroups.forEach(function (subGroup) { - parseColumnGroup(subGroup, level + 1); - }); - } else { - fields.push(column.definition.field); - padColumnTitles(fields.length - 1, level); - - groupColumnIndexs[level].push({ - type: "vert", - start: fields.length - 1 - }); - } - } - - function padColumnTitles() { - var max = 0; - - titles.forEach(function (title) { - var len = title.length; - if (len > max) { - max = len; - } - }); - - titles.forEach(function (title) { - var len = title.length; - if (len < max) { - for (var i = len; i < max; i++) { - title.push(""); - } - } - }); - } - - if (config.columnGroups) { - columns.forEach(function (column) { - parseColumnGroup(column, 0); - }); - - titles.forEach(function (title) { - rows.push(title); - }); - } else { - parseSimpleTitles(); - } - - function generateMerges() { - var output = []; - - groupRowIndexs.forEach(function (index) { - output.push({ s: { r: index, c: 0 }, e: { r: index, c: fields.length - 1 } }); - }); - - groupColumnIndexs.forEach(function (merges, level) { - merges.forEach(function (merge) { - if (merge.type === "hoz") { - output.push({ s: { r: level, c: merge.start }, e: { r: level, c: merge.end } }); - } else { - if (level != titles.length - 1) { - output.push({ s: { r: level, c: merge.start }, e: { r: titles.length - 1, c: merge.start } }); - } - } - }); - }); - - return output; - } - - //generate each row of the table - function parseRows(data) { - data.forEach(function (row) { - var rowData = []; - - fields.forEach(function (field) { - var value = self.getFieldValue(field, row); - - rowData.push((typeof value === "undefined" ? "undefined" : _typeof(value)) === "object" ? JSON.stringify(value) : value); - }); - - rows.push(rowData); - }); - } - - function parseGroup(group) { - var groupData = []; - - groupData.push(group.key); - - groupRowIndexs.push(rows.length); - - rows.push(groupData); - - if (group.subGroups) { - group.subGroups.forEach(function (subGroup) { - parseGroup(subGroup); - }); - } else { - parseRows(group.rows); - } - } - - if (config.rowGroups) { - data.forEach(function (group) { - parseGroup(group); - }); - } else { - parseRows(data); - } - - worksheet = rowsToSheet(); - - return worksheet; - } - - if (options.sheetOnly) { - setFileContents(generateSheet()); - return; - } - - if (options.sheets) { - for (var sheet in options.sheets) { - - if (options.sheets[sheet] === true) { - workbook.SheetNames.push(sheet); - workbook.Sheets[sheet] = generateSheet(); - } else { - - workbook.SheetNames.push(sheet); - - this.table.modules.comms.send(options.sheets[sheet], "download", "intercept", { - type: "xlsx", - options: { sheetOnly: true }, - intercept: function intercept(data) { - workbook.Sheets[sheet] = data; - } - }); - } - } - } else { - workbook.SheetNames.push(sheetName); - workbook.Sheets[sheetName] = generateSheet(); - } - - //convert workbook to binary array - function s2ab(s) { - var buf = new ArrayBuffer(s.length); - var view = new Uint8Array(buf); - for (var i = 0; i != s.length; ++i) { - view[i] = s.charCodeAt(i) & 0xFF; - }return buf; - } - - output = XLSX.write(workbook, { bookType: 'xlsx', bookSST: true, type: 'binary' }); - - setFileContents(s2ab(output), "application/octet-stream"); - } - -}; - -Tabulator.prototype.registerModule("download", Download); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/download.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/download.min.js deleted file mode 100644 index 3c10e672b4..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/download.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Download=function(o){this.table=o,this.fields={},this.columnsByIndex=[],this.columnsByField={},this.config={}};Download.prototype.download=function(o,n,t,e){function i(t,i){e?e(t):r.triggerDownload(t,i,o,n)}var r=this,s=!1;this.processConfig(),"function"==typeof o?s=o:r.downloaders[o]?s=r.downloaders[o]:console.warn("Download Error - No such download type found: ",o),this.processColumns(),s&&s.call(this,r.processDefinitions(),r.processData(),t||{},i,this.config)},Download.prototype.processConfig=function(){var o={columnGroups:!0,rowGroups:!0};if(this.table.options.downloadConfig)for(var n in this.table.options.downloadConfig)o[n]=this.table.options.downloadConfig[n];o.rowGroups&&this.table.options.groupBy&&this.table.modExists("groupRows")&&(this.config.rowGroups=!0),o.columnGroups&&this.table.columnManager.columns.length!=this.table.columnManager.columnsByIndex.length&&(this.config.columnGroups=!0)},Download.prototype.processColumns=function(){var o=this;o.columnsByIndex=[],o.columnsByField={},o.table.columnManager.columnsByIndex.forEach(function(n){n.field&&n.visible&&!1!==n.definition.download&&(o.columnsByIndex.push(n),o.columnsByField[n.field]=n)})},Download.prototype.processDefinitions=function(){var o=this,n=[];return this.config.columnGroups?o.table.columnManager.columns.forEach(function(t){var e=o.processColumnGroup(t);e&&n.push(e)}):o.columnsByIndex.forEach(function(t){!1!==t.download&&n.push(o.processDefinition(t))}),n},Download.prototype.processColumnGroup=function(o){var n=this,t=o.columns,e={type:"group",title:o.definition.title};if(t.length){if(e.subGroups=[],e.width=0,t.forEach(function(o){var t=n.processColumnGroup(o);t&&(e.width+=t.width,e.subGroups.push(t))}),!e.width)return!1}else{if(!o.field||!o.visible||!1===o.definition.download)return!1;e.width=1,e.definition=this.processDefinition(o)}return e},Download.prototype.processDefinition=function(o){var n={};for(var t in o.definition)n[t]=o.definition[t];return void 0!==o.definition.downloadTitle&&(n.title=o.definition.downloadTitle),n},Download.prototype.processData=function(){var o=this,n=this,t=[],e=[];return this.config.rowGroups?(e=this.table.modules.groupRows.getGroups(),e.forEach(function(n){t.push(o.processGroupData(n))})):t=n.table.rowManager.getData(!0,"download"),"function"==typeof n.table.options.downloadDataFormatter&&(t=n.table.options.downloadDataFormatter(t)),t},Download.prototype.processGroupData=function(o){var n=this,t=o.getSubGroups(),e={type:"group",key:o.key};return t.length?(e.subGroups=[],t.forEach(function(o){e.subGroups.push(n.processGroupData(o))})):e.rows=o.getData(!0,"download"),e},Download.prototype.triggerDownload=function(o,n,t,e){var i=document.createElement("a"),r=new Blob([o],{type:n}),e=e||"Tabulator."+("function"==typeof t?"txt":t);(r=this.table.options.downloadReady.call(this.table,o,r))&&(navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(r,e):(i.setAttribute("href",window.URL.createObjectURL(r)),i.setAttribute("download",e),i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)),this.table.options.downloadComplete&&this.table.options.downloadComplete())},Download.prototype.getFieldValue=function(o,n){var t=this.columnsByField[o];return!!t&&t.getFieldValue(n)},Download.prototype.commsReceived=function(o,n,t){switch(n){case"intercept":this.download(t.type,"",t.options,t.intercept)}},Download.prototype.downloaders={csv:function(o,n,t,e,i){function r(o,n){o.subGroups?o.subGroups.forEach(function(o){r(o,n+1)}):(c.push('"'+String(o.title).split('"').join('""')+'"'),f.push(o.definition.field))}function s(o){o.forEach(function(o){var n=[];f.forEach(function(t){var e=l.getFieldValue(t,o);switch(void 0===e?"undefined":_typeof(e)){case"object":e=JSON.stringify(e);break;case"undefined":case"null":e="";break;default:e=e}n.push('"'+String(e).split('"').join('""')+'"')}),a.push(n.join(p))})}function u(o){o.subGroups?o.subGroups.forEach(function(o){u(o)}):s(o.rows)}var a,l=this,c=[],f=[],p=t&&t.delimiter?t.delimiter:",";i.columnGroups?(console.warn("Download Warning - CSV downloader cannot process column groups"),o.forEach(function(o){r(o,0)})):function(){o.forEach(function(o){c.push('"'+String(o.title).split('"').join('""')+'"'),f.push(o.field)})}(),a=[c.join(p)],i.rowGroups?(console.warn("Download Warning - CSV downloader cannot process row groups"),n.forEach(function(o){u(o)})):s(n),e(a.join("\n"),"text/csv")},json:function(o,n,t,e,i){e(JSON.stringify(n,null,"\t"),"application/json")},pdf:function(o,n,t,e,i){function r(o,n){o.subGroups?o.subGroups.forEach(function(o){r(o,n+1)}):(f.push(o.title||""),c.push(o.definition.field))}function s(o){switch(void 0===o?"undefined":_typeof(o)){case"object":o=JSON.stringify(o);break;case"undefined":case"null":o="";break;default:o=o}return o}function u(o){o.forEach(function(o){var n=[];c.forEach(function(t){var e=l.getFieldValue(t,o);n.push(s(e))}),p.push(n)})}function a(o){var n=[];n.push(s(o.key)),d.push(p.length),p.push(n),o.subGroups?o.subGroups.forEach(function(o){a(o)}):u(o.rows)}var l=this,c=[],f=[],p=[],d=[],h={},w={},y=t.jsPDF||{},g=t&&t.title?t.title:"";y.orientation||(y.orientation=t.orientation||"landscape"),y.unit||(y.unit="pt"),i.columnGroups?(console.warn("Download Warning - PDF downloader cannot process column groups"),o.forEach(function(o){r(o,0)})):function(){o.forEach(function(o){o.field&&(f.push(o.title||""),c.push(o.field))})}(),i.rowGroups?n.forEach(function(o){a(o)}):u(n);var b=new jsPDF(y);if(t&&t.autoTable&&(h="function"==typeof t.autoTable?t.autoTable(b)||{}:t.autoTable),i.rowGroups){var m=function(o,n){if(d.indexOf(n.row.index)>-1)for(var t in w)o.styles[t]=w[t]};if(w=t.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},h.createdCell){var v=h.createdCell;h.createdCell=function(o,n){m(o,n),v(o,n)}}else h.createdCell=m}g&&(h.addPageContent=function(o){b.text(g,40,30)}),b.autoTable(f,p,h),e(b.output("arraybuffer"),"application/pdf")},xlsx:function(o,n,t,e,i){function r(){function t(o,n){void 0===l[n]&&(l[n]=[]),void 0===f[n]&&(f[n]=[]),o.width>1&&f[n].push({type:"hoz",start:l[n].length,end:l[n].length+o.width-1}),l[n].push(o.title),o.subGroups?o.subGroups.forEach(function(o){t(o,n+1)}):(p.push(o.definition.field),e(p.length),f[n].push({type:"vert",start:p.length-1}))}function e(){var o=0;l.forEach(function(n){var t=n.length;t>o&&(o=t)}),l.forEach(function(n){var t=n.length;if(t 0) { - setCurrentItem(dataItems[index - 1]); - } - break; - - case 40: - //down arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - - index = dataItems.indexOf(currentItem); - - if (index < dataItems.length - 1) { - if (index == -1) { - setCurrentItem(dataItems[0]); - } else { - setCurrentItem(dataItems[index + 1]); - } - } - break; - - case 13: - //enter - chooseItem(); - break; - - case 27: - //escape - cancelItem(); - break; - } - }); - - input.addEventListener("blur", function (e) { - if (blurable) { - cancelItem(); - } - }); - - input.addEventListener("focus", function (e) { - showList(); - }); - - //style list element - listEl = document.createElement("div"); - listEl.classList.add("tabulator-edit-select-list"); - - onRendered(function () { - input.style.height = "100%"; - input.focus(); - }); - - return input; - }, - - //autocomplete - autocomplete: function autocomplete(cell, onRendered, success, cancel, editorParams) { - var self = this, - cellEl = cell.getElement(), - initialValue = cell.getValue(), - input = document.createElement("input"), - listEl = document.createElement("div"), - allItems = [], - displayItems = [], - currentItem = {}, - blurable = true; - - function getUniqueColumnValues() { - var output = {}, - column = cell.getColumn()._getSelf(), - data = self.table.getData(); - - data.forEach(function (row) { - var val = column.getFieldValue(row); - - if (val !== null && typeof val !== "undefined" && val !== "") { - output[val] = true; - } - }); - - return Object.keys(output); - } - - function parseItems(inputValues, curentValue) { - var itemList = []; - - if (Array.isArray(inputValues)) { - inputValues.forEach(function (value) { - var item = { - title: editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value, - value: value, - element: false - }; - - if (item.value === curentValue) { - setCurrentItem(item); - } - - itemList.push(item); - }); - } else { - for (var key in inputValues) { - var item = { - title: editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : inputValues[key], - value: key, - element: false - }; - - if (item.value === curentValue) { - setCurrentItem(item); - } - - itemList.push(item); - } - } - - allItems = itemList; - } - - function filterList(term) { - var matches = []; - - if (editorParams.searchFunc) { - matches = editorParams.searchFunc(term, values); - } else { - if (term === "") { - - if (editorParams.showListOnEmpty) { - allItems.forEach(function (item) { - matches.push(item); - }); - } - } else { - allItems.forEach(function (item) { - - if (item.value !== null || typeof item.value !== "undefined") { - if (String(item.value).toLowerCase().indexOf(String(term).toLowerCase()) > -1) { - matches.push(item); - } - } - }); - } - } - - displayItems = matches; - - fillList(); - } - - function fillList() { - var current = false; - - while (listEl.firstChild) { - listEl.removeChild(listEl.firstChild); - }displayItems.forEach(function (item) { - var el = item.element; - - if (!el) { - el = document.createElement("div"); - el.classList.add("tabulator-edit-select-list-item"); - el.tabIndex = 0; - el.innerHTML = item.title; - - el.addEventListener("click", function () { - setCurrentItem(item); - chooseItem(); - }); - - el.addEventListener("mousedown", function () { - blurable = false; - - setTimeout(function () { - blurable = true; - }, 10); - }); - - item.element = el; - - if (item === currentItem) { - item.element.classList.add("active"); - current = true; - } - } - - listEl.appendChild(el); - }); - - if (!current) { - setCurrentItem(false); - } - } - - function setCurrentItem(item, showInputValue) { - if (currentItem && currentItem.element) { - currentItem.element.classList.remove("active"); - } - - currentItem = item; - - if (item && item.element) { - item.element.classList.add("active"); - } - } - - function chooseItem() { - hideList(); - - if (currentItem) { - if (initialValue !== currentItem.value) { - initialValue = currentItem.value; - input.value = currentItem.value; - success(input.value); - } else { - cancel(); - } - } else { - if (editorParams.freetext) { - initialValue = input.value; - success(input.value); - } else { - if (editorParams.allowEmpty && input.value === "") { - initialValue = input.value; - success(input.value); - } else { - cancel(); - } - } - } - } - - function cancelItem() { - hideList(); - cancel(); - } - - function showList() { - if (!listEl.parentNode) { - while (listEl.firstChild) { - listEl.removeChild(listEl.firstChild); - }if (editorParams.values === true) { - parseItems(getUniqueColumnValues(), initialValue); - } else { - parseItems(editorParams.values || [], initialValue); - } - - var offset = Tabulator.prototype.helpers.elOffset(cellEl); - - listEl.style.minWidth = cellEl.offsetWidth + "px"; - - listEl.style.top = offset.top + cellEl.offsetHeight + "px"; - listEl.style.left = offset.left + "px"; - document.body.appendChild(listEl); - } - } - - function hideList() { - if (listEl.parentNode) { - listEl.parentNode.removeChild(listEl); - } - } - - //style input - input.setAttribute("type", "text"); - - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - - //allow key based navigation - input.addEventListener("keydown", function (e) { - var index; - - switch (e.keyCode) { - case 38: - //up arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - - index = displayItems.indexOf(currentItem); - - if (index > 0) { - setCurrentItem(displayItems[index - 1]); - } else { - setCurrentItem(false); - } - break; - - case 40: - //down arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - - index = displayItems.indexOf(currentItem); - - if (index < displayItems.length - 1) { - if (index == -1) { - setCurrentItem(displayItems[0]); - } else { - setCurrentItem(displayItems[index + 1]); - } - } - break; - - case 13: - //enter - chooseItem(); - break; - - case 27: - //escape - cancelItem(); - break; - } - }); - - input.addEventListener("keyup", function (e) { - - switch (e.keyCode) { - case 38: //up arrow - case 37: //left arrow - case 39: //up arrow - case 40: //right arrow - case 13: //enter - case 27: - //escape - break; - - default: - filterList(input.value); - } - }); - - input.addEventListener("blur", function (e) { - if (blurable) { - chooseItem(); - } - }); - - input.addEventListener("focus", function (e) { - showList(); - input.value = initialValue; - filterList(initialValue); - }); - - //style list element - listEl = document.createElement("div"); - listEl.classList.add("tabulator-edit-select-list"); - - onRendered(function () { - input.style.height = "100%"; - input.focus(); - }); - - return input; - }, - - //start rating - star: function star(cell, onRendered, success, cancel, editorParams) { - var self = this, - element = cell.getElement(), - value = cell.getValue(), - maxStars = element.getElementsByTagName("svg").length || 5, - size = element.getElementsByTagName("svg")[0] ? element.getElementsByTagName("svg")[0].getAttribute("width") : 14, - stars = [], - starsHolder = document.createElement("div"), - star = document.createElementNS('http://www.w3.org/2000/svg', "svg"); - - //change star type - function starChange(val) { - stars.forEach(function (star, i) { - if (i < val) { - if (self.table.browser == "ie") { - star.setAttribute("class", "tabulator-star-active"); - } else { - star.classList.replace("tabulator-star-inactive", "tabulator-star-active"); - } - - star.innerHTML = ''; - } else { - if (self.table.browser == "ie") { - star.setAttribute("class", "tabulator-star-inactive"); - } else { - star.classList.replace("tabulator-star-active", "tabulator-star-inactive"); - } - - star.innerHTML = ''; - } - }); - } - - //build stars - function buildStar(i) { - var nextStar = star.cloneNode(true); - - stars.push(nextStar); - - nextStar.addEventListener("mouseover", function (e) { - e.stopPropagation(); - starChange(i); - }); - - nextStar.addEventListener("click", function (e) { - e.stopPropagation(); - success(i); - }); - - starsHolder.appendChild(nextStar); - } - - //handle keyboard navigation value change - function changeValue(val) { - value = val; - starChange(val); - } - - //style cell - element.style.whiteSpace = "nowrap"; - element.style.overflow = "hidden"; - element.style.textOverflow = "ellipsis"; - - //style holding element - starsHolder.style.verticalAlign = "middle"; - starsHolder.style.display = "inline-block"; - starsHolder.style.padding = "4px"; - - //style star - star.setAttribute("width", size); - star.setAttribute("height", size); - star.setAttribute("viewBox", "0 0 512 512"); - star.setAttribute("xml:space", "preserve"); - star.style.padding = "0 1px"; - - //create correct number of stars - for (var i = 1; i <= maxStars; i++) { - buildStar(i); - } - - //ensure value does not exceed number of stars - value = Math.min(parseInt(value), maxStars); - - // set initial styling of stars - starChange(value); - - starsHolder.addEventListener("mouseover", function (e) { - starChange(0); - }); - - starsHolder.addEventListener("click", function (e) { - success(0); - }); - - element.addEventListener("blur", function (e) { - cancel(); - }); - - //allow key based navigation - element.addEventListener("keydown", function (e) { - switch (e.keyCode) { - case 39: - //right arrow - changeValue(value + 1); - break; - - case 37: - //left arrow - changeValue(value - 1); - break; - - case 13: - //enter - success(value); - break; - - case 27: - //escape - cancel(); - break; - } - }); - - return starsHolder; - }, - - //draggable progress bar - progress: function progress(cell, onRendered, success, cancel, editorParams) { - var element = cell.getElement(), - max = typeof editorParams.max === "undefined" ? element.getElementsByTagName("div")[0].getAttribute("max") || 100 : editorParams.max, - min = typeof editorParams.min === "undefined" ? element.getElementsByTagName("div")[0].getAttribute("min") || 0 : editorParams.min, - percent = (max - min) / 100, - value = cell.getValue() || 0, - handle = document.createElement("div"), - bar = document.createElement("div"), - mouseDrag, - mouseDragWidth; - - //set new value - function updateValue() { - var calcVal = percent * Math.round(bar.offsetWidth / (element.clientWidth / 100)) + min; - success(calcVal); - element.setAttribute("aria-valuenow", calcVal); - element.setAttribute("aria-label", value); - } - - //style handle - handle.style.position = "absolute"; - handle.style.right = "0"; - handle.style.top = "0"; - handle.style.bottom = "0"; - handle.style.width = "5px"; - handle.classList.add("tabulator-progress-handle"); - - //style bar - bar.style.display = "inline-block"; - bar.style.position = "absolute"; - bar.style.top = "8px"; - bar.style.bottom = "8px"; - bar.style.left = "4px"; - bar.style.marginRight = "4px"; - bar.style.backgroundColor = "#488CE9"; - bar.style.maxWidth = "100%"; - bar.style.minWidth = "0%"; - - //style cell - element.style.padding = "0 4px"; - - //make sure value is in range - value = Math.min(parseFloat(value), max); - value = Math.max(parseFloat(value), min); - - //workout percentage - value = 100 - Math.round((value - min) / percent); - bar.style.right = value + "%"; - - element.setAttribute("aria-valuemin", min); - element.setAttribute("aria-valuemax", max); - - bar.appendChild(handle); - - handle.addEventListener("mousedown", function (e) { - mouseDrag = e.screenX; - mouseDragWidth = bar.offsetWidth; - }); - - handle.addEventListener("mouseover", function () { - handle.style.cursor = "ew-resize"; - }); - - element.addEventListener("mousemove", function (e) { - if (mouseDrag) { - bar.style.width = mouseDragWidth + e.screenX - mouseDrag + "px"; - } - }); - - element.addEventListener("mouseup", function (e) { - if (mouseDrag) { - e.stopPropagation(); - e.stopImmediatePropagation(); - - mouseDrag = false; - mouseDragWidth = false; - - updateValue(); - } - }); - - //allow key based navigation - element.addEventListener("keydown", function (e) { - switch (e.keyCode) { - case 39: - //right arrow - bar.style.width = bar.clientWidth + element.clientWidth / 100 + "px"; - break; - - case 37: - //left arrow - bar.style.width = bar.clientWidth - element.clientWidth / 100 + "px"; - break; - - case 13: - //enter - updateValue(); - break; - - case 27: - //escape - cancel(); - break; - - } - }); - - element.addEventListener("blur", function () { - cancel(); - }); - - return bar; - }, - - //checkbox - tickCross: function tickCross(cell, onRendered, success, cancel, editorParams) { - var value = cell.getValue(), - input = document.createElement("input"), - tristate = editorParams.tristate, - indetermValue = typeof editorParams.indeterminateValue === "undefined" ? null : editorParams.indeterminateValue, - indetermState = false; - - input.setAttribute("type", "checkbox"); - input.style.marginTop = "5px"; - input.style.boxSizing = "border-box"; - - input.value = value; - - if (tristate && (typeof value === "undefined" || value === indetermValue || value === "")) { - indetermState = true; - input.indeterminate = true; - } - - if (this.table.browser != "firefox") { - //prevent blur issue on mac firefox - onRendered(function () { - input.focus(); - }); - } - - input.checked = value === true || value === "true" || value === "True" || value === 1; - - function setValue(blur) { - if (tristate) { - if (!blur) { - if (input.checked && !indetermState) { - input.checked = false; - input.indeterminate = true; - indetermState = true; - return indetermValue; - } else { - indetermState = false; - return input.checked; - } - } else { - if (indetermState) { - return indetermValue; - } else { - return input.checked; - } - } - } else { - return input.checked; - } - } - - //submit new value on blur - input.addEventListener("change", function (e) { - success(setValue()); - }); - - input.addEventListener("blur", function (e) { - success(setValue(true)); - }); - - //submit new value on enter - input.addEventListener("keydown", function (e) { - if (e.keyCode == 13) { - success(setValue()); - } - if (e.keyCode == 27) { - cancel(); - } - }); - - return input; - } -}; - -Tabulator.prototype.registerModule("edit", Edit); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/edit.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/edit.min.js deleted file mode 100644 index 0081276b77..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/edit.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Edit=function(e){this.table=e,this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1};Edit.prototype.initializeColumn=function(e){var t=this,i={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{}};switch(_typeof(e.definition.editor)){case"string":"tick"===e.definition.editor&&(e.definition.editor="tickCross",console.warn("DEPRECATION WANRING - the tick editor has been depricated, please use the tickCross editor")),t.editors[e.definition.editor]?i.editor=t.editors[e.definition.editor]:console.warn("Editor Error - No such editor found: ",e.definition.editor);break;case"function":i.editor=e.definition.editor;break;case"boolean":!0===e.definition.editor&&("function"!=typeof e.definition.formatter?("tick"===e.definition.formatter&&(e.definition.formatter="tickCross",console.warn("DEPRECATION WANRING - the tick editor has been depricated, please use the tickCross editor")),t.editors[e.definition.formatter]?i.editor=t.editors[e.definition.formatter]:i.editor=t.editors.input):console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",e.definition.formatter))}i.editor&&(e.modules.edit=i)},Edit.prototype.getCurrentCell=function(){return!!this.currentCell&&this.currentCell.getComponent()},Edit.prototype.clearEditor=function(){var e,t=this.currentCell;if(this.invalidEdit=!1,t){for(this.currentCell=!1,e=t.getElement(),e.classList.remove("tabulator-validation-fail"),e.classList.remove("tabulator-editing");e.firstChild;)e.removeChild(e.firstChild);t.row.getElement().classList.remove("tabulator-row-editing")}},Edit.prototype.cancelEdit=function(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(),e.setValueActual(e.getValue()),e.column.cellEvents.cellEditCancelled&&e.column.cellEvents.cellEditCancelled.call(this.table,t),this.table.options.cellEditCancelled.call(this.table,t)}},Edit.prototype.bindEditor=function(e){var t=this,i=e.getElement();i.setAttribute("tabindex",0),i.addEventListener("click",function(e){i.classList.contains("tabulator-editing")||i.focus()}),i.addEventListener("mousedown",function(e){t.mouseClick=!0}),i.addEventListener("focus",function(i){t.recursionBlock||t.edit(e,i,!1)})},Edit.prototype.focusCellNoEvent=function(e){this.recursionBlock=!0,e.getElement().focus(),this.recursionBlock=!1},Edit.prototype.editCell=function(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)},Edit.prototype.edit=function(e,t,i){function n(t){if(d.currentCell===e){var i=!0;e.column.modules.validate&&d.table.modExists("validate")&&(i=d.table.modules.validate.validate(e.column.modules.validate,e.getComponent(),t)),!0===i?(d.clearEditor(),e.setValue(t,!0),d.table.options.dataTree&&d.table.modExists("dataTree")&&d.table.modules.dataTree.checkForRestyle(e)):(d.invalidEdit=!0,m.classList.add("tabulator-validation-fail"),d.focusCellNoEvent(e),u(),d.table.options.validationFailed.call(d.table,e.getComponent(),t,i))}}function o(){d.currentCell===e&&(d.cancelEdit(),d.table.options.dataTree&&d.table.modExists("dataTree")&&d.table.modules.dataTree.checkForRestyle(e))}function a(e){u=e}var l,r,s,d=this,c=!0,u=function(){},m=e.getElement();if(this.currentCell)return void(this.invalidEdit||this.cancelEdit());if(e.column.modules.edit.blocked)return this.mouseClick=!1,m.blur(),!1;switch(t&&t.stopPropagation(),_typeof(e.column.modules.edit.check)){case"function":c=e.column.modules.edit.check(e.getComponent());break;case"boolean":c=e.column.modules.edit.check}if(c||i){if(d.cancelEdit(),d.currentCell=e,r=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.cellEvents.cellClick&&e.column.cellEvents.cellClick.call(this.table,t,r)),e.column.cellEvents.cellEditing&&e.column.cellEvents.cellEditing.call(this.table,r),d.table.options.cellEditing.call(this.table,r),s="function"==typeof e.column.modules.edit.params?e.column.modules.edit.params(r):e.column.modules.edit.params,!1===(l=e.column.modules.edit.editor.call(d,r,a,n,o,s)))return m.blur(),!1;if(!(l instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",l),m.blur(),!1;for(m.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-row-editing");m.firstChild;)m.removeChild(m.firstChild);m.appendChild(l),u();for(var f=m.children,v=0;v0&&s(y[t-1]);break;case 40:e.stopImmediatePropagation(),e.stopPropagation(),t=y.indexOf(g),t-1&&t.push(i)}),g=t,s()}function s(){for(var e=!1;y.firstChild;)y.removeChild(y.firstChild);g.forEach(function(t){var i=t.element;i||(i=document.createElement("div"),i.classList.add("tabulator-edit-select-list-item"),i.tabIndex=0,i.innerHTML=t.title,i.addEventListener("click",function(){d(t),c()}),i.addEventListener("mousedown",function(){C=!1,setTimeout(function(){C=!0},10)}),t.element=i,t===k&&(t.element.classList.add("active"),e=!0)),y.appendChild(i)}),e||d(!1)}function d(e,t){k&&k.element&&k.element.classList.remove("active"),k=e,e&&e.element&&e.element.classList.add("active")}function c(){f(),k?h!==k.value?(h=k.value,b.value=k.value,i(b.value)):n():o.freetext?(h=b.value,i(b.value)):o.allowEmpty&&""===b.value?(h=b.value,i(b.value)):n()}function u(){f(),n()}function m(){if(!y.parentNode){for(;y.firstChild;)y.removeChild(y.firstChild);!0===o.values?l(a(),h):l(o.values||[],h);var e=Tabulator.prototype.helpers.elOffset(p);y.style.minWidth=p.offsetWidth+"px",y.style.top=e.top+p.offsetHeight+"px",y.style.left=e.left+"px",document.body.appendChild(y)}}function f(){y.parentNode&&y.parentNode.removeChild(y)}var v=this,p=e.getElement(),h=e.getValue(),b=document.createElement("input"),y=document.createElement("div"),E=[],g=[],k={},C=!0;return b.setAttribute("type","text"),b.style.padding="4px",b.style.width="100%",b.style.boxSizing="border-box",b.addEventListener("keydown",function(e){var t;switch(e.keyCode){case 38:e.stopImmediatePropagation(),e.stopPropagation(),t=g.indexOf(k),d(t>0?g[t-1]:!1);break;case 40:e.stopImmediatePropagation(),e.stopPropagation(),t=g.indexOf(k),t'):("ie"==r.table.browser?t.setAttribute("class","tabulator-star-inactive"):t.classList.replace("tabulator-star-active","tabulator-star-inactive"),t.innerHTML='')})}function l(e){d=e,a(e)}var r=this,s=e.getElement(),d=e.getValue(),c=s.getElementsByTagName("svg").length||5,u=s.getElementsByTagName("svg")[0]?s.getElementsByTagName("svg")[0].getAttribute("width"):14,m=[],f=document.createElement("div"),v=document.createElementNS("http://www.w3.org/2000/svg","svg");s.style.whiteSpace="nowrap",s.style.overflow="hidden",s.style.textOverflow="ellipsis",f.style.verticalAlign="middle",f.style.display="inline-block",f.style.padding="4px",v.setAttribute("width",u),v.setAttribute("height",u),v.setAttribute("viewBox","0 0 512 512"),v.setAttribute("xml:space","preserve"),v.style.padding="0 1px";for(var p=1;p<=c;p++)!function(e){var t=v.cloneNode(!0);m.push(t),t.addEventListener("mouseover",function(t){t.stopPropagation(),a(e)}),t.addEventListener("click",function(t){t.stopPropagation(),i(e)}),f.appendChild(t)}(p);return d=Math.min(parseInt(d),c),a(d),f.addEventListener("mouseover",function(e){a(0)}),f.addEventListener("click",function(e){i(0)}),s.addEventListener("blur",function(e){n()}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 39:l(d+1);break;case 37:l(d-1);break;case 13:i(d);break;case 27:n()}}),f},progress:function(e,t,i,n,o){function a(){var e=u*Math.round(v.offsetWidth/(s.clientWidth/100))+c;i(e),s.setAttribute("aria-valuenow",e),s.setAttribute("aria-label",m)}var l,r,s=e.getElement(),d=void 0===o.max?s.getElementsByTagName("div")[0].getAttribute("max")||100:o.max,c=void 0===o.min?s.getElementsByTagName("div")[0].getAttribute("min")||0:o.min,u=(d-c)/100,m=e.getValue()||0,f=document.createElement("div"),v=document.createElement("div");return f.style.position="absolute",f.style.right="0",f.style.top="0",f.style.bottom="0",f.style.width="5px",f.classList.add("tabulator-progress-handle"),v.style.display="inline-block",v.style.position="absolute",v.style.top="8px",v.style.bottom="8px",v.style.left="4px",v.style.marginRight="4px",v.style.backgroundColor="#488CE9",v.style.maxWidth="100%",v.style.minWidth="0%",s.style.padding="0 4px",m=Math.min(parseFloat(m),d),m=Math.max(parseFloat(m),c),m=100-Math.round((m-c)/u),v.style.right=m+"%",s.setAttribute("aria-valuemin",c),s.setAttribute("aria-valuemax",d),v.appendChild(f),f.addEventListener("mousedown",function(e){l=e.screenX,r=v.offsetWidth}),f.addEventListener("mouseover",function(){f.style.cursor="ew-resize"}),s.addEventListener("mousemove",function(e){l&&(v.style.width=r+e.screenX-l+"px")}),s.addEventListener("mouseup",function(e){l&&(e.stopPropagation(),e.stopImmediatePropagation(),l=!1,r=!1,a())}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 39:v.style.width=v.clientWidth+s.clientWidth/100+"px";break;case 37:v.style.width=v.clientWidth-s.clientWidth/100+"px";break;case 13:a();break;case 27:n()}}),s.addEventListener("blur",function(){n()}),v},tickCross:function(e,t,i,n,o){function a(e){return s?e?c?d:r.checked:r.checked&&!c?(r.checked=!1,r.indeterminate=!0,c=!0,d):(c=!1,r.checked):r.checked}var l=e.getValue(),r=document.createElement("input"),s=o.tristate,d=void 0===o.indeterminateValue?null:o.indeterminateValue,c=!1;return r.setAttribute("type","checkbox"),r.style.marginTop="5px",r.style.boxSizing="border-box",r.value=l,!s||void 0!==l&&l!==d&&""!==l||(c=!0,r.indeterminate=!0),"firefox"!=this.table.browser&&t(function(){r.focus()}),r.checked=!0===l||"true"===l||"True"===l||1===l,r.addEventListener("change",function(e){i(a())}),r.addEventListener("blur",function(e){i(a(!0))}),r.addEventListener("keydown",function(e){13==e.keyCode&&i(a()),27==e.keyCode&&n()}),r}},Tabulator.prototype.registerModule("edit",Edit); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/filter.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/filter.js deleted file mode 100644 index 1a9d5f4888..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/filter.js +++ /dev/null @@ -1,695 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var Filter = function Filter(table) { - - this.table = table; //hold Tabulator object - - this.filterList = []; //hold filter list - this.headerFilters = {}; //hold column filters - this.headerFilterElements = []; //hold header filter elements for manipulation - this.headerFilterColumns = []; //hold columns that use header filters - - this.changed = false; //has filtering changed since last render -}; - -//initialize column header filter -Filter.prototype.initializeColumn = function (column, value) { - var self = this, - field = column.getField(), - prevSuccess, - params; - - //handle successfull value change - function success(value) { - var filterType = column.modules.filter.tagType == "input" && column.modules.filter.attrType == "text" || column.modules.filter.tagType == "textarea" ? "partial" : "match", - type = "", - filterFunc; - - if (typeof prevSuccess === "undefined" || prevSuccess !== value) { - - prevSuccess = value; - - if (!column.modules.filter.emptyFunc(value)) { - column.modules.filter.value = value; - - switch (_typeof(column.definition.headerFilterFunc)) { - case "string": - if (self.filters[column.definition.headerFilterFunc]) { - type = column.definition.headerFilterFunc; - filterFunc = function filterFunc(data) { - return self.filters[column.definition.headerFilterFunc](value, column.getFieldValue(data)); - }; - } else { - console.warn("Header Filter Error - Matching filter function not found: ", column.definition.headerFilterFunc); - } - break; - - case "function": - filterFunc = function filterFunc(data) { - var params = column.definition.headerFilterFuncParams || {}; - var fieldVal = column.getFieldValue(data); - - params = typeof params === "function" ? params(value, fieldVal, data) : params; - - return column.definition.headerFilterFunc(value, fieldVal, data, params); - }; - - type = filterFunc; - break; - } - - if (!filterFunc) { - switch (filterType) { - case "partial": - filterFunc = function filterFunc(data) { - return String(column.getFieldValue(data)).toLowerCase().indexOf(String(value).toLowerCase()) > -1; - }; - type = "like"; - break; - - default: - filterFunc = function filterFunc(data) { - return column.getFieldValue(data) == value; - }; - type = "="; - } - } - - self.headerFilters[field] = { value: value, func: filterFunc, type: type }; - } else { - delete self.headerFilters[field]; - } - - self.changed = true; - - self.table.rowManager.filterRefresh(); - } - } - - column.modules.filter = { - success: success, - attrType: false, - tagType: false, - emptyFunc: false - }; - - this.generateHeaderFilterElement(column); -}; - -Filter.prototype.generateHeaderFilterElement = function (column, initialValue) { - var self = this, - success = column.modules.filter.success, - field = column.getField(), - filterElement, - editor, - editorElement, - cellWrapper, - typingTimer, - searchTrigger, - params; - - //handle aborted edit - function cancel() {} - - if (column.modules.filter.headerElement && column.modules.filter.headerElement.parentNode) { - column.modules.filter.headerElement.parentNode.removeChild(column.modules.filter.headerElement); - } - - if (field) { - - //set empty value function - column.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function (value) { - return !value && value !== "0"; - }; - - filterElement = document.createElement("div"); - filterElement.classList.add("tabulator-header-filter"); - - //set column editor - switch (_typeof(column.definition.headerFilter)) { - case "string": - if (self.table.modules.edit.editors[column.definition.headerFilter]) { - editor = self.table.modules.edit.editors[column.definition.headerFilter]; - - if ((column.definition.headerFilter === "tick" || column.definition.headerFilter === "tickCross") && !column.definition.headerFilterEmptyCheck) { - column.modules.filter.emptyFunc = function (value) { - return value !== true && value !== false; - }; - } - } else { - console.warn("Filter Error - Cannot build header filter, No such editor found: ", column.definition.editor); - } - break; - - case "function": - editor = column.definition.headerFilter; - break; - - case "boolean": - if (column.modules.edit && column.modules.edit.editor) { - editor = column.modules.edit.editor; - } else { - if (column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]) { - editor = self.table.modules.edit.editors[column.definition.formatter]; - - if ((column.definition.formatter === "tick" || column.definition.formatter === "tickCross") && !column.definition.headerFilterEmptyCheck) { - column.modules.filter.emptyFunc = function (value) { - return value !== true && value !== false; - }; - } - } else { - editor = self.table.modules.edit.editors["input"]; - } - } - break; - } - - if (editor) { - - cellWrapper = { - getValue: function getValue() { - return typeof initialValue !== "undefined" ? initialValue : ""; - }, - getField: function getField() { - return column.definition.field; - }, - getElement: function getElement() { - return filterElement; - }, - getColumn: function getColumn() { - return column.getComponent(); - }, - getRow: function getRow() { - return { - normalizeHeight: function normalizeHeight() {} - }; - } - }; - - params = column.definition.headerFilterParams || {}; - - params = typeof params === "function" ? params.call(self.table) : params; - - editorElement = editor.call(this.table.modules.edit, cellWrapper, function () {}, success, cancel, params); - - if (!editorElement) { - console.warn("Filter Error - Cannot add filter to " + field + " column, editor returned a value of false"); - return; - } - - if (!(editorElement instanceof Node)) { - console.warn("Filter Error - Cannot add filter to " + field + " column, editor should return an instance of Node, the editor returned:", editorElement); - return; - } - - //set Placeholder Text - if (field) { - self.table.modules.localize.bind("headerFilters|columns|" + column.definition.field, function (value) { - editorElement.setAttribute("placeholder", typeof value !== "undefined" && value ? value : self.table.modules.localize.getText("headerFilters|default")); - }); - } else { - self.table.modules.localize.bind("headerFilters|default", function (value) { - editorElement.setAttribute("placeholder", typeof self.column.definition.headerFilterPlaceholder !== "undefined" && self.column.definition.headerFilterPlaceholder ? self.column.definition.headerFilterPlaceholder : value); - }); - } - - //focus on element on click - editorElement.addEventListener("click", function (e) { - e.stopPropagation(); - editorElement.focus(); - }); - - //live update filters as user types - typingTimer = false; - - searchTrigger = function searchTrigger(e) { - if (typingTimer) { - clearTimeout(typingTimer); - } - - typingTimer = setTimeout(function () { - success(editorElement.value); - }, 300); - }; - - column.modules.filter.headerElement = editorElement; - column.modules.filter.attrType = editorElement.hasAttribute("type") ? editorElement.getAttribute("type").toLowerCase() : ""; - column.modules.filter.tagType = editorElement.tagName.toLowerCase(); - - if (column.definition.headerFilterLiveFilter !== false) { - - if (!(column.definition.headerFilter === "autocomplete" || column.definition.editor === "autocomplete" && column.definition.headerFilter === true)) { - editorElement.addEventListener("keyup", searchTrigger); - editorElement.addEventListener("search", searchTrigger); - - //update number filtered columns on change - if (column.modules.filter.attrType == "number") { - editorElement.addEventListener("change", function (e) { - success(editorElement.value); - }); - } - - //change text inputs to search inputs to allow for clearing of field - if (column.modules.filter.attrType == "text" && this.table.browser !== "ie") { - editorElement.setAttribute("type", "search"); - // editorElement.off("change blur"); //prevent blur from triggering filter and preventing selection click - } - } - - //prevent input and select elements from propegating click to column sorters etc - if (column.modules.filter.tagType == "input" || column.modules.filter.tagType == "select" || column.modules.filter.tagType == "textarea") { - editorElement.addEventListener("mousedown", function (e) { - e.stopPropagation(); - }); - } - } - - filterElement.appendChild(editorElement); - - column.contentElement.appendChild(filterElement); - - self.headerFilterElements.push(editorElement); - self.headerFilterColumns.push(column); - } - } else { - console.warn("Filter Error - Cannot add header filter, column has no field set:", column.definition.title); - } -}; - -//hide all header filter elements (used to ensure correct column widths in "fitData" layout mode) -Filter.prototype.hideHeaderFilterElements = function () { - this.headerFilterElements.forEach(function (element) { - element.style.display = 'none'; - }); -}; - -//show all header filter elements (used to ensure correct column widths in "fitData" layout mode) -Filter.prototype.showHeaderFilterElements = function () { - this.headerFilterElements.forEach(function (element) { - element.style.display = ''; - }); -}; - -//programatically set value of header filter -Filter.prototype.setHeaderFilterFocus = function (column) { - if (column.modules.filter && column.modules.filter.headerElement) { - column.modules.filter.headerElement.focus(); - } else { - console.warn("Column Filter Focus Error - No header filter set on column:", column.getField()); - } -}; - -//programatically set value of header filter -Filter.prototype.setHeaderFilterValue = function (column, value) { - if (column) { - if (column.modules.filter && column.modules.filter.headerElement) { - this.generateHeaderFilterElement(column, value); - column.modules.filter.success(value); - } else { - console.warn("Column Filter Error - No header filter set on column:", column.getField()); - } - } -}; - -Filter.prototype.reloadHeaderFilter = function (column) { - if (column) { - if (column.modules.filter && column.modules.filter.headerElement) { - this.generateHeaderFilterElement(column, column.modules.filter.value); - } else { - console.warn("Column Filter Error - No header filter set on column:", column.getField()); - } - } -}; - -//check if the filters has changed since last use -Filter.prototype.hasChanged = function () { - var changed = this.changed; - this.changed = false; - return changed; -}; - -//set standard filters -Filter.prototype.setFilter = function (field, type, value) { - var self = this; - - self.filterList = []; - - if (!Array.isArray(field)) { - field = [{ field: field, type: type, value: value }]; - } - - self.addFilter(field); -}; - -//add filter to array -Filter.prototype.addFilter = function (field, type, value) { - var self = this; - - if (!Array.isArray(field)) { - field = [{ field: field, type: type, value: value }]; - } - - field.forEach(function (filter) { - - filter = self.findFilter(filter); - - if (filter) { - self.filterList.push(filter); - - self.changed = true; - } - }); - - if (this.table.options.persistentFilter && this.table.modExists("persistence", true)) { - this.table.modules.persistence.save("filter"); - } -}; - -Filter.prototype.findFilter = function (filter) { - var self = this, - column; - - if (Array.isArray(filter)) { - return this.findSubFilters(filter); - } - - var filterFunc = false; - - if (typeof filter.field == "function") { - filterFunc = function filterFunc(data) { - return filter.field(data, filter.type || {}); // pass params to custom filter function - }; - } else { - - if (self.filters[filter.type]) { - - column = self.table.columnManager.getColumnByField(filter.field); - - if (column) { - filterFunc = function filterFunc(data) { - return self.filters[filter.type](filter.value, column.getFieldValue(data)); - }; - } else { - filterFunc = function filterFunc(data) { - return self.filters[filter.type](filter.value, data[filter.field]); - }; - } - } else { - console.warn("Filter Error - No such filter type found, ignoring: ", filter.type); - } - } - - filter.func = filterFunc; - - return filter.func ? filter : false; -}; - -Filter.prototype.findSubFilters = function (filters) { - var self = this, - output = []; - - filters.forEach(function (filter) { - filter = self.findFilter(filter); - - if (filter) { - output.push(filter); - } - }); - - return output.length ? output : false; -}; - -//get all filters -Filter.prototype.getFilters = function (all, ajax) { - var self = this, - output = []; - - if (all) { - output = self.getHeaderFilters(); - } - - self.filterList.forEach(function (filter) { - output.push({ field: filter.field, type: filter.type, value: filter.value }); - }); - - if (ajax) { - output.forEach(function (item) { - if (typeof item.type == "function") { - item.type = "function"; - } - }); - } - - return output; -}; - -//get all filters -Filter.prototype.getHeaderFilters = function () { - var self = this, - output = []; - - for (var key in this.headerFilters) { - output.push({ field: key, type: this.headerFilters[key].type, value: this.headerFilters[key].value }); - } - - return output; -}; - -//remove filter from array -Filter.prototype.removeFilter = function (field, type, value) { - var self = this; - - if (!Array.isArray(field)) { - field = [{ field: field, type: type, value: value }]; - } - - field.forEach(function (filter) { - var index = -1; - - if (_typeof(filter.field) == "object") { - index = self.filterList.findIndex(function (element) { - return filter === element; - }); - } else { - index = self.filterList.findIndex(function (element) { - return filter.field === element.field && filter.type === element.type && filter.value === element.value; - }); - } - - if (index > -1) { - self.filterList.splice(index, 1); - self.changed = true; - } else { - console.warn("Filter Error - No matching filter type found, ignoring: ", filter.type); - } - }); - - if (this.table.options.persistentFilter && this.table.modExists("persistence", true)) { - this.table.modules.persistence.save("filter"); - } -}; - -//clear filters -Filter.prototype.clearFilter = function (all) { - this.filterList = []; - - if (all) { - this.clearHeaderFilter(); - } - - this.changed = true; - - if (this.table.options.persistentFilter && this.table.modExists("persistence", true)) { - this.table.modules.persistence.save("filter"); - } -}; - -//clear header filters -Filter.prototype.clearHeaderFilter = function () { - var self = this; - - this.headerFilters = {}; - - this.headerFilterColumns.forEach(function (column) { - column.modules.filter.value = null; - self.reloadHeaderFilter(column); - }); - - this.changed = true; -}; - -//search data and return matching rows -Filter.prototype.search = function (searchType, field, type, value) { - var self = this, - activeRows = [], - filterList = []; - - if (!Array.isArray(field)) { - field = [{ field: field, type: type, value: value }]; - } - - field.forEach(function (filter) { - filter = self.findFilter(filter); - - if (filter) { - filterList.push(filter); - } - }); - - this.table.rowManager.rows.forEach(function (row) { - var match = true; - - filterList.forEach(function (filter) { - if (!self.filterRecurse(filter, row.getData())) { - match = false; - } - }); - - if (match) { - activeRows.push(searchType === "data" ? row.getData("data") : row.getComponent()); - } - }); - - return activeRows; -}; - -//filter row array -Filter.prototype.filter = function (rowList, filters) { - var self = this, - activeRows = [], - activeRowComponents = []; - - if (self.table.options.dataFiltering) { - self.table.options.dataFiltering.call(self.table, self.getFilters()); - } - - if (!self.table.options.ajaxFiltering && (self.filterList.length || Object.keys(self.headerFilters).length)) { - - rowList.forEach(function (row) { - if (self.filterRow(row)) { - activeRows.push(row); - } - }); - } else { - activeRows = rowList.slice(0); - } - - if (self.table.options.dataFiltered) { - - activeRows.forEach(function (row) { - activeRowComponents.push(row.getComponent()); - }); - - self.table.options.dataFiltered.call(self.table, self.getFilters(), activeRowComponents); - } - - return activeRows; -}; - -//filter individual row -Filter.prototype.filterRow = function (row, filters) { - var self = this, - match = true, - data = row.getData(); - - self.filterList.forEach(function (filter) { - if (!self.filterRecurse(filter, data)) { - match = false; - } - }); - - for (var field in self.headerFilters) { - if (!self.headerFilters[field].func(data)) { - match = false; - } - } - - return match; -}; - -Filter.prototype.filterRecurse = function (filter, data) { - var self = this, - match = false; - - if (Array.isArray(filter)) { - filter.forEach(function (subFilter) { - if (self.filterRecurse(subFilter, data)) { - match = true; - } - }); - } else { - match = filter.func(data); - } - - return match; -}; - -//list of available filters -Filter.prototype.filters = { - - //equal to - "=": function _(filterVal, rowVal) { - return rowVal == filterVal ? true : false; - }, - - //less than - "<": function _(filterVal, rowVal) { - return rowVal < filterVal ? true : false; - }, - - //less than or equal to - "<=": function _(filterVal, rowVal) { - return rowVal <= filterVal ? true : false; - }, - - //greater than - ">": function _(filterVal, rowVal) { - return rowVal > filterVal ? true : false; - }, - - //greater than or equal to - ">=": function _(filterVal, rowVal) { - return rowVal >= filterVal ? true : false; - }, - - //not equal to - "!=": function _(filterVal, rowVal) { - return rowVal != filterVal ? true : false; - }, - - "regex": function regex(filterVal, rowVal) { - - if (typeof filterVal == "string") { - filterVal = new RegExp(filterVal); - } - - return filterVal.test(rowVal); - }, - - //contains the string - "like": function like(filterVal, rowVal) { - if (filterVal === null || typeof filterVal === "undefined") { - return rowVal === filterVal ? true : false; - } else { - if (typeof rowVal !== 'undefined' && rowVal !== null) { - return String(rowVal).toLowerCase().indexOf(filterVal.toLowerCase()) > -1 ? true : false; - } else { - return false; - } - } - }, - - //in array - "in": function _in(filterVal, rowVal) { - if (Array.isArray(filterVal)) { - return filterVal.indexOf(rowVal) > -1; - } else { - console.warn("Filter Error - filter value is not an array:", filterVal); - return false; - } - } -}; - -Tabulator.prototype.registerModule("filter", Filter); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/filter.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/filter.min.js deleted file mode 100644 index 919f5309c0..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/filter.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Filter=function(e){this.table=e,this.filterList=[],this.headerFilters={},this.headerFilterElements=[],this.headerFilterColumns=[],this.changed=!1};Filter.prototype.initializeColumn=function(e,t){function i(t){var i,o="input"==e.modules.filter.tagType&&"text"==e.modules.filter.attrType||"textarea"==e.modules.filter.tagType?"partial":"match",a="";if(void 0===r||r!==t){if(r=t,e.modules.filter.emptyFunc(t))delete n.headerFilters[l];else{switch(e.modules.filter.value=t,_typeof(e.definition.headerFilterFunc)){case"string":n.filters[e.definition.headerFilterFunc]?(a=e.definition.headerFilterFunc,i=function(i){return n.filters[e.definition.headerFilterFunc](t,e.getFieldValue(i))}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":i=function(i){var r=e.definition.headerFilterFuncParams||{},n=e.getFieldValue(i);return r="function"==typeof r?r(t,n,i):r,e.definition.headerFilterFunc(t,n,i,r)},a=i}if(!i)switch(o){case"partial":i=function(i){return String(e.getFieldValue(i)).toLowerCase().indexOf(String(t).toLowerCase())>-1},a="like";break;default:i=function(i){return e.getFieldValue(i)==t},a="="}n.headerFilters[l]={value:t,func:i,type:a}}n.changed=!0,n.table.rowManager.filterRefresh()}}var r,n=this,l=e.getField();e.modules.filter={success:i,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)},Filter.prototype.generateHeaderFilterElement=function(e,t){function i(){}var r,n,l,o,a,d,s,u=this,f=e.modules.filter.success,c=e.getField();if(e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode&&e.modules.filter.headerElement.parentNode.removeChild(e.modules.filter.headerElement),c){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(e){return!e&&"0"!==e},r=document.createElement("div"),r.classList.add("tabulator-header-filter"),_typeof(e.definition.headerFilter)){case"string":u.table.modules.edit.editors[e.definition.headerFilter]?(n=u.table.modules.edit.editors[e.definition.headerFilter],"tick"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":n=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?n=e.modules.edit.editor:e.definition.formatter&&u.table.modules.edit.editors[e.definition.formatter]?(n=u.table.modules.edit.editors[e.definition.formatter],"tick"!==e.definition.formatter&&"tickCross"!==e.definition.formatter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):n=u.table.modules.edit.editors.input}if(n){if(o={getValue:function(){return void 0!==t?t:""},getField:function(){return e.definition.field},getElement:function(){return r},getColumn:function(){return e.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},s=e.definition.headerFilterParams||{},s="function"==typeof s?s.call(u.table):s,!(l=n.call(this.table.modules.edit,o,function(){},f,i,s)))return void console.warn("Filter Error - Cannot add filter to "+c+" column, editor returned a value of false");if(!(l instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+c+" column, editor should return an instance of Node, the editor returned:",l);c?u.table.modules.localize.bind("headerFilters|columns|"+e.definition.field,function(e){l.setAttribute("placeholder",void 0!==e&&e?e:u.table.modules.localize.getText("headerFilters|default"))}):u.table.modules.localize.bind("headerFilters|default",function(e){l.setAttribute("placeholder",void 0!==u.column.definition.headerFilterPlaceholder&&u.column.definition.headerFilterPlaceholder?u.column.definition.headerFilterPlaceholder:e)}),l.addEventListener("click",function(e){e.stopPropagation(),l.focus()}),a=!1,d=function(e){a&&clearTimeout(a),a=setTimeout(function(){f(l.value)},300)},e.modules.filter.headerElement=l,e.modules.filter.attrType=l.hasAttribute("type")?l.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=l.tagName.toLowerCase(),!1!==e.definition.headerFilterLiveFilter&&("autocomplete"===e.definition.headerFilter||"autocomplete"===e.definition.editor&&!0===e.definition.headerFilter||(l.addEventListener("keyup",d),l.addEventListener("search",d),"number"==e.modules.filter.attrType&&l.addEventListener("change",function(e){f(l.value)}),"text"==e.modules.filter.attrType&&"ie"!==this.table.browser&&l.setAttribute("type","search")),"input"!=e.modules.filter.tagType&&"select"!=e.modules.filter.tagType&&"textarea"!=e.modules.filter.tagType||l.addEventListener("mousedown",function(e){e.stopPropagation()})),r.appendChild(l),e.contentElement.appendChild(r),u.headerFilterElements.push(l),u.headerFilterColumns.push(e)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)},Filter.prototype.hideHeaderFilterElements=function(){this.headerFilterElements.forEach(function(e){e.style.display="none"})},Filter.prototype.showHeaderFilterElements=function(){this.headerFilterElements.forEach(function(e){e.style.display=""})},Filter.prototype.setHeaderFilterFocus=function(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())},Filter.prototype.setHeaderFilterValue=function(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},Filter.prototype.reloadHeaderFilter=function(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},Filter.prototype.hasChanged=function(){var e=this.changed;return this.changed=!1,e},Filter.prototype.setFilter=function(e,t,i){var r=this;r.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:i}]),r.addFilter(e)},Filter.prototype.addFilter=function(e,t,i){var r=this;Array.isArray(e)||(e=[{field:e,type:t,value:i}]),e.forEach(function(e){(e=r.findFilter(e))&&(r.filterList.push(e),r.changed=!0)}),this.table.options.persistentFilter&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("filter")},Filter.prototype.findFilter=function(e){var t,i=this;if(Array.isArray(e))return this.findSubFilters(e);var r=!1;return"function"==typeof e.field?r=function(t){return e.field(t,e.type||{})}:i.filters[e.type]?(t=i.table.columnManager.getColumnByField(e.field),r=t?function(r){return i.filters[e.type](e.value,t.getFieldValue(r))}:function(t){return i.filters[e.type](e.value,t[e.field])}):console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=r,!!e.func&&e},Filter.prototype.findSubFilters=function(e){var t=this,i=[];return e.forEach(function(e){(e=t.findFilter(e))&&i.push(e)}),!!i.length&&i},Filter.prototype.getFilters=function(e,t){var i=this,r=[];return e&&(r=i.getHeaderFilters()),i.filterList.forEach(function(e){r.push({field:e.field,type:e.type,value:e.value})}),t&&r.forEach(function(e){"function"==typeof e.type&&(e.type="function")}),r},Filter.prototype.getHeaderFilters=function(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e},Filter.prototype.removeFilter=function(e,t,i){var r=this;Array.isArray(e)||(e=[{field:e,type:t,value:i}]),e.forEach(function(e){var t=-1;t="object"==_typeof(e.field)?r.filterList.findIndex(function(t){return e===t}):r.filterList.findIndex(function(t){return e.field===t.field&&e.type===t.type&&e.value===t.value}),t>-1?(r.filterList.splice(t,1),r.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",e.type)}),this.table.options.persistentFilter&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("filter")},Filter.prototype.clearFilter=function(e){this.filterList=[],e&&this.clearHeaderFilter(),this.changed=!0,this.table.options.persistentFilter&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("filter")},Filter.prototype.clearHeaderFilter=function(){var e=this;this.headerFilters={},this.headerFilterColumns.forEach(function(t){t.modules.filter.value=null,e.reloadHeaderFilter(t)}),this.changed=!0},Filter.prototype.search=function(e,t,i,r){var n=this,l=[],o=[];return Array.isArray(t)||(t=[{field:t,type:i,value:r}]),t.forEach(function(e){(e=n.findFilter(e))&&o.push(e)}),this.table.rowManager.rows.forEach(function(t){var i=!0;o.forEach(function(e){n.filterRecurse(e,t.getData())||(i=!1)}),i&&l.push("data"===e?t.getData("data"):t.getComponent())}),l},Filter.prototype.filter=function(e,t){var i=this,r=[],n=[];return i.table.options.dataFiltering&&i.table.options.dataFiltering.call(i.table,i.getFilters()),i.table.options.ajaxFiltering||!i.filterList.length&&!Object.keys(i.headerFilters).length?r=e.slice(0):e.forEach(function(e){i.filterRow(e)&&r.push(e)}),i.table.options.dataFiltered&&(r.forEach(function(e){n.push(e.getComponent())}),i.table.options.dataFiltered.call(i.table,i.getFilters(),n)),r},Filter.prototype.filterRow=function(e,t){var i=this,r=!0,n=e.getData();i.filterList.forEach(function(e){i.filterRecurse(e,n)||(r=!1)});for(var l in i.headerFilters)i.headerFilters[l].func(n)||(r=!1);return r},Filter.prototype.filterRecurse=function(e,t){var i=this,r=!1;return Array.isArray(e)?e.forEach(function(e){i.filterRecurse(e,t)&&(r=!0)}):r=e.func(t),r},Filter.prototype.filters={"=":function(e,t){return t==e},"<":function(e,t){return t":function(e,t){return t>e},">=":function(e,t){return t>=e},"!=":function(e,t){return t!=e},regex:function(e,t){return"string"==typeof e&&(e=new RegExp(e)),e.test(t)},like:function(e,t){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().indexOf(e.toLowerCase())>-1},in:function(e,t){return Array.isArray(e)?e.indexOf(t)>-1:(console.warn("Filter Error - filter value is not an array:",e),!1)}},Tabulator.prototype.registerModule("filter",Filter); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/format.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/format.js deleted file mode 100644 index eb6f096636..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/format.js +++ /dev/null @@ -1,539 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var Format = function Format(table) { - this.table = table; //hold Tabulator object -}; - -//initialize column formatter -Format.prototype.initializeColumn = function (column) { - var self = this, - config = { params: column.definition.formatterParams || {} }; - - //set column formatter - switch (_typeof(column.definition.formatter)) { - case "string": - - if (column.definition.formatter === "tick") { - column.definition.formatter = "tickCross"; - - if (typeof config.params.crossElement == "undefined") { - config.params.crossElement = false; - } - - console.warn("DEPRECATION WANRING - the tick formatter has been depricated, please use the tickCross formatter with the crossElement param set to false"); - } - - if (self.formatters[column.definition.formatter]) { - config.formatter = self.formatters[column.definition.formatter]; - } else { - console.warn("Formatter Error - No such formatter found: ", column.definition.formatter); - config.formatter = self.formatters.plaintext; - } - break; - - case "function": - config.formatter = column.definition.formatter; - break; - - default: - config.formatter = self.formatters.plaintext; - break; - } - - column.modules.format = config; -}; - -Format.prototype.cellRendered = function (cell) { - if (cell.column.modules.format.renderedCallback) { - cell.column.modules.format.renderedCallback(); - } -}; - -//return a formatted value for a cell -Format.prototype.formatValue = function (cell) { - var component = cell.getComponent(), - params = typeof cell.column.modules.format.params === "function" ? cell.column.modules.format.params(component) : cell.column.modules.format.params; - - function onRendered(callback) { - cell.column.modules.format.renderedCallback = callback; - } - - return cell.column.modules.format.formatter.call(this, component, params, onRendered); -}; - -Format.prototype.sanitizeHTML = function (value) { - if (value) { - var entityMap = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '/': '/', - '`': '`', - '=': '=' - }; - - return String(value).replace(/[&<>"'`=\/]/g, function (s) { - return entityMap[s]; - }); - } else { - return value; - } -}; - -Format.prototype.emptyToSpace = function (value) { - return value === null || typeof value === "undefined" ? " " : value; -}; - -//get formatter for cell -Format.prototype.getFormatter = function (formatter) { - var formatter; - - switch (typeof formatter === "undefined" ? "undefined" : _typeof(formatter)) { - case "string": - if (this.formatters[formatter]) { - formatter = this.formatters[formatter]; - } else { - console.warn("Formatter Error - No such formatter found: ", formatter); - formatter = this.formatters.plaintext; - } - break; - - case "function": - formatter = formatter; - break; - - default: - formatter = this.formatters.plaintext; - break; - } - - return formatter; -}; - -//default data formatters -Format.prototype.formatters = { - //plain text value - plaintext: function plaintext(cell, formatterParams, onRendered) { - return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); - }, - - //html text value - html: function html(cell, formatterParams, onRendered) { - return cell.getValue(); - }, - - //multiline text area - textarea: function textarea(cell, formatterParams, onRendered) { - cell.getElement().style.whiteSpace = "pre-wrap"; - return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); - }, - - //currency formatting - money: function money(cell, formatterParams, onRendered) { - var floatVal = parseFloat(cell.getValue()), - number, - integer, - decimal, - rgx; - - var decimalSym = formatterParams.decimal || "."; - var thousandSym = formatterParams.thousand || ","; - var symbol = formatterParams.symbol || ""; - var after = !!formatterParams.symbolAfter; - var precision = typeof formatterParams.precision !== "undefined" ? formatterParams.precision : 2; - - if (isNaN(floatVal)) { - return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); - } - - number = precision !== false ? floatVal.toFixed(precision) : floatVal; - number = String(number).split("."); - - integer = number[0]; - decimal = number.length > 1 ? decimalSym + number[1] : ""; - - rgx = /(\d+)(\d{3})/; - - while (rgx.test(integer)) { - integer = integer.replace(rgx, "$1" + thousandSym + "$2"); - } - - return after ? integer + decimal + symbol : symbol + integer + decimal; - }, - - //clickable anchor tag - link: function link(cell, formatterParams, onRendered) { - var value = this.sanitizeHTML(cell.getValue()), - urlPrefix = formatterParams.urlPrefix || "", - label = this.emptyToSpace(value), - el = document.createElement("a"), - data; - - if (formatterParams.labelField) { - data = cell.getData(); - label = data[formatterParams.labelField]; - } - - if (formatterParams.label) { - switch (_typeof(formatterParams.label)) { - case "string": - label = formatterParams.label; - break; - - case "function": - label = formatterParams.label(cell); - break; - } - } - - if (formatterParams.urlField) { - data = cell.getData(); - value = data[formatterParams.urlField]; - } - - if (formatterParams.url) { - switch (_typeof(formatterParams.url)) { - case "string": - value = formatterParams.url; - break; - - case "function": - value = formatterParams.url(cell); - break; - } - } - - el.setAttribute("href", urlPrefix + value); - - if (formatterParams.target) { - el.setAttribute("target", formatterParams.target); - } - - el.innerHTML = this.emptyToSpace(label); - - return el; - }, - - //image element - image: function image(cell, formatterParams, onRendered) { - var el = document.createElement("img"); - el.setAttribute("src", cell.getValue()); - - switch (_typeof(formatterParams.height)) { - case "number": - element.style.height = formatterParams.height + "px"; - break; - - case "string": - element.style.height = formatterParams.height; - break; - } - - switch (_typeof(formatterParams.width)) { - case "number": - element.style.width = formatterParams.width + "px"; - break; - - case "string": - element.style.width = formatterParams.width; - break; - } - - el.addEventListener("load", function () { - cell.getRow().normalizeHeight(); - }); - - return el; - }, - - //tick or cross - tickCross: function tickCross(cell, formatterParams, onRendered) { - var value = cell.getValue(), - element = cell.getElement(), - empty = formatterParams.allowEmpty, - truthy = formatterParams.allowTruthy, - tick = typeof formatterParams.tickElement !== "undefined" ? formatterParams.tickElement : '', - cross = typeof formatterParams.crossElement !== "undefined" ? formatterParams.crossElement : ''; - - if (truthy && value || value === true || value === "true" || value === "True" || value === 1 || value === "1") { - element.setAttribute("aria-checked", true); - return tick || ""; - } else { - if (empty && (value === "null" || value === "" || value === null || typeof value === "undefined")) { - element.setAttribute("aria-checked", "mixed"); - return ""; - } else { - element.setAttribute("aria-checked", false); - return cross || ""; - } - } - }, - - datetime: function datetime(cell, formatterParams, onRendered) { - var inputFormat = formatterParams.inputFormat || "YYYY-MM-DD hh:mm:ss"; - var outputFormat = formatterParams.outputFormat || "DD/MM/YYYY hh:mm:ss"; - var invalid = typeof formatterParams.invalidPlaceholder !== "undefined" ? formatterParams.invalidPlaceholder : ""; - var value = cell.getValue(); - - var newDatetime = moment(value, inputFormat); - - if (newDatetime.isValid()) { - return newDatetime.format(outputFormat); - } else { - - if (invalid === true) { - return value; - } else if (typeof invalid === "function") { - return invalid(value); - } else { - return invalid; - } - } - }, - - datetimediff: function datetime(cell, formatterParams, onRendered) { - var inputFormat = formatterParams.inputFormat || "YYYY-MM-DD hh:mm:ss"; - var invalid = typeof formatterParams.invalidPlaceholder !== "undefined" ? formatterParams.invalidPlaceholder : ""; - var suffix = typeof formatterParams.suffix !== "undefined" ? formatterParams.suffix : false; - var unit = typeof formatterParams.unit !== "undefined" ? formatterParams.unit : undefined; - var humanize = typeof formatterParams.humanize !== "undefined" ? formatterParams.humanize : false; - var date = typeof formatterParams.date !== "undefined" ? formatterParams.date : moment(); - var value = cell.getValue(); - - var newDatetime = moment(value, inputFormat); - - if (newDatetime.isValid()) { - if (humanize) { - return moment.duration(newDatetime.diff(date)).humanize(suffix); - } else { - return newDatetime.diff(date, unit) + (suffix ? " " + suffix : ""); - } - } else { - - if (invalid === true) { - return value; - } else if (typeof invalid === "function") { - return invalid(value); - } else { - return invalid; - } - } - }, - - //select - lookup: function lookup(cell, formatterParams, onRendered) { - var value = cell.getValue(); - - if (typeof formatterParams[value] === "undefined") { - console.warn('Missing display value for ' + value); - return value; - } - - return formatterParams[value]; - }, - - //star rating - star: function star(cell, formatterParams, onRendered) { - var value = cell.getValue(), - element = cell.getElement(), - maxStars = formatterParams && formatterParams.stars ? formatterParams.stars : 5, - stars = document.createElement("span"), - star = document.createElementNS('http://www.w3.org/2000/svg', "svg"), - starActive = '', - starInactive = ''; - - //style stars holder - stars.style.verticalAlign = "middle"; - - //style star - star.setAttribute("width", "14"); - star.setAttribute("height", "14"); - star.setAttribute("viewBox", "0 0 512 512"); - star.setAttribute("xml:space", "preserve"); - star.style.padding = "0 1px"; - - value = parseInt(value) < maxStars ? parseInt(value) : maxStars; - - for (var i = 1; i <= maxStars; i++) { - var nextStar = star.cloneNode(true); - nextStar.innerHTML = i <= value ? starActive : starInactive; - - stars.appendChild(nextStar); - } - - element.style.whiteSpace = "nowrap"; - element.style.overflow = "hidden"; - element.style.textOverflow = "ellipsis"; - - element.setAttribute("aria-label", value); - - return stars; - }, - - //progress bar - progress: function progress(cell, formatterParams, onRendered) { - //progress bar - var value = this.sanitizeHTML(cell.getValue()) || 0, - element = cell.getElement(), - max = formatterParams && formatterParams.max ? formatterParams.max : 100, - min = formatterParams && formatterParams.min ? formatterParams.min : 0, - legendAlign = formatterParams && formatterParams.legendAlign ? formatterParams.legendAlign : "center", - percent, - percentValue, - color, - legend, - legendColor, - top, - left, - right, - bottom; - - //make sure value is in range - percentValue = parseFloat(value) <= max ? parseFloat(value) : max; - percentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min; - - //workout percentage - percent = (max - min) / 100; - percentValue = Math.round((percentValue - min) / percent); - - //set bar color - switch (_typeof(formatterParams.color)) { - case "string": - color = formatterParams.color; - break; - case "function": - color = formatterParams.color(value); - break; - case "object": - if (Array.isArray(formatterParams.color)) { - var unit = 100 / formatterParams.color.length; - var index = Math.floor(percentValue / unit); - - index = Math.min(index, formatterParams.color.length - 1); - index = Math.max(index, 0); - color = formatterParams.color[index]; - break; - } - default: - color = "#2DC214"; - } - - //generate legend - switch (_typeof(formatterParams.legend)) { - case "string": - legend = formatterParams.legend; - break; - case "function": - legend = formatterParams.legend(value); - break; - case "boolean": - legend = value; - break; - default: - legend = false; - } - - //set legend color - switch (_typeof(formatterParams.legendColor)) { - case "string": - legendColor = formatterParams.legendColor; - break; - case "function": - legendColor = formatterParams.legendColor(value); - break; - case "object": - if (Array.isArray(formatterParams.legendColor)) { - var unit = 100 / formatterParams.legendColor.length; - var index = Math.floor(percentValue / unit); - - index = Math.min(index, formatterParams.legendColor.length - 1); - index = Math.max(index, 0); - legendColor = formatterParams.legendColor[index]; - } - break; - default: - legendColor = "#000"; - } - - element.style.minWidth = "30px"; - element.style.position = "relative"; - - element.setAttribute("aria-label", percentValue); - - return "
" + (legend ? "
" + legend + "
" : ""); - }, - - //background color - color: function color(cell, formatterParams, onRendered) { - cell.getElement().style.backgroundColor = this.sanitizeHTML(cell.getValue()); - return ""; - }, - - //tick icon - buttonTick: function buttonTick(cell, formatterParams, onRendered) { - return ''; - }, - - //cross icon - buttonCross: function buttonCross(cell, formatterParams, onRendered) { - return ''; - }, - - //current row number - rownum: function rownum(cell, formatterParams, onRendered) { - return this.table.rowManager.activeRows.indexOf(cell.getRow()._getSelf()) + 1; - }, - - //row handle - handle: function handle(cell, formatterParams, onRendered) { - cell.getElement().classList.add("tabulator-row-handle"); - return "
"; - }, - - responsiveCollapse: function responsiveCollapse(cell, formatterParams, onRendered) { - var self = this, - open = false, - el = document.createElement("div"); - - function toggleList(isOpen) { - var collapse = cell.getRow().getElement().getElementsByClassName("tabulator-responsive-collapse")[0]; - - open = isOpen; - - if (open) { - el.classList.add("open"); - if (collapse) { - collapse.style.display = ''; - } - } else { - el.classList.remove("open"); - if (collapse) { - collapse.style.display = 'none'; - } - } - } - - el.classList.add("tabulator-responsive-collapse-toggle"); - el.innerHTML = "+-"; - - cell.getElement().classList.add("tabulator-row-handle"); - - if (self.table.options.responsiveLayoutCollapseStartOpen) { - open = true; - } - - el.addEventListener("click", function () { - toggleList(!open); - }); - - toggleList(open); - - return el; - } -}; - -Tabulator.prototype.registerModule("format", Format); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/format.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/format.min.js deleted file mode 100644 index d625e4344c..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/format.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Format=function(e){this.table=e};Format.prototype.initializeColumn=function(e){var t=this,r={params:e.definition.formatterParams||{}};switch(_typeof(e.definition.formatter)){case"string":"tick"===e.definition.formatter&&(e.definition.formatter="tickCross",void 0===r.params.crossElement&&(r.params.crossElement=!1),console.warn("DEPRECATION WANRING - the tick formatter has been depricated, please use the tickCross formatter with the crossElement param set to false")),t.formatters[e.definition.formatter]?r.formatter=t.formatters[e.definition.formatter]:(console.warn("Formatter Error - No such formatter found: ",e.definition.formatter),r.formatter=t.formatters.plaintext);break;case"function":r.formatter=e.definition.formatter;break;default:r.formatter=t.formatters.plaintext}e.modules.format=r},Format.prototype.cellRendered=function(e){e.column.modules.format.renderedCallback&&e.column.modules.format.renderedCallback()},Format.prototype.formatValue=function(e){function t(t){e.column.modules.format.renderedCallback=t}var r=e.getComponent(),o="function"==typeof e.column.modules.format.params?e.column.modules.format.params(r):e.column.modules.format.params;return e.column.modules.format.formatter.call(this,r,o,t)},Format.prototype.sanitizeHTML=function(e){if(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=\/]/g,function(e){return t[e]})}return e},Format.prototype.emptyToSpace=function(e){return null===e||void 0===e?" ":e},Format.prototype.getFormatter=function(e){var e;switch(void 0===e?"undefined":_typeof(e)){case"string":this.formatters[e]?e=this.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=this.formatters.plaintext);break;case"function":e=e;break;default:e=this.formatters.plaintext}return e},Format.prototype.formatters={plaintext:function(e,t,r){return this.emptyToSpace(this.sanitizeHTML(e.getValue()))},html:function(e,t,r){return e.getValue()},textarea:function(e,t,r){return e.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(e.getValue()))},money:function(e,t,r){var o,a,i,l,n=parseFloat(e.getValue()),s=t.decimal||".",c=t.thousand||",",u=t.symbol||"",d=!!t.symbolAfter,m=void 0!==t.precision?t.precision:2;if(isNaN(n))return this.emptyToSpace(this.sanitizeHTML(e.getValue()));for(o=!1!==m?n.toFixed(m):n,o=String(o).split("."),a=o[0],i=o.length>1?s+o[1]:"",l=/(\d+)(\d{3})/;l.test(a);)a=a.replace(l,"$1"+c+"$2");return d?a+i+u:u+a+i},link:function(e,t,r){var o,a=this.sanitizeHTML(e.getValue()),i=t.urlPrefix||"",l=this.emptyToSpace(a),n=document.createElement("a");if(t.labelField&&(o=e.getData(),l=o[t.labelField]),t.label)switch(_typeof(t.label)){case"string":l=t.label;break;case"function":l=t.label(e)}if(t.urlField&&(o=e.getData(),a=o[t.urlField]),t.url)switch(_typeof(t.url)){case"string":a=t.url;break;case"function":a=t.url(e)}return n.setAttribute("href",i+a),t.target&&n.setAttribute("target",t.target),n.innerHTML=this.emptyToSpace(l),n},image:function(e,t,r){var o=document.createElement("img");switch(o.setAttribute("src",e.getValue()),_typeof(t.height)){case"number":element.style.height=t.height+"px";break;case"string":element.style.height=t.height}switch(_typeof(t.width)){case"number":element.style.width=t.width+"px";break;case"string":element.style.width=t.width}return o.addEventListener("load",function(){e.getRow().normalizeHeight()}),o},tickCross:function(e,t,r){var o=e.getValue(),a=e.getElement(),i=t.allowEmpty,l=t.allowTruthy,n=void 0!==t.tickElement?t.tickElement:'',s=void 0!==t.crossElement?t.crossElement:'';return l&&o||!0===o||"true"===o||"True"===o||1===o||"1"===o?(a.setAttribute("aria-checked",!0),n||""):!i||"null"!==o&&""!==o&&null!==o&&void 0!==o?(a.setAttribute("aria-checked",!1),s||""):(a.setAttribute("aria-checked","mixed"),"")},datetime:function(e,t,r){var o=t.inputFormat||"YYYY-MM-DD hh:mm:ss",a=t.outputFormat||"DD/MM/YYYY hh:mm:ss",i=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",l=e.getValue(),n=moment(l,o);return n.isValid()?n.format(a):!0===i?l:"function"==typeof i?i(l):i},datetimediff:function(e,t,r){var o=t.inputFormat||"YYYY-MM-DD hh:mm:ss",a=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",i=void 0!==t.suffix&&t.suffix,l=void 0!==t.unit?t.unit:void 0,n=void 0!==t.humanize&&t.humanize,s=void 0!==t.date?t.date:moment(),c=e.getValue(),u=moment(c,o);return u.isValid()?n?moment.duration(u.diff(s)).humanize(i):u.diff(s,l)+(i?" "+i:""):!0===a?c:"function"==typeof a?a(c):a},lookup:function(e,t,r){var o=e.getValue();return void 0===t[o]?(console.warn("Missing display value for "+o),o):t[o]},star:function(e,t,r){var o=e.getValue(),a=e.getElement(),i=t&&t.stars?t.stars:5,l=document.createElement("span"),n=document.createElementNS("http://www.w3.org/2000/svg","svg");l.style.verticalAlign="middle",n.setAttribute("width","14"),n.setAttribute("height","14"),n.setAttribute("viewBox","0 0 512 512"),n.setAttribute("xml:space","preserve"),n.style.padding="0 1px",o=parseInt(o)':'',l.appendChild(c)}return a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.setAttribute("aria-label",o),l},progress:function(e,t,r){var o,a,i,l,n,s=this.sanitizeHTML(e.getValue())||0,c=e.getElement(),u=t&&t.max?t.max:100,d=t&&t.min?t.min:0,m=t&&t.legendAlign?t.legendAlign:"center";switch(a=parseFloat(s)<=u?parseFloat(s):u,a=parseFloat(a)>=d?parseFloat(a):d,o=(u-d)/100,a=Math.round((a-d)/o),_typeof(t.color)){case"string":i=t.color;break;case"function":i=t.color(s);break;case"object":if(Array.isArray(t.color)){var p=100/t.color.length,f=Math.floor(a/p);f=Math.min(f,t.color.length-1),f=Math.max(f,0),i=t.color[f];break}default:i="#2DC214"}switch(_typeof(t.legend)){case"string":l=t.legend;break;case"function":l=t.legend(s);break;case"boolean":l=s;break;default:l=!1}switch(_typeof(t.legendColor)){case"string":n=t.legendColor;break;case"function":n=t.legendColor(s);break;case"object":if(Array.isArray(t.legendColor)){var p=100/t.legendColor.length,f=Math.floor(a/p);f=Math.min(f,t.legendColor.length-1),f=Math.max(f,0),n=t.legendColor[f]}break;default:n="#000"}return c.style.minWidth="30px",c.style.position="relative",c.setAttribute("aria-label",a),"
"+(l?"
"+l+"
":"")},color:function(e,t,r){return e.getElement().style.backgroundColor=this.sanitizeHTML(e.getValue()),""},buttonTick:function(e,t,r){return''},buttonCross:function(e,t,r){return''},rownum:function(e,t,r){return this.table.rowManager.activeRows.indexOf(e.getRow()._getSelf())+1},handle:function(e,t,r){return e.getElement().classList.add("tabulator-row-handle"),"
"},responsiveCollapse:function(e,t,r){function o(t){var r=e.getRow().getElement().getElementsByClassName("tabulator-responsive-collapse")[0];i=t,i?(l.classList.add("open"),r&&(r.style.display="")):(l.classList.remove("open"),r&&(r.style.display="none"))}var a=this,i=!1,l=document.createElement("div");return l.classList.add("tabulator-responsive-collapse-toggle"),l.innerHTML="+-",e.getElement().classList.add("tabulator-row-handle"),a.table.options.responsiveLayoutCollapseStartOpen&&(i=!0),l.addEventListener("click",function(){o(!i)}),o(i),l}},Tabulator.prototype.registerModule("format",Format); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/frozen_columns.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/frozen_columns.js deleted file mode 100644 index d3acbe5d2d..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/frozen_columns.js +++ /dev/null @@ -1,160 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var FrozenColumns = function FrozenColumns(table) { - this.table = table; //hold Tabulator object - this.leftColumns = []; - this.rightColumns = []; - this.leftMargin = 0; - this.rightMargin = 0; - this.initializationMode = "left"; - this.active = false; -}; - -//reset initial state -FrozenColumns.prototype.reset = function () { - this.initializationMode = "left"; - this.leftColumns = []; - this.rightColumns = []; - this.active = false; -}; - -//initialize specific column -FrozenColumns.prototype.initializeColumn = function (column) { - var config = { margin: 0, edge: false }; - - if (column.definition.frozen) { - - if (!column.parent.isGroup) { - - if (!column.isGroup) { - config.position = this.initializationMode; - - if (this.initializationMode == "left") { - this.leftColumns.push(column); - } else { - this.rightColumns.unshift(column); - } - - this.active = true; - - column.modules.frozen = config; - } else { - console.warn("Frozen Column Error - Column Groups cannot be frozen"); - } - } else { - console.warn("Frozen Column Error - Grouped columns cannot be frozen"); - } - } else { - this.initializationMode = "right"; - } -}; - -//layout columns appropropriatly -FrozenColumns.prototype.layout = function () { - var self = this, - tableHolder = this.table.rowManager.element, - rightMargin = 0; - - if (self.active) { - - //calculate row padding - - self.leftMargin = self._calcSpace(self.leftColumns, self.leftColumns.length); - self.table.columnManager.headersElement.style.marginLeft = self.leftMargin + "px"; - - self.rightMargin = self._calcSpace(self.rightColumns, self.rightColumns.length); - self.table.columnManager.element.style.paddingRight = self.rightMargin + "px"; - - self.table.rowManager.activeRows.forEach(function (row) { - self.layoutRow(row); - }); - - if (self.table.modExists("columnCalcs")) { - if (self.table.modules.columnCalcs.topInitialized && self.table.modules.columnCalcs.topRow) { - self.layoutRow(self.table.modules.columnCalcs.topRow); - } - if (self.table.modules.columnCalcs.botInitialized && self.table.modules.columnCalcs.botRow) { - self.layoutRow(self.table.modules.columnCalcs.botRow); - } - } - - //calculate left columns - self.leftColumns.forEach(function (column, i) { - column.modules.frozen.margin = self._calcSpace(self.leftColumns, i) + self.table.columnManager.scrollLeft; - - if (i == self.leftColumns.length - 1) { - column.modules.frozen.edge = true; - } else { - column.modules.frozen.edge = false; - } - - self.layoutColumn(column); - }); - - //calculate right frozen columns - rightMargin = self.table.rowManager.element.clientWidth + self.table.columnManager.scrollLeft; - - // if(tableHolder.scrollHeight > tableHolder.clientHeight){ - // rightMargin -= tableHolder.offsetWidth - tableHolder.clientWidth; - // } - - self.rightColumns.forEach(function (column, i) { - column.modules.frozen.margin = rightMargin - self._calcSpace(self.rightColumns, i + 1); - - if (i == self.rightColumns.length - 1) { - column.modules.frozen.edge = true; - } else { - column.modules.frozen.edge = false; - } - - self.layoutColumn(column); - }); - - this.table.rowManager.tableElement.style.marginRight = this.rightMargin + "px"; - } -}; - -FrozenColumns.prototype.layoutColumn = function (column) { - var self = this; - - self.layoutElement(column.getElement(), column); - - column.cells.forEach(function (cell) { - self.layoutElement(cell.getElement(), column); - }); -}; - -FrozenColumns.prototype.layoutRow = function (row) { - var rowEl = row.getElement(); - - rowEl.style.paddingLeft = this.leftMargin + "px"; - // rowEl.style.paddingRight = this.rightMargin + "px"; -}; - -FrozenColumns.prototype.layoutElement = function (element, column) { - - if (column.modules.frozen) { - element.style.position = "absolute"; - element.style.left = column.modules.frozen.margin + "px"; - - element.classList.add("tabulator-frozen"); - - if (column.modules.frozen.edge) { - element.classList.add("tabulator-frozen-" + column.modules.frozen.position); - } - } -}; - -FrozenColumns.prototype._calcSpace = function (columns, index) { - var width = 0; - - for (var i = 0; i < index; i++) { - if (columns[i].visible) { - width += columns[i].getWidth(); - } - } - - return width; -}; - -Tabulator.prototype.registerModule("frozenColumns", FrozenColumns); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/frozen_columns.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/frozen_columns.min.js deleted file mode 100644 index 0c3f1faecc..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/frozen_columns.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var FrozenColumns=function(o){this.table=o,this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.initializationMode="left",this.active=!1};FrozenColumns.prototype.reset=function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.active=!1},FrozenColumns.prototype.initializeColumn=function(o){var e={margin:0,edge:!1};o.definition.frozen?o.parent.isGroup?console.warn("Frozen Column Error - Grouped columns cannot be frozen"):o.isGroup?console.warn("Frozen Column Error - Column Groups cannot be frozen"):(e.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(o):this.rightColumns.unshift(o),this.active=!0,o.modules.frozen=e):this.initializationMode="right"},FrozenColumns.prototype.layout=function(){var o=this,e=(this.table.rowManager.element,0);o.active&&(o.leftMargin=o._calcSpace(o.leftColumns,o.leftColumns.length),o.table.columnManager.headersElement.style.marginLeft=o.leftMargin+"px",o.rightMargin=o._calcSpace(o.rightColumns,o.rightColumns.length),o.table.columnManager.element.style.paddingRight=o.rightMargin+"px",o.table.rowManager.activeRows.forEach(function(e){o.layoutRow(e)}),o.table.modExists("columnCalcs")&&(o.table.modules.columnCalcs.topInitialized&&o.table.modules.columnCalcs.topRow&&o.layoutRow(o.table.modules.columnCalcs.topRow),o.table.modules.columnCalcs.botInitialized&&o.table.modules.columnCalcs.botRow&&o.layoutRow(o.table.modules.columnCalcs.botRow)),o.leftColumns.forEach(function(e,t){e.modules.frozen.margin=o._calcSpace(o.leftColumns,t)+o.table.columnManager.scrollLeft,t==o.leftColumns.length-1?e.modules.frozen.edge=!0:e.modules.frozen.edge=!1,o.layoutColumn(e)}),e=o.table.rowManager.element.clientWidth+o.table.columnManager.scrollLeft,o.rightColumns.forEach(function(t,n){t.modules.frozen.margin=e-o._calcSpace(o.rightColumns,n+1),n==o.rightColumns.length-1?t.modules.frozen.edge=!0:t.modules.frozen.edge=!1,o.layoutColumn(t)}),this.table.rowManager.tableElement.style.marginRight=this.rightMargin+"px")},FrozenColumns.prototype.layoutColumn=function(o){var e=this;e.layoutElement(o.getElement(),o),o.cells.forEach(function(t){e.layoutElement(t.getElement(),o)})},FrozenColumns.prototype.layoutRow=function(o){o.getElement().style.paddingLeft=this.leftMargin+"px"},FrozenColumns.prototype.layoutElement=function(o,e){e.modules.frozen&&(o.style.position="absolute",o.style.left=e.modules.frozen.margin+"px",o.classList.add("tabulator-frozen"),e.modules.frozen.edge&&o.classList.add("tabulator-frozen-"+e.modules.frozen.position))},FrozenColumns.prototype._calcSpace=function(o,e){for(var t=0,n=0;n -1) { - output.splice(index, 1); - } - }); - - return output; -}; - -FrozenRows.prototype.freezeRow = function (row) { - if (!row.modules.frozen) { - row.modules.frozen = true; - this.topElement.appendChild(row.getElement()); - row.initialize(); - row.normalizeHeight(); - this.table.rowManager.adjustTableSize(); - - this.rows.push(row); - - this.table.rowManager.refreshActiveData("display"); - - this.styleRows(); - } else { - console.warn("Freeze Error - Row is already frozen"); - } -}; - -FrozenRows.prototype.unfreezeRow = function (row) { - var index = this.rows.indexOf(row); - - if (row.modules.frozen) { - - row.modules.frozen = false; - - var rowEl = row.getElement(); - rowEl.parentNode.removeChild(rowEl); - - this.table.rowManager.adjustTableSize(); - - this.rows.splice(index, 1); - - this.table.rowManager.refreshActiveData("display"); - - if (this.rows.length) { - this.styleRows(); - } - } else { - console.warn("Freeze Error - Row is already unfrozen"); - } -}; - -FrozenRows.prototype.styleRows = function (row) { - var self = this; - - this.rows.forEach(function (row, i) { - self.table.rowManager.styleRow(row, i); - }); -}; - -Tabulator.prototype.registerModule("frozenRows", FrozenRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/frozen_rows.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/frozen_rows.min.js deleted file mode 100644 index 844367a167..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/frozen_rows.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var FrozenRows=function(e){this.table=e,this.topElement=document.createElement("div"),this.rows=[],this.displayIndex=0};FrozenRows.prototype.initialize=function(){this.rows=[],this.topElement.classList.add("tabulator-frozen-rows-holder"),this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling)},FrozenRows.prototype.setDisplayIndex=function(e){this.displayIndex=e},FrozenRows.prototype.getDisplayIndex=function(){return this.displayIndex},FrozenRows.prototype.isFrozen=function(){return!!this.rows.length},FrozenRows.prototype.getRows=function(e){var o=e.slice(0);return this.rows.forEach(function(e){var t=o.indexOf(e);t>-1&&o.splice(t,1)}),o},FrozenRows.prototype.freezeRow=function(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(e),this.table.rowManager.refreshActiveData("display"),this.styleRows())},FrozenRows.prototype.unfreezeRow=function(e){var o=this.rows.indexOf(e);if(e.modules.frozen){e.modules.frozen=!1;var t=e.getElement();t.parentNode.removeChild(t),this.table.rowManager.adjustTableSize(),this.rows.splice(o,1),this.table.rowManager.refreshActiveData("display"),this.rows.length&&this.styleRows()}else console.warn("Freeze Error - Row is already unfrozen")},FrozenRows.prototype.styleRows=function(e){var o=this;this.rows.forEach(function(e,t){o.table.rowManager.styleRow(e,t)})},Tabulator.prototype.registerModule("frozenRows",FrozenRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/group_rows.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/group_rows.js deleted file mode 100644 index 463098ebb1..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/group_rows.js +++ /dev/null @@ -1,975 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -//public group object -var GroupComponent = function GroupComponent(group) { - this._group = group; - this.type = "GroupComponent"; -}; - -GroupComponent.prototype.getKey = function () { - return this._group.key; -}; - -GroupComponent.prototype.getElement = function () { - return this._group.element; -}; - -GroupComponent.prototype.getRows = function () { - return this._group.getRows(true); -}; - -GroupComponent.prototype.getSubGroups = function () { - return this._group.getSubGroups(true); -}; - -GroupComponent.prototype.getParentGroup = function () { - return this._group.parent ? this._group.parent.getComponent() : false; -}; - -GroupComponent.prototype.getVisibility = function () { - return this._group.visible; -}; - -GroupComponent.prototype.show = function () { - this._group.show(); -}; - -GroupComponent.prototype.hide = function () { - this._group.hide(); -}; - -GroupComponent.prototype.toggle = function () { - this._group.toggleVisibility(); -}; - -GroupComponent.prototype._getSelf = function () { - return this._group; -}; - -GroupComponent.prototype.getTable = function () { - return this._group.table; -}; - -////////////////////////////////////////////////// -//////////////// Group Functions ///////////////// -////////////////////////////////////////////////// - -var Group = function Group(groupManager, parent, level, key, field, generator, oldGroup) { - - this.groupManager = groupManager; - this.parent = parent; - this.key = key; - this.level = level; - this.field = field; - this.hasSubGroups = level < groupManager.groupIDLookups.length - 1; - this.addRow = this.hasSubGroups ? this._addRowToGroup : this._addRow; - this.type = "group"; //type of element - this.old = oldGroup; - this.rows = []; - this.groups = []; - this.groupList = []; - this.generator = generator; - this.elementContents = false; - this.height = 0; - this.outerHeight = 0; - this.initialized = false; - this.calcs = {}; - this.initialized = false; - this.modules = {}; - - this.visible = oldGroup ? oldGroup.visible : typeof groupManager.startOpen[level] !== "undefined" ? groupManager.startOpen[level] : groupManager.startOpen[0]; - - this.createElements(); - this.addBindings(); - - this.createValueGroups(); -}; - -Group.prototype.createElements = function () { - this.element = document.createElement("div"); - this.element.classList.add("tabulator-row"); - this.element.classList.add("tabulator-group"); - this.element.classList.add("tabulator-group-level-" + this.level); - this.element.setAttribute("role", "rowgroup"); - - this.arrowElement = document.createElement("div"); - this.arrowElement.classList.add("tabulator-arrow"); -}; - -Group.prototype.createValueGroups = function () { - var _this = this; - - var level = this.level + 1; - if (this.groupManager.allowedValues && this.groupManager.allowedValues[level]) { - this.groupManager.allowedValues[level].forEach(function (value) { - _this._createGroup(value, level); - }); - } -}; - -Group.prototype.addBindings = function () { - var self = this, - dblTap, - tapHold, - tap, - toggleElement; - - //handle group click events - if (self.groupManager.table.options.groupClick) { - self.element.addEventListener("click", function (e) { - self.groupManager.table.options.groupClick(e, self.getComponent()); - }); - } - - if (self.groupManager.table.options.groupDblClick) { - self.element.addEventListener("dblclick", function (e) { - self.groupManager.table.options.groupDblClick(e, self.getComponent()); - }); - } - - if (self.groupManager.table.options.groupContext) { - self.element.addEventListener("contextmenu", function (e) { - self.groupManager.table.options.groupContext(e, self.getComponent()); - }); - } - - if (self.groupManager.table.options.groupTap) { - - tap = false; - - self.element.addEventListener("touchstart", function (e) { - tap = true; - }); - - self.element.addEventListener("touchend", function (e) { - if (tap) { - self.groupManager.table.options.groupTap(e, self.getComponent()); - } - - tap = false; - }); - } - - if (self.groupManager.table.options.groupDblTap) { - - dblTap = null; - - self.element.addEventListener("touchend", function (e) { - - if (dblTap) { - clearTimeout(dblTap); - dblTap = null; - - self.groupManager.table.options.groupDblTap(e, self.getComponent()); - } else { - - dblTap = setTimeout(function () { - clearTimeout(dblTap); - dblTap = null; - }, 300); - } - }); - } - - if (self.groupManager.table.options.groupTapHold) { - - tapHold = null; - - self.element.addEventListener("touchstart", function (e) { - clearTimeout(tapHold); - - tapHold = setTimeout(function () { - clearTimeout(tapHold); - tapHold = null; - tap = false; - self.groupManager.table.options.groupTapHold(e, self.getComponent()); - }, 1000); - }); - - self.element.addEventListener("touchend", function (e) { - clearTimeout(tapHold); - tapHold = null; - }); - } - - if (self.groupManager.table.options.groupToggleElement) { - toggleElement = self.groupManager.table.options.groupToggleElement == "arrow" ? self.arrowElement : self.element; - - toggleElement.addEventListener("click", function (e) { - e.stopPropagation(); - e.stopImmediatePropagation(); - self.toggleVisibility(); - }); - } -}; - -Group.prototype._createGroup = function (groupID, level) { - var groupKey = level + "_" + groupID; - var group = new Group(this.groupManager, this, level, groupID, this.groupManager.groupIDLookups[level].field, this.groupManager.headerGenerator[level] || this.groupManager.headerGenerator[0], this.old ? this.old.groups[groupKey] : false); - - this.groups[groupKey] = group; - this.groupList.push(group); -}; - -Group.prototype._addRowToGroup = function (row) { - - var level = this.level + 1; - - if (this.hasSubGroups) { - var groupID = this.groupManager.groupIDLookups[level].func(row.getData()), - groupKey = level + "_" + groupID; - - if (this.groupManager.allowedValues && this.groupManager.allowedValues[level]) { - if (this.groups[groupKey]) { - this.groups[groupKey].addRow(row); - } - } else { - if (!this.groups[groupKey]) { - this._createGroup(groupID, level); - } - - this.groups[groupKey].addRow(row); - } - } -}; - -Group.prototype._addRow = function (row) { - this.rows.push(row); - row.modules.group = this; -}; - -Group.prototype.insertRow = function (row, to, after) { - var data = this.conformRowData({}); - - row.updateData(data); - - var toIndex = this.rows.indexOf(to); - - if (toIndex > -1) { - if (after) { - this.rows.splice(toIndex + 1, 0, row); - } else { - this.rows.splice(toIndex, 0, row); - } - } else { - if (after) { - this.rows.push(row); - } else { - this.rows.unshift(row); - } - } - - row.modules.group = this; - - this.generateGroupHeaderContents(); - - if (this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.options.columnCalcs != "table") { - this.groupManager.table.modules.columnCalcs.recalcGroup(this); - } -}; - -Group.prototype.getRowIndex = function (row) {}; - -//update row data to match grouping contraints -Group.prototype.conformRowData = function (data) { - if (this.field) { - data[this.field] = this.key; - } else { - console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"); - } - - if (this.parent) { - data = this.parent.conformRowData(data); - } - - return data; -}; - -Group.prototype.removeRow = function (row) { - var index = this.rows.indexOf(row); - - if (index > -1) { - this.rows.splice(index, 1); - } - - if (!this.rows.length) { - if (this.parent) { - this.parent.removeGroup(this); - } else { - this.groupManager.removeGroup(this); - } - - this.groupManager.updateGroupRows(true); - } else { - this.generateGroupHeaderContents(); - if (this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.options.columnCalcs != "table") { - this.groupManager.table.modules.columnCalcs.recalcGroup(this); - } - } -}; - -Group.prototype.removeGroup = function (group) { - var groupKey = group.level + "_" + group.key, - index; - - if (this.groups[groupKey]) { - delete this.groups[groupKey]; - - index = this.groupList.indexOf(group); - - if (index > -1) { - this.groupList.splice(index, 1); - } - - if (!this.groupList.length) { - if (this.parent) { - this.parent.removeGroup(this); - } else { - this.groupManager.removeGroup(this); - } - } - } -}; - -Group.prototype.getHeadersAndRows = function () { - var output = []; - - output.push(this); - - this._visSet(); - - if (this.visible) { - - if (this.groupList.length) { - this.groupList.forEach(function (group) { - output = output.concat(group.getHeadersAndRows()); - }); - } else { - if (this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()) { - this.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows); - output.push(this.calcs.top); - } - - output = output.concat(this.rows); - - if (this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()) { - this.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows); - output.push(this.calcs.bottom); - } - } - } else { - if (!this.groupList.length && this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.options.groupClosedShowCalcs) { - if (this.groupManager.table.modExists("columnCalcs")) { - if (this.groupManager.table.modules.columnCalcs.hasTopCalcs()) { - this.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows); - output.push(this.calcs.top); - } - - if (this.groupManager.table.modules.columnCalcs.hasBottomCalcs()) { - this.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows); - output.push(this.calcs.bottom); - } - } - } - } - - return output; -}; - -Group.prototype.getData = function (visible, transform) { - var self = this, - output = []; - - this._visSet(); - - if (!visible || visible && this.visible) { - this.rows.forEach(function (row) { - output.push(row.getData(transform || "data")); - }); - } - - return output; -}; - -// Group.prototype.getRows = function(){ -// this._visSet(); - -// return this.visible ? this.rows : []; -// }; - -Group.prototype.getRowCount = function () { - var count = 0; - - if (this.groupList.length) { - this.groupList.forEach(function (group) { - count += group.getRowCount(); - }); - } else { - count = this.rows.length; - } - return count; -}; - -Group.prototype.toggleVisibility = function () { - if (this.visible) { - this.hide(); - } else { - this.show(); - } -}; - -Group.prototype.hide = function () { - this.visible = false; - - if (this.groupManager.table.rowManager.getRenderMode() == "classic" && !this.groupManager.table.options.pagination) { - - this.element.classList.remove("tabulator-group-visible"); - - if (this.groupList.length) { - this.groupList.forEach(function (group) { - - var el; - - if (group.calcs.top) { - el = group.calcs.top.getElement(); - el.parentNode.removeChild(el); - } - - if (group.calcs.bottom) { - el = group.calcs.bottom.getElement(); - el.parentNode.removeChild(el); - } - - var rows = group.getHeadersAndRows(); - - rows.forEach(function (row) { - var rowEl = row.getElement(); - rowEl.parentNode.removeChild(rowEl); - }); - }); - } else { - this.rows.forEach(function (row) { - var rowEl = row.getElement(); - rowEl.parentNode.removeChild(rowEl); - }); - } - - this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex()); - } else { - this.groupManager.updateGroupRows(true); - } - - this.groupManager.table.options.groupVisibilityChanged.call(this.table, this.getComponent(), false); -}; - -Group.prototype.show = function () { - var self = this; - - self.visible = true; - - if (this.groupManager.table.rowManager.getRenderMode() == "classic" && !this.groupManager.table.options.pagination) { - - this.element.classList.add("tabulator-group-visible"); - - var prev = self.getElement(); - - if (this.groupList.length) { - this.groupList.forEach(function (group) { - var rows = group.getHeadersAndRows(); - - rows.forEach(function (row) { - var rowEl = row.getElement(); - prev.parentNode.insertBefore(rowEl, prev.nextSibling); - row.initialize(); - prev = rowEl; - }); - }); - } else { - self.rows.forEach(function (row) { - var rowEl = row.getElement(); - prev.parentNode.insertBefore(rowEl, prev.nextSibling); - row.initialize(); - prev = rowEl; - }); - } - - this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex()); - } else { - this.groupManager.updateGroupRows(true); - } - - this.groupManager.table.options.groupVisibilityChanged.call(this.table, this.getComponent(), true); -}; - -Group.prototype._visSet = function () { - var data = []; - - if (typeof this.visible == "function") { - - this.rows.forEach(function (row) { - data.push(row.getData()); - }); - - this.visible = this.visible(this.key, this.getRowCount(), data, this.getComponent()); - } -}; - -Group.prototype.getRowGroup = function (row) { - var match = false; - if (this.groupList.length) { - this.groupList.forEach(function (group) { - var result = group.getRowGroup(row); - - if (result) { - match = result; - } - }); - } else { - if (this.rows.find(function (item) { - return item === row; - })) { - match = this; - } - } - - return match; -}; - -Group.prototype.getSubGroups = function (component) { - var output = []; - - this.groupList.forEach(function (child) { - output.push(component ? child.getComponent() : child); - }); - - return output; -}; - -Group.prototype.getRows = function (compoment) { - var output = []; - - this.rows.forEach(function (row) { - output.push(compoment ? row.getComponent() : row); - }); - - return output; -}; - -Group.prototype.generateGroupHeaderContents = function () { - var data = []; - - this.rows.forEach(function (row) { - data.push(row.getData()); - }); - - this.elementContents = this.generator(this.key, this.getRowCount(), data, this.getComponent()); - - while (this.element.firstChild) { - this.element.removeChild(this.element.firstChild); - }if (typeof this.elementContents === "string") { - this.element.innerHTML = this.elementContents; - } else { - this.element.appendChild(this.elementContents); - } - - this.element.insertBefore(this.arrowElement, this.element.firstChild); -}; - -////////////// Standard Row Functions ////////////// - -Group.prototype.getElement = function () { - this.addBindingsd = false; - - this._visSet(); - - if (this.visible) { - this.element.classList.add("tabulator-group-visible"); - } else { - this.element.classList.remove("tabulator-group-visible"); - } - - this.element.childNodes.forEach(function (child) { - child.parentNode.removeChild(child); - }); - - this.generateGroupHeaderContents(); - - // this.addBindings(); - - return this.element; -}; - -//normalize the height of elements in the row -Group.prototype.normalizeHeight = function () { - this.setHeight(this.element.clientHeight); -}; - -Group.prototype.initialize = function (force) { - if (!this.initialized || force) { - this.normalizeHeight(); - this.initialized = true; - } -}; - -Group.prototype.reinitialize = function () { - this.initialized = false; - this.height = 0; - - if (Tabulator.prototype.helpers.elVisible(this.element)) { - this.initialize(true); - } -}; - -Group.prototype.setHeight = function (height) { - if (this.height != height) { - this.height = height; - this.outerHeight = this.element.offsetHeight; - } -}; - -//return rows outer height -Group.prototype.getHeight = function () { - return this.outerHeight; -}; - -Group.prototype.getGroup = function () { - return this; -}; - -Group.prototype.reinitializeHeight = function () {}; -Group.prototype.calcHeight = function () {}; -Group.prototype.setCellHeight = function () {}; -Group.prototype.clearCellHeight = function () {}; - -//////////////// Object Generation ///////////////// -Group.prototype.getComponent = function () { - return new GroupComponent(this); -}; - -////////////////////////////////////////////////// -////////////// Group Row Extension /////////////// -////////////////////////////////////////////////// - -var GroupRows = function GroupRows(table) { - - this.table = table; //hold Tabulator object - - this.groupIDLookups = false; //enable table grouping and set field to group by - this.startOpen = [function () { - return false; - }]; //starting state of group - this.headerGenerator = [function () { - return ""; - }]; - this.groupList = []; //ordered list of groups - this.allowedValues = false; - this.groups = {}; //hold row groups - this.displayIndex = 0; //index in display pipeline -}; - -//initialize group configuration -GroupRows.prototype.initialize = function () { - var self = this, - groupBy = self.table.options.groupBy, - startOpen = self.table.options.groupStartOpen, - groupHeader = self.table.options.groupHeader; - - this.allowedValues = self.table.options.groupValues; - - self.headerGenerator = [function () { - return ""; - }]; - this.startOpen = [function () { - return false; - }]; //starting state of group - - self.table.modules.localize.bind("groups|item", function (langValue, lang) { - self.headerGenerator[0] = function (value, count, data) { - //header layout function - return (typeof value === "undefined" ? "" : value) + "(" + count + " " + (count === 1 ? langValue : lang.groups.items) + ")"; - }; - }); - - this.groupIDLookups = []; - - if (Array.isArray(groupBy) || groupBy) { - if (this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "table" && this.table.options.columnCalcs != "both") { - this.table.modules.columnCalcs.removeCalcs(); - } - } else { - if (this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "group") { - - var cols = this.table.columnManager.getRealColumns(); - - cols.forEach(function (col) { - if (col.definition.topCalc) { - self.table.modules.columnCalcs.initializeTopRow(); - } - - if (col.definition.bottomCalc) { - self.table.modules.columnCalcs.initializeBottomRow(); - } - }); - } - } - - if (!Array.isArray(groupBy)) { - groupBy = [groupBy]; - } - - groupBy.forEach(function (group, i) { - var lookupFunc, column; - - if (typeof group == "function") { - lookupFunc = group; - } else { - column = self.table.columnManager.getColumnByField(group); - - if (column) { - lookupFunc = function lookupFunc(data) { - return column.getFieldValue(data); - }; - } else { - lookupFunc = function lookupFunc(data) { - return data[group]; - }; - } - } - - self.groupIDLookups.push({ - field: typeof group === "function" ? false : group, - func: lookupFunc, - values: self.allowedValues ? self.allowedValues[i] : false - }); - }); - - if (startOpen) { - - if (!Array.isArray(startOpen)) { - startOpen = [startOpen]; - } - - startOpen.forEach(function (level) { - level = typeof level == "function" ? level : function () { - return true; - }; - }); - - self.startOpen = startOpen; - } - - if (groupHeader) { - self.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader]; - } - - this.initialized = true; -}; - -GroupRows.prototype.setDisplayIndex = function (index) { - this.displayIndex = index; -}; - -GroupRows.prototype.getDisplayIndex = function () { - return this.displayIndex; -}; - -//return appropriate rows with group headers -GroupRows.prototype.getRows = function (rows) { - if (this.groupIDLookups.length) { - - this.table.options.dataGrouping.call(this.table); - - this.generateGroups(rows); - - if (this.table.options.dataGrouped) { - this.table.options.dataGrouped.call(this.table, this.getGroups(true)); - } - - return this.updateGroupRows(); - } else { - return rows.slice(0); - } -}; - -GroupRows.prototype.getGroups = function (compoment) { - var groupComponents = []; - - this.groupList.forEach(function (group) { - groupComponents.push(compoment ? group.getComponent() : group); - }); - - return groupComponents; -}; - -GroupRows.prototype.pullGroupListData = function (groupList) { - var self = this; - var groupListData = []; - - groupList.forEach(function (group) { - var groupHeader = {}; - groupHeader.level = 0; - groupHeader.rowCount = 0; - groupHeader.headerContent = ""; - var childData = []; - - if (group.hasSubGroups) { - childData = self.pullGroupListData(group.groupList); - - groupHeader.level = group.level; - groupHeader.rowCount = childData.length - group.groupList.length; // data length minus number of sub-headers - groupHeader.headerContent = group.generator(group.key, groupHeader.rowCount, group.rows, group); - - groupListData.push(groupHeader); - groupListData = groupListData.concat(childData); - } else { - groupHeader.level = group.level; - groupHeader.headerContent = group.generator(group.key, group.rows.length, group.rows, group); - groupHeader.rowCount = group.getRows().length; - - groupListData.push(groupHeader); - - group.getRows().forEach(function (row) { - groupListData.push(row.getData("data")); - }); - } - }); - - return groupListData; -}; - -GroupRows.prototype.getGroupedData = function () { - - return this.pullGroupListData(this.groupList); -}; - -GroupRows.prototype.getRowGroup = function (row) { - var match = false; - - this.groupList.forEach(function (group) { - var result = group.getRowGroup(row); - - if (result) { - match = result; - } - }); - - return match; -}; - -GroupRows.prototype.countGroups = function () { - return this.groupList.length; -}; - -GroupRows.prototype.generateGroups = function (rows) { - var self = this, - oldGroups = self.groups; - - self.groups = {}; - self.groupList = []; - - if (this.allowedValues && this.allowedValues[0]) { - this.allowedValues[0].forEach(function (value) { - self.createGroup(value, 0, oldGroups); - }); - - rows.forEach(function (row) { - self.assignRowToExistingGroup(row, oldGroups); - }); - } else { - rows.forEach(function (row) { - self.assignRowToGroup(row, oldGroups); - }); - } -}; - -GroupRows.prototype.createGroup = function (groupID, level, oldGroups) { - var groupKey = level + "_" + groupID, - group; - - oldGroups = oldGroups || []; - - group = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]); - - this.groups[groupKey] = group; - this.groupList.push(group); -}; - -GroupRows.prototype.assignRowToGroup = function (row, oldGroups) { - var groupID = this.groupIDLookups[0].func(row.getData()), - groupKey = "0_" + groupID; - - if (!this.groups[groupKey]) { - this.createGroup(groupID, 0, oldGroups); - } - - this.groups[groupKey].addRow(row); -}; - -GroupRows.prototype.assignRowToExistingGroup = function (row, oldGroups) { - var groupID = this.groupIDLookups[0].func(row.getData()), - groupKey = "0_" + groupID; - - if (this.groups[groupKey]) { - this.groups[groupKey].addRow(row); - } -}; - -GroupRows.prototype.assignRowToGroup = function (row, oldGroups) { - var groupID = this.groupIDLookups[0].func(row.getData()), - newGroupNeeded = !this.groups["0_" + groupID]; - - if (newGroupNeeded) { - this.createGroup(groupID, 0, oldGroups); - } - - this.groups["0_" + groupID].addRow(row); - - return !newGroupNeeded; -}; - -GroupRows.prototype.updateGroupRows = function (force) { - var self = this, - output = [], - oldRowCount; - - self.groupList.forEach(function (group) { - output = output.concat(group.getHeadersAndRows()); - }); - - //force update of table display - if (force) { - - var displayIndex = self.table.rowManager.setDisplayRows(output, this.getDisplayIndex()); - - if (displayIndex !== true) { - this.setDisplayIndex(displayIndex); - } - - self.table.rowManager.refreshActiveData("group", true, true); - } - - return output; -}; - -GroupRows.prototype.scrollHeaders = function (left) { - this.groupList.forEach(function (group) { - group.arrowElement.style.marginLeft = left + "px"; - }); -}; - -GroupRows.prototype.removeGroup = function (group) { - var groupKey = group.level + "_" + group.key, - index; - - if (this.groups[groupKey]) { - delete this.groups[groupKey]; - - index = this.groupList.indexOf(group); - - if (index > -1) { - this.groupList.splice(index, 1); - } - } -}; - -Tabulator.prototype.registerModule("groupRows", GroupRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/group_rows.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/group_rows.min.js deleted file mode 100644 index 2bf081296a..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/group_rows.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var GroupComponent=function(t){this._group=t,this.type="GroupComponent"};GroupComponent.prototype.getKey=function(){return this._group.key},GroupComponent.prototype.getElement=function(){return this._group.element},GroupComponent.prototype.getRows=function(){return this._group.getRows(!0)},GroupComponent.prototype.getSubGroups=function(){return this._group.getSubGroups(!0)},GroupComponent.prototype.getParentGroup=function(){return!!this._group.parent&&this._group.parent.getComponent()},GroupComponent.prototype.getVisibility=function(){return this._group.visible},GroupComponent.prototype.show=function(){this._group.show()},GroupComponent.prototype.hide=function(){this._group.hide()},GroupComponent.prototype.toggle=function(){this._group.toggleVisibility()},GroupComponent.prototype._getSelf=function(){return this._group},GroupComponent.prototype.getTable=function(){return this._group.table};var Group=function(t,o,e,r,i,s,n){this.groupManager=t,this.parent=o,this.key=r,this.level=e,this.field=i,this.hasSubGroups=e-1?e?this.rows.splice(i+1,0,t):this.rows.splice(i,0,t):e?this.rows.push(t):this.rows.unshift(t),t.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)},Group.prototype.getRowIndex=function(t){},Group.prototype.conformRowData=function(t){return this.field?t[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(t=this.parent.conformRowData(t)),t},Group.prototype.removeRow=function(t){var o=this.rows.indexOf(t);o>-1&&this.rows.splice(o,1),this.rows.length?(this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))},Group.prototype.removeGroup=function(t){var o,e=t.level+"_"+t.key;this.groups[e]&&(delete this.groups[e],o=this.groupList.indexOf(t),o>-1&&this.groupList.splice(o,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))},Group.prototype.getHeadersAndRows=function(){var t=[];return t.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach(function(o){t=t.concat(o.getHeadersAndRows())}):("table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),t=t.concat(this.rows),"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))):!this.groupList.length&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.options.groupClosedShowCalcs&&this.groupManager.table.modExists("columnCalcs")&&(this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))),t},Group.prototype.getData=function(t,o){var e=[];return this._visSet(),(!t||t&&this.visible)&&this.rows.forEach(function(t){e.push(t.getData(o||"data"))}),e},Group.prototype.getRowCount=function(){var t=0;return this.groupList.length?this.groupList.forEach(function(o){t+=o.getRowCount()}):t=this.rows.length,t},Group.prototype.toggleVisibility=function(){this.visible?this.hide():this.show()},Group.prototype.hide=function(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach(function(t){var o;t.calcs.top&&(o=t.calcs.top.getElement(),o.parentNode.removeChild(o)),t.calcs.bottom&&(o=t.calcs.bottom.getElement(),o.parentNode.removeChild(o)),t.getHeadersAndRows().forEach(function(t){var o=t.getElement();o.parentNode.removeChild(o)})}):this.rows.forEach(function(t){var o=t.getElement();o.parentNode.removeChild(o)}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex())),this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!1)},Group.prototype.show=function(){var t=this;if(t.visible=!0,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var o=t.getElement();this.groupList.length?this.groupList.forEach(function(t){t.getHeadersAndRows().forEach(function(t){var e=t.getElement();o.parentNode.insertBefore(e,o.nextSibling),t.initialize(),o=e})}):t.rows.forEach(function(t){var e=t.getElement();o.parentNode.insertBefore(e,o.nextSibling),t.initialize(),o=e}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex())}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!0)},Group.prototype._visSet=function(){var t=[];"function"==typeof this.visible&&(this.rows.forEach(function(o){t.push(o.getData())}),this.visible=this.visible(this.key,this.getRowCount(),t,this.getComponent()))},Group.prototype.getRowGroup=function(t){var o=!1;return this.groupList.length?this.groupList.forEach(function(e){var r=e.getRowGroup(t);r&&(o=r)}):this.rows.find(function(o){return o===t})&&(o=this),o},Group.prototype.getSubGroups=function(t){var o=[];return this.groupList.forEach(function(e){o.push(t?e.getComponent():e)}),o},Group.prototype.getRows=function(t){var o=[];return this.rows.forEach(function(e){o.push(t?e.getComponent():e)}),o},Group.prototype.generateGroupHeaderContents=function(){var t=[];for(this.rows.forEach(function(o){t.push(o.getData())}),this.elementContents=this.generator(this.key,this.getRowCount(),t,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)},Group.prototype.getElement=function(){return this.addBindingsd=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible"),this.element.childNodes.forEach(function(t){t.parentNode.removeChild(t)}),this.generateGroupHeaderContents(),this.element},Group.prototype.normalizeHeight=function(){this.setHeight(this.element.clientHeight)},Group.prototype.initialize=function(t){this.initialized&&!t||(this.normalizeHeight(),this.initialized=!0)},Group.prototype.reinitialize=function(){this.initialized=!1,this.height=0,Tabulator.prototype.helpers.elVisible(this.element)&&this.initialize(!0)},Group.prototype.setHeight=function(t){this.height!=t&&(this.height=t,this.outerHeight=this.element.offsetHeight)},Group.prototype.getHeight=function(){return this.outerHeight},Group.prototype.getGroup=function(){return this},Group.prototype.reinitializeHeight=function(){},Group.prototype.calcHeight=function(){},Group.prototype.setCellHeight=function(){},Group.prototype.clearCellHeight=function(){},Group.prototype.getComponent=function(){return new GroupComponent(this)};var GroupRows=function(t){this.table=t,this.groupIDLookups=!1,this.startOpen=[function(){return!1}],this.headerGenerator=[function(){return""}],this.groupList=[],this.allowedValues=!1,this.groups={},this.displayIndex=0};GroupRows.prototype.initialize=function(){var t=this,o=t.table.options.groupBy,e=t.table.options.groupStartOpen,r=t.table.options.groupHeader;if(this.allowedValues=t.table.options.groupValues,t.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],t.table.modules.localize.bind("groups|item",function(o,e){t.headerGenerator[0]=function(t,r,i){return(void 0===t?"":t)+"("+r+" "+(1===r?o:e.groups.items)+")"}}),this.groupIDLookups=[],Array.isArray(o)||o)this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs){var i=this.table.columnManager.getRealColumns();i.forEach(function(o){o.definition.topCalc&&t.table.modules.columnCalcs.initializeTopRow(),o.definition.bottomCalc&&t.table.modules.columnCalcs.initializeBottomRow()})}Array.isArray(o)||(o=[o]),o.forEach(function(o,e){var r,i;"function"==typeof o?r=o:(i=t.table.columnManager.getColumnByField(o),r=i?function(t){return i.getFieldValue(t)}:function(t){return t[o]}),t.groupIDLookups.push({field:"function"!=typeof o&&o,func:r,values:!!t.allowedValues&&t.allowedValues[e]})}),e&&(Array.isArray(e)||(e=[e]),e.forEach(function(t){t="function"==typeof t?t:function(){return!0}}),t.startOpen=e),r&&(t.headerGenerator=Array.isArray(r)?r:[r]),this.initialized=!0},GroupRows.prototype.setDisplayIndex=function(t){this.displayIndex=t},GroupRows.prototype.getDisplayIndex=function(){return this.displayIndex},GroupRows.prototype.getRows=function(t){return this.groupIDLookups.length?(this.table.options.dataGrouping.call(this.table),this.generateGroups(t),this.table.options.dataGrouped&&this.table.options.dataGrouped.call(this.table,this.getGroups(!0)),this.updateGroupRows()):t.slice(0)},GroupRows.prototype.getGroups=function(t){var o=[];return this.groupList.forEach(function(e){o.push(t?e.getComponent():e)}),o},GroupRows.prototype.pullGroupListData=function(t){var o=this,e=[];return t.forEach(function(t){var r={};r.level=0,r.rowCount=0,r.headerContent="";var i=[];t.hasSubGroups?(i=o.pullGroupListData(t.groupList),r.level=t.level,r.rowCount=i.length-t.groupList.length,r.headerContent=t.generator(t.key,r.rowCount,t.rows,t),e.push(r),e=e.concat(i)):(r.level=t.level,r.headerContent=t.generator(t.key,t.rows.length,t.rows,t),r.rowCount=t.getRows().length,e.push(r),t.getRows().forEach(function(t){e.push(t.getData("data"))}))}),e},GroupRows.prototype.getGroupedData=function(){return this.pullGroupListData(this.groupList)},GroupRows.prototype.getRowGroup=function(t){var o=!1;return this.groupList.forEach(function(e){var r=e.getRowGroup(t);r&&(o=r)}),o},GroupRows.prototype.countGroups=function(){return this.groupList.length},GroupRows.prototype.generateGroups=function(t){var o=this,e=o.groups;o.groups={},o.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach(function(t){o.createGroup(t,0,e)}),t.forEach(function(t){o.assignRowToExistingGroup(t,e)})):t.forEach(function(t){o.assignRowToGroup(t,e)})},GroupRows.prototype.createGroup=function(t,o,e){var r,i=o+"_"+t;e=e||[],r=new Group(this,!1,o,t,this.groupIDLookups[0].field,this.headerGenerator[0],e[i]),this.groups[i]=r,this.groupList.push(r)},GroupRows.prototype.assignRowToGroup=function(t,o){var e=this.groupIDLookups[0].func(t.getData()),r="0_"+e;this.groups[r]||this.createGroup(e,0,o),this.groups[r].addRow(t)},GroupRows.prototype.assignRowToExistingGroup=function(t,o){var e=this.groupIDLookups[0].func(t.getData()),r="0_"+e;this.groups[r]&&this.groups[r].addRow(t)},GroupRows.prototype.assignRowToGroup=function(t,o){var e=this.groupIDLookups[0].func(t.getData()),r=!this.groups["0_"+e];return r&&this.createGroup(e,0,o),this.groups["0_"+e].addRow(t),!r},GroupRows.prototype.updateGroupRows=function(t){var o=this,e=[];if(o.groupList.forEach(function(t){e=e.concat(t.getHeadersAndRows())}),t){var r=o.table.rowManager.setDisplayRows(e,this.getDisplayIndex());!0!==r&&this.setDisplayIndex(r),o.table.rowManager.refreshActiveData("group",!0,!0)}return e},GroupRows.prototype.scrollHeaders=function(t){this.groupList.forEach(function(o){o.arrowElement.style.marginLeft=t+"px"})},GroupRows.prototype.removeGroup=function(t){var o,e=t.level+"_"+t.key;this.groups[e]&&(delete this.groups[e],(o=this.groupList.indexOf(t))>-1&&this.groupList.splice(o,1))},Tabulator.prototype.registerModule("groupRows",GroupRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/history.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/history.js deleted file mode 100644 index eaf836fbb3..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/history.js +++ /dev/null @@ -1,133 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var History = function History(table) { - this.table = table; //hold Tabulator object - - this.history = []; - this.index = -1; -}; - -History.prototype.clear = function () { - this.history = []; - this.index = -1; -}; - -History.prototype.action = function (type, component, data) { - - this.history = this.history.slice(0, this.index + 1); - - this.history.push({ - type: type, - component: component, - data: data - }); - - this.index++; -}; - -History.prototype.getHistoryUndoSize = function () { - return this.index + 1; -}; - -History.prototype.getHistoryRedoSize = function () { - return this.history.length - (this.index + 1); -}; - -History.prototype.undo = function () { - - if (this.index > -1) { - var action = this.history[this.index]; - - this.undoers[action.type].call(this, action); - - this.index--; - - this.table.options.historyUndo.call(this.table, action.type, action.component.getComponent(), action.data); - - return true; - } else { - console.warn("History Undo Error - No more history to undo"); - return false; - } -}; - -History.prototype.redo = function () { - if (this.history.length - 1 > this.index) { - - this.index++; - - var action = this.history[this.index]; - - this.redoers[action.type].call(this, action); - - this.table.options.historyRedo.call(this.table, action.type, action.component.getComponent(), action.data); - - return true; - } else { - console.warn("History Redo Error - No more history to redo"); - return false; - } -}; - -History.prototype.undoers = { - cellEdit: function cellEdit(action) { - action.component.setValueProcessData(action.data.oldValue); - }, - - rowAdd: function rowAdd(action) { - action.component.deleteActual(); - }, - - rowDelete: function rowDelete(action) { - var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); - - this._rebindRow(action.component, newRow); - }, - - rowMove: function rowMove(action) { - this.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.pos], false); - this.table.rowManager.redraw(); - } -}; - -History.prototype.redoers = { - cellEdit: function cellEdit(action) { - action.component.setValueProcessData(action.data.newValue); - }, - - rowAdd: function rowAdd(action) { - var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); - - this._rebindRow(action.component, newRow); - }, - - rowDelete: function rowDelete(action) { - action.component.deleteActual(); - }, - - rowMove: function rowMove(action) { - this.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.pos], false); - this.table.rowManager.redraw(); - } -}; - -//rebind rows to new element after deletion -History.prototype._rebindRow = function (oldRow, newRow) { - this.history.forEach(function (action) { - if (action.component instanceof Row) { - if (action.component === oldRow) { - action.component = newRow; - } - } else if (action.component instanceof Cell) { - if (action.component.row === oldRow) { - var field = action.component.column.getField(); - - if (field) { - action.component = newRow.getCell(field); - } - } - } - }); -}; - -Tabulator.prototype.registerModule("history", History); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/history.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/history.min.js deleted file mode 100644 index 5a32bd6a02..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/history.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var History=function(t){this.table=t,this.history=[],this.index=-1};History.prototype.clear=function(){this.history=[],this.index=-1},History.prototype.action=function(t,o,e){this.history=this.history.slice(0,this.index+1),this.history.push({type:t,component:o,data:e}),this.index++},History.prototype.getHistoryUndoSize=function(){return this.index+1},History.prototype.getHistoryRedoSize=function(){return this.history.length-(this.index+1)},History.prototype.undo=function(){if(this.index>-1){var t=this.history[this.index];return this.undoers[t.type].call(this,t),this.index--,this.table.options.historyUndo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Undo Error - No more history to undo"),!1},History.prototype.redo=function(){if(this.history.length-1>this.index){this.index++;var t=this.history[this.index];return this.redoers[t.type].call(this,t),this.table.options.historyRedo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Redo Error - No more history to redo"),!1},History.prototype.undoers={cellEdit:function(t){t.component.setValueProcessData(t.data.oldValue)},rowAdd:function(t){t.component.deleteActual()},rowDelete:function(t){var o=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this._rebindRow(t.component,o)},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.pos],!1),this.table.rowManager.redraw()}},History.prototype.redoers={cellEdit:function(t){t.component.setValueProcessData(t.data.newValue)},rowAdd:function(t){var o=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this._rebindRow(t.component,o)},rowDelete:function(t){t.component.deleteActual()},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.pos],!1),this.table.rowManager.redraw()}},History.prototype._rebindRow=function(t,o){this.history.forEach(function(e){if(e.component instanceof Row)e.component===t&&(e.component=o);else if(e.component instanceof Cell&&e.component.row===t){var n=e.component.column.getField();n&&(e.component=o.getCell(n))}})},Tabulator.prototype.registerModule("history",History); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/html_table_import.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/html_table_import.js deleted file mode 100644 index 3235c6a79b..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/html_table_import.js +++ /dev/null @@ -1,199 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var HtmlTableImport = function HtmlTableImport(table) { - this.table = table; //hold Tabulator object - this.fieldIndex = []; - this.hasIndex = false; -}; - -HtmlTableImport.prototype.parseTable = function () { - var self = this, - element = self.table.element, - options = self.table.options, - columns = options.columns, - headers = element.getElementsByTagName("th"), - rows = element.getElementsByTagName("tbody")[0], - data = [], - newTable; - - self.hasIndex = false; - - self.table.options.htmlImporting.call(this.table); - - rows = rows ? rows.getElementsByTagName("tr") : []; - - //check for tablator inline options - self._extractOptions(element, options); - - if (headers.length) { - self._extractHeaders(headers, rows); - } else { - self._generateBlankHeaders(headers, rows); - } - - //iterate through table rows and build data set - for (var index = 0; index < rows.length; index++) { - var row = rows[index], - cells = row.getElementsByTagName("td"), - item = {}; - - //create index if the dont exist in table - if (!self.hasIndex) { - item[options.index] = index; - } - - for (var i = 0; i < cells.length; i++) { - var cell = cells[i]; - if (typeof this.fieldIndex[i] !== "undefined") { - item[this.fieldIndex[i]] = cell.innerHTML; - } - } - - //add row data to item - data.push(item); - } - - //create new element - var newElement = document.createElement("div"); - - //transfer attributes to new element - var attributes = element.attributes; - - // loop through attributes and apply them on div - - for (var i in attributes) { - if (_typeof(attributes[i]) == "object") { - newElement.setAttribute(attributes[i].name, attributes[i].value); - } - } - - // replace table with div element - element.parentNode.replaceChild(newElement, element); - - options.data = data; - - self.table.options.htmlImported.call(this.table); - - // // newElement.tabulator(options); - - this.table.element = newElement; -}; - -//extract tabulator attribute options -HtmlTableImport.prototype._extractOptions = function (element, options) { - var attributes = element.attributes; - - for (var index in attributes) { - var attrib = attributes[index]; - var name; - - if ((typeof attrib === "undefined" ? "undefined" : _typeof(attrib)) == "object" && attrib.name && attrib.name.indexOf("tabulator-") === 0) { - name = attrib.name.replace("tabulator-", ""); - - for (var key in options) { - if (key.toLowerCase() == name) { - options[key] = this._attribValue(attrib.value); - } - } - } - } -}; - -//get value of attribute -HtmlTableImport.prototype._attribValue = function (value) { - if (value === "true") { - return true; - } - - if (value === "false") { - return false; - } - - return value; -}; - -//find column if it has already been defined -HtmlTableImport.prototype._findCol = function (title) { - var match = this.table.options.columns.find(function (column) { - return column.title === title; - }); - - return match || false; -}; - -//extract column from headers -HtmlTableImport.prototype._extractHeaders = function (headers, rows) { - for (var index = 0; index < headers.length; index++) { - var header = headers[index], - exists = false, - col = this._findCol(header.textContent), - width, - attributes; - - if (col) { - exists = true; - } else { - col = { title: header.textContent.trim() }; - } - - if (!col.field) { - col.field = header.textContent.trim().toLowerCase().replace(" ", "_"); - } - - width = header.getAttribute("width"); - - if (width && !col.width) { - col.width = width; - } - - //check for tablator inline options - attributes = header.attributes; - - // //check for tablator inline options - this._extractOptions(header, col); - - for (var i in attributes) { - var attrib = attributes[i], - name; - - if ((typeof attrib === "undefined" ? "undefined" : _typeof(attrib)) == "object" && attrib.name && attrib.name.indexOf("tabulator-") === 0) { - - name = attrib.name.replace("tabulator-", ""); - - col[name] = this._attribValue(attrib.value); - } - } - - this.fieldIndex[index] = col.field; - - if (col.field == this.table.options.index) { - this.hasIndex = true; - } - - if (!exists) { - this.table.options.columns.push(col); - } - } -}; - -//generate blank headers -HtmlTableImport.prototype._generateBlankHeaders = function (headers, rows) { - for (var index = 0; index < headers.length; index++) { - var header = headers[index], - col = { title: "", field: "col" + index }; - - this.fieldIndex[index] = col.field; - - var width = header.getAttribute("width"); - - if (width) { - col.width = width; - } - - this.table.options.columns.push(col); - } -}; - -Tabulator.prototype.registerModule("htmlTableImport", HtmlTableImport); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/html_table_import.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/html_table_import.min.js deleted file mode 100644 index ceac6ad5e5..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/html_table_import.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},HtmlTableImport=function(t){this.table=t,this.fieldIndex=[],this.hasIndex=!1};HtmlTableImport.prototype.parseTable=function(){var t=this,e=t.table.element,o=t.table.options,a=(o.columns,e.getElementsByTagName("th")),n=e.getElementsByTagName("tbody")[0],r=[];t.hasIndex=!1,t.table.options.htmlImporting.call(this.table),n=n?n.getElementsByTagName("tr"):[],t._extractOptions(e,o),a.length?t._extractHeaders(a,n):t._generateBlankHeaders(a,n);for(var l=0;l -1) { - self.pressedKeys.splice(index, 1); - } - } - }; - - this.table.element.addEventListener("keydown", this.keyupBinding); - - this.table.element.addEventListener("keyup", this.keydownBinding); -}; - -Keybindings.prototype.clearBindings = function () { - if (this.keyupBinding) { - this.table.element.removeEventListener("keydown", this.keyupBinding); - } - - if (this.keydownBinding) { - this.table.element.removeEventListener("keyup", this.keydownBinding); - } -}; - -Keybindings.prototype.checkBinding = function (e, binding) { - var self = this, - match = true; - - if (e.ctrlKey == binding.ctrl && e.shiftKey == binding.shift) { - binding.keys.forEach(function (key) { - var index = self.pressedKeys.indexOf(key); - - if (index == -1) { - match = false; - } - }); - - if (match) { - binding.action.call(self, e); - } - - return true; - } - - return false; -}; - -//default bindings -Keybindings.prototype.bindings = { - navPrev: "shift + 9", - navNext: 9, - navUp: 38, - navDown: 40, - scrollPageUp: 33, - scrollPageDown: 34, - scrollToStart: 36, - scrollToEnd: 35, - undo: "ctrl + 90", - redo: "ctrl + 89", - copyToClipboard: "ctrl + 67" -}; - -//default actions -Keybindings.prototype.actions = { - keyBlock: function keyBlock(e) { - e.stopPropagation(); - e.preventDefault(); - }, - scrollPageUp: function scrollPageUp(e) { - var rowManager = this.table.rowManager, - newPos = rowManager.scrollTop - rowManager.height, - scrollMax = rowManager.element.scrollHeight; - - e.preventDefault(); - - if (rowManager.displayRowsCount) { - if (newPos >= 0) { - rowManager.element.scrollTop = newPos; - } else { - rowManager.scrollToRow(rowManager.getDisplayRows()[0]); - } - } - - this.table.element.focus(); - }, - scrollPageDown: function scrollPageDown(e) { - var rowManager = this.table.rowManager, - newPos = rowManager.scrollTop + rowManager.height, - scrollMax = rowManager.element.scrollHeight; - - e.preventDefault(); - - if (rowManager.displayRowsCount) { - if (newPos <= scrollMax) { - rowManager.element.scrollTop = newPos; - } else { - rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]); - } - } - - this.table.element.focus(); - }, - scrollToStart: function scrollToStart(e) { - var rowManager = this.table.rowManager; - - e.preventDefault(); - - if (rowManager.displayRowsCount) { - rowManager.scrollToRow(rowManager.getDisplayRows()[0]); - } - - this.table.element.focus(); - }, - scrollToEnd: function scrollToEnd(e) { - var rowManager = this.table.rowManager; - - e.preventDefault(); - - if (rowManager.displayRowsCount) { - rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]); - } - - this.table.element.focus(); - }, - navPrev: function navPrev(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().prev(); - } - } - }, - - navNext: function navNext(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().next(); - } - } - }, - - navLeft: function navLeft(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().left(); - } - } - }, - - navRight: function navRight(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().right(); - } - } - }, - - navUp: function navUp(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().up(); - } - } - }, - - navDown: function navDown(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().down(); - } - } - }, - - undo: function undo(e) { - var cell = false; - if (this.table.options.history && this.table.modExists("history") && this.table.modExists("edit")) { - - cell = this.table.modules.edit.currentCell; - - if (!cell) { - e.preventDefault(); - this.table.modules.history.undo(); - } - } - }, - - redo: function redo(e) { - var cell = false; - if (this.table.options.history && this.table.modExists("history") && this.table.modExists("edit")) { - - cell = this.table.modules.edit.currentCell; - - if (!cell) { - e.preventDefault(); - this.table.modules.history.redo(); - } - } - }, - - copyToClipboard: function copyToClipboard(e) { - if (!this.table.modules.edit.currentCell) { - if (this.table.modExists("clipboard", true)) { - this.table.modules.clipboard.copy(!this.table.options.selectable || this.table.options.selectable == "highlight" ? "active" : "selected", null, null, null, true); - } - } - } -}; - -Tabulator.prototype.registerModule("keybindings", Keybindings); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/keybindings.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/keybindings.min.js deleted file mode 100644 index 837370baba..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/keybindings.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Keybindings=function(t){this.table=t,this.watchKeys=null,this.pressedKeys=null,this.keyupBinding=!1,this.keydownBinding=!1};Keybindings.prototype.initialize=function(){var t=this.table.options.keybindings,e={};if(this.watchKeys={},this.pressedKeys=[],!1!==t){for(var i in this.bindings)e[i]=this.bindings[i];if(Object.keys(t).length)for(var n in t)e[n]=t[n];this.mapBindings(e),this.bindEvents()}},Keybindings.prototype.mapBindings=function(t){var e=this,i=this;for(var n in t)!function(n){e.actions[n]?t[n]&&("object"!==_typeof(t[n])&&(t[n]=[t[n]]),t[n].forEach(function(t){i.mapBinding(n,t)})):console.warn("Key Binding Error - no such action:",n)}(n)},Keybindings.prototype.mapBinding=function(t,e){var i=this,n={action:this.actions[t],keys:[],ctrl:!1,shift:!1};e.toString().toLowerCase().split(" ").join("").split("+").forEach(function(t){switch(t){case"ctrl":n.ctrl=!0;break;case"shift":n.shift=!0;break;default:t=parseInt(t),n.keys.push(t),i.watchKeys[t]||(i.watchKeys[t]=[]),i.watchKeys[t].push(n)}})},Keybindings.prototype.bindEvents=function(){var t=this;this.keyupBinding=function(e){var i=e.keyCode,n=t.watchKeys[i];n&&(t.pressedKeys.push(i),n.forEach(function(i){t.checkBinding(e,i)}))},this.keydownBinding=function(e){var i=e.keyCode;if(t.watchKeys[i]){var n=t.pressedKeys.indexOf(i);n>-1&&t.pressedKeys.splice(n,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)},Keybindings.prototype.clearBindings=function(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)},Keybindings.prototype.checkBinding=function(t,e){var i=this,n=!0;return t.ctrlKey==e.ctrl&&t.shiftKey==e.shift&&(e.keys.forEach(function(t){-1==i.pressedKeys.indexOf(t)&&(n=!1)}),n&&e.action.call(i,t),!0)},Keybindings.prototype.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:"ctrl + 90",redo:"ctrl + 89",copyToClipboard:"ctrl + 67"},Keybindings.prototype.actions={keyBlock:function(t){t.stopPropagation(),t.preventDefault()},scrollPageUp:function(t){var e=this.table.rowManager,i=e.scrollTop-e.height;e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(i>=0?e.element.scrollTop=i:e.scrollToRow(e.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(t){var e=this.table.rowManager,i=e.scrollTop+e.height,n=e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(i<=n?e.element.scrollTop=i:e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1]),this.table.element.focus()},navPrev:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().prev())},navNext:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().next())},navLeft:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().left())},navRight:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().right())},navUp:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().up())},navDown:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().down())},undo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.undo()))},redo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(t){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(this.table.options.selectable&&"highlight"!=this.table.options.selectable?"selected":"active",null,null,null,!0)}},Tabulator.prototype.registerModule("keybindings",Keybindings); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/moveable_columns.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/moveable_columns.js deleted file mode 100644 index ddfb57795d..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/moveable_columns.js +++ /dev/null @@ -1,196 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var MoveColumns = function MoveColumns(table) { - this.table = table; //hold Tabulator object - this.placeholderElement = this.createPlaceholderElement(); - this.hoverElement = false; //floating column header element - this.checkTimeout = false; //click check timeout holder - this.checkPeriod = 250; //period to wait on mousedown to consider this a move and not a click - this.moving = false; //currently moving column - this.toCol = false; //destination column - this.toColAfter = false; //position of moving column relative to the desitnation column - this.startX = 0; //starting position within header element - this.autoScrollMargin = 40; //auto scroll on edge when within margin - this.autoScrollStep = 5; //auto scroll distance in pixels - this.autoScrollTimeout = false; //auto scroll timeout - - this.moveHover = this.moveHover.bind(this); - this.endMove = this.endMove.bind(this); -}; - -MoveColumns.prototype.createPlaceholderElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-col"); - el.classList.add("tabulator-col-placeholder"); - - return el; -}; - -MoveColumns.prototype.initializeColumn = function (column) { - var self = this, - config = {}, - colEl; - - if (!column.modules.frozen) { - - colEl = column.getElement(); - - config.mousemove = function (e) { - if (column.parent === self.moving.parent) { - if (e.pageX - Tabulator.prototype.helpers.elOffset(colEl).left + self.table.columnManager.element.scrollLeft > column.getWidth() / 2) { - if (self.toCol !== column || !self.toColAfter) { - colEl.parentNode.insertBefore(self.placeholderElement, colEl.nextSibling); - self.moveColumn(column, true); - } - } else { - if (self.toCol !== column || self.toColAfter) { - colEl.parentNode.insertBefore(self.placeholderElement, colEl); - self.moveColumn(column, false); - } - } - } - }.bind(self); - - colEl.addEventListener("mousedown", function (e) { - if (e.which === 1) { - self.checkTimeout = setTimeout(function () { - self.startMove(e, column); - }, self.checkPeriod); - } - }); - - colEl.addEventListener("mouseup", function (e) { - if (e.which === 1) { - if (self.checkTimeout) { - clearTimeout(self.checkTimeout); - } - } - }); - } - - column.modules.moveColumn = config; -}; - -MoveColumns.prototype.startMove = function (e, column) { - var element = column.getElement(); - - this.moving = column; - this.startX = e.pageX - Tabulator.prototype.helpers.elOffset(element).left; - - this.table.element.classList.add("tabulator-block-select"); - - //create placeholder - - this.placeholderElement.style.width = column.getWidth() + "px"; - this.placeholderElement.style.height = column.getHeight() + "px"; - - element.parentNode.insertBefore(this.placeholderElement, element); - element.parentNode.removeChild(element); - - //create hover element - this.hoverElement = element.cloneNode(true); - this.hoverElement.classList.add("tabulator-moving"); - - this.table.columnManager.getElement().appendChild(this.hoverElement); - - this.hoverElement.style.left = "0"; - this.hoverElement.style.bottom = "0"; - - this._bindMouseMove(); - - document.body.addEventListener("mousemove", this.moveHover); - document.body.addEventListener("mouseup", this.endMove); - - this.moveHover(e); -}; - -MoveColumns.prototype._bindMouseMove = function () { - this.table.columnManager.columnsByIndex.forEach(function (column) { - if (column.modules.moveColumn.mousemove) { - column.getElement().addEventListener("mousemove", column.modules.moveColumn.mousemove); - } - }); -}; - -MoveColumns.prototype._unbindMouseMove = function () { - this.table.columnManager.columnsByIndex.forEach(function (column) { - if (column.modules.moveColumn.mousemove) { - column.getElement().removeEventListener("mousemove", column.modules.moveColumn.mousemove); - } - }); -}; - -MoveColumns.prototype.moveColumn = function (column, after) { - var movingCells = this.moving.getCells(); - - this.toCol = column; - this.toColAfter = after; - - if (after) { - column.getCells().forEach(function (cell, i) { - var cellEl = cell.getElement(); - cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling); - }); - } else { - column.getCells().forEach(function (cell, i) { - var cellEl = cell.getElement(); - cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl); - }); - } -}; - -MoveColumns.prototype.endMove = function (e) { - if (e.which === 1) { - this._unbindMouseMove(); - - this.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling); - this.placeholderElement.parentNode.removeChild(this.placeholderElement); - this.hoverElement.parentNode.removeChild(this.hoverElement); - - this.table.element.classList.remove("tabulator-block-select"); - - if (this.toCol) { - this.table.columnManager.moveColumn(this.moving, this.toCol, this.toColAfter); - } - - this.moving = false; - this.toCol = false; - this.toColAfter = false; - - document.body.removeEventListener("mousemove", this.moveHover); - document.body.removeEventListener("mouseup", this.endMove); - } -}; - -MoveColumns.prototype.moveHover = function (e) { - var self = this, - columnHolder = self.table.columnManager.getElement(), - scrollLeft = columnHolder.scrollLeft, - xPos = e.pageX - Tabulator.prototype.helpers.elOffset(columnHolder).left + scrollLeft, - scrollPos; - - self.hoverElement.style.left = xPos - self.startX + "px"; - - if (xPos - scrollLeft < self.autoScrollMargin) { - if (!self.autoScrollTimeout) { - self.autoScrollTimeout = setTimeout(function () { - scrollPos = Math.max(0, scrollLeft - 5); - self.table.rowManager.getElement().scrollLeft = scrollPos; - self.autoScrollTimeout = false; - }, 1); - } - } - - if (scrollLeft + columnHolder.clientWidth - xPos < self.autoScrollMargin) { - if (!self.autoScrollTimeout) { - self.autoScrollTimeout = setTimeout(function () { - scrollPos = Math.min(columnHolder.clientWidth, scrollLeft + 5); - self.table.rowManager.getElement().scrollLeft = scrollPos; - self.autoScrollTimeout = false; - }, 1); - } - } -}; - -Tabulator.prototype.registerModule("moveColumn", MoveColumns); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/moveable_columns.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/moveable_columns.min.js deleted file mode 100644 index fbcaac7067..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/moveable_columns.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var MoveColumns=function(e){this.table=e,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};MoveColumns.prototype.createPlaceholderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e},MoveColumns.prototype.initializeColumn=function(e){var t,o=this,l={};e.modules.frozen||(t=e.getElement(),l.mousemove=function(l){e.parent===o.moving.parent&&(l.pageX-Tabulator.prototype.helpers.elOffset(t).left+o.table.columnManager.element.scrollLeft>e.getWidth()/2?o.toCol===e&&o.toColAfter||(t.parentNode.insertBefore(o.placeholderElement,t.nextSibling),o.moveColumn(e,!0)):(o.toCol!==e||o.toColAfter)&&(t.parentNode.insertBefore(o.placeholderElement,t),o.moveColumn(e,!1)))}.bind(o),t.addEventListener("mousedown",function(t){1===t.which&&(o.checkTimeout=setTimeout(function(){o.startMove(t,e)},o.checkPeriod))}),t.addEventListener("mouseup",function(e){1===e.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)})),e.modules.moveColumn=l},MoveColumns.prototype.startMove=function(e,t){var o=t.getElement();this.moving=t,this.startX=e.pageX-Tabulator.prototype.helpers.elOffset(o).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom="0",this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(e)},MoveColumns.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)})},MoveColumns.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)})},MoveColumns.prototype.moveColumn=function(e,t){var o=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach(function(e,t){var l=e.getElement();l.parentNode.insertBefore(o[t].getElement(),l.nextSibling)}):e.getCells().forEach(function(e,t){var l=e.getElement();l.parentNode.insertBefore(o[t].getElement(),l)})},MoveColumns.prototype.endMove=function(e){1===e.which&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumn(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove))},MoveColumns.prototype.moveHover=function(e){var t,o=this,l=o.table.columnManager.getElement(),n=l.scrollLeft,i=e.pageX-Tabulator.prototype.helpers.elOffset(l).left+n;o.hoverElement.style.left=i-o.startX+"px",i-n row.getHeight() / 2) { - if (self.toRow !== row || !self.toRowAfter) { - var rowEl = row.getElement(); - rowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling); - self.moveRow(row, true); - } - } else { - if (self.toRow !== row || self.toRowAfter) { - var rowEl = row.getElement(); - rowEl.parentNode.insertBefore(self.placeholderElement, rowEl); - self.moveRow(row, false); - } - } - }.bind(self); - - if (!this.hasHandle) { - - rowEl = row.getElement(); - - rowEl.addEventListener("mousedown", function (e) { - if (e.which === 1) { - self.checkTimeout = setTimeout(function () { - self.startMove(e, row); - }, self.checkPeriod); - } - }); - - rowEl.addEventListener("mouseup", function (e) { - if (e.which === 1) { - if (self.checkTimeout) { - clearTimeout(self.checkTimeout); - } - } - }); - } - - row.modules.moveRow = config; -}; - -MoveRows.prototype.initializeCell = function (cell) { - var self = this, - cellEl = cell.getElement(); - - cellEl.addEventListener("mousedown", function (e) { - if (e.which === 1) { - self.checkTimeout = setTimeout(function () { - self.startMove(e, cell.row); - }, self.checkPeriod); - } - }); - - cellEl.addEventListener("mouseup", function (e) { - if (e.which === 1) { - if (self.checkTimeout) { - clearTimeout(self.checkTimeout); - } - } - }); -}; - -MoveRows.prototype._bindMouseMove = function () { - var self = this; - - self.table.rowManager.getDisplayRows().forEach(function (row) { - if (row.type === "row" && row.modules.moveRow.mousemove) { - row.getElement().addEventListener("mousemove", row.modules.moveRow.mousemove); - } - }); -}; - -MoveRows.prototype._unbindMouseMove = function () { - var self = this; - - self.table.rowManager.getDisplayRows().forEach(function (row) { - if (row.type === "row" && row.modules.moveRow.mousemove) { - row.getElement().removeEventListener("mousemove", row.modules.moveRow.mousemove); - } - }); -}; - -MoveRows.prototype.startMove = function (e, row) { - var element = row.getElement(); - - this.setStartPosition(e, row); - - this.moving = row; - - this.table.element.classList.add("tabulator-block-select"); - - //create placeholder - this.placeholderElement.style.width = row.getWidth() + "px"; - this.placeholderElement.style.height = row.getHeight() + "px"; - - if (!this.connection) { - element.parentNode.insertBefore(this.placeholderElement, element); - element.parentNode.removeChild(element); - } else { - this.table.element.classList.add("tabulator-movingrow-sending"); - this.connectToTables(row); - } - - //create hover element - this.hoverElement = element.cloneNode(true); - this.hoverElement.classList.add("tabulator-moving"); - - if (this.connection) { - document.body.appendChild(this.hoverElement); - this.hoverElement.style.left = "0"; - this.hoverElement.style.top = "0"; - this.hoverElement.style.width = this.table.element.clientWidth + "px"; - this.hoverElement.style.whiteSpace = "nowrap"; - this.hoverElement.style.overflow = "hidden"; - this.hoverElement.style.pointerEvents = "none"; - } else { - this.table.rowManager.getTableElement().appendChild(this.hoverElement); - - this.hoverElement.style.left = "0"; - this.hoverElement.style.top = "0"; - - this._bindMouseMove(); - } - - document.body.addEventListener("mousemove", this.moveHover); - document.body.addEventListener("mouseup", this.endMove); - - this.moveHover(e); -}; - -MoveRows.prototype.setStartPosition = function (e, row) { - var element, position; - - element = row.getElement(); - if (this.connection) { - position = element.getBoundingClientRect(); - - this.startX = position.left - e.pageX + window.scrollX; - this.startY = position.top - e.pageY + window.scrollY; - } else { - this.startY = e.pageY - element.getBoundingClientRect().top; - } -}; - -MoveRows.prototype.endMove = function (e) { - if (!e || e.which === 1) { - this._unbindMouseMove(); - - if (!this.connection) { - this.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling); - this.placeholderElement.parentNode.removeChild(this.placeholderElement); - } - - this.hoverElement.parentNode.removeChild(this.hoverElement); - - this.table.element.classList.remove("tabulator-block-select"); - - if (this.toRow) { - this.table.rowManager.moveRow(this.moving, this.toRow, this.toRowAfter); - } - - this.moving = false; - this.toRow = false; - this.toRowAfter = false; - - document.body.removeEventListener("mousemove", this.moveHover); - document.body.removeEventListener("mouseup", this.endMove); - - if (this.connection) { - this.table.element.classList.remove("tabulator-movingrow-sending"); - this.disconnectFromTables(); - } - } -}; - -MoveRows.prototype.moveRow = function (row, after) { - this.toRow = row; - this.toRowAfter = after; -}; - -MoveRows.prototype.moveHover = function (e) { - if (this.connection) { - this.moveHoverConnections.call(this, e); - } else { - this.moveHoverTable.call(this, e); - } -}; - -MoveRows.prototype.moveHoverTable = function (e) { - var rowHolder = this.table.rowManager.getElement(), - scrollTop = rowHolder.scrollTop, - yPos = e.pageY - rowHolder.getBoundingClientRect().top + scrollTop, - scrollPos; - - this.hoverElement.style.top = yPos - this.startY + "px"; -}; - -MoveRows.prototype.moveHoverConnections = function (e) { - this.hoverElement.style.left = this.startX + e.pageX + "px"; - this.hoverElement.style.top = this.startY + e.pageY + "px"; -}; - -//establish connection with other tables -MoveRows.prototype.connectToTables = function (row) { - var self = this, - connections = this.table.modules.comms.getConnections(this.connection); - - this.table.options.movableRowsSendingStart.call(this.table, connections); - - this.table.modules.comms.send(this.connection, "moveRow", "connect", { - row: row - }); -}; - -//disconnect from other tables -MoveRows.prototype.disconnectFromTables = function () { - var self = this, - connections = this.table.modules.comms.getConnections(this.connection); - - this.table.options.movableRowsSendingStop.call(this.table, connections); - - this.table.modules.comms.send(this.connection, "moveRow", "disconnect"); -}; - -//accept incomming connection -MoveRows.prototype.connect = function (table, row) { - var self = this; - if (!this.connectedTable) { - this.connectedTable = table; - this.connectedRow = row; - - this.table.element.classList.add("tabulator-movingrow-receiving"); - - self.table.rowManager.getDisplayRows().forEach(function (row) { - if (row.type === "row" && row.modules.moveRow && row.modules.moveRow.mouseup) { - row.getElement().addEventListener("mouseup", row.modules.moveRow.mouseup); - } - }); - - self.tableRowDropEvent = self.tableRowDrop.bind(self); - - self.table.element.addEventListener("mouseup", self.tableRowDropEvent); - - this.table.options.movableRowsReceivingStart.call(this.table, row, table); - - return true; - } else { - console.warn("Move Row Error - Table cannot accept connection, already connected to table:", this.connectedTable); - return false; - } -}; - -//close incomming connection -MoveRows.prototype.disconnect = function (table) { - var self = this; - if (table === this.connectedTable) { - this.connectedTable = false; - this.connectedRow = false; - - this.table.element.classList.remove("tabulator-movingrow-receiving"); - - self.table.rowManager.getDisplayRows().forEach(function (row) { - if (row.type === "row" && row.modules.moveRow && row.modules.moveRow.mouseup) { - row.getElement().removeEventListener("mouseup", row.modules.moveRow.mouseup); - } - }); - - self.table.element.removeEventListener("mouseup", self.tableRowDropEvent); - - this.table.options.movableRowsReceivingStop.call(this.table, table); - } else { - console.warn("Move Row Error - trying to disconnect from non connected table"); - } -}; - -MoveRows.prototype.dropComplete = function (table, row, success) { - var sender = false; - - if (success) { - - switch (_typeof(this.table.options.movableRowsSender)) { - case "string": - sender = this.senders[this.table.options.movableRowsSender]; - break; - - case "function": - sender = this.table.options.movableRowsSender; - break; - } - - if (sender) { - sender.call(this, this.moving.getComponent(), row ? row.getComponent() : undefined, table); - } else { - if (this.table.options.movableRowsSender) { - console.warn("Mover Row Error - no matching sender found:", this.table.options.movableRowsSender); - } - } - - this.table.options.movableRowsSent.call(this.table, this.moving.getComponent(), row ? row.getComponent() : undefined, table); - } else { - this.table.options.movableRowsSentFailed.call(this.table, this.moving.getComponent(), row ? row.getComponent() : undefined, table); - } - - this.endMove(); -}; - -MoveRows.prototype.tableRowDrop = function (e, row) { - var receiver = false, - success = false; - - e.stopImmediatePropagation(); - - switch (_typeof(this.table.options.movableRowsReceiver)) { - case "string": - receiver = this.receivers[this.table.options.movableRowsReceiver]; - break; - - case "function": - receiver = this.table.options.movableRowsReceiver; - break; - } - - if (receiver) { - success = receiver.call(this, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); - } else { - console.warn("Mover Row Error - no matching receiver found:", this.table.options.movableRowsReceiver); - } - - if (success) { - this.table.options.movableRowsReceived.call(this.table, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); - } else { - this.table.options.movableRowsReceivedFailed.call(this.table, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); - } - - this.table.modules.comms.send(this.connectedTable, "moveRow", "dropcomplete", { - row: row, - success: success - }); -}; - -MoveRows.prototype.receivers = { - insert: function insert(fromRow, toRow, fromTable) { - this.table.addRow(fromRow.getData(), undefined, toRow); - return true; - }, - - add: function add(fromRow, toRow, fromTable) { - this.table.addRow(fromRow.getData()); - return true; - }, - - update: function update(fromRow, toRow, fromTable) { - if (toRow) { - toRow.update(fromRow.getData()); - return true; - } - - return false; - }, - - replace: function replace(fromRow, toRow, fromTable) { - if (toRow) { - this.table.addRow(fromRow.getData(), undefined, toRow); - toRow.delete(); - return true; - } - - return false; - } -}; - -MoveRows.prototype.senders = { - delete: function _delete(fromRow, toRow, toTable) { - fromRow.delete(); - } -}; - -MoveRows.prototype.commsReceived = function (table, action, data) { - switch (action) { - case "connect": - return this.connect(table, data.row); - break; - - case "disconnect": - return this.disconnect(table); - break; - - case "dropcomplete": - return this.dropComplete(table, data.row, data.success); - break; - } -}; - -Tabulator.prototype.registerModule("moveRow", MoveRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/moveable_rows.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/moveable_rows.min.js deleted file mode 100644 index 7624efd615..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/moveable_rows.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},MoveRows=function(e){this.table=e,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.startX=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.tableRowDropEvent=!1,this.connection=!1,this.connections=[],this.connectedTable=!1,this.connectedRow=!1};MoveRows.prototype.createPlaceholderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-row"),e.classList.add("tabulator-row-placeholder"),e},MoveRows.prototype.initialize=function(e){this.connection=this.table.options.movableRowsConnectedTables},MoveRows.prototype.setHandle=function(e){this.hasHandle=e},MoveRows.prototype.initializeRow=function(e){var t,o=this,n={};n.mouseup=function(t){o.tableRowDrop(t,e)}.bind(o),n.mousemove=function(t){if(t.pageY-Tabulator.prototype.helpers.elOffset(e.element).top+o.table.rowManager.element.scrollTop>e.getHeight()/2){if(o.toRow!==e||!o.toRowAfter){var n=e.getElement();n.parentNode.insertBefore(o.placeholderElement,n.nextSibling),o.moveRow(e,!0)}}else if(o.toRow!==e||o.toRowAfter){var n=e.getElement();n.parentNode.insertBefore(o.placeholderElement,n),o.moveRow(e,!1)}}.bind(o),this.hasHandle||(t=e.getElement(),t.addEventListener("mousedown",function(t){1===t.which&&(o.checkTimeout=setTimeout(function(){o.startMove(t,e)},o.checkPeriod))}),t.addEventListener("mouseup",function(e){1===e.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)})),e.modules.moveRow=n},MoveRows.prototype.initializeCell=function(e){var t=this,o=e.getElement();o.addEventListener("mousedown",function(o){1===o.which&&(t.checkTimeout=setTimeout(function(){t.startMove(o,e.row)},t.checkPeriod))}),o.addEventListener("mouseup",function(e){1===e.which&&t.checkTimeout&&clearTimeout(t.checkTimeout)})},MoveRows.prototype._bindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)})},MoveRows.prototype._unbindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)})},MoveRows.prototype.startMove=function(e,t){var o=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o)),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(e)},MoveRows.prototype.setStartPosition=function(e,t){var o,n;o=t.getElement(),this.connection?(n=o.getBoundingClientRect(),this.startX=n.left-e.pageX+window.scrollX,this.startY=n.top-e.pageY+window.scrollY):this.startY=e.pageY-o.getBoundingClientRect().top},MoveRows.prototype.endMove=function(e){e&&1!==e.which||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow&&this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))},MoveRows.prototype.moveRow=function(e,t){this.toRow=e,this.toRowAfter=t},MoveRows.prototype.moveHover=function(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)},MoveRows.prototype.moveHoverTable=function(e){var t=this.table.rowManager.getElement(),o=t.scrollTop,n=e.pageY-t.getBoundingClientRect().top+o;this.hoverElement.style.top=n-this.startY+"px"},MoveRows.prototype.moveHoverConnections=function(e){this.hoverElement.style.left=this.startX+e.pageX+"px",this.hoverElement.style.top=this.startY+e.pageY+"px"},MoveRows.prototype.connectToTables=function(e){var t=this.table.modules.comms.getConnections(this.connection);this.table.options.movableRowsSendingStart.call(this.table,t),this.table.modules.comms.send(this.connection,"moveRow","connect",{row:e})},MoveRows.prototype.disconnectFromTables=function(){var e=this.table.modules.comms.getConnections(this.connection);this.table.options.movableRowsSendingStop.call(this.table,e),this.table.modules.comms.send(this.connection,"moveRow","disconnect")},MoveRows.prototype.connect=function(e,t){var o=this;return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),o.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().addEventListener("mouseup",e.modules.moveRow.mouseup)}),o.tableRowDropEvent=o.tableRowDrop.bind(o),o.table.element.addEventListener("mouseup",o.tableRowDropEvent),this.table.options.movableRowsReceivingStart.call(this.table,t,e),!0)},MoveRows.prototype.disconnect=function(e){var t=this;e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),t.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().removeEventListener("mouseup",e.modules.moveRow.mouseup)}),t.table.element.removeEventListener("mouseup",t.tableRowDropEvent),this.table.options.movableRowsReceivingStop.call(this.table,e)):console.warn("Move Row Error - trying to disconnect from non connected table")},MoveRows.prototype.dropComplete=function(e,t,o){var n=!1;if(o){switch(_typeof(this.table.options.movableRowsSender)){case"string":n=this.senders[this.table.options.movableRowsSender];break;case"function":n=this.table.options.movableRowsSender}n?n.call(this,this.moving.getComponent(),t?t.getComponent():void 0,e):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.table.options.movableRowsSent.call(this.table,this.moving.getComponent(),t?t.getComponent():void 0,e)}else this.table.options.movableRowsSentFailed.call(this.table,this.moving.getComponent(),t?t.getComponent():void 0,e);this.endMove()},MoveRows.prototype.tableRowDrop=function(e,t){var o=!1,n=!1;switch(e.stopImmediatePropagation(),_typeof(this.table.options.movableRowsReceiver)){case"string":o=this.receivers[this.table.options.movableRowsReceiver];break;case"function":o=this.table.options.movableRowsReceiver}o?n=o.call(this,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),n?this.table.options.movableRowsReceived.call(this.table,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):this.table.options.movableRowsReceivedFailed.call(this.table,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable),this.table.modules.comms.send(this.connectedTable,"moveRow","dropcomplete",{row:t,success:n})},MoveRows.prototype.receivers={insert:function(e,t,o){return this.table.addRow(e.getData(),void 0,t),!0},add:function(e,t,o){return this.table.addRow(e.getData()),!0},update:function(e,t,o){return!!t&&(t.update(e.getData()),!0)},replace:function(e,t,o){return!!t&&(this.table.addRow(e.getData(),void 0,t),t.delete(),!0)}},MoveRows.prototype.senders={delete:function(e,t,o){e.delete()}},MoveRows.prototype.commsReceived=function(e,t,o){switch(t){case"connect":return this.connect(e,o.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,o.row,o.success)}},Tabulator.prototype.registerModule("moveRow",MoveRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/mutator.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/mutator.js deleted file mode 100644 index a4f0ae180d..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/mutator.js +++ /dev/null @@ -1,113 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var Mutator = function Mutator(table) { - this.table = table; //hold Tabulator object - this.allowedTypes = ["", "data", "edit", "clipboard"]; //list of muatation types - this.enabled = true; -}; - -//initialize column mutator -Mutator.prototype.initializeColumn = function (column) { - var self = this, - match = false, - config = {}; - - this.allowedTypes.forEach(function (type) { - var key = "mutator" + (type.charAt(0).toUpperCase() + type.slice(1)), - mutator; - - if (column.definition[key]) { - mutator = self.lookupMutator(column.definition[key]); - - if (mutator) { - match = true; - - config[key] = { - mutator: mutator, - params: column.definition[key + "Params"] || {} - }; - } - } - }); - - if (match) { - column.modules.mutate = config; - } -}; - -Mutator.prototype.lookupMutator = function (value) { - var mutator = false; - - //set column mutator - switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { - case "string": - if (this.mutators[value]) { - mutator = this.mutators[value]; - } else { - console.warn("Mutator Error - No such mutator found, ignoring: ", value); - } - break; - - case "function": - mutator = value; - break; - } - - return mutator; -}; - -//apply mutator to row -Mutator.prototype.transformRow = function (data, type, update) { - var self = this, - key = "mutator" + (type.charAt(0).toUpperCase() + type.slice(1)), - value; - - if (this.enabled) { - - self.table.columnManager.traverse(function (column) { - var mutator, params, component; - - if (column.modules.mutate) { - mutator = column.modules.mutate[key] || column.modules.mutate.mutator || false; - - if (mutator) { - value = column.getFieldValue(data); - - if (!update || update && typeof value !== "undefined") { - component = column.getComponent(); - params = typeof mutator.params === "function" ? mutator.params(value, data, type, component) : mutator.params; - column.setFieldValue(data, mutator.mutator(value, data, type, params, component)); - } - } - } - }); - } - - return data; -}; - -//apply mutator to new cell value -Mutator.prototype.transformCell = function (cell, value) { - var mutator = cell.column.modules.mutate.mutatorEdit || cell.column.modules.mutate.mutator || false; - - if (mutator) { - return mutator.mutator(value, cell.row.getData(), "edit", mutator.params, cell.getComponent()); - } else { - return value; - } -}; - -Mutator.prototype.enable = function () { - this.enabled = true; -}; - -Mutator.prototype.disable = function () { - this.enabled = false; -}; - -//default mutators -Mutator.prototype.mutators = {}; - -Tabulator.prototype.registerModule("mutator", Mutator); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/mutator.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/mutator.min.js deleted file mode 100644 index 9413c0fdf3..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/mutator.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mutator=function(t){this.table=t,this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0};Mutator.prototype.initializeColumn=function(t){var o=this,e=!1,a={};this.allowedTypes.forEach(function(r){var u,n="mutator"+(r.charAt(0).toUpperCase()+r.slice(1));t.definition[n]&&(u=o.lookupMutator(t.definition[n]))&&(e=!0,a[n]={mutator:u,params:t.definition[n+"Params"]||{}})}),e&&(t.modules.mutate=a)},Mutator.prototype.lookupMutator=function(t){var o=!1;switch(void 0===t?"undefined":_typeof(t)){case"string":this.mutators[t]?o=this.mutators[t]:console.warn("Mutator Error - No such mutator found, ignoring: ",t);break;case"function":o=t}return o},Mutator.prototype.transformRow=function(t,o,e){var a,r=this,u="mutator"+(o.charAt(0).toUpperCase()+o.slice(1));return this.enabled&&r.table.columnManager.traverse(function(r){var n,i,s;r.modules.mutate&&(n=r.modules.mutate[u]||r.modules.mutate.mutator||!1)&&(a=r.getFieldValue(t),(!e||e&&void 0!==a)&&(s=r.getComponent(),i="function"==typeof n.params?n.params(a,t,o,s):n.params,r.setFieldValue(t,n.mutator(a,t,o,i,s))))}),t},Mutator.prototype.transformCell=function(t,o){var e=t.column.modules.mutate.mutatorEdit||t.column.modules.mutate.mutator||!1;return e?e.mutator(o,t.row.getData(),"edit",e.params,t.getComponent()):o},Mutator.prototype.enable=function(){this.enabled=!0},Mutator.prototype.disable=function(){this.enabled=!1},Mutator.prototype.mutators={},Tabulator.prototype.registerModule("mutator",Mutator); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/page.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/page.js deleted file mode 100644 index ef6ea6e51e..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/page.js +++ /dev/null @@ -1,527 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var Page = function Page(table) { - - this.table = table; //hold Tabulator object - - this.mode = "local"; - this.progressiveLoad = false; - - this.size = 0; - this.page = 1; - this.count = 5; - this.max = 1; - - this.displayIndex = 0; //index in display pipeline - - this.createElements(); -}; - -Page.prototype.createElements = function () { - - var button; - - this.element = document.createElement("span"); - this.element.classList.add("tabulator-paginator"); - - this.pagesElement = document.createElement("span"); - this.pagesElement.classList.add("tabulator-pages"); - - button = document.createElement("button"); - button.classList.add("tabulator-page"); - button.setAttribute("type", "button"); - button.setAttribute("role", "button"); - button.setAttribute("aria-label", ""); - button.setAttribute("title", ""); - - this.firstBut = button.cloneNode(true); - this.firstBut.setAttribute("data-page", "first"); - - this.prevBut = button.cloneNode(true); - this.prevBut.setAttribute("data-page", "prev"); - - this.nextBut = button.cloneNode(true); - this.nextBut.setAttribute("data-page", "next"); - - this.lastBut = button.cloneNode(true); - this.lastBut.setAttribute("data-page", "last"); -}; - -//setup pageination -Page.prototype.initialize = function (hidden) { - var self = this; - - //update param names - for (var key in self.table.options.paginationDataSent) { - self.paginationDataSentNames[key] = self.table.options.paginationDataSent[key]; - } - - for (var _key in self.table.options.paginationDataReceived) { - self.paginationDataReceivedNames[_key] = self.table.options.paginationDataReceived[_key]; - } - - //build pagination element - - //bind localizations - self.table.modules.localize.bind("pagination|first", function (value) { - self.firstBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|first_title", function (value) { - self.firstBut.setAttribute("aria-label", value); - self.firstBut.setAttribute("title", value); - }); - - self.table.modules.localize.bind("pagination|prev", function (value) { - self.prevBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|prev_title", function (value) { - self.prevBut.setAttribute("aria-label", value); - self.prevBut.setAttribute("title", value); - }); - - self.table.modules.localize.bind("pagination|next", function (value) { - self.nextBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|next_title", function (value) { - self.nextBut.setAttribute("aria-label", value); - self.nextBut.setAttribute("title", value); - }); - - self.table.modules.localize.bind("pagination|last", function (value) { - self.lastBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|last_title", function (value) { - self.lastBut.setAttribute("aria-label", value); - self.lastBut.setAttribute("title", value); - }); - - //click bindings - self.firstBut.addEventListener("click", function () { - self.setPage(1); - }); - - self.prevBut.addEventListener("click", function () { - self.previousPage(); - }); - - self.nextBut.addEventListener("click", function () { - self.nextPage().then(function () {}).catch(function () {}); - }); - - self.lastBut.addEventListener("click", function () { - self.setPage(self.max); - }); - - if (self.table.options.paginationElement) { - self.element = self.table.options.paginationElement; - } - - //append to DOM - self.element.appendChild(self.firstBut); - self.element.appendChild(self.prevBut); - self.element.appendChild(self.pagesElement); - self.element.appendChild(self.nextBut); - self.element.appendChild(self.lastBut); - - if (!self.table.options.paginationElement && !hidden) { - self.table.footerManager.append(self.element, self); - } - - //set default values - self.mode = self.table.options.pagination; - self.size = self.table.options.paginationSize || Math.floor(self.table.rowManager.getElement().clientHeight / 24); - self.count = self.table.options.paginationButtonCount; -}; - -Page.prototype.initializeProgressive = function (mode) { - this.initialize(true); - this.mode = "progressive_" + mode; - this.progressiveLoad = true; -}; - -Page.prototype.setDisplayIndex = function (index) { - this.displayIndex = index; -}; - -Page.prototype.getDisplayIndex = function () { - return this.displayIndex; -}; - -//calculate maximum page from number of rows -Page.prototype.setMaxRows = function (rowCount) { - if (!rowCount) { - this.max = 1; - } else { - this.max = Math.ceil(rowCount / this.size); - } - - if (this.page > this.max) { - this.page = this.max; - } -}; - -//reset to first page without triggering action -Page.prototype.reset = function (force) { - if (this.mode == "local" || force) { - this.page = 1; - } - return true; -}; - -//set the maxmum page -Page.prototype.setMaxPage = function (max) { - this.max = max || 1; - - if (this.page > this.max) { - this.page = this.max; - this.trigger(); - } -}; - -//set current page number -Page.prototype.setPage = function (page) { - var _this = this; - - return new Promise(function (resolve, reject) { - if (page > 0 && page <= _this.max) { - _this.page = page; - _this.trigger().then(function () { - resolve(); - }).catch(function () { - reject(); - }); - } else { - console.warn("Pagination Error - Requested page is out of range of 1 - " + _this.max + ":", page); - reject(); - } - }); -}; - -Page.prototype.setPageSize = function (size) { - if (size > 0) { - this.size = size; - } -}; - -//setup the pagination buttons -Page.prototype._setPageButtons = function () { - var self = this; - - var leftSize = Math.floor((this.count - 1) / 2); - var rightSize = Math.ceil((this.count - 1) / 2); - var min = this.max - this.page + leftSize + 1 < this.count ? this.max - this.count + 1 : Math.max(this.page - leftSize, 1); - var max = this.page <= rightSize ? Math.min(this.count, this.max) : Math.min(this.page + rightSize, this.max); - - while (self.pagesElement.firstChild) { - self.pagesElement.removeChild(self.pagesElement.firstChild); - }if (self.page == 1) { - self.firstBut.disabled = true; - self.prevBut.disabled = true; - } else { - self.firstBut.disabled = false; - self.prevBut.disabled = false; - } - - if (self.page == self.max) { - self.lastBut.disabled = true; - self.nextBut.disabled = true; - } else { - self.lastBut.disabled = false; - self.nextBut.disabled = false; - } - - for (var i = min; i <= max; i++) { - if (i > 0 && i <= self.max) { - self.pagesElement.appendChild(self._generatePageButton(i)); - } - } - - this.footerRedraw(); -}; - -Page.prototype._generatePageButton = function (page) { - var self = this, - button = document.createElement("button"); - - button.classList.add("tabulator-page"); - if (page == self.page) { - button.classList.add("active"); - } - - button.setAttribute("type", "button"); - button.setAttribute("role", "button"); - button.setAttribute("aria-label", "Show Page " + page); - button.setAttribute("title", "Show Page " + page); - button.setAttribute("data-page", page); - button.textContent = page; - - button.addEventListener("click", function (e) { - self.setPage(page); - }); - - return button; -}; - -//previous page -Page.prototype.previousPage = function () { - var _this2 = this; - - return new Promise(function (resolve, reject) { - if (_this2.page > 1) { - _this2.page--; - _this2.trigger().then(function () { - resolve(); - }).catch(function () { - reject(); - }); - } else { - console.warn("Pagination Error - Previous page would be less than page 1:", 0); - reject(); - } - }); -}; - -//next page -Page.prototype.nextPage = function () { - var _this3 = this; - - return new Promise(function (resolve, reject) { - if (_this3.page < _this3.max) { - _this3.page++; - _this3.trigger().then(function () { - resolve(); - }).catch(function () { - reject(); - }); - } else { - if (!_this3.progressiveLoad) { - console.warn("Pagination Error - Next page would be greater than maximum page of " + _this3.max + ":", _this3.max + 1); - } - reject(); - } - }); -}; - -//return current page number -Page.prototype.getPage = function () { - return this.page; -}; - -//return max page number -Page.prototype.getPageMax = function () { - return this.max; -}; - -Page.prototype.getPageSize = function (size) { - return this.size; -}; - -Page.prototype.getMode = function () { - return this.mode; -}; - -//return appropriate rows for current page -Page.prototype.getRows = function (data) { - var output, start, end; - - if (this.mode == "local") { - output = []; - start = this.size * (this.page - 1); - end = start + parseInt(this.size); - - this._setPageButtons(); - - for (var i = start; i < end; i++) { - if (data[i]) { - output.push(data[i]); - } - } - - return output; - } else { - - this._setPageButtons(); - - return data.slice(0); - } -}; - -Page.prototype.trigger = function () { - var _this4 = this; - - var left; - - return new Promise(function (resolve, reject) { - - switch (_this4.mode) { - case "local": - left = _this4.table.rowManager.scrollLeft; - - _this4.table.rowManager.refreshActiveData("page"); - _this4.table.rowManager.scrollHorizontal(left); - - _this4.table.options.pageLoaded.call(_this4.table, _this4.getPage()); - resolve(); - break; - - case "remote": - case "progressive_load": - case "progressive_scroll": - _this4.table.modules.ajax.blockActiveRequest(); - _this4._getRemotePage().then(function () { - resolve(); - }).catch(function () { - reject(); - }); - break; - - default: - console.warn("Pagination Error - no such pagination mode:", _this4.mode); - reject(); - } - }); -}; - -Page.prototype._getRemotePage = function () { - var _this5 = this; - - var self = this, - oldParams, - pageParams; - - return new Promise(function (resolve, reject) { - - if (!self.table.modExists("ajax", true)) { - reject(); - } - - //record old params and restore after request has been made - oldParams = Tabulator.prototype.helpers.deepClone(self.table.modules.ajax.getParams() || {}); - pageParams = self.table.modules.ajax.getParams(); - - //configure request params - pageParams[_this5.paginationDataSentNames.page] = self.page; - - //set page size if defined - if (_this5.size) { - pageParams[_this5.paginationDataSentNames.size] = _this5.size; - } - - //set sort data if defined - if (_this5.table.options.ajaxSorting && _this5.table.modExists("sort")) { - var sorters = self.table.modules.sort.getSort(); - - sorters.forEach(function (item) { - delete item.column; - }); - - pageParams[_this5.paginationDataSentNames.sorters] = sorters; - } - - //set filter data if defined - if (_this5.table.options.ajaxFiltering && _this5.table.modExists("filter")) { - var filters = self.table.modules.filter.getFilters(true, true); - pageParams[_this5.paginationDataSentNames.filters] = filters; - } - - self.table.modules.ajax.setParams(pageParams); - - self.table.modules.ajax.sendRequest(_this5.progressiveLoad).then(function (data) { - self._parseRemoteData(data); - resolve(); - }).catch(function (e) { - reject(); - }); - - self.table.modules.ajax.setParams(oldParams); - }); -}; - -Page.prototype._parseRemoteData = function (data) { - var self = this, - left, - data, - margin; - - if (typeof data[this.paginationDataReceivedNames.last_page] === "undefined") { - console.warn("Remote Pagination Error - Server response missing '" + this.paginationDataReceivedNames.last_page + "' property"); - } - - if (data[this.paginationDataReceivedNames.data]) { - this.max = parseInt(data[this.paginationDataReceivedNames.last_page]) || 1; - - if (this.progressiveLoad) { - switch (this.mode) { - case "progressive_load": - this.table.rowManager.addRows(data[this.paginationDataReceivedNames.data]); - if (this.page < this.max) { - setTimeout(function () { - self.nextPage().then(function () {}).catch(function () {}); - }, self.table.options.ajaxProgressiveLoadDelay); - } - break; - - case "progressive_scroll": - data = this.table.rowManager.getData().concat(data[this.paginationDataReceivedNames.data]); - - this.table.rowManager.setData(data, true); - - margin = this.table.options.ajaxProgressiveLoadScrollMargin || this.table.rowManager.element.clientHeight * 2; - - if (self.table.rowManager.element.scrollHeight <= self.table.rowManager.element.clientHeight + margin) { - self.nextPage().then(function () {}).catch(function () {}); - } - break; - } - } else { - left = this.table.rowManager.scrollLeft; - - this.table.rowManager.setData(data[this.paginationDataReceivedNames.data]); - - this.table.rowManager.scrollHorizontal(left); - - this.table.columnManager.scrollHorizontal(left); - - this.table.options.pageLoaded.call(this.table, this.getPage()); - } - } else { - console.warn("Remote Pagination Error - Server response missing '" + this.paginationDataReceivedNames.data + "' property"); - } -}; - -//handle the footer element being redrawn -Page.prototype.footerRedraw = function () { - var footer = this.table.footerManager.element; - - if (Math.ceil(footer.clientWidth) - footer.scrollWidth < 0) { - this.pagesElement.style.display = 'none'; - } else { - this.pagesElement.style.display = ''; - - if (Math.ceil(footer.clientWidth) - footer.scrollWidth < 0) { - this.pagesElement.style.display = 'none'; - } - } -}; - -//set the paramter names for pagination requests -Page.prototype.paginationDataSentNames = { - "page": "page", - "size": "size", - "sorters": "sorters", - // "sort_dir":"sort_dir", - "filters": "filters" -}; - -//set the property names for pagination responses -Page.prototype.paginationDataReceivedNames = { - "current_page": "current_page", - "last_page": "last_page", - "data": "data" -}; - -Tabulator.prototype.registerModule("page", Page); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/page.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/page.min.js deleted file mode 100644 index 57d8cbe76a..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/page.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var Page=function(t){this.table=t,this.mode="local",this.progressiveLoad=!1,this.size=0,this.page=1,this.count=5,this.max=1,this.displayIndex=0,this.createElements()};Page.prototype.createElements=function(){var t;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),t=document.createElement("button"),t.classList.add("tabulator-page"),t.setAttribute("type","button"),t.setAttribute("role","button"),t.setAttribute("aria-label",""),t.setAttribute("title",""),this.firstBut=t.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=t.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=t.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=t.cloneNode(!0),this.lastBut.setAttribute("data-page","last")},Page.prototype.initialize=function(t){var e=this;for(var a in e.table.options.paginationDataSent)e.paginationDataSentNames[a]=e.table.options.paginationDataSent[a];for(var i in e.table.options.paginationDataReceived)e.paginationDataReceivedNames[i]=e.table.options.paginationDataReceived[i];e.table.modules.localize.bind("pagination|first",function(t){e.firstBut.innerHTML=t}),e.table.modules.localize.bind("pagination|first_title",function(t){e.firstBut.setAttribute("aria-label",t),e.firstBut.setAttribute("title",t)}),e.table.modules.localize.bind("pagination|prev",function(t){e.prevBut.innerHTML=t}),e.table.modules.localize.bind("pagination|prev_title",function(t){e.prevBut.setAttribute("aria-label",t),e.prevBut.setAttribute("title",t)}),e.table.modules.localize.bind("pagination|next",function(t){e.nextBut.innerHTML=t}),e.table.modules.localize.bind("pagination|next_title",function(t){e.nextBut.setAttribute("aria-label",t),e.nextBut.setAttribute("title",t)}),e.table.modules.localize.bind("pagination|last",function(t){e.lastBut.innerHTML=t}),e.table.modules.localize.bind("pagination|last_title",function(t){e.lastBut.setAttribute("aria-label",t),e.lastBut.setAttribute("title",t)}),e.firstBut.addEventListener("click",function(){e.setPage(1)}),e.prevBut.addEventListener("click",function(){e.previousPage()}),e.nextBut.addEventListener("click",function(){e.nextPage().then(function(){}).catch(function(){})}),e.lastBut.addEventListener("click",function(){e.setPage(e.max)}),e.table.options.paginationElement&&(e.element=e.table.options.paginationElement),e.element.appendChild(e.firstBut),e.element.appendChild(e.prevBut),e.element.appendChild(e.pagesElement),e.element.appendChild(e.nextBut),e.element.appendChild(e.lastBut),e.table.options.paginationElement||t||e.table.footerManager.append(e.element,e),e.mode=e.table.options.pagination,e.size=e.table.options.paginationSize||Math.floor(e.table.rowManager.getElement().clientHeight/24),e.count=e.table.options.paginationButtonCount},Page.prototype.initializeProgressive=function(t){this.initialize(!0),this.mode="progressive_"+t,this.progressiveLoad=!0},Page.prototype.setDisplayIndex=function(t){this.displayIndex=t},Page.prototype.getDisplayIndex=function(){return this.displayIndex},Page.prototype.setMaxRows=function(t){this.max=t?Math.ceil(t/this.size):1,this.page>this.max&&(this.page=this.max)},Page.prototype.reset=function(t){return("local"==this.mode||t)&&(this.page=1),!0},Page.prototype.setMaxPage=function(t){this.max=t||1,this.page>this.max&&(this.page=this.max,this.trigger())},Page.prototype.setPage=function(t){var e=this;return new Promise(function(a,i){t>0&&t<=e.max?(e.page=t,e.trigger().then(function(){a()}).catch(function(){i()})):(console.warn("Pagination Error - Requested page is out of range of 1 - "+e.max+":",t),i())})},Page.prototype.setPageSize=function(t){t>0&&(this.size=t)},Page.prototype._setPageButtons=function(){for(var t=this,e=Math.floor((this.count-1)/2),a=Math.ceil((this.count-1)/2),i=this.max-this.page+e+10&&o<=t.max&&t.pagesElement.appendChild(t._generatePageButton(o));this.footerRedraw()},Page.prototype._generatePageButton=function(t){var e=this,a=document.createElement("button");return a.classList.add("tabulator-page"),t==e.page&&a.classList.add("active"),a.setAttribute("type","button"),a.setAttribute("role","button"),a.setAttribute("aria-label","Show Page "+t),a.setAttribute("title","Show Page "+t),a.setAttribute("data-page",t),a.textContent=t,a.addEventListener("click",function(a){e.setPage(t)}),a},Page.prototype.previousPage=function(){var t=this;return new Promise(function(e,a){t.page>1?(t.page--,t.trigger().then(function(){e()}).catch(function(){a()})):(console.warn("Pagination Error - Previous page would be less than page 1:",0),a())})},Page.prototype.nextPage=function(){var t=this;return new Promise(function(e,a){t.page -1) { - cookie = cookie.substr(0, end); - } - - data = cookie.replace(id + "=", ""); - } - break; - - default: - console.warn("Persistance Load Error - invalid mode selected", this.mode); - } - - return data ? JSON.parse(data) : false; -}; - -//merge old and new column defintions -Persistence.prototype.mergeDefinition = function (oldCols, newCols) { - var self = this, - output = []; - - // oldCols = oldCols || []; - newCols = newCols || []; - - newCols.forEach(function (column, to) { - - var from = self._findColumn(oldCols, column); - - if (from) { - - from.width = column.width; - from.visible = column.visible; - - if (from.columns) { - from.columns = self.mergeDefinition(from.columns, column.columns); - } - - output.push(from); - } - }); - oldCols.forEach(function (column, i) { - var from = self._findColumn(newCols, column); - if (!from) { - if (output.length > i) { - output.splice(i, 0, column); - } else { - output.push(column); - } - } - }); - - return output; -}; - -//find matching columns -Persistence.prototype._findColumn = function (columns, subject) { - var type = subject.columns ? "group" : subject.field ? "field" : "object"; - - return columns.find(function (col) { - switch (type) { - case "group": - return col.title === subject.title && col.columns.length === subject.columns.length; - break; - - case "field": - return col.field === subject.field; - break; - - case "object": - return col === subject; - break; - } - }); -}; - -//save data -Persistence.prototype.save = function (type) { - var data = {}; - - switch (type) { - case "columns": - data = this.parseColumns(this.table.columnManager.getColumns()); - break; - - case "filter": - data = this.table.modules.filter.getFilters(); - break; - - case "sort": - data = this.validateSorters(this.table.modules.sort.getSort()); - break; - } - - var id = this.id + (type === "columns" ? "" : "-" + type); - - this.saveData(id, data); -}; - -//ensure sorters contain no function data -Persistence.prototype.validateSorters = function (data) { - data.forEach(function (item) { - item.column = item.field; - delete item.field; - }); - - return data; -}; - -//save data to chosed medium -Persistence.prototype.saveData = function (id, data) { - - data = JSON.stringify(data); - - switch (this.mode) { - case "local": - localStorage.setItem(id, data); - break; - - case "cookie": - var expireDate = new Date(); - expireDate.setDate(expireDate.getDate() + 10000); - - //save cookie - document.cookie = id + "=" + data + "; expires=" + expireDate.toUTCString(); - break; - - default: - console.warn("Persistance Save Error - invalid mode selected", this.mode); - } -}; - -//build premission list -Persistence.prototype.parseColumns = function (columns) { - var self = this, - definitions = []; - - columns.forEach(function (column) { - var def = {}; - - if (column.isGroup) { - def.title = column.getDefinition().title; - def.columns = self.parseColumns(column.getColumns()); - } else { - def.title = column.getDefinition().title; - def.field = column.getField(); - def.width = column.getWidth(); - def.visible = column.visible; - } - - definitions.push(def); - }); - - return definitions; -}; - -Tabulator.prototype.registerModule("persistence", Persistence); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/persistence.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/persistence.min.js deleted file mode 100644 index 85aa1be83b..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/persistence.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var Persistence=function(e){this.table=e,this.mode="",this.id="",this.persistProps=["field","width","visible"]};Persistence.prototype.initialize=function(e,t){this.mode=!0!==e?e:void 0!==window.localStorage?"local":"cookie",this.id="tabulator-"+(t||this.table.element.getAttribute("id")||"")},Persistence.prototype.load=function(e,t){var i=this.retreiveData(e);return t&&(i=i?this.mergeDefinition(t,i):t),i},Persistence.prototype.retreiveData=function(e){var t="",i=this.id+("columns"===e?"":"-"+e);switch(this.mode){case"local":t=localStorage.getItem(i);break;case"cookie":var o=document.cookie,s=o.indexOf(i+"="),r=void 0;s>-1&&(o=o.substr(s),r=o.indexOf(";"),r>-1&&(o=o.substr(0,r)),t=o.replace(i+"=",""));break;default:console.warn("Persistance Load Error - invalid mode selected",this.mode)}return!!t&&JSON.parse(t)},Persistence.prototype.mergeDefinition=function(e,t){var i=this,o=[];return t=t||[],t.forEach(function(t,s){var r=i._findColumn(e,t);r&&(r.width=t.width,r.visible=t.visible,r.columns&&(r.columns=i.mergeDefinition(r.columns,t.columns)),o.push(r))}),e.forEach(function(e,s){i._findColumn(t,e)||(o.length>s?o.splice(s,0,e):o.push(e))}),o},Persistence.prototype._findColumn=function(e,t){var i=t.columns?"group":t.field?"field":"object";return e.find(function(e){switch(i){case"group":return e.title===t.title&&e.columns.length===t.columns.length;case"field":return e.field===t.field;case"object":return e===t}})},Persistence.prototype.save=function(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort())}var i=this.id+("columns"===e?"":"-"+e);this.saveData(i,t)},Persistence.prototype.validateSorters=function(e){return e.forEach(function(e){e.column=e.field,delete e.field}),e},Persistence.prototype.saveData=function(e,t){switch(t=JSON.stringify(t),this.mode){case"local":localStorage.setItem(e,t);break;case"cookie":var i=new Date;i.setDate(i.getDate()+1e4),document.cookie=e+"="+t+"; expires="+i.toUTCString();break;default:console.warn("Persistance Save Error - invalid mode selected",this.mode)}},Persistence.prototype.parseColumns=function(e){var t=this,i=[];return e.forEach(function(e){var o={};e.isGroup?(o.title=e.getDefinition().title,o.columns=t.parseColumns(e.getColumns())):(o.title=e.getDefinition().title,o.field=e.getField(),o.width=e.getWidth(),o.visible=e.visible),i.push(o)}),i},Tabulator.prototype.registerModule("persistence",Persistence); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_columns.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_columns.js deleted file mode 100644 index a3d3b1bb06..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_columns.js +++ /dev/null @@ -1,146 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var ResizeColumns = function ResizeColumns(table) { - this.table = table; //hold Tabulator object - this.startColumn = false; - this.startX = false; - this.startWidth = false; - this.handle = null; - this.prevHandle = null; -}; - -ResizeColumns.prototype.initializeColumn = function (type, column, element) { - var self = this, - variableHeight = false, - mode = this.table.options.resizableColumns; - - //set column resize mode - if (type === "header") { - variableHeight = column.definition.formatter == "textarea" || column.definition.variableHeight; - column.modules.resize = { variableHeight: variableHeight }; - } - - if (mode === true || mode == type) { - - var handle = document.createElement('div'); - handle.className = "tabulator-col-resize-handle"; - - var prevHandle = document.createElement('div'); - prevHandle.className = "tabulator-col-resize-handle prev"; - - handle.addEventListener("click", function (e) { - e.stopPropagation(); - }); - - handle.addEventListener("mousedown", function (e) { - var nearestColumn = column.getLastColumn(); - - if (nearestColumn && self._checkResizability(nearestColumn)) { - self.startColumn = column; - self._mouseDown(e, nearestColumn); - } - }); - - //reszie column on double click - handle.addEventListener("dblclick", function (e) { - if (self._checkResizability(column)) { - column.reinitializeWidth(true); - } - }); - - prevHandle.addEventListener("click", function (e) { - e.stopPropagation(); - }); - - prevHandle.addEventListener("mousedown", function (e) { - var nearestColumn, colIndex, prevColumn; - - nearestColumn = column.getFirstColumn(); - - if (nearestColumn) { - colIndex = self.table.columnManager.findColumnIndex(nearestColumn); - prevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false; - - if (prevColumn && self._checkResizability(prevColumn)) { - self.startColumn = column; - self._mouseDown(e, prevColumn); - } - } - }); - - //resize column on double click - prevHandle.addEventListener("dblclick", function (e) { - var nearestColumn, colIndex, prevColumn; - - nearestColumn = column.getFirstColumn(); - - if (nearestColumn) { - colIndex = self.table.columnManager.findColumnIndex(nearestColumn); - prevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false; - - if (prevColumn && self._checkResizability(prevColumn)) { - prevColumn.reinitializeWidth(true); - } - } - }); - - element.appendChild(handle); - element.appendChild(prevHandle); - } -}; - -ResizeColumns.prototype._checkResizability = function (column) { - return typeof column.definition.resizable != "undefined" ? column.definition.resizable : this.table.options.resizableColumns; -}; - -ResizeColumns.prototype._mouseDown = function (e, column) { - var self = this; - - self.table.element.classList.add("tabulator-block-select"); - - function mouseMove(e) { - column.setWidth(self.startWidth + (e.screenX - self.startX)); - - if (!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight) { - column.checkCellHeights(); - } - } - - function mouseUp(e) { - - //block editor from taking action while resizing is taking place - if (self.startColumn.modules.edit) { - self.startColumn.modules.edit.blocked = false; - } - - if (self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight) { - column.checkCellHeights(); - } - - document.body.removeEventListener("mouseup", mouseUp); - document.body.removeEventListener("mousemove", mouseMove); - - self.table.element.classList.remove("tabulator-block-select"); - - if (self.table.options.persistentLayout && self.table.modExists("persistence", true)) { - self.table.modules.persistence.save("columns"); - } - - self.table.options.columnResized.call(self.table, self.startColumn.getComponent()); - } - - e.stopPropagation(); //prevent resize from interfereing with movable columns - - //block editor from taking action while resizing is taking place - if (self.startColumn.modules.edit) { - self.startColumn.modules.edit.blocked = true; - } - - self.startX = e.screenX; - self.startWidth = column.getWidth(); - - document.body.addEventListener("mousemove", mouseMove); - document.body.addEventListener("mouseup", mouseUp); -}; - -Tabulator.prototype.registerModule("resizeColumns", ResizeColumns); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_columns.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_columns.min.js deleted file mode 100644 index 2b4908860b..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_columns.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var ResizeColumns=function(e){this.table=e,this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null};ResizeColumns.prototype.initializeColumn=function(e,t,i){var n=this,o=!1,s=this.table.options.resizableColumns;if("header"===e&&(o="textarea"==t.definition.formatter||t.definition.variableHeight,t.modules.resize={variableHeight:o}),!0===s||s==e){var l=document.createElement("div");l.className="tabulator-col-resize-handle";var a=document.createElement("div");a.className="tabulator-col-resize-handle prev",l.addEventListener("click",function(e){e.stopPropagation()}),l.addEventListener("mousedown",function(e){var i=t.getLastColumn();i&&n._checkResizability(i)&&(n.startColumn=t,n._mouseDown(e,i))}),l.addEventListener("dblclick",function(e){n._checkResizability(t)&&t.reinitializeWidth(!0)}),a.addEventListener("click",function(e){e.stopPropagation()}),a.addEventListener("mousedown",function(e){var i,o,s;(i=t.getFirstColumn())&&(o=n.table.columnManager.findColumnIndex(i),(s=o>0&&n.table.columnManager.getColumnByIndex(o-1))&&n._checkResizability(s)&&(n.startColumn=t,n._mouseDown(e,s)))}),a.addEventListener("dblclick",function(e){var i,o,s;(i=t.getFirstColumn())&&(o=n.table.columnManager.findColumnIndex(i),(s=o>0&&n.table.columnManager.getColumnByIndex(o-1))&&n._checkResizability(s)&&s.reinitializeWidth(!0))}),i.appendChild(l),i.appendChild(a)}},ResizeColumns.prototype._checkResizability=function(e){return void 0!==e.definition.resizable?e.definition.resizable:this.table.options.resizableColumns},ResizeColumns.prototype._mouseDown=function(e,t){function i(e){t.setWidth(o.startWidth+(e.screenX-o.startX)),!o.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}function n(e){o.startColumn.modules.edit&&(o.startColumn.modules.edit.blocked=!1),o.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",n),document.body.removeEventListener("mousemove",i),o.table.element.classList.remove("tabulator-block-select"),o.table.options.persistentLayout&&o.table.modExists("persistence",!0)&&o.table.modules.persistence.save("columns"),o.table.options.columnResized.call(o.table,o.startColumn.getComponent())}var o=this;o.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),o.startColumn.modules.edit&&(o.startColumn.modules.edit.blocked=!0),o.startX=e.screenX,o.startWidth=t.getWidth(),document.body.addEventListener("mousemove",i),document.body.addEventListener("mouseup",n)},Tabulator.prototype.registerModule("resizeColumns",ResizeColumns); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_rows.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_rows.js deleted file mode 100644 index e92144cf93..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_rows.js +++ /dev/null @@ -1,87 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var ResizeRows = function ResizeRows(table) { - this.table = table; //hold Tabulator object - this.startColumn = false; - this.startY = false; - this.startHeight = false; - this.handle = null; - this.prevHandle = null; -}; - -ResizeRows.prototype.initializeRow = function (row) { - var self = this, - rowEl = row.getElement(); - - var handle = document.createElement('div'); - handle.className = "tabulator-row-resize-handle"; - - var prevHandle = document.createElement('div'); - prevHandle.className = "tabulator-row-resize-handle prev"; - - handle.addEventListener("click", function (e) { - e.stopPropagation(); - }); - - handle.addEventListener("mousedown", function (e) { - self.startRow = row; - self._mouseDown(e, row); - }); - - prevHandle.addEventListener("click", function (e) { - e.stopPropagation(); - }); - - prevHandle.addEventListener("mousedown", function (e) { - var prevRow = self.table.rowManager.prevDisplayRow(row); - - if (prevRow) { - self.startRow = prevRow; - self._mouseDown(e, prevRow); - } - }); - - rowEl.appendChild(handle); - rowEl.appendChild(prevHandle); -}; - -ResizeRows.prototype._mouseDown = function (e, row) { - var self = this; - - self.table.element.classList.add("tabulator-block-select"); - - function mouseMove(e) { - row.setHeight(self.startHeight + (e.screenY - self.startY)); - } - - function mouseUp(e) { - - // //block editor from taking action while resizing is taking place - // if(self.startColumn.modules.edit){ - // self.startColumn.modules.edit.blocked = false; - // } - - document.body.removeEventListener("mouseup", mouseMove); - document.body.removeEventListener("mousemove", mouseMove); - - self.table.element.classList.remove("tabulator-block-select"); - - self.table.options.rowResized.call(this.table, row.getComponent()); - } - - e.stopPropagation(); //prevent resize from interfereing with movable columns - - //block editor from taking action while resizing is taking place - // if(self.startColumn.modules.edit){ - // self.startColumn.modules.edit.blocked = true; - // } - - self.startY = e.screenY; - self.startHeight = row.getHeight(); - - document.body.addEventListener("mousemove", mouseMove); - - document.body.addEventListener("mouseup", mouseUp); -}; - -Tabulator.prototype.registerModule("resizeRows", ResizeRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_rows.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_rows.min.js deleted file mode 100644 index 61421f4750..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_rows.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var ResizeRows=function(e){this.table=e,this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null};ResizeRows.prototype.initializeRow=function(e){var t=this,o=e.getElement(),n=document.createElement("div");n.className="tabulator-row-resize-handle";var s=document.createElement("div");s.className="tabulator-row-resize-handle prev",n.addEventListener("click",function(e){e.stopPropagation()}),n.addEventListener("mousedown",function(o){t.startRow=e,t._mouseDown(o,e)}),s.addEventListener("click",function(e){e.stopPropagation()}),s.addEventListener("mousedown",function(o){var n=t.table.rowManager.prevDisplayRow(e);n&&(t.startRow=n,t._mouseDown(o,n))}),o.appendChild(n),o.appendChild(s)},ResizeRows.prototype._mouseDown=function(e,t){function o(e){t.setHeight(s.startHeight+(e.screenY-s.startY))}function n(e){document.body.removeEventListener("mouseup",o),document.body.removeEventListener("mousemove",o),s.table.element.classList.remove("tabulator-block-select"),s.table.options.rowResized.call(this.table,t.getComponent())}var s=this;s.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),s.startY=e.screenY,s.startHeight=t.getHeight(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",n)},Tabulator.prototype.registerModule("resizeRows",ResizeRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_table.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_table.js deleted file mode 100644 index fda4d489da..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_table.js +++ /dev/null @@ -1,38 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var ResizeTable = function ResizeTable(table) { - this.table = table; //hold Tabulator object - this.binding = false; - this.observer = false; -}; - -ResizeTable.prototype.initialize = function (row) { - var table = this.table, - observer; - - if (typeof ResizeObserver !== "undefined" && table.rowManager.getRenderMode() === "virtual") { - this.observer = new ResizeObserver(function (entry) { - table.redraw(); - }); - - this.observer.observe(table.element); - } else { - this.binding = function () { - table.redraw(); - }; - - window.addEventListener("resize", this.binding); - } -}; - -ResizeTable.prototype.clearBindings = function (row) { - if (this.binding) { - window.removeEventListener("resize", this.binding); - } - - if (this.observer) { - this.observer.unobserve(this.table.element); - } -}; - -Tabulator.prototype.registerModule("resizeTable", ResizeTable); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_table.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_table.min.js deleted file mode 100644 index 253f36e081..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_table.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var ResizeTable=function(e){this.table=e,this.binding=!1,this.observer=!1};ResizeTable.prototype.initialize=function(e){var i=this.table;"undefined"!=typeof ResizeObserver&&"virtual"===i.rowManager.getRenderMode()?(this.observer=new ResizeObserver(function(e){i.redraw()}),this.observer.observe(i.element)):(this.binding=function(){i.redraw()},window.addEventListener("resize",this.binding))},ResizeTable.prototype.clearBindings=function(e){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element)},Tabulator.prototype.registerModule("resizeTable",ResizeTable); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/responsive_layout.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/responsive_layout.js deleted file mode 100644 index e22bcb21ef..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/responsive_layout.js +++ /dev/null @@ -1,243 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var ResponsiveLayout = function ResponsiveLayout(table) { - this.table = table; //hold Tabulator object - this.columns = []; - this.hiddenColumns = []; - this.mode = ""; - this.index = 0; - this.collapseFormatter = []; - this.collapseStartOpen = true; -}; - -//generate resposive columns list -ResponsiveLayout.prototype.initialize = function () { - var self = this, - columns = []; - - this.mode = this.table.options.responsiveLayout; - this.collapseFormatter = this.table.options.responsiveLayoutCollapseFormatter || this.formatCollapsedData; - this.collapseStartOpen = this.table.options.responsiveLayoutCollapseStartOpen; - this.hiddenColumns = []; - - //detemine level of responsivity for each column - this.table.columnManager.columnsByIndex.forEach(function (column, i) { - if (column.modules.responsive) { - if (column.modules.responsive.order && column.modules.responsive.visible) { - column.modules.responsive.index = i; - columns.push(column); - - if (!column.visible && self.mode === "collapse") { - self.hiddenColumns.push(column); - } - } - } - }); - - //sort list by responsivity - columns = columns.reverse(); - columns = columns.sort(function (a, b) { - var diff = b.modules.responsive.order - a.modules.responsive.order; - return diff || b.modules.responsive.index - a.modules.responsive.index; - }); - - this.columns = columns; - - if (this.mode === "collapse") { - this.generateCollapsedContent(); - } -}; - -//define layout information -ResponsiveLayout.prototype.initializeColumn = function (column) { - var def = column.getDefinition(); - - column.modules.responsive = { order: typeof def.responsive === "undefined" ? 1 : def.responsive, visible: def.visible === false ? false : true }; -}; - -ResponsiveLayout.prototype.layoutRow = function (row) { - var rowEl = row.getElement(), - el = document.createElement("div"); - - el.classList.add("tabulator-responsive-collapse"); - - if (!rowEl.classList.contains("tabulator-calcs")) { - row.modules.responsiveLayout = { - element: el - }; - - if (!this.collapseStartOpen) { - el.style.display = 'none'; - } - - rowEl.appendChild(el); - - this.generateCollapsedRowContent(row); - } -}; - -//update column visibility -ResponsiveLayout.prototype.updateColumnVisibility = function (column, visible) { - var index; - if (column.modules.responsive) { - column.modules.responsive.visible = visible; - this.initialize(); - } -}; - -ResponsiveLayout.prototype.hideColumn = function (column) { - column.hide(false, true); - - if (this.mode === "collapse") { - this.hiddenColumns.unshift(column); - this.generateCollapsedContent(); - } -}; - -ResponsiveLayout.prototype.showColumn = function (column) { - var index; - - column.show(false, true); - //set column width to prevent calculation loops on uninitialized columns - column.setWidth(column.getWidth()); - - if (this.mode === "collapse") { - index = this.hiddenColumns.indexOf(column); - - if (index > -1) { - this.hiddenColumns.splice(index, 1); - } - - this.generateCollapsedContent(); - } -}; - -//redraw columns to fit space -ResponsiveLayout.prototype.update = function () { - var self = this, - working = true; - - while (working) { - - var width = self.table.modules.layout.getMode() == "fitColumns" ? self.table.columnManager.getFlexBaseWidth() : self.table.columnManager.getWidth(); - - var diff = self.table.columnManager.element.clientWidth - width; - - if (diff < 0) { - //table is too wide - var column = self.columns[self.index]; - - if (column) { - self.hideColumn(column); - self.index++; - } else { - working = false; - } - } else { - - //table has spare space - var _column = self.columns[self.index - 1]; - - if (_column) { - if (diff > 0) { - if (diff >= _column.getWidth()) { - self.showColumn(_column); - self.index--; - } else { - working = false; - } - } else { - working = false; - } - } else { - working = false; - } - } - - if (!self.table.rowManager.activeRowsCount) { - self.table.rowManager.renderEmptyScroll(); - } - } -}; - -ResponsiveLayout.prototype.generateCollapsedContent = function () { - var self = this, - rows = this.table.rowManager.getDisplayRows(); - - rows.forEach(function (row) { - self.generateCollapsedRowContent(row); - }); -}; - -ResponsiveLayout.prototype.generateCollapsedRowContent = function (row) { - var el, contents; - - if (row.modules.responsiveLayout) { - el = row.modules.responsiveLayout.element; - - while (el.firstChild) { - el.removeChild(el.firstChild); - }contents = this.collapseFormatter(this.generateCollapsedRowData(row)); - - if (contents) { - el.appendChild(contents); - } - } -}; - -ResponsiveLayout.prototype.generateCollapsedRowData = function (row) { - var self = this, - data = row.getData(), - output = {}, - mockCellComponent; - - this.hiddenColumns.forEach(function (column) { - var value = column.getFieldValue(data); - - if (column.definition.title && column.field) { - if (column.modules.format && self.table.options.responsiveLayoutCollapseUseFormatters) { - - mockCellComponent = { - value: false, - data: {}, - getValue: function getValue() { - return value; - }, - getData: function getData() { - return data; - }, - getElement: function getElement() { - return document.createElement("div"); - }, - getRow: function getRow() { - return row.getComponent(); - }, - getColumn: function getColumn() { - return column.getComponent(); - } - }; - - output[column.definition.title] = column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params); - } else { - output[column.definition.title] = value; - } - } - }); - - return output; -}; - -ResponsiveLayout.prototype.formatCollapsedData = function (data) { - var list = document.createElement("table"), - listContents = ""; - - for (var key in data) { - listContents += "" + key + "" + data[key] + ""; - } - - list.innerHTML = listContents; - - return Object.keys(data).length ? list : ""; -}; - -Tabulator.prototype.registerModule("responsiveLayout", ResponsiveLayout); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/responsive_layout.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/responsive_layout.min.js deleted file mode 100644 index 3ca60c8b9f..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/responsive_layout.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var ResponsiveLayout=function(e){this.table=e,this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0};ResponsiveLayout.prototype.initialize=function(){var e=this,t=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach(function(o,s){o.modules.responsive&&o.modules.responsive.order&&o.modules.responsive.visible&&(o.modules.responsive.index=s,t.push(o),o.visible||"collapse"!==e.mode||e.hiddenColumns.push(o))}),t=t.reverse(),t=t.sort(function(e,t){return t.modules.responsive.order-e.modules.responsive.order||t.modules.responsive.index-e.modules.responsive.index}),this.columns=t,"collapse"===this.mode&&this.generateCollapsedContent()},ResponsiveLayout.prototype.initializeColumn=function(e){var t=e.getDefinition();e.modules.responsive={order:void 0===t.responsive?1:t.responsive,visible:!1!==t.visible}},ResponsiveLayout.prototype.layoutRow=function(e){var t=e.getElement(),o=document.createElement("div");o.classList.add("tabulator-responsive-collapse"),t.classList.contains("tabulator-calcs")||(e.modules.responsiveLayout={element:o},this.collapseStartOpen||(o.style.display="none"),t.appendChild(o),this.generateCollapsedRowContent(e))},ResponsiveLayout.prototype.updateColumnVisibility=function(e,t){e.modules.responsive&&(e.modules.responsive.visible=t,this.initialize())},ResponsiveLayout.prototype.hideColumn=function(e){e.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent())},ResponsiveLayout.prototype.showColumn=function(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),"collapse"===this.mode&&(t=this.hiddenColumns.indexOf(e),t>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent())},ResponsiveLayout.prototype.update=function(){for(var e=this,t=!0;t;){var o="fitColumns"==e.table.modules.layout.getMode()?e.table.columnManager.getFlexBaseWidth():e.table.columnManager.getWidth(),s=e.table.columnManager.element.clientWidth-o;if(s<0){var n=e.columns[e.index];n?(e.hideColumn(n),e.index++):t=!1}else{var i=e.columns[e.index-1];i&&s>0&&s>=i.getWidth()?(e.showColumn(i),e.index--):t=!1}e.table.rowManager.activeRowsCount||e.table.rowManager.renderEmptyScroll()}},ResponsiveLayout.prototype.generateCollapsedContent=function(){var e=this;this.table.rowManager.getDisplayRows().forEach(function(t){e.generateCollapsedRowContent(t)})},ResponsiveLayout.prototype.generateCollapsedRowContent=function(e){var t,o;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);o=this.collapseFormatter(this.generateCollapsedRowData(e)),o&&t.appendChild(o)}},ResponsiveLayout.prototype.generateCollapsedRowData=function(e){var t,o=this,s=e.getData(),n={};return this.hiddenColumns.forEach(function(i){var a=i.getFieldValue(s);i.definition.title&&i.field&&(i.modules.format&&o.table.options.responsiveLayoutCollapseUseFormatters?(t={value:!1,data:{},getValue:function(){return a},getData:function(){return s},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return i.getComponent()}},n[i.definition.title]=i.modules.format.formatter.call(o.table.modules.format,t,i.modules.format.params)):n[i.definition.title]=a)}),n},ResponsiveLayout.prototype.formatCollapsedData=function(e){var t=document.createElement("table"),o="";for(var s in e)o+=""+s+""+e[s]+"";return t.innerHTML=o,Object.keys(e).length?t:""},Tabulator.prototype.registerModule("responsiveLayout",ResponsiveLayout); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/select_row.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/select_row.js deleted file mode 100644 index 3f4f76915c..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/select_row.js +++ /dev/null @@ -1,294 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var SelectRow = function SelectRow(table) { - this.table = table; //hold Tabulator object - this.selecting = false; //flag selecting in progress - this.lastClickedRow = false; //last clicked row - this.selectPrev = []; //hold previously selected element for drag drop selection - this.selectedRows = []; //hold selected rows -}; - -SelectRow.prototype.clearSelectionData = function (silent) { - this.selecting = false; - this.lastClickedRow = false; - this.selectPrev = []; - this.selectedRows = []; - - if (!silent) { - this._rowSelectionChanged(); - } -}; - -SelectRow.prototype.initializeRow = function (row) { - var self = this, - element = row.getElement(); - - // trigger end of row selection - var endSelect = function endSelect() { - - setTimeout(function () { - self.selecting = false; - }, 50); - - document.body.removeEventListener("mouseup", endSelect); - }; - - row.modules.select = { selected: false }; - - //set row selection class - if (self.table.options.selectableCheck.call(this.table, row.getComponent())) { - element.classList.add("tabulator-selectable"); - element.classList.remove("tabulator-unselectable"); - - if (self.table.options.selectable && self.table.options.selectable != "highlight") { - if (self.table.options.selectableRangeMode && self.table.options.selectableRangeMode === "click") { - element.addEventListener("click", function (e) { - if (e.shiftKey) { - self.lastClickedRow = self.lastClickedRow || row; - - var lastClickedRowIdx = self.table.rowManager.getDisplayRowIndex(self.lastClickedRow); - var rowIdx = self.table.rowManager.getDisplayRowIndex(row); - - var fromRowIdx = lastClickedRowIdx <= rowIdx ? lastClickedRowIdx : rowIdx; - var toRowIdx = lastClickedRowIdx >= rowIdx ? lastClickedRowIdx : rowIdx; - - var rows = self.table.rowManager.getDisplayRows().slice(0); - var toggledRows = rows.splice(fromRowIdx, toRowIdx - fromRowIdx + 1); - - if (e.ctrlKey) { - toggledRows.forEach(function (toggledRow) { - if (toggledRow !== self.lastClickedRow) { - self.toggleRow(toggledRow); - } - }); - self.lastClickedRow = row; - } else { - self.deselectRows(); - self.selectRows(toggledRows); - } - } else if (e.ctrlKey) { - self.toggleRow(row); - self.lastClickedRow = row; - } else { - self.deselectRows(); - self.selectRows(row); - self.lastClickedRow = row; - } - }); - } else { - element.addEventListener("click", function (e) { - if (!self.selecting) { - self.toggleRow(row); - } - }); - - element.addEventListener("mousedown", function (e) { - if (e.shiftKey) { - self.selecting = true; - - self.selectPrev = []; - - document.body.addEventListener("mouseup", endSelect); - document.body.addEventListener("keyup", endSelect); - - self.toggleRow(row); - - return false; - } - }); - - element.addEventListener("mouseenter", function (e) { - if (self.selecting) { - self.toggleRow(row); - - if (self.selectPrev[1] == row) { - self.toggleRow(self.selectPrev[0]); - } - } - }); - - element.addEventListener("mouseout", function (e) { - if (self.selecting) { - self.selectPrev.unshift(row); - } - }); - } - } - } else { - element.classList.add("tabulator-unselectable"); - element.classList.remove("tabulator-selectable"); - } -}; - -//toggle row selection -SelectRow.prototype.toggleRow = function (row) { - if (this.table.options.selectableCheck.call(this.table, row.getComponent())) { - if (row.modules.select.selected) { - this._deselectRow(row); - } else { - this._selectRow(row); - } - } -}; - -//select a number of rows -SelectRow.prototype.selectRows = function (rows) { - var self = this; - - switch (typeof rows === "undefined" ? "undefined" : _typeof(rows)) { - case "undefined": - self.table.rowManager.rows.forEach(function (row) { - self._selectRow(row, false, true); - }); - - self._rowSelectionChanged(); - break; - - case "boolean": - if (rows === true) { - self.table.rowManager.activeRows.forEach(function (row) { - self._selectRow(row, false, true); - }); - - self._rowSelectionChanged(); - } - break; - - default: - if (Array.isArray(rows)) { - rows.forEach(function (row) { - self._selectRow(row); - }); - - self._rowSelectionChanged(); - } else { - self._selectRow(rows); - } - break; - } -}; - -//select an individual row -SelectRow.prototype._selectRow = function (rowInfo, silent, force) { - var index; - - //handle max row count - if (!isNaN(this.table.options.selectable) && this.table.options.selectable !== true && !force) { - if (this.selectedRows.length >= this.table.options.selectable) { - if (this.table.options.selectableRollingSelection) { - this._deselectRow(this.selectedRows[0]); - } else { - return false; - } - } - } - - var row = this.table.rowManager.findRow(rowInfo); - - if (row) { - if (this.selectedRows.indexOf(row) == -1) { - row.modules.select.selected = true; - row.getElement().classList.add("tabulator-selected"); - - this.selectedRows.push(row); - - if (!silent) { - this.table.options.rowSelected.call(this.table, row.getComponent()); - this._rowSelectionChanged(); - } - } - } else { - if (!silent) { - console.warn("Selection Error - No such row found, ignoring selection:" + rowInfo); - } - } -}; - -SelectRow.prototype.isRowSelected = function (row) { - return this.selectedRows.indexOf(row) !== -1; -}; - -//deselect a number of rows -SelectRow.prototype.deselectRows = function (rows) { - var self = this, - rowCount; - - if (typeof rows == "undefined") { - - rowCount = self.selectedRows.length; - - for (var i = 0; i < rowCount; i++) { - self._deselectRow(self.selectedRows[0], false); - } - - self._rowSelectionChanged(); - } else { - if (Array.isArray(rows)) { - rows.forEach(function (row) { - self._deselectRow(row); - }); - - self._rowSelectionChanged(); - } else { - self._deselectRow(rows); - } - } -}; - -//deselect an individual row -SelectRow.prototype._deselectRow = function (rowInfo, silent) { - var self = this, - row = self.table.rowManager.findRow(rowInfo), - index; - - if (row) { - index = self.selectedRows.findIndex(function (selectedRow) { - return selectedRow == row; - }); - - if (index > -1) { - - row.modules.select.selected = false; - row.getElement().classList.remove("tabulator-selected"); - self.selectedRows.splice(index, 1); - - if (!silent) { - self.table.options.rowDeselected.call(this.table, row.getComponent()); - self._rowSelectionChanged(); - } - } - } else { - if (!silent) { - console.warn("Deselection Error - No such row found, ignoring selection:" + rowInfo); - } - } -}; - -SelectRow.prototype.getSelectedData = function () { - var data = []; - - this.selectedRows.forEach(function (row) { - data.push(row.getData()); - }); - - return data; -}; - -SelectRow.prototype.getSelectedRows = function () { - - var rows = []; - - this.selectedRows.forEach(function (row) { - rows.push(row.getComponent()); - }); - - return rows; -}; - -SelectRow.prototype._rowSelectionChanged = function () { - this.table.options.rowSelectionChanged.call(this.table, this.getSelectedData(), this.getSelectedRows()); -}; - -Tabulator.prototype.registerModule("selectRow", SelectRow); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/select_row.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/select_row.min.js deleted file mode 100644 index 8ac199fcc9..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/select_row.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},SelectRow=function(e){this.table=e,this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[]};SelectRow.prototype.clearSelectionData=function(e){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],e||this._rowSelectionChanged()},SelectRow.prototype.initializeRow=function(e){var t=this,o=e.getElement(),l=function e(){setTimeout(function(){t.selecting=!1},50),document.body.removeEventListener("mouseup",e)};e.modules.select={selected:!1},t.table.options.selectableCheck.call(this.table,e.getComponent())?(o.classList.add("tabulator-selectable"),o.classList.remove("tabulator-unselectable"),t.table.options.selectable&&"highlight"!=t.table.options.selectable&&(t.table.options.selectableRangeMode&&"click"===t.table.options.selectableRangeMode?o.addEventListener("click",function(o){if(o.shiftKey){t.lastClickedRow=t.lastClickedRow||e;var l=t.table.rowManager.getDisplayRowIndex(t.lastClickedRow),s=t.table.rowManager.getDisplayRowIndex(e),c=l<=s?l:s,n=l>=s?l:s,i=t.table.rowManager.getDisplayRows().slice(0),a=i.splice(c,n-c+1);o.ctrlKey?(a.forEach(function(e){e!==t.lastClickedRow&&t.toggleRow(e)}),t.lastClickedRow=e):(t.deselectRows(),t.selectRows(a))}else o.ctrlKey?(t.toggleRow(e),t.lastClickedRow=e):(t.deselectRows(),t.selectRows(e),t.lastClickedRow=e)}):(o.addEventListener("click",function(o){t.selecting||t.toggleRow(e)}),o.addEventListener("mousedown",function(o){if(o.shiftKey)return t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",l),document.body.addEventListener("keyup",l),t.toggleRow(e),!1}),o.addEventListener("mouseenter",function(o){t.selecting&&(t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))}),o.addEventListener("mouseout",function(o){t.selecting&&t.selectPrev.unshift(e)})))):(o.classList.add("tabulator-unselectable"),o.classList.remove("tabulator-selectable"))},SelectRow.prototype.toggleRow=function(e){this.table.options.selectableCheck.call(this.table,e.getComponent())&&(e.modules.select.selected?this._deselectRow(e):this._selectRow(e))},SelectRow.prototype.selectRows=function(e){var t=this;switch(void 0===e?"undefined":_typeof(e)){case"undefined":t.table.rowManager.rows.forEach(function(e){t._selectRow(e,!1,!0)}),t._rowSelectionChanged();break;case"boolean":!0===e&&(t.table.rowManager.activeRows.forEach(function(e){t._selectRow(e,!1,!0)}),t._rowSelectionChanged());break;default:Array.isArray(e)?(e.forEach(function(e){t._selectRow(e)}),t._rowSelectionChanged()):t._selectRow(e)}},SelectRow.prototype._selectRow=function(e,t,o){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!o&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var l=this.table.rowManager.findRow(e);l?-1==this.selectedRows.indexOf(l)&&(l.modules.select.selected=!0,l.getElement().classList.add("tabulator-selected"),this.selectedRows.push(l),t||(this.table.options.rowSelected.call(this.table,l.getComponent()),this._rowSelectionChanged())):t||console.warn("Selection Error - No such row found, ignoring selection:"+e)},SelectRow.prototype.isRowSelected=function(e){return-1!==this.selectedRows.indexOf(e)},SelectRow.prototype.deselectRows=function(e){var t,o=this;if(void 0===e){t=o.selectedRows.length;for(var l=0;l-1&&(s.modules.select.selected=!1,s.getElement().classList.remove("tabulator-selected"),l.selectedRows.splice(o,1),t||(l.table.options.rowDeselected.call(this.table,s.getComponent()),l._rowSelectionChanged())):t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)},SelectRow.prototype.getSelectedData=function(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getData())}),e},SelectRow.prototype.getSelectedRows=function(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getComponent())}),e},SelectRow.prototype._rowSelectionChanged=function(){this.table.options.rowSelectionChanged.call(this.table,this.getSelectedData(),this.getSelectedRows())},Tabulator.prototype.registerModule("selectRow",SelectRow); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/sort.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/sort.js deleted file mode 100644 index f3a0215487..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/sort.js +++ /dev/null @@ -1,527 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var Sort = function Sort(table) { - this.table = table; //hold Tabulator object - this.sortList = []; //holder current sort - this.changed = false; //has the sort changed since last render -}; - -//initialize column header for sorting -Sort.prototype.initializeColumn = function (column, content) { - var self = this, - sorter = false, - colEl, - arrowEl; - - switch (_typeof(column.definition.sorter)) { - case "string": - if (self.sorters[column.definition.sorter]) { - sorter = self.sorters[column.definition.sorter]; - } else { - console.warn("Sort Error - No such sorter found: ", column.definition.sorter); - } - break; - - case "function": - sorter = column.definition.sorter; - break; - } - - column.modules.sort = { - sorter: sorter, dir: "none", - params: column.definition.sorterParams || {}, - startingDir: column.definition.headerSortStartingDir || "asc" - }; - - if (column.definition.headerSort !== false) { - - colEl = column.getElement(); - - colEl.classList.add("tabulator-sortable"); - - arrowEl = document.createElement("div"); - arrowEl.classList.add("tabulator-arrow"); - //create sorter arrow - content.appendChild(arrowEl); - - //sort on click - colEl.addEventListener("click", function (e) { - var dir = "", - sorters = [], - match = false; - - if (column.modules.sort) { - dir = column.modules.sort.dir == "asc" ? "desc" : column.modules.sort.dir == "desc" ? "asc" : column.modules.sort.startingDir; - - if (self.table.options.columnHeaderSortMulti && (e.shiftKey || e.ctrlKey)) { - sorters = self.getSort(); - - match = sorters.findIndex(function (sorter) { - return sorter.field === column.getField(); - }); - - if (match > -1) { - sorters[match].dir = sorters[match].dir == "asc" ? "desc" : "asc"; - - if (match != sorters.length - 1) { - sorters.push(sorters.splice(match, 1)[0]); - } - } else { - sorters.push({ column: column, dir: dir }); - } - - //add to existing sort - self.setSort(sorters); - } else { - //sort by column only - self.setSort(column, dir); - } - - self.table.rowManager.sorterRefresh(); - } - }); - } -}; - -//check if the sorters have changed since last use -Sort.prototype.hasChanged = function () { - var changed = this.changed; - this.changed = false; - return changed; -}; - -//return current sorters -Sort.prototype.getSort = function () { - var self = this, - sorters = []; - - self.sortList.forEach(function (item) { - if (item.column) { - sorters.push({ column: item.column.getComponent(), field: item.column.getField(), dir: item.dir }); - } - }); - - return sorters; -}; - -//change sort list and trigger sort -Sort.prototype.setSort = function (sortList, dir) { - var self = this, - newSortList = []; - - if (!Array.isArray(sortList)) { - sortList = [{ column: sortList, dir: dir }]; - } - - sortList.forEach(function (item) { - var column; - - column = self.table.columnManager.findColumn(item.column); - - if (column) { - item.column = column; - newSortList.push(item); - self.changed = true; - } else { - console.warn("Sort Warning - Sort field does not exist and is being ignored: ", item.column); - } - }); - - self.sortList = newSortList; - - if (this.table.options.persistentSort && this.table.modExists("persistence", true)) { - this.table.modules.persistence.save("sort"); - } -}; - -//clear sorters -Sort.prototype.clear = function () { - this.setSort([]); -}; - -//find appropriate sorter for column -Sort.prototype.findSorter = function (column) { - var row = this.table.rowManager.activeRows[0], - sorter = "string", - field, - value; - - if (row) { - row = row.getData(); - field = column.getField(); - - if (field) { - - value = column.getFieldValue(row); - - switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { - case "undefined": - sorter = "string"; - break; - - case "boolean": - sorter = "boolean"; - break; - - default: - if (!isNaN(value) && value !== "") { - sorter = "number"; - } else { - if (value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)) { - sorter = "alphanum"; - } - } - break; - } - } - } - - return this.sorters[sorter]; -}; - -//work through sort list sorting data -Sort.prototype.sort = function () { - var self = this, - lastSort, - sortList; - - sortList = this.table.options.sortOrderReverse ? self.sortList.slice().reverse() : self.sortList; - - if (self.table.options.dataSorting) { - self.table.options.dataSorting.call(self.table, self.getSort()); - } - - self.clearColumnHeaders(); - - if (!self.table.options.ajaxSorting) { - - sortList.forEach(function (item, i) { - - if (item.column && item.column.modules.sort) { - - //if no sorter has been defined, take a guess - if (!item.column.modules.sort.sorter) { - item.column.modules.sort.sorter = self.findSorter(item.column); - } - - self._sortItem(item.column, item.dir, sortList, i); - } - - self.setColumnHeader(item.column, item.dir); - }); - } else { - sortList.forEach(function (item, i) { - self.setColumnHeader(item.column, item.dir); - }); - } - - if (self.table.options.dataSorted) { - self.table.options.dataSorted.call(self.table, self.getSort(), self.table.rowManager.getComponents(true)); - } -}; - -//clear sort arrows on columns -Sort.prototype.clearColumnHeaders = function () { - this.table.columnManager.getRealColumns().forEach(function (column) { - if (column.modules.sort) { - column.modules.sort.dir = "none"; - column.getElement().setAttribute("aria-sort", "none"); - } - }); -}; - -//set the column header sort direction -Sort.prototype.setColumnHeader = function (column, dir) { - column.modules.sort.dir = dir; - column.getElement().setAttribute("aria-sort", dir); -}; - -//sort each item in sort list -Sort.prototype._sortItem = function (column, dir, sortList, i) { - var self = this; - - var activeRows = self.table.rowManager.activeRows; - - var params = typeof column.modules.sort.params === "function" ? column.modules.sort.params(column.getComponent(), dir) : column.modules.sort.params; - - activeRows.sort(function (a, b) { - - var result = self._sortRow(a, b, column, dir, params); - - //if results match recurse through previous searchs to be sure - if (result === 0 && i) { - for (var j = i - 1; j >= 0; j--) { - result = self._sortRow(a, b, sortList[j].column, sortList[j].dir, params); - - if (result !== 0) { - break; - } - } - } - - return result; - }); -}; - -//process individual rows for a sort function on active data -Sort.prototype._sortRow = function (a, b, column, dir, params) { - var el1Comp, el2Comp, colComp; - - //switch elements depending on search direction - var el1 = dir == "asc" ? a : b; - var el2 = dir == "asc" ? b : a; - - a = column.getFieldValue(el1.getData()); - b = column.getFieldValue(el2.getData()); - - a = typeof a !== "undefined" ? a : ""; - b = typeof b !== "undefined" ? b : ""; - - el1Comp = el1.getComponent(); - el2Comp = el2.getComponent(); - - return column.modules.sort.sorter.call(this, a, b, el1Comp, el2Comp, column.getComponent(), dir, params); -}; - -//default data sorters -Sort.prototype.sorters = { - - //sort numbers - number: function number(a, b, aRow, bRow, column, dir, params) { - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - - a = parseFloat(String(a).replace(",", "")); - b = parseFloat(String(b).replace(",", "")); - - //handle non numeric values - if (isNaN(a)) { - emptyAlign = isNaN(b) ? 0 : -1; - } else if (isNaN(b)) { - emptyAlign = 1; - } else { - //compare valid values - return a - b; - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - }, - - //sort strings - string: function string(a, b, aRow, bRow, column, dir, params) { - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - var locale; - - //handle empty values - if (!a) { - emptyAlign = !b ? 0 : -1; - } else if (!b) { - emptyAlign = 1; - } else { - //compare valid values - switch (_typeof(params.locale)) { - case "boolean": - if (params.locale) { - locale = this.table.modules.localize.getLocale(); - } - break; - case "string": - locale = params.locale; - break; - } - - return String(a).toLowerCase().localeCompare(String(b).toLowerCase(), locale); - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - }, - - //sort date - date: function date(a, b, aRow, bRow, column, dir, params) { - if (!params.format) { - params.format = "DD/MM/YYYY"; - } - - return this.sorters.datetime.call(this, a, b, aRow, bRow, column, dir, params); - }, - - //sort hh:mm formatted times - time: function time(a, b, aRow, bRow, column, dir, params) { - if (!params.format) { - params.format = "hh:mm"; - } - - return this.sorters.datetime.call(this, a, b, aRow, bRow, column, dir, params); - }, - - //sort datetime - datetime: function datetime(a, b, aRow, bRow, column, dir, params) { - var format = params.format || "DD/MM/YYYY hh:mm:ss", - alignEmptyValues = params.alignEmptyValues, - emptyAlign = 0; - - if (typeof moment != "undefined") { - a = moment(a, format); - b = moment(b, format); - - if (!a.isValid()) { - emptyAlign = !b.isValid() ? 0 : -1; - } else if (!b.isValid()) { - emptyAlign = 1; - } else { - //compare valid values - return a - b; - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - } else { - console.error("Sort Error - 'datetime' sorter is dependant on moment.js"); - } - }, - - //sort booleans - boolean: function boolean(a, b, aRow, bRow, column, dir, params) { - var el1 = a === true || a === "true" || a === "True" || a === 1 ? 1 : 0; - var el2 = b === true || b === "true" || b === "True" || b === 1 ? 1 : 0; - - return el1 - el2; - }, - - //sort if element contains any data - array: function array(a, b, aRow, bRow, column, dir, params) { - var el1 = 0; - var el2 = 0; - var type = params.type || "length"; - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - - function calc(value) { - - switch (type) { - case "length": - return value.length; - break; - - case "sum": - return value.reduce(function (c, d) { - return c + d; - }); - break; - - case "max": - return Math.max.apply(null, value); - break; - - case "min": - return Math.min.apply(null, value); - break; - - case "avg": - return value.reduce(function (c, d) { - return c + d; - }) / value.length; - break; - } - } - - //handle non array values - if (!Array.isArray(a)) { - alignEmptyValues = !Array.isArray(b) ? 0 : -1; - } else if (!Array.isArray(b)) { - alignEmptyValues = 1; - } else { - - //compare valid values - el1 = a ? calc(a) : 0; - el2 = b ? calc(b) : 0; - - return el1 - el2; - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - }, - - //sort if element contains any data - exists: function exists(a, b, aRow, bRow, column, dir, params) { - var el1 = typeof a == "undefined" ? 0 : 1; - var el2 = typeof b == "undefined" ? 0 : 1; - - return el1 - el2; - }, - - //sort alpha numeric strings - alphanum: function alphanum(as, bs, aRow, bRow, column, dir, params) { - var a, - b, - a1, - b1, - i = 0, - L, - rx = /(\d+)|(\D+)/g, - rd = /\d/; - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - - //handle empty values - if (!as && as !== 0) { - emptyAlign = !bs && bs !== 0 ? 0 : -1; - } else if (!bs && bs !== 0) { - emptyAlign = 1; - } else { - - if (isFinite(as) && isFinite(bs)) return as - bs; - a = String(as).toLowerCase(); - b = String(bs).toLowerCase(); - if (a === b) return 0; - if (!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1; - a = a.match(rx); - b = b.match(rx); - L = a.length > b.length ? b.length : a.length; - while (i < L) { - a1 = a[i]; - b1 = b[i++]; - if (a1 !== b1) { - if (isFinite(a1) && isFinite(b1)) { - if (a1.charAt(0) === "0") a1 = "." + a1; - if (b1.charAt(0) === "0") b1 = "." + b1; - return a1 - b1; - } else return a1 > b1 ? 1 : -1; - } - } - - return a.length > b.length; - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - } -}; - -Tabulator.prototype.registerModule("sort", Sort); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/sort.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/sort.min.js deleted file mode 100644 index 5cc1ae4400..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/sort.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sort=function(t){this.table=t,this.sortList=[],this.changed=!1};Sort.prototype.initializeColumn=function(t,e){var r,o,n=this,s=!1;switch(_typeof(t.definition.sorter)){case"string":n.sorters[t.definition.sorter]?s=n.sorters[t.definition.sorter]:console.warn("Sort Error - No such sorter found: ",t.definition.sorter);break;case"function":s=t.definition.sorter}t.modules.sort={sorter:s,dir:"none",params:t.definition.sorterParams||{},startingDir:t.definition.headerSortStartingDir||"asc"},!1!==t.definition.headerSort&&(r=t.getElement(),r.classList.add("tabulator-sortable"),o=document.createElement("div"),o.classList.add("tabulator-arrow"),e.appendChild(o),r.addEventListener("click",function(e){var r="",o=[],s=!1;t.modules.sort&&(r="asc"==t.modules.sort.dir?"desc":"desc"==t.modules.sort.dir?"asc":t.modules.sort.startingDir,n.table.options.columnHeaderSortMulti&&(e.shiftKey||e.ctrlKey)?(o=n.getSort(),s=o.findIndex(function(e){return e.field===t.getField()}),s>-1?(o[s].dir="asc"==o[s].dir?"desc":"asc",s!=o.length-1&&o.push(o.splice(s,1)[0])):o.push({column:t,dir:r}),n.setSort(o)):n.setSort(t,r),n.table.rowManager.sorterRefresh())}))},Sort.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},Sort.prototype.getSort=function(){var t=this,e=[];return t.sortList.forEach(function(t){t.column&&e.push({column:t.column.getComponent(),field:t.column.getField(),dir:t.dir})}),e},Sort.prototype.setSort=function(t,e){var r=this,o=[];Array.isArray(t)||(t=[{column:t,dir:e}]),t.forEach(function(t){var e;e=r.table.columnManager.findColumn(t.column),e?(t.column=e,o.push(t),r.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",t.column)}),r.sortList=o,this.table.options.persistentSort&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("sort")},Sort.prototype.clear=function(){this.setSort([])},Sort.prototype.findSorter=function(t){var e,r=this.table.rowManager.activeRows[0],o="string";if(r&&(r=r.getData(),t.getField()))switch(e=t.getFieldValue(r),void 0===e?"undefined":_typeof(e)){case"undefined":o="string";break;case"boolean":o="boolean";break;default:isNaN(e)||""===e?e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(o="alphanum"):o="number"}return this.sorters[o]},Sort.prototype.sort=function(){var t,e=this;t=this.table.options.sortOrderReverse?e.sortList.slice().reverse():e.sortList,e.table.options.dataSorting&&e.table.options.dataSorting.call(e.table,e.getSort()),e.clearColumnHeaders(),e.table.options.ajaxSorting?t.forEach(function(t,r){e.setColumnHeader(t.column,t.dir)}):t.forEach(function(r,o){r.column&&r.column.modules.sort&&(r.column.modules.sort.sorter||(r.column.modules.sort.sorter=e.findSorter(r.column)),e._sortItem(r.column,r.dir,t,o)),e.setColumnHeader(r.column,r.dir)}),e.table.options.dataSorted&&e.table.options.dataSorted.call(e.table,e.getSort(),e.table.rowManager.getComponents(!0))},Sort.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach(function(t){t.modules.sort&&(t.modules.sort.dir="none",t.getElement().setAttribute("aria-sort","none"))})},Sort.prototype.setColumnHeader=function(t,e){t.modules.sort.dir=e,t.getElement().setAttribute("aria-sort",e)},Sort.prototype._sortItem=function(t,e,r,o){var n=this,s=n.table.rowManager.activeRows,i="function"==typeof t.modules.sort.params?t.modules.sort.params(t.getComponent(),e):t.modules.sort.params;s.sort(function(s,a){var l=n._sortRow(s,a,t,e,i);if(0===l&&o)for(var u=o-1;u>=0&&0===(l=n._sortRow(s,a,r[u].column,r[u].dir,i));u--);return l})},Sort.prototype._sortRow=function(t,e,r,o,n){var s,i,a="asc"==o?t:e,l="asc"==o?e:t;return t=r.getFieldValue(a.getData()),e=r.getFieldValue(l.getData()),t=void 0!==t?t:"",e=void 0!==e?e:"",s=a.getComponent(),i=l.getComponent(),r.modules.sort.sorter.call(this,t,e,s,i,r.getComponent(),o,n)},Sort.prototype.sorters={number:function(t,e,r,o,n,s,i){var a=i.alignEmptyValues,l=0;if(t=parseFloat(String(t).replace(",","")),e=parseFloat(String(e).replace(",","")),isNaN(t))l=isNaN(e)?0:-1;else{if(!isNaN(e))return t-e;l=1}return("top"===a&&"desc"===s||"bottom"===a&&"asc"===s)&&(l*=-1),l},string:function(t,e,r,o,n,s,i){var a,l=i.alignEmptyValues,u=0;if(t){if(e){switch(_typeof(i.locale)){case"boolean":i.locale&&(a=this.table.modules.localize.getLocale());break;case"string":a=i.locale}return String(t).toLowerCase().localeCompare(String(e).toLowerCase(),a)}u=1}else u=e?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(u*=-1),u},date:function(t,e,r,o,n,s,i){return i.format||(i.format="DD/MM/YYYY"),this.sorters.datetime.call(this,t,e,r,o,n,s,i)},time:function(t,e,r,o,n,s,i){return i.format||(i.format="hh:mm"),this.sorters.datetime.call(this,t,e,r,o,n,s,i)},datetime:function(t,e,r,o,n,s,i){var a=i.format||"DD/MM/YYYY hh:mm:ss",l=i.alignEmptyValues,u=0;if("undefined"!=typeof moment){if(t=moment(t,a),e=moment(e,a),t.isValid()){if(e.isValid())return t-e;u=1}else u=e.isValid()?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(u*=-1),u}console.error("Sort Error - 'datetime' sorter is dependant on moment.js")},boolean:function(t,e,r,o,n,s,i){return(!0===t||"true"===t||"True"===t||1===t?1:0)-(!0===e||"true"===e||"True"===e||1===e?1:0)},array:function(t,e,r,o,n,s,i){function a(t){switch(c){case"length":return t.length;case"sum":return t.reduce(function(t,e){return t+e});case"max":return Math.max.apply(null,t);case"min":return Math.min.apply(null,t);case"avg":return t.reduce(function(t,e){return t+e})/t.length}}var l=0,u=0,c=i.type||"length",d=i.alignEmptyValues,m=0;if(Array.isArray(t)){if(Array.isArray(e))return l=t?a(t):0,u=e?a(e):0,l-u;d=1}else d=Array.isArray(e)?-1:0;return("top"===d&&"desc"===s||"bottom"===d&&"asc"===s)&&(m*=-1),m},exists:function(t,e,r,o,n,s,i){return(void 0===t?0:1)-(void 0===e?0:1)},alphanum:function(t,e,r,o,n,s,i){var a,l,u,c,d,m=0,f=/(\d+)|(\D+)/g,p=/\d/,g=i.alignEmptyValues,h=0;if(t||0===t){if(e||0===e){if(isFinite(t)&&isFinite(e))return t-e;if(a=String(t).toLowerCase(),l=String(e).toLowerCase(),a===l)return 0;if(!p.test(a)||!p.test(l))return a>l?1:-1;for(a=a.match(f),l=l.match(f),d=a.length>l.length?l.length:a.length;mc?1:-1;return a.length>l.length}h=1}else h=e||0===e?-1:0;return("top"===g&&"desc"===s||"bottom"===g&&"asc"===s)&&(h*=-1),h}},Tabulator.prototype.registerModule("sort",Sort); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/validate.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/validate.js deleted file mode 100644 index dea91a0508..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/validate.js +++ /dev/null @@ -1,212 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var Validate = function Validate(table) { - this.table = table; -}; - -//validate -Validate.prototype.initializeColumn = function (column) { - var self = this, - config = [], - validator; - - if (column.definition.validator) { - - if (Array.isArray(column.definition.validator)) { - column.definition.validator.forEach(function (item) { - validator = self._extractValidator(item); - - if (validator) { - config.push(validator); - } - }); - } else { - validator = this._extractValidator(column.definition.validator); - - if (validator) { - config.push(validator); - } - } - - column.modules.validate = config.length ? config : false; - } -}; - -Validate.prototype._extractValidator = function (value) { - var parts, type, params; - - switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { - case "string": - parts = value.split(":", 2); - type = parts.shift(); - params = parts[0]; - - return this._buildValidator(type, params); - break; - - case "function": - return this._buildValidator(value); - break; - - case "object": - return this._buildValidator(value.type, value.parameters); - break; - } -}; - -Validate.prototype._buildValidator = function (type, params) { - - var func = typeof type == "function" ? type : this.validators[type]; - - if (!func) { - console.warn("Validator Setup Error - No matching validator found:", type); - return false; - } else { - return { - type: typeof type == "function" ? "function" : type, - func: func, - params: params - }; - } -}; - -Validate.prototype.validate = function (validators, cell, value) { - var self = this, - valid = []; - - if (validators) { - validators.forEach(function (item) { - if (!item.func.call(self, cell, value, item.params)) { - valid.push({ - type: item.type, - parameters: item.params - }); - } - }); - } - - return valid.length ? valid : true; -}; - -Validate.prototype.validators = { - - //is integer - integer: function integer(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - value = Number(value); - return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; - }, - - //is float - float: function float(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - value = Number(value); - return typeof value === 'number' && isFinite(value) && value % 1 !== 0; - }, - - //must be a number - numeric: function numeric(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return !isNaN(value); - }, - - //must be a string - string: function string(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return isNaN(value); - }, - - //maximum value - max: function max(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return parseFloat(value) <= parameters; - }, - - //minimum value - min: function min(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return parseFloat(value) >= parameters; - }, - - //minimum string length - minLength: function minLength(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return String(value).length >= parameters; - }, - - //maximum string length - maxLength: function maxLength(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return String(value).length <= parameters; - }, - - //in provided value list - in: function _in(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - if (typeof parameters == "string") { - parameters = parameters.split("|"); - } - - return value === "" || parameters.indexOf(value) > -1; - }, - - //must match provided regex - regex: function regex(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - var reg = new RegExp(parameters); - - return reg.test(value); - }, - - //value must be unique in this column - unique: function unique(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - var unique = true; - - var cellData = cell.getData(); - var column = cell.getColumn()._getSelf(); - - this.table.rowManager.rows.forEach(function (row) { - var data = row.getData(); - - if (data !== cellData) { - if (value == column.getFieldValue(data)) { - unique = false; - } - } - }); - - return unique; - }, - - //must have a value - required: function required(cell, value, parameters) { - return value !== "" & value !== null && typeof value !== "undefined"; - } -}; - -Tabulator.prototype.registerModule("validate", Validate); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/validate.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/validate.min.js deleted file mode 100644 index 443a3fc3f6..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/validate.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Validate=function(t){this.table=t};Validate.prototype.initializeColumn=function(t){var n,i=this,o=[];t.definition.validator&&(Array.isArray(t.definition.validator)?t.definition.validator.forEach(function(t){(n=i._extractValidator(t))&&o.push(n)}):(n=this._extractValidator(t.definition.validator))&&o.push(n),t.modules.validate=!!o.length&&o)},Validate.prototype._extractValidator=function(t){var n,i,o;switch(void 0===t?"undefined":_typeof(t)){case"string":return n=t.split(":",2),i=n.shift(),o=n[0],this._buildValidator(i,o);case"function":return this._buildValidator(t);case"object":return this._buildValidator(t.type,t.parameters)}},Validate.prototype._buildValidator=function(t,n){var i="function"==typeof t?t:this.validators[t];return i?{type:"function"==typeof t?"function":t,func:i,params:n}:(console.warn("Validator Setup Error - No matching validator found:",t),!1)},Validate.prototype.validate=function(t,n,i){var o=this,r=[];return t&&t.forEach(function(t){t.func.call(o,n,i,t.params)||r.push({type:t.type,parameters:t.params})}),!r.length||r},Validate.prototype.validators={integer:function(t,n,i){return""===n||null===n||void 0===n||"number"==typeof(n=Number(n))&&isFinite(n)&&Math.floor(n)===n},float:function(t,n,i){return""===n||null===n||void 0===n||"number"==typeof(n=Number(n))&&isFinite(n)&&n%1!=0},numeric:function(t,n,i){return""===n||null===n||void 0===n||!isNaN(n)},string:function(t,n,i){return""===n||null===n||void 0===n||isNaN(n)},max:function(t,n,i){return""===n||null===n||void 0===n||parseFloat(n)<=i},min:function(t,n,i){return""===n||null===n||void 0===n||parseFloat(n)>=i},minLength:function(t,n,i){return""===n||null===n||void 0===n||String(n).length>=i},maxLength:function(t,n,i){return""===n||null===n||void 0===n||String(n).length<=i},in:function(t,n,i){return""===n||null===n||void 0===n||("string"==typeof i&&(i=i.split("|")),""===n||i.indexOf(n)>-1)},regex:function(t,n,i){return""===n||null===n||void 0===n||new RegExp(i).test(n)},unique:function(t,n,i){if(""===n||null===n||void 0===n)return!0;var o=!0,r=t.getData(),e=t.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(t){var i=t.getData();i!==r&&n==e.getFieldValue(i)&&(o=!1)}),o},required:function(t,n,i){return""!==n&null!==n&&void 0!==n}},Tabulator.prototype.registerModule("validate",Validate); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator.js deleted file mode 100644 index cb271b9fcb..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator.js +++ /dev/null @@ -1,19704 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -;(function (global, factory) { - if ((typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object' && typeof module !== 'undefined') { - module.exports = factory(); - } else if (typeof define === 'function' && define.amd) { - define(factory); - } else { - global.Tabulator = factory(); - } -})(this, function () { - - 'use strict'; - - // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex - - - if (!Array.prototype.findIndex) { - - Object.defineProperty(Array.prototype, 'findIndex', { - - value: function value(predicate) { - - // 1. Let O be ? ToObject(this value). - - - if (this == null) { - - throw new TypeError('"this" is null or not defined'); - } - - var o = Object(this); - - // 2. Let len be ? ToLength(? Get(O, "length")). - - - var len = o.length >>> 0; - - // 3. If IsCallable(predicate) is false, throw a TypeError exception. - - - if (typeof predicate !== 'function') { - - throw new TypeError('predicate must be a function'); - } - - // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. - - - var thisArg = arguments[1]; - - // 5. Let k be 0. - - - var k = 0; - - // 6. Repeat, while k < len - - - while (k < len) { - - // a. Let Pk be ! ToString(k). - - - // b. Let kValue be ? Get(O, Pk). - - - // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). - - - // d. If testResult is true, return k. - - - var kValue = o[k]; - - if (predicate.call(thisArg, kValue, k, o)) { - - return k; - } - - // e. Increase k by 1. - - - k++; - } - - // 7. Return -1. - - - return -1; - } - - }); - } - - // https://tc39.github.io/ecma262/#sec-array.prototype.find - - - if (!Array.prototype.find) { - - Object.defineProperty(Array.prototype, 'find', { - - value: function value(predicate) { - - // 1. Let O be ? ToObject(this value). - - - if (this == null) { - - throw new TypeError('"this" is null or not defined'); - } - - var o = Object(this); - - // 2. Let len be ? ToLength(? Get(O, "length")). - - - var len = o.length >>> 0; - - // 3. If IsCallable(predicate) is false, throw a TypeError exception. - - - if (typeof predicate !== 'function') { - - throw new TypeError('predicate must be a function'); - } - - // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. - - - var thisArg = arguments[1]; - - // 5. Let k be 0. - - - var k = 0; - - // 6. Repeat, while k < len - - - while (k < len) { - - // a. Let Pk be ! ToString(k). - - - // b. Let kValue be ? Get(O, Pk). - - - // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). - - - // d. If testResult is true, return kValue. - - - var kValue = o[k]; - - if (predicate.call(thisArg, kValue, k, o)) { - - return kValue; - } - - // e. Increase k by 1. - - - k++; - } - - // 7. Return undefined. - - - return undefined; - } - - }); - } - - var ColumnManager = function ColumnManager(table) { - - this.table = table; //hold parent table - - - this.headersElement = this.createHeadersElement(); - - this.element = this.createHeaderElement(); //containing element - - - this.rowManager = null; //hold row manager object - - - this.columns = []; // column definition object - - - this.columnsByIndex = []; //columns by index - - - this.columnsByField = []; //columns by field - - - this.scrollLeft = 0; - - this.element.insertBefore(this.headersElement, this.element.firstChild); - }; - - ////////////// Setup Functions ///////////////// - - - ColumnManager.prototype.createHeadersElement = function () { - - var el = document.createElement("div"); - - el.classList.add("tabulator-headers"); - - return el; - }; - - ColumnManager.prototype.createHeaderElement = function () { - - var el = document.createElement("div"); - - el.classList.add("tabulator-header"); - - return el; - }; - - //link to row manager - - - ColumnManager.prototype.setRowManager = function (manager) { - - this.rowManager = manager; - }; - - //return containing element - - - ColumnManager.prototype.getElement = function () { - - return this.element; - }; - - //return header containing element - - - ColumnManager.prototype.getHeadersElement = function () { - - return this.headersElement; - }; - - //scroll horizontally to match table body - - - ColumnManager.prototype.scrollHorizontal = function (left) { - - var hozAdjust = 0, - scrollWidth = this.element.scrollWidth - this.table.element.clientWidth; - - this.element.scrollLeft = left; - - //adjust for vertical scrollbar moving table when present - - - if (left > scrollWidth) { - - hozAdjust = left - scrollWidth; - - this.element.style.marginLeft = -hozAdjust + "px"; - } else { - - this.element.style.marginLeft = 0; - } - - //keep frozen columns fixed in position - - - //this._calcFrozenColumnsPos(hozAdjust + 3); - - - this.scrollLeft = left; - - if (this.table.modExists("frozenColumns")) { - - this.table.modules.frozenColumns.layout(); - } - }; - - ///////////// Column Setup Functions ///////////// - - - ColumnManager.prototype.setColumns = function (cols, row) { - - var self = this; - - while (self.headersElement.firstChild) { - self.headersElement.removeChild(self.headersElement.firstChild); - }self.columns = []; - - self.columnsByIndex = []; - - self.columnsByField = []; - - //reset frozen columns - - - if (self.table.modExists("frozenColumns")) { - - self.table.modules.frozenColumns.reset(); - } - - cols.forEach(function (def, i) { - - self._addColumn(def); - }); - - self._reIndexColumns(); - - if (self.table.options.responsiveLayout && self.table.modExists("responsiveLayout", true)) { - - self.table.modules.responsiveLayout.initialize(); - } - - self.redraw(true); - }; - - ColumnManager.prototype._addColumn = function (definition, before, nextToColumn) { - - var column = new Column(definition, this), - colEl = column.getElement(), - index = nextToColumn ? this.findColumnIndex(nextToColumn) : nextToColumn; - - if (nextToColumn && index > -1) { - - var parentIndex = this.columns.indexOf(nextToColumn.getTopColumn()); - - var nextEl = nextToColumn.getElement(); - - if (before) { - - this.columns.splice(parentIndex, 0, column); - - nextEl.parentNode.insertBefore(colEl, nextEl); - } else { - - this.columns.splice(parentIndex + 1, 0, column); - - nextEl.parentNode.insertBefore(colEl, nextEl.nextSibling); - } - } else { - - if (before) { - - this.columns.unshift(column); - - this.headersElement.insertBefore(column.getElement(), this.headersElement.firstChild); - } else { - - this.columns.push(column); - - this.headersElement.appendChild(column.getElement()); - } - } - - return column; - }; - - ColumnManager.prototype.registerColumnField = function (col) { - - if (col.definition.field) { - - this.columnsByField[col.definition.field] = col; - } - }; - - ColumnManager.prototype.registerColumnPosition = function (col) { - - this.columnsByIndex.push(col); - }; - - ColumnManager.prototype._reIndexColumns = function () { - - this.columnsByIndex = []; - - this.columns.forEach(function (column) { - - column.reRegisterPosition(); - }); - }; - - //ensure column headers take up the correct amount of space in column groups - - - ColumnManager.prototype._verticalAlignHeaders = function () { - - var self = this, - minHeight = 0; - - self.columns.forEach(function (column) { - - var height; - - column.clearVerticalAlign(); - - height = column.getHeight(); - - if (height > minHeight) { - - minHeight = height; - } - }); - - self.columns.forEach(function (column) { - - column.verticalAlign(self.table.options.columnVertAlign, minHeight); - }); - - self.rowManager.adjustTableSize(); - }; - - //////////////// Column Details ///////////////// - - - ColumnManager.prototype.findColumn = function (subject) { - - var self = this; - - if ((typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) == "object") { - - if (subject instanceof Column) { - - //subject is column element - - - return subject; - } else if (subject instanceof ColumnComponent) { - - //subject is public column component - - - return subject._getSelf() || false; - } else if (subject instanceof HTMLElement) { - - //subject is a HTML element of the column header - - - var match = self.columns.find(function (column) { - - return column.element === subject; - }); - - return match || false; - } - } else { - - //subject should be treated as the field name of the column - - - return this.columnsByField[subject] || false; - } - - //catch all for any other type of input - - - return false; - }; - - ColumnManager.prototype.getColumnByField = function (field) { - - return this.columnsByField[field]; - }; - - ColumnManager.prototype.getColumnByIndex = function (index) { - - return this.columnsByIndex[index]; - }; - - ColumnManager.prototype.getColumns = function () { - - return this.columns; - }; - - ColumnManager.prototype.findColumnIndex = function (column) { - - return this.columnsByIndex.findIndex(function (col) { - - return column === col; - }); - }; - - //return all columns that are not groups - - - ColumnManager.prototype.getRealColumns = function () { - - return this.columnsByIndex; - }; - - //travers across columns and call action - - - ColumnManager.prototype.traverse = function (callback) { - - var self = this; - - self.columnsByIndex.forEach(function (column, i) { - - callback(column, i); - }); - }; - - //get defintions of actual columns - - - ColumnManager.prototype.getDefinitions = function (active) { - - var self = this, - output = []; - - self.columnsByIndex.forEach(function (column) { - - if (!active || active && column.visible) { - - output.push(column.getDefinition()); - } - }); - - return output; - }; - - //get full nested definition tree - - - ColumnManager.prototype.getDefinitionTree = function () { - - var self = this, - output = []; - - self.columns.forEach(function (column) { - - output.push(column.getDefinition(true)); - }); - - return output; - }; - - ColumnManager.prototype.getComponents = function (structured) { - - var self = this, - output = [], - columns = structured ? self.columns : self.columnsByIndex; - - columns.forEach(function (column) { - - output.push(column.getComponent()); - }); - - return output; - }; - - ColumnManager.prototype.getWidth = function () { - - var width = 0; - - this.columnsByIndex.forEach(function (column) { - - if (column.visible) { - - width += column.getWidth(); - } - }); - - return width; - }; - - ColumnManager.prototype.moveColumn = function (from, to, after) { - - this._moveColumnInArray(this.columns, from, to, after); - - this._moveColumnInArray(this.columnsByIndex, from, to, after, true); - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.initialize(); - } - - if (this.table.options.columnMoved) { - - this.table.options.columnMoved.call(this.table, from.getComponent(), this.table.columnManager.getComponents()); - } - - if (this.table.options.persistentLayout && this.table.modExists("persistence", true)) { - - this.table.modules.persistence.save("columns"); - } - }; - - ColumnManager.prototype._moveColumnInArray = function (columns, from, to, after, updateRows) { - - var fromIndex = columns.indexOf(from), - toIndex; - - if (fromIndex > -1) { - - columns.splice(fromIndex, 1); - - toIndex = columns.indexOf(to); - - if (toIndex > -1) { - - if (after) { - - toIndex = toIndex + 1; - } - } else { - - toIndex = fromIndex; - } - - columns.splice(toIndex, 0, from); - - if (updateRows) { - - this.table.rowManager.rows.forEach(function (row) { - - if (row.cells.length) { - - var cell = row.cells.splice(fromIndex, 1)[0]; - - row.cells.splice(toIndex, 0, cell); - } - }); - } - } - }; - - ColumnManager.prototype.scrollToColumn = function (column, position, ifVisible) { - var _this = this; - - var left = 0, - offset = 0, - adjust = 0, - colEl = column.getElement(); - - return new Promise(function (resolve, reject) { - - if (typeof position === "undefined") { - - position = _this.table.options.scrollToColumnPosition; - } - - if (typeof ifVisible === "undefined") { - - ifVisible = _this.table.options.scrollToColumnIfVisible; - } - - if (column.visible) { - - //align to correct position - - - switch (position) { - - case "middle": - - case "center": - - adjust = -_this.element.clientWidth / 2; - - break; - - case "right": - - adjust = colEl.clientWidth - _this.headersElement.clientWidth; - - break; - - } - - //check column visibility - - - if (!ifVisible) { - - offset = colEl.offsetLeft; - - if (offset > 0 && offset + colEl.offsetWidth < _this.element.clientWidth) { - - return false; - } - } - - //calculate scroll position - - - left = colEl.offsetLeft + _this.element.scrollLeft + adjust; - - left = Math.max(Math.min(left, _this.table.rowManager.element.scrollWidth - _this.table.rowManager.element.clientWidth), 0); - - _this.table.rowManager.scrollHorizontal(left); - - _this.scrollHorizontal(left); - - resolve(); - } else { - - console.warn("Scroll Error - Column not visible"); - - reject("Scroll Error - Column not visible"); - } - }); - }; - - //////////////// Cell Management ///////////////// - - - ColumnManager.prototype.generateCells = function (row) { - - var self = this; - - var cells = []; - - self.columnsByIndex.forEach(function (column) { - - cells.push(column.generateCell(row)); - }); - - return cells; - }; - - //////////////// Column Management ///////////////// - - - ColumnManager.prototype.getFlexBaseWidth = function () { - - var self = this, - totalWidth = self.table.element.clientWidth, - //table element width - - - fixedWidth = 0; - - //adjust for vertical scrollbar if present - - - if (self.rowManager.element.scrollHeight > self.rowManager.element.clientHeight) { - - totalWidth -= self.rowManager.element.offsetWidth - self.rowManager.element.clientWidth; - } - - this.columnsByIndex.forEach(function (column) { - - var width, minWidth, colWidth; - - if (column.visible) { - - width = column.definition.width || 0; - - minWidth = typeof column.minWidth == "undefined" ? self.table.options.columnMinWidth : parseInt(column.minWidth); - - if (typeof width == "string") { - - if (width.indexOf("%") > -1) { - - colWidth = totalWidth / 100 * parseInt(width); - } else { - - colWidth = parseInt(width); - } - } else { - - colWidth = width; - } - - fixedWidth += colWidth > minWidth ? colWidth : minWidth; - } - }); - - return fixedWidth; - }; - - ColumnManager.prototype.addColumn = function (definition, before, nextToColumn) { - - var column = this._addColumn(definition, before, nextToColumn); - - this._reIndexColumns(); - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.initialize(); - } - - if (this.table.modExists("columnCalcs")) { - - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - - this.redraw(); - - if (this.table.modules.layout.getMode() != "fitColumns") { - - column.reinitializeWidth(); - } - - this._verticalAlignHeaders(); - - this.table.rowManager.reinitialize(); - }; - - //remove column from system - - - ColumnManager.prototype.deregisterColumn = function (column) { - - var field = column.getField(), - index; - - //remove from field list - - - if (field) { - - delete this.columnsByField[field]; - } - - //remove from index list - - - index = this.columnsByIndex.indexOf(column); - - if (index > -1) { - - this.columnsByIndex.splice(index, 1); - } - - //remove from column list - - - index = this.columns.indexOf(column); - - if (index > -1) { - - this.columns.splice(index, 1); - } - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.initialize(); - } - - this.redraw(); - }; - - //redraw columns - - - ColumnManager.prototype.redraw = function (force) { - - if (force) { - - if (Tabulator.prototype.helpers.elVisible(this.element)) { - - this._verticalAlignHeaders(); - } - - this.table.rowManager.resetScroll(); - - this.table.rowManager.reinitialize(); - } - - if (this.table.modules.layout.getMode() == "fitColumns") { - - this.table.modules.layout.layout(); - } else { - - if (force) { - - this.table.modules.layout.layout(); - } else { - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.update(); - } - } - } - - if (this.table.modExists("frozenColumns")) { - - this.table.modules.frozenColumns.layout(); - } - - if (this.table.modExists("columnCalcs")) { - - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - - if (force) { - - if (this.table.options.persistentLayout && this.table.modExists("persistence", true)) { - - this.table.modules.persistence.save("columns"); - } - - if (this.table.modExists("columnCalcs")) { - - this.table.modules.columnCalcs.redraw(); - } - } - - this.table.footerManager.redraw(); - }; - - //public column object - - var ColumnComponent = function ColumnComponent(column) { - - this._column = column; - - this.type = "ColumnComponent"; - }; - - ColumnComponent.prototype.getElement = function () { - - return this._column.getElement(); - }; - - ColumnComponent.prototype.getDefinition = function () { - - return this._column.getDefinition(); - }; - - ColumnComponent.prototype.getField = function () { - - return this._column.getField(); - }; - - ColumnComponent.prototype.getCells = function () { - - var cells = []; - - this._column.cells.forEach(function (cell) { - - cells.push(cell.getComponent()); - }); - - return cells; - }; - - ColumnComponent.prototype.getVisibility = function () { - - return this._column.visible; - }; - - ColumnComponent.prototype.show = function () { - - if (this._column.isGroup) { - - this._column.columns.forEach(function (column) { - - column.show(); - }); - } else { - - this._column.show(); - } - }; - - ColumnComponent.prototype.hide = function () { - - if (this._column.isGroup) { - - this._column.columns.forEach(function (column) { - - column.hide(); - }); - } else { - - this._column.hide(); - } - }; - - ColumnComponent.prototype.toggle = function () { - - if (this._column.visible) { - - this.hide(); - } else { - - this.show(); - } - }; - - ColumnComponent.prototype.delete = function () { - - this._column.delete(); - }; - - ColumnComponent.prototype.getSubColumns = function () { - - var output = []; - - if (this._column.columns.length) { - - this._column.columns.forEach(function (column) { - - output.push(column.getComponent()); - }); - } - - return output; - }; - - ColumnComponent.prototype.getParentColumn = function () { - - return this._column.parent instanceof Column ? this._column.parent.getComponent() : false; - }; - - ColumnComponent.prototype._getSelf = function () { - - return this._column; - }; - - ColumnComponent.prototype.scrollTo = function () { - - return this._column.table.columnManager.scrollToColumn(this._column); - }; - - ColumnComponent.prototype.getTable = function () { - - return this._column.table; - }; - - ColumnComponent.prototype.headerFilterFocus = function () { - - if (this._column.table.modExists("filter", true)) { - - this._column.table.modules.filter.setHeaderFilterFocus(this._column); - } - }; - - ColumnComponent.prototype.reloadHeaderFilter = function () { - - if (this._column.table.modExists("filter", true)) { - - this._column.table.modules.filter.reloadHeaderFilter(this._column); - } - }; - - ColumnComponent.prototype.setHeaderFilterValue = function (value) { - - if (this._column.table.modExists("filter", true)) { - - this._column.table.modules.filter.setHeaderFilterValue(this._column, value); - } - }; - - var Column = function Column(def, parent) { - - var self = this; - - this.table = parent.table; - - this.definition = def; //column definition - - this.parent = parent; //hold parent object - - this.type = "column"; //type of element - - this.columns = []; //child columns - - this.cells = []; //cells bound to this column - - this.element = this.createElement(); //column header element - - this.contentElement = false; - - this.groupElement = this.createGroupElement(); //column group holder element - - this.isGroup = false; - - this.tooltip = false; //hold column tooltip - - this.hozAlign = ""; //horizontal text alignment - - - //multi dimentional filed handling - - this.field = ""; - - this.fieldStructure = ""; - - this.getFieldValue = ""; - - this.setFieldValue = ""; - - this.setField(this.definition.field); - - this.modules = {}; //hold module variables; - - - this.cellEvents = { - - cellClick: false, - - cellDblClick: false, - - cellContext: false, - - cellTap: false, - - cellDblTap: false, - - cellTapHold: false - - }; - - this.width = null; //column width - - this.minWidth = null; //column minimum width - - this.widthFixed = false; //user has specified a width for this column - - - this.visible = true; //default visible state - - - //initialize column - - if (def.columns) { - - this.isGroup = true; - - def.columns.forEach(function (def, i) { - - var newCol = new Column(def, self); - - self.attachColumn(newCol); - }); - - self.checkColumnVisibility(); - } else { - - parent.registerColumnField(this); - } - - if (def.rowHandle && this.table.options.movableRows !== false && this.table.modExists("moveRow")) { - - this.table.modules.moveRow.setHandle(true); - } - - this._buildHeader(); - }; - - Column.prototype.createElement = function () { - - var el = document.createElement("div"); - - el.classList.add("tabulator-col"); - - el.setAttribute("role", "columnheader"); - - el.setAttribute("aria-sort", "none"); - - return el; - }; - - Column.prototype.createGroupElement = function () { - - var el = document.createElement("div"); - - el.classList.add("tabulator-col-group-cols"); - - return el; - }; - - Column.prototype.setField = function (field) { - - this.field = field; - - this.fieldStructure = field ? this.table.options.nestedFieldSeparator ? field.split(this.table.options.nestedFieldSeparator) : [field] : []; - - this.getFieldValue = this.fieldStructure.length > 1 ? this._getNestedData : this._getFlatData; - - this.setFieldValue = this.fieldStructure.length > 1 ? this._setNesteData : this._setFlatData; - }; - - //register column position with column manager - - Column.prototype.registerColumnPosition = function (column) { - - this.parent.registerColumnPosition(column); - }; - - //register column position with column manager - - Column.prototype.registerColumnField = function (column) { - - this.parent.registerColumnField(column); - }; - - //trigger position registration - - Column.prototype.reRegisterPosition = function () { - - if (this.isGroup) { - - this.columns.forEach(function (column) { - - column.reRegisterPosition(); - }); - } else { - - this.registerColumnPosition(this); - } - }; - - Column.prototype.setTooltip = function () { - - var self = this, - def = self.definition; - - //set header tooltips - - var tooltip = def.headerTooltip || def.tooltip === false ? def.headerTooltip : self.table.options.tooltipsHeader; - - if (tooltip) { - - if (tooltip === true) { - - if (def.field) { - - self.table.modules.localize.bind("columns|" + def.field, function (value) { - - self.element.setAttribute("title", value || def.title); - }); - } else { - - self.element.setAttribute("title", def.title); - } - } else { - - if (typeof tooltip == "function") { - - tooltip = tooltip(self.getComponent()); - - if (tooltip === false) { - - tooltip = ""; - } - } - - self.element.setAttribute("title", tooltip); - } - } else { - - self.element.setAttribute("title", ""); - } - }; - - //build header element - - Column.prototype._buildHeader = function () { - - var self = this, - def = self.definition; - - while (self.element.firstChild) { - self.element.removeChild(self.element.firstChild); - }if (def.headerVertical) { - - self.element.classList.add("tabulator-col-vertical"); - - if (def.headerVertical === "flip") { - - self.element.classList.add("tabulator-col-vertical-flip"); - } - } - - self.contentElement = self._bindEvents(); - - self.contentElement = self._buildColumnHeaderContent(); - - self.element.appendChild(self.contentElement); - - if (self.isGroup) { - - self._buildGroupHeader(); - } else { - - self._buildColumnHeader(); - } - - self.setTooltip(); - - //set resizable handles - - if (self.table.options.resizableColumns && self.table.modExists("resizeColumns")) { - - self.table.modules.resizeColumns.initializeColumn("header", self, self.element); - } - - //set resizable handles - - if (def.headerFilter && self.table.modExists("filter") && self.table.modExists("edit")) { - - if (typeof def.headerFilterPlaceholder !== "undefined" && def.field) { - - self.table.modules.localize.setHeaderFilterColumnPlaceholder(def.field, def.headerFilterPlaceholder); - } - - self.table.modules.filter.initializeColumn(self); - } - - //set resizable handles - - if (self.table.modExists("frozenColumns")) { - - self.table.modules.frozenColumns.initializeColumn(self); - } - - //set movable column - - if (self.table.options.movableColumns && !self.isGroup && self.table.modExists("moveColumn")) { - - self.table.modules.moveColumn.initializeColumn(self); - } - - //set calcs column - - if ((def.topCalc || def.bottomCalc) && self.table.modExists("columnCalcs")) { - - self.table.modules.columnCalcs.initializeColumn(self); - } - - //update header tooltip on mouse enter - - self.element.addEventListener("mouseenter", function (e) { - - self.setTooltip(); - }); - }; - - Column.prototype._bindEvents = function () { - - var self = this, - def = self.definition, - dblTap, - tapHold, - tap; - - //setup header click event bindings - - if (typeof def.headerClick == "function") { - - self.element.addEventListener("click", function (e) { - def.headerClick(e, self.getComponent()); - }); - } - - if (typeof def.headerDblClick == "function") { - - self.element.addEventListener("dblclick", function (e) { - def.headerDblClick(e, self.getComponent()); - }); - } - - if (typeof def.headerContext == "function") { - - self.element.addEventListener("contextmenu", function (e) { - def.headerContext(e, self.getComponent()); - }); - } - - //setup header tap event bindings - - if (typeof def.headerTap == "function") { - - tap = false; - - self.element.addEventListener("touchstart", function (e) { - - tap = true; - }); - - self.element.addEventListener("touchend", function (e) { - - if (tap) { - - def.headerTap(e, self.getComponent()); - } - - tap = false; - }); - } - - if (typeof def.headerDblTap == "function") { - - dblTap = null; - - self.element.addEventListener("touchend", function (e) { - - if (dblTap) { - - clearTimeout(dblTap); - - dblTap = null; - - def.headerDblTap(e, self.getComponent()); - } else { - - dblTap = setTimeout(function () { - - clearTimeout(dblTap); - - dblTap = null; - }, 300); - } - }); - } - - if (typeof def.headerTapHold == "function") { - - tapHold = null; - - self.element.addEventListener("touchstart", function (e) { - - clearTimeout(tapHold); - - tapHold = setTimeout(function () { - - clearTimeout(tapHold); - - tapHold = null; - - tap = false; - - def.headerTapHold(e, self.getComponent()); - }, 1000); - }); - - self.element.addEventListener("touchend", function (e) { - - clearTimeout(tapHold); - - tapHold = null; - }); - } - - //store column cell click event bindings - - if (typeof def.cellClick == "function") { - - self.cellEvents.cellClick = def.cellClick; - } - - if (typeof def.cellDblClick == "function") { - - self.cellEvents.cellDblClick = def.cellDblClick; - } - - if (typeof def.cellContext == "function") { - - self.cellEvents.cellContext = def.cellContext; - } - - //setup column cell tap event bindings - - if (typeof def.cellTap == "function") { - - self.cellEvents.cellTap = def.cellTap; - } - - if (typeof def.cellDblTap == "function") { - - self.cellEvents.cellDblTap = def.cellDblTap; - } - - if (typeof def.cellTapHold == "function") { - - self.cellEvents.cellTapHold = def.cellTapHold; - } - - //setup column cell edit callbacks - - if (typeof def.cellEdited == "function") { - - self.cellEvents.cellEdited = def.cellEdited; - } - - if (typeof def.cellEditing == "function") { - - self.cellEvents.cellEditing = def.cellEditing; - } - - if (typeof def.cellEditCancelled == "function") { - - self.cellEvents.cellEditCancelled = def.cellEditCancelled; - } - }; - - //build header element for header - - Column.prototype._buildColumnHeader = function () { - - var self = this, - def = self.definition, - table = self.table, - sortable; - - //set column sorter - - if (table.modExists("sort")) { - - table.modules.sort.initializeColumn(self, self.contentElement); - } - - //set column formatter - - if (table.modExists("format")) { - - table.modules.format.initializeColumn(self); - } - - //set column editor - - if (typeof def.editor != "undefined" && table.modExists("edit")) { - - table.modules.edit.initializeColumn(self); - } - - //set colum validator - - if (typeof def.validator != "undefined" && table.modExists("validate")) { - - table.modules.validate.initializeColumn(self); - } - - //set column mutator - - if (table.modExists("mutator")) { - - table.modules.mutator.initializeColumn(self); - } - - //set column accessor - - if (table.modExists("accessor")) { - - table.modules.accessor.initializeColumn(self); - } - - //set respoviveLayout - - if (_typeof(table.options.responsiveLayout) && table.modExists("responsiveLayout")) { - - table.modules.responsiveLayout.initializeColumn(self); - } - - //set column visibility - - if (typeof def.visible != "undefined") { - - if (def.visible) { - - self.show(true); - } else { - - self.hide(true); - } - } - - //asign additional css classes to column header - - if (def.cssClass) { - - self.element.classList.add(def.cssClass); - } - - if (def.field) { - - this.element.setAttribute("tabulator-field", def.field); - } - - //set min width if present - - self.setMinWidth(typeof def.minWidth == "undefined" ? self.table.options.columnMinWidth : def.minWidth); - - self.reinitializeWidth(); - - //set tooltip if present - - self.tooltip = self.definition.tooltip || self.definition.tooltip === false ? self.definition.tooltip : self.table.options.tooltips; - - //set orizontal text alignment - - self.hozAlign = typeof self.definition.align == "undefined" ? "" : self.definition.align; - }; - - Column.prototype._buildColumnHeaderContent = function () { - - var self = this, - def = self.definition, - table = self.table; - - var contentElement = document.createElement("div"); - - contentElement.classList.add("tabulator-col-content"); - - contentElement.appendChild(self._buildColumnHeaderTitle()); - - return contentElement; - }; - - //build title element of column - - Column.prototype._buildColumnHeaderTitle = function () { - - var self = this, - def = self.definition, - table = self.table, - title; - - var titleHolderElement = document.createElement("div"); - - titleHolderElement.classList.add("tabulator-col-title"); - - if (def.editableTitle) { - - var titleElement = document.createElement("input"); - - titleElement.classList.add("tabulator-title-editor"); - - titleElement.addEventListener("click", function (e) { - - e.stopPropagation(); - - titleElement.focus(); - }); - - titleElement.addEventListener("change", function () { - - def.title = titleElement.value; - - table.options.columnTitleChanged.call(self.table, self.getComponent()); - }); - - titleHolderElement.appendChild(titleElement); - - if (def.field) { - - table.modules.localize.bind("columns|" + def.field, function (text) { - - titleElement.value = text || def.title || " "; - }); - } else { - - titleElement.value = def.title || " "; - } - } else { - - if (def.field) { - - table.modules.localize.bind("columns|" + def.field, function (text) { - - self._formatColumnHeaderTitle(titleHolderElement, text || def.title || " "); - }); - } else { - - self._formatColumnHeaderTitle(titleHolderElement, def.title || " "); - } - } - - return titleHolderElement; - }; - - Column.prototype._formatColumnHeaderTitle = function (el, title) { - - var formatter, contents, params, mockCell; - - if (this.definition.titleFormatter && this.table.modExists("format")) { - - formatter = this.table.modules.format.getFormatter(this.definition.titleFormatter); - - mockCell = { - - getValue: function getValue() { - - return title; - }, - - getElement: function getElement() { - - return el; - } - - }; - - params = this.definition.titleFormatterParams || {}; - - params = typeof params === "function" ? params() : params; - - contents = formatter.call(this.table.modules.format, mockCell, params); - - switch (typeof contents === 'undefined' ? 'undefined' : _typeof(contents)) { - - case "object": - - if (contents instanceof Node) { - - this.element.appendChild(contents); - } else { - - this.element.innerHTML = ""; - - console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:", contents); - } - - break; - - case "undefined": - - case "null": - - this.element.innerHTML = ""; - - break; - - default: - - this.element.innerHTML = contents; - - } - } else { - - el.innerHTML = title; - } - }; - - //build header element for column group - - Column.prototype._buildGroupHeader = function () { - - this.element.classList.add("tabulator-col-group"); - - this.element.setAttribute("role", "columngroup"); - - this.element.setAttribute("aria-title", this.definition.title); - - this.element.appendChild(this.groupElement); - }; - - //flat field lookup - - Column.prototype._getFlatData = function (data) { - - return data[this.field]; - }; - - //nested field lookup - - Column.prototype._getNestedData = function (data) { - - var dataObj = data, - structure = this.fieldStructure, - length = structure.length, - output; - - for (var i = 0; i < length; i++) { - - dataObj = dataObj[structure[i]]; - - output = dataObj; - - if (!dataObj) { - - break; - } - } - - return output; - }; - - //flat field set - - Column.prototype._setFlatData = function (data, value) { - - data[this.field] = value; - }; - - //nested field set - - Column.prototype._setNesteData = function (data, value) { - - var dataObj = data, - structure = this.fieldStructure, - length = structure.length; - - for (var i = 0; i < length; i++) { - - if (i == length - 1) { - - dataObj[structure[i]] = value; - } else { - - if (!dataObj[structure[i]]) { - - dataObj[structure[i]] = {}; - } - - dataObj = dataObj[structure[i]]; - } - } - }; - - //attach column to this group - - Column.prototype.attachColumn = function (column) { - - var self = this; - - if (self.groupElement) { - - self.columns.push(column); - - self.groupElement.appendChild(column.getElement()); - } else { - - console.warn("Column Warning - Column being attached to another column instead of column group"); - } - }; - - //vertically align header in column - - Column.prototype.verticalAlign = function (alignment, height) { - - //calculate height of column header and group holder element - - var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : height || this.parent.getHeadersElement().clientHeight; - - // var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : this.parent.getHeadersElement().clientHeight; - - - this.element.style.height = parentHeight + "px"; - - if (this.isGroup) { - - this.groupElement.style.minHeight = parentHeight - this.contentElement.offsetHeight + "px"; - } - - //vertically align cell contents - - if (!this.isGroup && alignment !== "top") { - - if (alignment === "bottom") { - - this.element.style.paddingTop = this.element.clientHeight - this.contentElement.offsetHeight + "px"; - } else { - - this.element.style.paddingTop = (this.element.clientHeight - this.contentElement.offsetHeight) / 2 + "px"; - } - } - - this.columns.forEach(function (column) { - - column.verticalAlign(alignment); - }); - }; - - //clear vertical alignmenet - - Column.prototype.clearVerticalAlign = function () { - - this.element.style.paddingTop = ""; - - this.element.style.height = ""; - - this.element.style.minHeight = ""; - - this.columns.forEach(function (column) { - - column.clearVerticalAlign(); - }); - }; - - //// Retreive Column Information //// - - - //return column header element - - Column.prototype.getElement = function () { - - return this.element; - }; - - //return colunm group element - - Column.prototype.getGroupElement = function () { - - return this.groupElement; - }; - - //return field name - - Column.prototype.getField = function () { - - return this.field; - }; - - //return the first column in a group - - Column.prototype.getFirstColumn = function () { - - if (!this.isGroup) { - - return this; - } else { - - if (this.columns.length) { - - return this.columns[0].getFirstColumn(); - } else { - - return false; - } - } - }; - - //return the last column in a group - - Column.prototype.getLastColumn = function () { - - if (!this.isGroup) { - - return this; - } else { - - if (this.columns.length) { - - return this.columns[this.columns.length - 1].getLastColumn(); - } else { - - return false; - } - } - }; - - //return all columns in a group - - Column.prototype.getColumns = function () { - - return this.columns; - }; - - //return all columns in a group - - Column.prototype.getCells = function () { - - return this.cells; - }; - - //retreive the top column in a group of columns - - Column.prototype.getTopColumn = function () { - - if (this.parent.isGroup) { - - return this.parent.getTopColumn(); - } else { - - return this; - } - }; - - //return column definition object - - Column.prototype.getDefinition = function (updateBranches) { - - var colDefs = []; - - if (this.isGroup && updateBranches) { - - this.columns.forEach(function (column) { - - colDefs.push(column.getDefinition(true)); - }); - - this.definition.columns = colDefs; - } - - return this.definition; - }; - - //////////////////// Actions //////////////////// - - - Column.prototype.checkColumnVisibility = function () { - - var visible = false; - - this.columns.forEach(function (column) { - - if (column.visible) { - - visible = true; - } - }); - - if (visible) { - - this.show(); - - this.parent.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), false); - } else { - - this.hide(); - } - }; - - //show column - - Column.prototype.show = function (silent, responsiveToggle) { - - if (!this.visible) { - - this.visible = true; - - this.element.style.display = ""; - - this.table.columnManager._verticalAlignHeaders(); - - if (this.parent.isGroup) { - - this.parent.checkColumnVisibility(); - } - - this.cells.forEach(function (cell) { - - cell.show(); - }); - - if (this.table.options.persistentLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.persistence.save("columns"); - } - - if (!responsiveToggle && this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.updateColumnVisibility(this, this.visible); - } - - if (!silent) { - - this.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), true); - } - } - }; - - //hide column - - Column.prototype.hide = function (silent, responsiveToggle) { - - if (this.visible) { - - this.visible = false; - - this.element.style.display = "none"; - - this.table.columnManager._verticalAlignHeaders(); - - if (this.parent.isGroup) { - - this.parent.checkColumnVisibility(); - } - - this.cells.forEach(function (cell) { - - cell.hide(); - }); - - if (this.table.options.persistentLayout && this.table.modExists("persistence", true)) { - - this.table.modules.persistence.save("columns"); - } - - if (!responsiveToggle && this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.updateColumnVisibility(this, this.visible); - } - - if (!silent) { - - this.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), false); - } - } - }; - - Column.prototype.matchChildWidths = function () { - - var childWidth = 0; - - if (this.contentElement && this.columns.length) { - - this.columns.forEach(function (column) { - - childWidth += column.getWidth(); - }); - - this.contentElement.style.maxWidth = childWidth - 1 + "px"; - } - }; - - Column.prototype.setWidth = function (width) { - - this.widthFixed = true; - - this.setWidthActual(width); - }; - - Column.prototype.setWidthActual = function (width) { - - if (isNaN(width)) { - - width = Math.floor(this.table.element.clientWidth / 100 * parseInt(width)); - } - - width = Math.max(this.minWidth, width); - - this.width = width; - - this.element.style.width = width ? width + "px" : ""; - - if (!this.isGroup) { - - this.cells.forEach(function (cell) { - - cell.setWidth(width); - }); - } - - if (this.parent.isGroup) { - - this.parent.matchChildWidths(); - } - - //set resizable handles - - if (this.table.modExists("frozenColumns")) { - - this.table.modules.frozenColumns.layout(); - } - }; - - Column.prototype.checkCellHeights = function () { - - var rows = []; - - this.cells.forEach(function (cell) { - - if (cell.row.heightInitialized) { - - if (cell.row.getElement().offsetParent !== null) { - - rows.push(cell.row); - - cell.row.clearCellHeight(); - } else { - - cell.row.heightInitialized = false; - } - } - }); - - rows.forEach(function (row) { - - row.calcHeight(); - }); - - rows.forEach(function (row) { - - row.setCellHeight(); - }); - }; - - Column.prototype.getWidth = function () { - - // return this.element.offsetWidth; - - return this.width; - }; - - Column.prototype.getHeight = function () { - - return this.element.offsetHeight; - }; - - Column.prototype.setMinWidth = function (minWidth) { - - this.minWidth = minWidth; - - this.element.style.minWidth = minWidth ? minWidth + "px" : ""; - - this.cells.forEach(function (cell) { - - cell.setMinWidth(minWidth); - }); - }; - - Column.prototype.delete = function () { - - if (this.isGroup) { - - this.columns.forEach(function (column) { - - column.delete(); - }); - } - - var cellCount = this.cells.length; - - for (var i = 0; i < cellCount; i++) { - - this.cells[0].delete(); - } - - this.element.parentNode.removeChild(this.element); - - this.table.columnManager.deregisterColumn(this); - }; - - //////////////// Cell Management ///////////////// - - - //generate cell for this column - - Column.prototype.generateCell = function (row) { - - var self = this; - - var cell = new Cell(self, row); - - this.cells.push(cell); - - return cell; - }; - - Column.prototype.reinitializeWidth = function (force) { - - this.widthFixed = false; - - //set width if present - - if (typeof this.definition.width !== "undefined" && !force) { - - this.setWidth(this.definition.width); - } - - //hide header filters to prevent them altering column width - - if (this.table.modExists("filter")) { - - this.table.modules.filter.hideHeaderFilterElements(); - } - - this.fitToData(); - - //show header filters again after layout is complete - - if (this.table.modExists("filter")) { - - this.table.modules.filter.showHeaderFilterElements(); - } - }; - - //set column width to maximum cell width - - Column.prototype.fitToData = function () { - - var self = this; - - if (!this.widthFixed) { - - this.element.width = ""; - - self.cells.forEach(function (cell) { - - cell.setWidth(""); - }); - } - - var maxWidth = this.element.offsetWidth; - - if (!self.width || !this.widthFixed) { - - self.cells.forEach(function (cell) { - - var width = cell.getWidth(); - - if (width > maxWidth) { - - maxWidth = width; - } - }); - - if (maxWidth) { - - self.setWidthActual(maxWidth + 1); - } - } - }; - - Column.prototype.deleteCell = function (cell) { - - var index = this.cells.indexOf(cell); - - if (index > -1) { - - this.cells.splice(index, 1); - } - }; - - //////////////// Event Bindings ///////////////// - - - //////////////// Object Generation ///////////////// - - Column.prototype.getComponent = function () { - - return new ColumnComponent(this); - }; - - var RowManager = function RowManager(table) { - - this.table = table; - - this.element = this.createHolderElement(); //containing element - - this.tableElement = this.createTableElement(); //table element - - this.columnManager = null; //hold column manager object - - this.height = 0; //hold height of table element - - - this.firstRender = false; //handle first render - - this.renderMode = "classic"; //current rendering mode - - - this.rows = []; //hold row data objects - - this.activeRows = []; //rows currently available to on display in the table - - this.activeRowsCount = 0; //count of active rows - - - this.displayRows = []; //rows currently on display in the table - - this.displayRowsCount = 0; //count of display rows - - - this.scrollTop = 0; - - this.scrollLeft = 0; - - this.vDomRowHeight = 20; //approximation of row heights for padding - - - this.vDomTop = 0; //hold position for first rendered row in the virtual DOM - - this.vDomBottom = 0; //hold possition for last rendered row in the virtual DOM - - - this.vDomScrollPosTop = 0; //last scroll position of the vDom top; - - this.vDomScrollPosBottom = 0; //last scroll position of the vDom bottom; - - - this.vDomTopPad = 0; //hold value of padding for top of virtual DOM - - this.vDomBottomPad = 0; //hold value of padding for bottom of virtual DOM - - - this.vDomMaxRenderChain = 90; //the maximum number of dom elements that can be rendered in 1 go - - - this.vDomWindowBuffer = 0; //window row buffer before removing elements, to smooth scrolling - - - this.vDomWindowMinTotalRows = 20; //minimum number of rows to be generated in virtual dom (prevent buffering issues on tables with tall rows) - - this.vDomWindowMinMarginRows = 5; //minimum number of rows to be generated in virtual dom margin - - - this.vDomTopNewRows = []; //rows to normalize after appending to optimize render speed - - this.vDomBottomNewRows = []; //rows to normalize after appending to optimize render speed - }; - - //////////////// Setup Functions ///////////////// - - - RowManager.prototype.createHolderElement = function () { - - var el = document.createElement("div"); - - el.classList.add("tabulator-tableHolder"); - - el.setAttribute("tabindex", 0); - - return el; - }; - - RowManager.prototype.createTableElement = function () { - - var el = document.createElement("div"); - - el.classList.add("tabulator-table"); - - return el; - }; - - //return containing element - - RowManager.prototype.getElement = function () { - - return this.element; - }; - - //return table element - - RowManager.prototype.getTableElement = function () { - - return this.tableElement; - }; - - //return position of row in table - - RowManager.prototype.getRowPosition = function (row, active) { - - if (active) { - - return this.activeRows.indexOf(row); - } else { - - return this.rows.indexOf(row); - } - }; - - //link to column manager - - RowManager.prototype.setColumnManager = function (manager) { - - this.columnManager = manager; - }; - - RowManager.prototype.initialize = function () { - - var self = this; - - self.setRenderMode(); - - //initialize manager - - self.element.appendChild(self.tableElement); - - self.firstRender = true; - - //scroll header along with table body - - self.element.addEventListener("scroll", function () { - - var left = self.element.scrollLeft; - - //handle horizontal scrolling - - if (self.scrollLeft != left) { - - self.columnManager.scrollHorizontal(left); - - if (self.table.options.groupBy) { - - self.table.modules.groupRows.scrollHeaders(left); - } - - if (self.table.modExists("columnCalcs")) { - - self.table.modules.columnCalcs.scrollHorizontal(left); - } - } - - self.scrollLeft = left; - }); - - //handle virtual dom scrolling - - if (this.renderMode === "virtual") { - - self.element.addEventListener("scroll", function () { - - var top = self.element.scrollTop; - - var dir = self.scrollTop > top; - - //handle verical scrolling - - if (self.scrollTop != top) { - - self.scrollTop = top; - - self.scrollVertical(dir); - - if (self.table.options.ajaxProgressiveLoad == "scroll") { - - self.table.modules.ajax.nextPage(self.element.scrollHeight - self.element.clientHeight - top); - } - } else { - - self.scrollTop = top; - } - }); - } - }; - - ////////////////// Row Manipulation ////////////////// - - - RowManager.prototype.findRow = function (subject) { - - var self = this; - - if ((typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) == "object") { - - if (subject instanceof Row) { - - //subject is row element - - return subject; - } else if (subject instanceof RowComponent) { - - //subject is public row component - - return subject._getSelf() || false; - } else if (subject instanceof HTMLElement) { - - //subject is a HTML element of the row - - var match = self.rows.find(function (row) { - - return row.element === subject; - }); - - return match || false; - } - } else if (typeof subject == "undefined" || subject === null) { - - return false; - } else { - - //subject should be treated as the index of the row - - var _match = self.rows.find(function (row) { - - return row.data[self.table.options.index] == subject; - }); - - return _match || false; - } - - //catch all for any other type of input - - - return false; - }; - - RowManager.prototype.getRowFromPosition = function (position, active) { - - if (active) { - - return this.activeRows[position]; - } else { - - return this.rows[position]; - } - }; - - RowManager.prototype.scrollToRow = function (row, position, ifVisible) { - var _this2 = this; - - var rowIndex = this.getDisplayRows().indexOf(row), - rowEl = row.getElement(), - rowTop, - offset = 0; - - return new Promise(function (resolve, reject) { - - if (rowIndex > -1) { - - if (typeof position === "undefined") { - - position = _this2.table.options.scrollToRowPosition; - } - - if (typeof ifVisible === "undefined") { - - ifVisible = _this2.table.options.scrollToRowIfVisible; - } - - if (position === "nearest") { - - switch (_this2.renderMode) { - - case "classic": - - rowTop = Tabulator.prototype.helpers.elOffset(rowEl).top; - - position = Math.abs(_this2.element.scrollTop - rowTop) > Math.abs(_this2.element.scrollTop + _this2.element.clientHeight - rowTop) ? "bottom" : "top"; - - break; - - case "virtual": - - position = Math.abs(_this2.vDomTop - rowIndex) > Math.abs(_this2.vDomBottom - rowIndex) ? "bottom" : "top"; - - break; - - } - } - - //check row visibility - - if (!ifVisible) { - - if (Tabulator.prototype.helpers.elVisible(rowEl)) { - - offset = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this2.element).top; - - if (offset > 0 && offset < _this2.element.clientHeight - rowEl.offsetHeight) { - - return false; - } - } - } - - //scroll to row - - switch (_this2.renderMode) { - - case "classic": - - _this2.element.scrollTop = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this2.element).top + _this2.element.scrollTop; - - break; - - case "virtual": - - _this2._virtualRenderFill(rowIndex, true); - - break; - - } - - //align to correct position - - switch (position) { - - case "middle": - - case "center": - - _this2.element.scrollTop = _this2.element.scrollTop - _this2.element.clientHeight / 2; - - break; - - case "bottom": - - _this2.element.scrollTop = _this2.element.scrollTop - _this2.element.clientHeight + rowEl.offsetHeight; - - break; - - } - - resolve(); - } else { - - console.warn("Scroll Error - Row not visible"); - - reject("Scroll Error - Row not visible"); - } - }); - }; - - ////////////////// Data Handling ////////////////// - - - RowManager.prototype.setData = function (data, renderInPosition) { - var _this3 = this; - - var self = this; - - return new Promise(function (resolve, reject) { - - if (renderInPosition && _this3.getDisplayRows().length) { - - if (self.table.options.pagination) { - - self._setDataActual(data, true); - } else { - - _this3.reRenderInPosition(function () { - - self._setDataActual(data); - }); - } - } else { - - _this3.resetScroll(); - - _this3._setDataActual(data); - } - - resolve(); - }); - }; - - RowManager.prototype._setDataActual = function (data, renderInPosition) { - - var self = this; - - self.table.options.dataLoading.call(this.table, data); - - self.rows.forEach(function (row) { - - row.wipe(); - }); - - self.rows = []; - - if (this.table.options.history && this.table.modExists("history")) { - - this.table.modules.history.clear(); - } - - if (Array.isArray(data)) { - - if (this.table.modExists("selectRow")) { - - this.table.modules.selectRow.clearSelectionData(); - } - - data.forEach(function (def, i) { - - if (def && (typeof def === 'undefined' ? 'undefined' : _typeof(def)) === "object") { - - var row = new Row(def, self); - - self.rows.push(row); - } else { - - console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:", def); - } - }); - - self.table.options.dataLoaded.call(this.table, data); - - self.refreshActiveData(false, false, renderInPosition); - } else { - - console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ", typeof data === 'undefined' ? 'undefined' : _typeof(data), "\nData: ", data); - } - }; - - RowManager.prototype.deleteRow = function (row) { - - var allIndex = this.rows.indexOf(row), - activeIndex = this.activeRows.indexOf(row); - - if (activeIndex > -1) { - - this.activeRows.splice(activeIndex, 1); - } - - if (allIndex > -1) { - - this.rows.splice(allIndex, 1); - } - - this.setActiveRows(this.activeRows); - - this.displayRowIterator(function (rows) { - - var displayIndex = rows.indexOf(row); - - if (displayIndex > -1) { - - rows.splice(displayIndex, 1); - } - }); - - this.reRenderInPosition(); - - this.table.options.rowDeleted.call(this.table, row.getComponent()); - - this.table.options.dataEdited.call(this.table, this.getData()); - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - - this.table.modules.groupRows.updateGroupRows(true); - } else if (this.table.options.pagination && this.table.modExists("page")) { - - this.refreshActiveData(false, false, true); - } else { - - if (this.table.options.pagination && this.table.modExists("page")) { - - this.refreshActiveData("page"); - } - } - }; - - RowManager.prototype.addRow = function (data, pos, index, blockRedraw) { - - var row = this.addRowActual(data, pos, index, blockRedraw); - - if (this.table.options.history && this.table.modExists("history")) { - - this.table.modules.history.action("rowAdd", row, { data: data, pos: pos, index: index }); - } - - return row; - }; - - //add multiple rows - - RowManager.prototype.addRows = function (data, pos, index) { - var _this4 = this; - - var self = this, - length = 0, - rows = []; - - return new Promise(function (resolve, reject) { - - pos = _this4.findAddRowPos(pos); - - if (!Array.isArray(data)) { - - data = [data]; - } - - length = data.length - 1; - - if (typeof index == "undefined" && pos || typeof index !== "undefined" && !pos) { - - data.reverse(); - } - - data.forEach(function (item, i) { - - var row = self.addRow(item, pos, index, true); - - rows.push(row); - }); - - if (_this4.table.options.groupBy && _this4.table.modExists("groupRows")) { - - _this4.table.modules.groupRows.updateGroupRows(true); - } else if (_this4.table.options.pagination && _this4.table.modExists("page")) { - - _this4.refreshActiveData(false, false, true); - } else { - - _this4.reRenderInPosition(); - } - - //recalc column calculations if present - - if (_this4.table.modExists("columnCalcs")) { - - _this4.table.modules.columnCalcs.recalc(_this4.table.rowManager.activeRows); - } - - resolve(rows); - }); - }; - - RowManager.prototype.findAddRowPos = function (pos) { - - if (typeof pos === "undefined") { - - pos = this.table.options.addRowPos; - } - - if (pos === "pos") { - - pos = true; - } - - if (pos === "bottom") { - - pos = false; - } - - return pos; - }; - - RowManager.prototype.addRowActual = function (data, pos, index, blockRedraw) { - - var row = data instanceof Row ? data : new Row(data || {}, this), - top = this.findAddRowPos(pos), - dispRows; - - if (!index && this.table.options.pagination && this.table.options.paginationAddRow == "page") { - - dispRows = this.getDisplayRows(); - - if (top) { - - if (dispRows.length) { - - index = dispRows[0]; - } else { - - if (this.activeRows.length) { - - index = this.activeRows[this.activeRows.length - 1]; - - top = false; - } - } - } else { - - if (dispRows.length) { - - index = dispRows[dispRows.length - 1]; - - top = dispRows.length < this.table.modules.page.getPageSize() ? false : true; - } - } - } - - if (index) { - - index = this.findRow(index); - } - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - - this.table.modules.groupRows.assignRowToGroup(row); - - var groupRows = row.getGroup().rows; - - if (groupRows.length > 1) { - - if (!index || index && groupRows.indexOf(index) == -1) { - - if (top) { - - if (groupRows[0] !== row) { - - index = groupRows[0]; - - this._moveRowInArray(row.getGroup().rows, row, index, top); - } - } else { - - if (groupRows[groupRows.length - 1] !== row) { - - index = groupRows[groupRows.length - 1]; - - this._moveRowInArray(row.getGroup().rows, row, index, top); - } - } - } else { - - this._moveRowInArray(row.getGroup().rows, row, index, top); - } - } - } - - if (index) { - - var allIndex = this.rows.indexOf(index), - activeIndex = this.activeRows.indexOf(index); - - this.displayRowIterator(function (rows) { - - var displayIndex = rows.indexOf(index); - - if (displayIndex > -1) { - - rows.splice(top ? displayIndex : displayIndex + 1, 0, row); - } - }); - - if (activeIndex > -1) { - - this.activeRows.splice(top ? activeIndex : activeIndex + 1, 0, row); - } - - if (allIndex > -1) { - - this.rows.splice(top ? allIndex : allIndex + 1, 0, row); - } - } else { - - if (top) { - - this.displayRowIterator(function (rows) { - - rows.unshift(row); - }); - - this.activeRows.unshift(row); - - this.rows.unshift(row); - } else { - - this.displayRowIterator(function (rows) { - - rows.push(row); - }); - - this.activeRows.push(row); - - this.rows.push(row); - } - } - - this.setActiveRows(this.activeRows); - - this.table.options.rowAdded.call(this.table, row.getComponent()); - - this.table.options.dataEdited.call(this.table, this.getData()); - - if (!blockRedraw) { - - this.reRenderInPosition(); - } - - return row; - }; - - RowManager.prototype.moveRow = function (from, to, after) { - - if (this.table.options.history && this.table.modExists("history")) { - - this.table.modules.history.action("rowMove", from, { pos: this.getRowPosition(from), to: to, after: after }); - } - - this.moveRowActual(from, to, after); - - this.table.options.rowMoved.call(this.table, from.getComponent()); - }; - - RowManager.prototype.moveRowActual = function (from, to, after) { - - var self = this; - - this._moveRowInArray(this.rows, from, to, after); - - this._moveRowInArray(this.activeRows, from, to, after); - - this.displayRowIterator(function (rows) { - - self._moveRowInArray(rows, from, to, after); - }); - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - - var toGroup = to.getGroup(); - - var fromGroup = from.getGroup(); - - if (toGroup === fromGroup) { - - this._moveRowInArray(toGroup.rows, from, to, after); - } else { - - if (fromGroup) { - - fromGroup.removeRow(from); - } - - toGroup.insertRow(from, to, after); - } - } - }; - - RowManager.prototype._moveRowInArray = function (rows, from, to, after) { - - var fromIndex, toIndex, start, end; - - if (from !== to) { - - fromIndex = rows.indexOf(from); - - if (fromIndex > -1) { - - rows.splice(fromIndex, 1); - - toIndex = rows.indexOf(to); - - if (toIndex > -1) { - - if (after) { - - rows.splice(toIndex + 1, 0, from); - } else { - - rows.splice(toIndex, 0, from); - } - } else { - - rows.splice(fromIndex, 0, from); - } - } - - //restyle rows - - if (rows === this.getDisplayRows()) { - - start = fromIndex < toIndex ? fromIndex : toIndex; - - end = toIndex > fromIndex ? toIndex : fromIndex + 1; - - for (var i = start; i <= end; i++) { - - if (rows[i]) { - - this.styleRow(rows[i], i); - } - } - } - } - }; - - RowManager.prototype.clearData = function () { - - this.setData([]); - }; - - RowManager.prototype.getRowIndex = function (row) { - - return this.findRowIndex(row, this.rows); - }; - - RowManager.prototype.getDisplayRowIndex = function (row) { - - var index = this.getDisplayRows().indexOf(row); - - return index > -1 ? index : false; - }; - - RowManager.prototype.nextDisplayRow = function (row, rowOnly) { - - var index = this.getDisplayRowIndex(row), - nextRow = false; - - if (index !== false && index < this.displayRowsCount - 1) { - - nextRow = this.getDisplayRows()[index + 1]; - } - - if (nextRow && (!(nextRow instanceof Row) || nextRow.type != "row")) { - - return this.nextDisplayRow(nextRow, rowOnly); - } - - return nextRow; - }; - - RowManager.prototype.prevDisplayRow = function (row, rowOnly) { - - var index = this.getDisplayRowIndex(row), - prevRow = false; - - if (index) { - - prevRow = this.getDisplayRows()[index - 1]; - } - - if (prevRow && (!(prevRow instanceof Row) || prevRow.type != "row")) { - - return this.prevDisplayRow(prevRow, rowOnly); - } - - return prevRow; - }; - - RowManager.prototype.findRowIndex = function (row, list) { - - var rowIndex; - - row = this.findRow(row); - - if (row) { - - rowIndex = list.indexOf(row); - - if (rowIndex > -1) { - - return rowIndex; - } - } - - return false; - }; - - RowManager.prototype.getData = function (active, transform) { - - var self = this, - output = []; - - var rows = active ? self.activeRows : self.rows; - - rows.forEach(function (row) { - - output.push(row.getData(transform || "data")); - }); - - return output; - }; - - RowManager.prototype.getHtml = function (active) { - - var data = this.getData(active), - columns = [], - header = "", - body = "", - table = ""; - - //build header row - - this.table.columnManager.getColumns().forEach(function (column) { - - var def = column.getDefinition(); - - if (column.visible && !def.hideInHtml) { - - header += '' + (def.title || "") + ''; - - columns.push(column); - } - }); - - //build body rows - - data.forEach(function (rowData) { - - var row = ""; - - columns.forEach(function (column) { - - var value = column.getFieldValue(rowData); - - if (typeof value === "undefined" || value === null) { - - value = ":"; - } - - row += '' + value + ''; - }); - - body += '' + row + ''; - }); - - //build table - - table = '\n\n\t\t\t\n\n\t\t\t' + header + '\n\n\t\t\t\n\n\t\t\t' + body + '\n\n\t\t\t
'; - - return table; - }; - - RowManager.prototype.getComponents = function (active) { - - var self = this, - output = []; - - var rows = active ? self.activeRows : self.rows; - - rows.forEach(function (row) { - - output.push(row.getComponent()); - }); - - return output; - }; - - RowManager.prototype.getDataCount = function (active) { - - return active ? this.rows.length : this.activeRows.length; - }; - - RowManager.prototype._genRemoteRequest = function () { - - var self = this, - table = self.table, - options = table.options, - params = {}; - - if (table.modExists("page")) { - - //set sort data if defined - - if (options.ajaxSorting) { - - var sorters = self.table.modules.sort.getSort(); - - sorters.forEach(function (item) { - - delete item.column; - }); - - params[self.table.modules.page.paginationDataSentNames.sorters] = sorters; - } - - //set filter data if defined - - if (options.ajaxFiltering) { - - var filters = self.table.modules.filter.getFilters(true, true); - - params[self.table.modules.page.paginationDataSentNames.filters] = filters; - } - - self.table.modules.ajax.setParams(params, true); - } - - table.modules.ajax.sendRequest().then(function (data) { - - self.setData(data); - }).catch(function (e) {}); - }; - - //choose the path to refresh data after a filter update - - RowManager.prototype.filterRefresh = function () { - - var table = this.table, - options = table.options, - left = this.scrollLeft; - - if (options.ajaxFiltering) { - - if (options.pagination == "remote" && table.modExists("page")) { - - table.modules.page.reset(true); - - table.modules.page.setPage(1); - } else if (options.ajaxProgressiveLoad) { - - table.modules.ajax.loadData(); - } else { - - //assume data is url, make ajax call to url to get data - - this._genRemoteRequest(); - } - } else { - - this.refreshActiveData("filter"); - } - - this.scrollHorizontal(left); - }; - - //choose the path to refresh data after a sorter update - - RowManager.prototype.sorterRefresh = function () { - - var table = this.table, - options = this.table.options, - left = this.scrollLeft; - - if (options.ajaxSorting) { - - if ((options.pagination == "remote" || options.progressiveLoad) && table.modExists("page")) { - - table.modules.page.reset(true); - - table.modules.page.setPage(1); - } else if (options.ajaxProgressiveLoad) { - - table.modules.ajax.loadData(); - } else { - - //assume data is url, make ajax call to url to get data - - this._genRemoteRequest(); - } - } else { - - this.refreshActiveData("sort"); - } - - this.scrollHorizontal(left); - }; - - RowManager.prototype.scrollHorizontal = function (left) { - - this.scrollLeft = left; - - this.element.scrollLeft = left; - - if (this.table.options.groupBy) { - - this.table.modules.groupRows.scrollHeaders(left); - } - - if (this.table.modExists("columnCalcs")) { - - this.table.modules.columnCalcs.scrollHorizontal(left); - } - }; - - //set active data set - - RowManager.prototype.refreshActiveData = function (stage, skipStage, renderInPosition) { - - var self = this, - table = this.table, - displayIndex; - - if (!stage) { - - stage = "all"; - } - - if (table.options.selectable && !table.options.selectablePersistence && table.modExists("selectRow")) { - - table.modules.selectRow.deselectRows(); - } - - //cascade through data refresh stages - - switch (stage) { - - case "all": - - case "filter": - - if (!skipStage) { - - if (table.modExists("filter")) { - - self.setActiveRows(table.modules.filter.filter(self.rows)); - } else { - - self.setActiveRows(self.rows.slice(0)); - } - } else { - - skipStage = false; - } - - case "sort": - - if (!skipStage) { - - if (table.modExists("sort")) { - - table.modules.sort.sort(); - } - } else { - - skipStage = false; - } - - //generic stage to allow for pipeline trigger after the data manipulation stage - - case "display": - - this.resetDisplayRows(); - - case "freeze": - - if (!skipStage) { - - if (this.table.modExists("frozenRows")) { - - if (table.modules.frozenRows.isFrozen()) { - - if (!table.modules.frozenRows.getDisplayIndex()) { - - table.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.frozenRows.getDisplayIndex(); - - displayIndex = self.setDisplayRows(table.modules.frozenRows.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if (displayIndex !== true) { - - table.modules.frozenRows.setDisplayIndex(displayIndex); - } - } - } - } else { - - skipStage = false; - } - - case "group": - - if (!skipStage) { - - if (table.options.groupBy && table.modExists("groupRows")) { - - if (!table.modules.groupRows.getDisplayIndex()) { - - table.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.groupRows.getDisplayIndex(); - - displayIndex = self.setDisplayRows(table.modules.groupRows.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if (displayIndex !== true) { - - table.modules.groupRows.setDisplayIndex(displayIndex); - } - } - } else { - - skipStage = false; - } - - case "tree": - - if (!skipStage) { - - if (table.options.dataTree && table.modExists("dataTree")) { - - if (!table.modules.dataTree.getDisplayIndex()) { - - table.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.dataTree.getDisplayIndex(); - - displayIndex = self.setDisplayRows(table.modules.dataTree.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if (displayIndex !== true) { - - table.modules.dataTree.setDisplayIndex(displayIndex); - } - } - } else { - - skipStage = false; - } - - if (table.options.pagination && table.modExists("page") && !renderInPosition) { - - if (table.modules.page.getMode() == "local") { - - table.modules.page.reset(); - } - } - - case "page": - - if (!skipStage) { - - if (table.options.pagination && table.modExists("page")) { - - if (!table.modules.page.getDisplayIndex()) { - - table.modules.page.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.page.getDisplayIndex(); - - if (table.modules.page.getMode() == "local") { - - table.modules.page.setMaxRows(this.getDisplayRows(displayIndex - 1).length); - } - - displayIndex = self.setDisplayRows(table.modules.page.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if (displayIndex !== true) { - - table.modules.page.setDisplayIndex(displayIndex); - } - } - } else { - - skipStage = false; - } - - } - - if (Tabulator.prototype.helpers.elVisible(self.element)) { - - if (renderInPosition) { - - self.reRenderInPosition(); - } else { - - self.renderTable(); - - if (table.options.layoutColumnsOnNewData) { - - self.table.columnManager.redraw(true); - } - } - } - - if (table.modExists("columnCalcs")) { - - table.modules.columnCalcs.recalc(this.activeRows); - } - }; - - RowManager.prototype.setActiveRows = function (activeRows) { - - this.activeRows = activeRows; - - this.activeRowsCount = this.activeRows.length; - }; - - //reset display rows array - - RowManager.prototype.resetDisplayRows = function () { - - this.displayRows = []; - - this.displayRows.push(this.activeRows.slice(0)); - - this.displayRowsCount = this.displayRows[0].length; - - if (this.table.modExists("frozenRows")) { - - this.table.modules.frozenRows.setDisplayIndex(0); - } - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - - this.table.modules.groupRows.setDisplayIndex(0); - } - - if (this.table.options.pagination && this.table.modExists("page")) { - - this.table.modules.page.setDisplayIndex(0); - } - }; - - RowManager.prototype.getNextDisplayIndex = function () { - - return this.displayRows.length; - }; - - //set display row pipeline data - - RowManager.prototype.setDisplayRows = function (displayRows, index) { - - var output = true; - - if (index && typeof this.displayRows[index] != "undefined") { - - this.displayRows[index] = displayRows; - - output = true; - } else { - - this.displayRows.push(displayRows); - - output = index = this.displayRows.length - 1; - } - - if (index == this.displayRows.length - 1) { - - this.displayRowsCount = this.displayRows[this.displayRows.length - 1].length; - } - - return output; - }; - - RowManager.prototype.getDisplayRows = function (index) { - - if (typeof index == "undefined") { - - return this.displayRows.length ? this.displayRows[this.displayRows.length - 1] : []; - } else { - - return this.displayRows[index] || []; - } - }; - - //repeat action accross display rows - - RowManager.prototype.displayRowIterator = function (callback) { - - this.displayRows.forEach(callback); - - this.displayRowsCount = this.displayRows[this.displayRows.length - 1].length; - }; - - //return only actual rows (not group headers etc) - - RowManager.prototype.getRows = function () { - - return this.rows; - }; - - ///////////////// Table Rendering ///////////////// - - - //trigger rerender of table in current position - - RowManager.prototype.reRenderInPosition = function (callback) { - - if (this.getRenderMode() == "virtual") { - - var scrollTop = this.element.scrollTop; - - var topRow = false; - - var topOffset = false; - - var left = this.scrollLeft; - - var rows = this.getDisplayRows(); - - for (var i = this.vDomTop; i <= this.vDomBottom; i++) { - - if (rows[i]) { - - var diff = scrollTop - rows[i].getElement().offsetTop; - - if (topOffset === false || Math.abs(diff) < topOffset) { - - topOffset = diff; - - topRow = i; - } else { - - break; - } - } - } - - if (callback) { - - callback(); - } - - this._virtualRenderFill(topRow === false ? this.displayRowsCount - 1 : topRow, true, topOffset || 0); - - this.scrollHorizontal(left); - } else { - - this.renderTable(); - } - }; - - RowManager.prototype.setRenderMode = function () { - - if ((this.table.element.clientHeight || this.table.options.height) && this.table.options.virtualDom) { - - this.renderMode = "virtual"; - } else { - - this.renderMode = "classic"; - } - }; - - RowManager.prototype.getRenderMode = function () { - - return this.renderMode; - }; - - RowManager.prototype.renderTable = function () { - - var self = this; - - self.table.options.renderStarted.call(this.table); - - self.element.scrollTop = 0; - - switch (self.renderMode) { - - case "classic": - - self._simpleRender(); - - break; - - case "virtual": - - self._virtualRenderFill(); - - break; - - } - - if (self.firstRender) { - - if (self.displayRowsCount) { - - self.firstRender = false; - - self.table.modules.layout.layout(); - } else { - - self.renderEmptyScroll(); - } - } - - if (self.table.modExists("frozenColumns")) { - - self.table.modules.frozenColumns.layout(); - } - - if (!self.displayRowsCount) { - - if (self.table.options.placeholder) { - - if (this.renderMode) { - - self.table.options.placeholder.setAttribute("tabulator-render-mode", this.renderMode); - } - - self.getElement().appendChild(self.table.options.placeholder); - } - } - - self.table.options.renderComplete.call(this.table); - }; - - //simple render on heightless table - - RowManager.prototype._simpleRender = function () { - - var self = this, - element = this.tableElement; - - self._clearVirtualDom(); - - if (self.displayRowsCount) { - - var onlyGroupHeaders = true; - - self.getDisplayRows().forEach(function (row, index) { - - self.styleRow(row, index); - - element.appendChild(row.getElement()); - - row.initialize(true); - - if (row.type !== "group") { - - onlyGroupHeaders = false; - } - }); - - if (onlyGroupHeaders) { - - element.style.minWidth = self.table.columnManager.getWidth() + "px"; - } - } else { - - self.renderEmptyScroll(); - } - }; - - //show scrollbars on empty table div - - RowManager.prototype.renderEmptyScroll = function () { - - this.tableElement.style.minWidth = this.table.columnManager.getWidth(); - - this.tableElement.style.minHeight = "1px"; - - // this.tableElement.style.visibility = "hidden"; - }; - - RowManager.prototype._clearVirtualDom = function () { - - var element = this.tableElement; - - if (this.table.options.placeholder && this.table.options.placeholder.parentNode) { - - this.table.options.placeholder.parentNode.removeChild(this.table.options.placeholder); - } - - // element.children.detach(); - - while (element.firstChild) { - element.removeChild(element.firstChild); - }element.style.paddingTop = ""; - - element.style.paddingBottom = ""; - - element.style.minWidth = ""; - - element.style.minHeight = ""; - - element.style.visibility = ""; - - this.scrollTop = 0; - - this.scrollLeft = 0; - - this.vDomTop = 0; - - this.vDomBottom = 0; - - this.vDomTopPad = 0; - - this.vDomBottomPad = 0; - }; - - RowManager.prototype.styleRow = function (row, index) { - - var rowEl = row.getElement(); - - if (index % 2) { - - rowEl.classList.add("tabulator-row-even"); - - rowEl.classList.remove("tabulator-row-odd"); - } else { - - rowEl.classList.add("tabulator-row-odd"); - - rowEl.classList.remove("tabulator-row-even"); - } - }; - - //full virtual render - - RowManager.prototype._virtualRenderFill = function (position, forceMove, offset) { - - var self = this, - element = self.tableElement, - holder = self.element, - topPad = 0, - rowsHeight = 0, - topPadHeight = 0, - i = 0, - onlyGroupHeaders = true, - rows = self.getDisplayRows(); - - position = position || 0; - - offset = offset || 0; - - if (!position) { - - self._clearVirtualDom(); - } else { - - // element.children().detach(); - - while (element.firstChild) { - element.removeChild(element.firstChild); - } //check if position is too close to bottom of table - - var heightOccpied = (self.displayRowsCount - position + 1) * self.vDomRowHeight; - - if (heightOccpied < self.height) { - - position -= Math.ceil((self.height - heightOccpied) / self.vDomRowHeight); - - if (position < 0) { - - position = 0; - } - } - - //calculate initial pad - - topPad = Math.min(Math.max(Math.floor(self.vDomWindowBuffer / self.vDomRowHeight), self.vDomWindowMinMarginRows), position); - - position -= topPad; - } - - if (self.displayRowsCount && Tabulator.prototype.helpers.elVisible(self.element)) { - - self.vDomTop = position; - - self.vDomBottom = position - 1; - - while ((rowsHeight <= self.height + self.vDomWindowBuffer || i < self.vDomWindowMinTotalRows) && self.vDomBottom < self.displayRowsCount - 1) { - - var index = self.vDomBottom + 1, - row = rows[index]; - - self.styleRow(row, index); - - element.appendChild(row.getElement()); - - if (!row.initialized) { - - row.initialize(true); - } else { - - if (!row.heightInitialized) { - - row.normalizeHeight(true); - } - } - - if (i < topPad) { - - topPadHeight += row.getHeight(); - } else { - - rowsHeight += row.getHeight(); - } - - if (row.type !== "group") { - - onlyGroupHeaders = false; - } - - self.vDomBottom++; - - i++; - } - - if (!position) { - - this.vDomTopPad = 0; - - //adjust rowheight to match average of rendered elements - - self.vDomRowHeight = Math.floor((rowsHeight + topPadHeight) / i); - - self.vDomBottomPad = self.vDomRowHeight * (self.displayRowsCount - self.vDomBottom - 1); - - self.vDomScrollHeight = topPadHeight + rowsHeight + self.vDomBottomPad - self.height; - } else { - - self.vDomTopPad = !forceMove ? self.scrollTop - topPadHeight : self.vDomRowHeight * this.vDomTop + offset; - - self.vDomBottomPad = self.vDomBottom == self.displayRowsCount - 1 ? 0 : Math.max(self.vDomScrollHeight - self.vDomTopPad - rowsHeight - topPadHeight, 0); - } - - element.style.paddingTop = self.vDomTopPad + "px"; - - element.style.paddingBottom = self.vDomBottomPad + "px"; - - if (forceMove) { - - this.scrollTop = self.vDomTopPad + topPadHeight + offset - (this.element.scrollWidth > this.element.clientWidth ? this.element.offsetHeight - this.element.clientHeight : 0); - } - - this.scrollTop = Math.min(this.scrollTop, this.element.scrollHeight - this.height); - - //adjust for horizontal scrollbar if present - - if (this.element.scrollWidth > this.element.offsetWidth) { - - this.scrollTop += this.element.offsetHeight - this.element.clientHeight; - } - - this.vDomScrollPosTop = this.scrollTop; - - this.vDomScrollPosBottom = this.scrollTop; - - holder.scrollTop = this.scrollTop; - - element.style.minWidth = onlyGroupHeaders ? self.table.columnManager.getWidth() + "px" : ""; - - if (self.table.options.groupBy) { - - if (self.table.modules.layout.getMode() != "fitDataFill" && self.displayRowsCount == self.table.modules.groupRows.countGroups()) { - - self.tableElement.style.minWidth = self.table.columnManager.getWidth(); - } - } - } else { - - this.renderEmptyScroll(); - } - }; - - //handle vertical scrolling - - RowManager.prototype.scrollVertical = function (dir) { - - var topDiff = this.scrollTop - this.vDomScrollPosTop; - - var bottomDiff = this.scrollTop - this.vDomScrollPosBottom; - - var margin = this.vDomWindowBuffer * 2; - - if (-topDiff > margin || bottomDiff > margin) { - - //if big scroll redraw table; - - var left = this.scrollLeft; - - this._virtualRenderFill(Math.floor(this.element.scrollTop / this.element.scrollHeight * this.displayRowsCount)); - - this.scrollHorizontal(left); - } else { - - if (dir) { - - //scrolling up - - if (topDiff < 0) { - - this._addTopRow(-topDiff); - } - - if (topDiff < 0) { - - //hide bottom row if needed - - if (this.vDomScrollHeight - this.scrollTop > this.vDomWindowBuffer) { - - this._removeBottomRow(-bottomDiff); - } - } - } else { - - //scrolling down - - if (topDiff >= 0) { - - //hide top row if needed - - if (this.scrollTop > this.vDomWindowBuffer) { - - this._removeTopRow(topDiff); - } - } - - if (bottomDiff >= 0) { - - this._addBottomRow(bottomDiff); - } - } - } - }; - - RowManager.prototype._addTopRow = function (topDiff) { - var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - - - var table = this.tableElement, - rows = this.getDisplayRows(); - - if (this.vDomTop) { - - var index = this.vDomTop - 1, - topRow = rows[index], - topRowHeight = topRow.getHeight() || this.vDomRowHeight; - - //hide top row if needed - - if (topDiff >= topRowHeight) { - - this.styleRow(topRow, index); - - table.insertBefore(topRow.getElement(), table.firstChild); - - if (!topRow.initialized || !topRow.heightInitialized) { - - this.vDomTopNewRows.push(topRow); - - if (!topRow.heightInitialized) { - - topRow.clearCellHeight(); - } - } - - topRow.initialize(); - - this.vDomTopPad -= topRowHeight; - - if (this.vDomTopPad < 0) { - - this.vDomTopPad = index * this.vDomRowHeight; - } - - if (!index) { - - this.vDomTopPad = 0; - } - - table.style.paddingTop = this.vDomTopPad + "px"; - - this.vDomScrollPosTop -= topRowHeight; - - this.vDomTop--; - } - - topDiff = -(this.scrollTop - this.vDomScrollPosTop); - - if (i < this.vDomMaxRenderChain && this.vDomTop && topDiff >= (rows[this.vDomTop - 1].getHeight() || this.vDomRowHeight)) { - - this._addTopRow(topDiff, i + 1); - } else { - - this._quickNormalizeRowHeight(this.vDomTopNewRows); - } - } - }; - - RowManager.prototype._removeTopRow = function (topDiff) { - - var table = this.tableElement, - topRow = this.getDisplayRows()[this.vDomTop], - topRowHeight = topRow.getHeight() || this.vDomRowHeight; - - if (topDiff >= topRowHeight) { - - var rowEl = topRow.getElement(); - - rowEl.parentNode.removeChild(rowEl); - - this.vDomTopPad += topRowHeight; - - table.style.paddingTop = this.vDomTopPad + "px"; - - this.vDomScrollPosTop += this.vDomTop ? topRowHeight : topRowHeight + this.vDomWindowBuffer; - - this.vDomTop++; - - topDiff = this.scrollTop - this.vDomScrollPosTop; - - this._removeTopRow(topDiff); - } - }; - - RowManager.prototype._addBottomRow = function (bottomDiff) { - var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - - - var table = this.tableElement, - rows = this.getDisplayRows(); - - if (this.vDomBottom < this.displayRowsCount - 1) { - - var index = this.vDomBottom + 1, - bottomRow = rows[index], - bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; - - //hide bottom row if needed - - if (bottomDiff >= bottomRowHeight) { - - this.styleRow(bottomRow, index); - - table.appendChild(bottomRow.getElement()); - - if (!bottomRow.initialized || !bottomRow.heightInitialized) { - - this.vDomBottomNewRows.push(bottomRow); - - if (!bottomRow.heightInitialized) { - - bottomRow.clearCellHeight(); - } - } - - bottomRow.initialize(); - - this.vDomBottomPad -= bottomRowHeight; - - if (this.vDomBottomPad < 0 || index == this.displayRowsCount - 1) { - - this.vDomBottomPad = 0; - } - - table.style.paddingBottom = this.vDomBottomPad + "px"; - - this.vDomScrollPosBottom += bottomRowHeight; - - this.vDomBottom++; - } - - bottomDiff = this.scrollTop - this.vDomScrollPosBottom; - - if (i < this.vDomMaxRenderChain && this.vDomBottom < this.displayRowsCount - 1 && bottomDiff >= (rows[this.vDomBottom + 1].getHeight() || this.vDomRowHeight)) { - - this._addBottomRow(bottomDiff, i + 1); - } else { - - this._quickNormalizeRowHeight(this.vDomBottomNewRows); - } - } - }; - - RowManager.prototype._removeBottomRow = function (bottomDiff) { - - var table = this.tableElement, - bottomRow = this.getDisplayRows()[this.vDomBottom], - bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; - - if (bottomDiff >= bottomRowHeight) { - - var rowEl = bottomRow.getElement(); - - if (rowEl.parentNode) { - - rowEl.parentNode.removeChild(rowEl); - } - - this.vDomBottomPad += bottomRowHeight; - - if (this.vDomBottomPad < 0) { - - this.vDomBottomPad = 0; - } - - table.style.paddingBottom = this.vDomBottomPad + "px"; - - this.vDomScrollPosBottom -= bottomRowHeight; - - this.vDomBottom--; - - bottomDiff = -(this.scrollTop - this.vDomScrollPosBottom); - - this._removeBottomRow(bottomDiff); - } - }; - - RowManager.prototype._quickNormalizeRowHeight = function (rows) { - - rows.forEach(function (row) { - - row.calcHeight(); - }); - - rows.forEach(function (row) { - - row.setCellHeight(); - }); - - rows.length = 0; - }; - - //normalize height of active rows - - RowManager.prototype.normalizeHeight = function () { - - this.activeRows.forEach(function (row) { - - row.normalizeHeight(); - }); - }; - - //adjust the height of the table holder to fit in the Tabulator element - - RowManager.prototype.adjustTableSize = function () { - - if (this.renderMode === "virtual") { - - this.height = this.element.clientHeight; - - this.vDomWindowBuffer = this.table.options.virtualDomBuffer || this.height; - - var otherHeight = this.columnManager.getElement().offsetHeight + (this.table.footerManager && !this.table.footerManager.external ? this.table.footerManager.getElement().offsetHeight : 0); - - this.element.style.minHeight = "calc(100% - " + otherHeight + "px)"; - - this.element.style.height = "calc(100% - " + otherHeight + "px)"; - - this.element.style.maxHeight = "calc(100% - " + otherHeight + "px)"; - } - }; - - //renitialize all rows - - RowManager.prototype.reinitialize = function () { - - this.rows.forEach(function (row) { - - row.reinitialize(); - }); - }; - - //redraw table - - RowManager.prototype.redraw = function (force) { - - var pos = 0, - left = this.scrollLeft; - - this.adjustTableSize(); - - if (!force) { - - if (self.renderMode == "classic") { - - if (self.table.options.groupBy) { - - self.refreshActiveData("group", false, false); - } else { - - this._simpleRender(); - } - } else { - - this.reRenderInPosition(); - - this.scrollHorizontal(left); - } - - if (!this.displayRowsCount) { - - if (this.table.options.placeholder) { - - this.getElement().appendChild(this.table.options.placeholder); - } - } - } else { - - this.renderTable(); - } - }; - - RowManager.prototype.resetScroll = function () { - - this.element.scrollLeft = 0; - - this.element.scrollTop = 0; - - if (this.table.browser === "ie") { - - var event = document.createEvent("Event"); - - event.initEvent("scroll", false, true); - - this.element.dispatchEvent(event); - } else { - - this.element.dispatchEvent(new Event('scroll')); - } - }; - - //public row object - - var RowComponent = function RowComponent(row) { - - this._row = row; - }; - - RowComponent.prototype.getData = function (transform) { - - return this._row.getData(transform); - }; - - RowComponent.prototype.getElement = function () { - - return this._row.getElement(); - }; - - RowComponent.prototype.getCells = function () { - - var cells = []; - - this._row.getCells().forEach(function (cell) { - - cells.push(cell.getComponent()); - }); - - return cells; - }; - - RowComponent.prototype.getCell = function (column) { - - var cell = this._row.getCell(column); - - return cell ? cell.getComponent() : false; - }; - - RowComponent.prototype.getIndex = function () { - - return this._row.getData("data")[this._row.table.options.index]; - }; - - RowComponent.prototype.getPosition = function (active) { - - return this._row.table.rowManager.getRowPosition(this._row, active); - }; - - RowComponent.prototype.delete = function () { - - return this._row.delete(); - }; - - RowComponent.prototype.scrollTo = function () { - - return this._row.table.rowManager.scrollToRow(this._row); - }; - - RowComponent.prototype.update = function (data) { - - return this._row.updateData(data); - }; - - RowComponent.prototype.normalizeHeight = function () { - - this._row.normalizeHeight(true); - }; - - RowComponent.prototype.select = function () { - - this._row.table.modules.selectRow.selectRows(this._row); - }; - - RowComponent.prototype.deselect = function () { - - this._row.table.modules.selectRow.deselectRows(this._row); - }; - - RowComponent.prototype.toggleSelect = function () { - - this._row.table.modules.selectRow.toggleRow(this._row); - }; - - RowComponent.prototype.isSelected = function () { - - return this._row.table.modules.selectRow.isRowSelected(this._row); - }; - - RowComponent.prototype._getSelf = function () { - - return this._row; - }; - - RowComponent.prototype.freeze = function () { - - if (this._row.table.modExists("frozenRows", true)) { - - this._row.table.modules.frozenRows.freezeRow(this._row); - } - }; - - RowComponent.prototype.unfreeze = function () { - - if (this._row.table.modExists("frozenRows", true)) { - - this._row.table.modules.frozenRows.unfreezeRow(this._row); - } - }; - - RowComponent.prototype.treeCollapse = function () { - - if (this._row.table.modExists("dataTree", true)) { - - this._row.table.modules.dataTree.collapseRow(this._row); - } - }; - - RowComponent.prototype.treeExpand = function () { - - if (this._row.table.modExists("dataTree", true)) { - - this._row.table.modules.dataTree.expandRow(this._row); - } - }; - - RowComponent.prototype.treeToggle = function () { - - if (this._row.table.modExists("dataTree", true)) { - - this._row.table.modules.dataTree.toggleRow(this._row); - } - }; - - RowComponent.prototype.getTreeParent = function () { - - if (this._row.table.modExists("dataTree", true)) { - - return this._row.table.modules.dataTree.getTreeParent(this._row); - } - - return false; - }; - - RowComponent.prototype.getTreeChildren = function () { - - if (this._row.table.modExists("dataTree", true)) { - - return this._row.table.modules.dataTree.getTreeChildren(this._row); - } - - return false; - }; - - RowComponent.prototype.reformat = function () { - - return this._row.reinitialize(); - }; - - RowComponent.prototype.getGroup = function () { - - return this._row.getGroup().getComponent(); - }; - - RowComponent.prototype.getTable = function () { - - return this._row.table; - }; - - RowComponent.prototype.getNextRow = function () { - - return this._row.nextRow(); - }; - - RowComponent.prototype.getPrevRow = function () { - - return this._row.prevRow(); - }; - - var Row = function Row(data, parent) { - - this.table = parent.table; - - this.parent = parent; - - this.data = {}; - - this.type = "row"; //type of element - - this.element = this.createElement(); - - this.modules = {}; //hold module variables; - - this.cells = []; - - this.height = 0; //hold element height - - this.outerHeight = 0; //holde lements outer height - - this.initialized = false; //element has been rendered - - this.heightInitialized = false; //element has resized cells to fit - - - this.setData(data); - - this.generateElement(); - }; - - Row.prototype.createElement = function () { - - var el = document.createElement("div"); - - el.classList.add("tabulator-row"); - - el.setAttribute("role", "row"); - - return el; - }; - - Row.prototype.getElement = function () { - - return this.element; - }; - - Row.prototype.generateElement = function () { - - var self = this, - dblTap, - tapHold, - tap; - - //set row selection characteristics - - if (self.table.options.selectable !== false && self.table.modExists("selectRow")) { - - self.table.modules.selectRow.initializeRow(this); - } - - //setup movable rows - - if (self.table.options.movableRows !== false && self.table.modExists("moveRow")) { - - self.table.modules.moveRow.initializeRow(this); - } - - //setup data tree - - if (self.table.options.dataTree !== false && self.table.modExists("dataTree")) { - - self.table.modules.dataTree.initializeRow(this); - } - - //handle row click events - - if (self.table.options.rowClick) { - - self.element.addEventListener("click", function (e) { - - self.table.options.rowClick(e, self.getComponent()); - }); - } - - if (self.table.options.rowDblClick) { - - self.element.addEventListener("dblclick", function (e) { - - self.table.options.rowDblClick(e, self.getComponent()); - }); - } - - if (self.table.options.rowContext) { - - self.element.addEventListener("contextmenu", function (e) { - - self.table.options.rowContext(e, self.getComponent()); - }); - } - - if (self.table.options.rowTap) { - - tap = false; - - self.element.addEventListener("touchstart", function (e) { - - tap = true; - }); - - self.element.addEventListener("touchend", function (e) { - - if (tap) { - - self.table.options.rowTap(e, self.getComponent()); - } - - tap = false; - }); - } - - if (self.table.options.rowDblTap) { - - dblTap = null; - - self.element.addEventListener("touchend", function (e) { - - if (dblTap) { - - clearTimeout(dblTap); - - dblTap = null; - - self.table.options.rowDblTap(e, self.getComponent()); - } else { - - dblTap = setTimeout(function () { - - clearTimeout(dblTap); - - dblTap = null; - }, 300); - } - }); - } - - if (self.table.options.rowTapHold) { - - tapHold = null; - - self.element.addEventListener("touchstart", function (e) { - - clearTimeout(tapHold); - - tapHold = setTimeout(function () { - - clearTimeout(tapHold); - - tapHold = null; - - tap = false; - - self.table.options.rowTapHold(e, self.getComponent()); - }, 1000); - }); - - self.element.addEventListener("touchend", function (e) { - - clearTimeout(tapHold); - - tapHold = null; - }); - } - }; - - Row.prototype.generateCells = function () { - - this.cells = this.table.columnManager.generateCells(this); - }; - - //functions to setup on first render - - Row.prototype.initialize = function (force) { - - var self = this; - - if (!self.initialized || force) { - - self.deleteCells(); - - while (self.element.firstChild) { - self.element.removeChild(self.element.firstChild); - } //handle frozen cells - - if (this.table.modExists("frozenColumns")) { - - this.table.modules.frozenColumns.layoutRow(this); - } - - this.generateCells(); - - self.cells.forEach(function (cell) { - - self.element.appendChild(cell.getElement()); - - cell.cellRendered(); - }); - - if (force) { - - self.normalizeHeight(); - } - - //setup movable rows - - if (self.table.options.dataTree && self.table.modExists("dataTree")) { - - self.table.modules.dataTree.layoutRow(this); - } - - //setup movable rows - - if (self.table.options.responsiveLayout === "collapse" && self.table.modExists("responsiveLayout")) { - - self.table.modules.responsiveLayout.layoutRow(this); - } - - if (self.table.options.rowFormatter) { - - self.table.options.rowFormatter(self.getComponent()); - } - - //set resizable handles - - if (self.table.options.resizableRows && self.table.modExists("resizeRows")) { - - self.table.modules.resizeRows.initializeRow(self); - } - - self.initialized = true; - } - }; - - Row.prototype.reinitializeHeight = function () { - - this.heightInitialized = false; - - if (this.element.offsetParent !== null) { - - this.normalizeHeight(true); - } - }; - - Row.prototype.reinitialize = function () { - - this.initialized = false; - - this.heightInitialized = false; - - this.height = 0; - - if (this.element.offsetParent !== null) { - - this.initialize(true); - } - }; - - //get heights when doing bulk row style calcs in virtual DOM - - Row.prototype.calcHeight = function () { - - var maxHeight = 0, - minHeight = this.table.options.resizableRows ? this.element.clientHeight : 0; - - this.cells.forEach(function (cell) { - - var height = cell.getHeight(); - - if (height > maxHeight) { - - maxHeight = height; - } - }); - - this.height = Math.max(maxHeight, minHeight); - - this.outerHeight = this.element.offsetHeight; - }; - - //set of cells - - Row.prototype.setCellHeight = function () { - - var height = this.height; - - this.cells.forEach(function (cell) { - - cell.setHeight(height); - }); - - this.heightInitialized = true; - }; - - Row.prototype.clearCellHeight = function () { - - this.cells.forEach(function (cell) { - - cell.clearHeight(); - }); - }; - - //normalize the height of elements in the row - - Row.prototype.normalizeHeight = function (force) { - - if (force) { - - this.clearCellHeight(); - } - - this.calcHeight(); - - this.setCellHeight(); - }; - - Row.prototype.setHeight = function (height) { - - this.height = height; - - this.setCellHeight(); - }; - - //set height of rows - - Row.prototype.setHeight = function (height, force) { - - if (this.height != height || force) { - - this.height = height; - - this.setCellHeight(); - - // this.outerHeight = this.element.outerHeight(); - - this.outerHeight = this.element.offsetHeight; - } - }; - - //return rows outer height - - Row.prototype.getHeight = function () { - - return this.outerHeight; - }; - - //return rows outer Width - - Row.prototype.getWidth = function () { - - return this.element.offsetWidth; - }; - - //////////////// Cell Management ///////////////// - - - Row.prototype.deleteCell = function (cell) { - - var index = this.cells.indexOf(cell); - - if (index > -1) { - - this.cells.splice(index, 1); - } - }; - - //////////////// Data Management ///////////////// - - - Row.prototype.setData = function (data) { - - var self = this; - - if (self.table.modExists("mutator")) { - - self.data = self.table.modules.mutator.transformRow(data, "data"); - } else { - - self.data = data; - } - }; - - //update the rows data - - Row.prototype.updateData = function (data) { - var _this5 = this; - - var self = this; - - return new Promise(function (resolve, reject) { - - if (typeof data === "string") { - - data = JSON.parse(data); - } - - //mutate incomming data if needed - - if (self.table.modExists("mutator")) { - - data = self.table.modules.mutator.transformRow(data, "data", true); - } - - //set data - - for (var attrname in data) { - - self.data[attrname] = data[attrname]; - } - - //update affected cells only - - for (var attrname in data) { - - var cell = _this5.getCell(attrname); - - if (cell) { - - if (cell.getValue() != data[attrname]) { - - cell.setValueProcessData(data[attrname]); - } - } - } - - //Partial reinitialization if visible - - if (Tabulator.prototype.helpers.elVisible(_this5.element)) { - - self.normalizeHeight(); - - if (self.table.options.rowFormatter) { - - self.table.options.rowFormatter(self.getComponent()); - } - } else { - - _this5.initialized = false; - - _this5.height = 0; - } - - //self.reinitialize(); - - - self.table.options.rowUpdated.call(_this5.table, self.getComponent()); - - resolve(); - }); - }; - - Row.prototype.getData = function (transform) { - - var self = this; - - if (transform) { - - if (self.table.modExists("accessor")) { - - return self.table.modules.accessor.transformRow(self.data, transform); - } - } else { - - return this.data; - } - }; - - Row.prototype.getCell = function (column) { - - var match = false; - - column = this.table.columnManager.findColumn(column); - - match = this.cells.find(function (cell) { - - return cell.column === column; - }); - - return match; - }; - - Row.prototype.getCellIndex = function (findCell) { - - return this.cells.findIndex(function (cell) { - - return cell === findCell; - }); - }; - - Row.prototype.findNextEditableCell = function (index) { - - var nextCell = false; - - if (index < this.cells.length - 1) { - - for (var i = index + 1; i < this.cells.length; i++) { - - var cell = this.cells[i]; - - if (cell.column.modules.edit && Tabulator.prototype.helpers.elVisible(cell.getElement())) { - - var allowEdit = true; - - if (typeof cell.column.modules.edit.check == "function") { - - allowEdit = cell.column.modules.edit.check(cell.getComponent()); - } - - if (allowEdit) { - - nextCell = cell; - - break; - } - } - } - } - - return nextCell; - }; - - Row.prototype.findPrevEditableCell = function (index) { - - var prevCell = false; - - if (index > 0) { - - for (var i = index - 1; i >= 0; i--) { - - var cell = this.cells[i], - allowEdit = true; - - if (cell.column.modules.edit && Tabulator.prototype.helpers.elVisible(cell.getElement())) { - - if (typeof cell.column.modules.edit.check == "function") { - - allowEdit = cell.column.modules.edit.check(cell.getComponent()); - } - - if (allowEdit) { - - prevCell = cell; - - break; - } - } - } - } - - return prevCell; - }; - - Row.prototype.getCells = function () { - - return this.cells; - }; - - Row.prototype.nextRow = function () { - - var row = this.table.rowManager.nextDisplayRow(this, true); - - return row ? row.getComponent() : false; - }; - - Row.prototype.prevRow = function () { - - var row = this.table.rowManager.prevDisplayRow(this, true); - - return row ? row.getComponent() : false; - }; - - ///////////////////// Actions ///////////////////// - - - Row.prototype.delete = function () { - var _this6 = this; - - return new Promise(function (resolve, reject) { - - var index = _this6.table.rowManager.getRowIndex(_this6); - - _this6.deleteActual(); - - if (_this6.table.options.history && _this6.table.modExists("history")) { - - if (index) { - - index = _this6.table.rowManager.rows[index - 1]; - } - - _this6.table.modules.history.action("rowDelete", _this6, { data: _this6.getData(), pos: !index, index: index }); - } - - resolve(); - }); - }; - - Row.prototype.deleteActual = function () { - - var index = this.table.rowManager.getRowIndex(this); - - //deselect row if it is selected - - if (this.table.modExists("selectRow")) { - - this.table.modules.selectRow._deselectRow(this, true); - } - - // if(this.table.options.dataTree && this.table.modExists("dataTree")){ - - // this.table.modules.dataTree.collapseRow(this, true); - - // } - - - this.table.rowManager.deleteRow(this); - - this.deleteCells(); - - this.initialized = false; - - this.heightInitialized = false; - - //remove from group - - if (this.modules.group) { - - this.modules.group.removeRow(this); - } - - //recalc column calculations if present - - if (this.table.modExists("columnCalcs")) { - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - - this.table.modules.columnCalcs.recalcRowGroup(this); - } else { - - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - } - }; - - Row.prototype.deleteCells = function () { - - var cellCount = this.cells.length; - - for (var i = 0; i < cellCount; i++) { - - this.cells[0].delete(); - } - }; - - Row.prototype.wipe = function () { - - this.deleteCells(); - - // this.element.children().each(function(){ - - // $(this).remove(); - - // }) - - // this.element.empty(); - - - while (this.element.firstChild) { - this.element.removeChild(this.element.firstChild); - } // this.element.remove(); - - if (this.element.parentNode) { - - this.element.parentNode.removeChild(this.element); - } - }; - - Row.prototype.getGroup = function () { - - return this.modules.group || false; - }; - - //////////////// Object Generation ///////////////// - - Row.prototype.getComponent = function () { - - return new RowComponent(this); - }; - - //public row object - - var CellComponent = function CellComponent(cell) { - - this._cell = cell; - }; - - CellComponent.prototype.getValue = function () { - - return this._cell.getValue(); - }; - - CellComponent.prototype.getOldValue = function () { - - return this._cell.getOldValue(); - }; - - CellComponent.prototype.getElement = function () { - - return this._cell.getElement(); - }; - - CellComponent.prototype.getRow = function () { - - return this._cell.row.getComponent(); - }; - - CellComponent.prototype.getData = function () { - - return this._cell.row.getData(); - }; - - CellComponent.prototype.getField = function () { - - return this._cell.column.getField(); - }; - - CellComponent.prototype.getColumn = function () { - - return this._cell.column.getComponent(); - }; - - CellComponent.prototype.setValue = function (value, mutate) { - - if (typeof mutate == "undefined") { - - mutate = true; - } - - this._cell.setValue(value, mutate); - }; - - CellComponent.prototype.restoreOldValue = function () { - - this._cell.setValueActual(this._cell.getOldValue()); - }; - - CellComponent.prototype.edit = function (force) { - - return this._cell.edit(force); - }; - - CellComponent.prototype.cancelEdit = function () { - - this._cell.cancelEdit(); - }; - - CellComponent.prototype.nav = function () { - - return this._cell.nav(); - }; - - CellComponent.prototype.checkHeight = function () { - - this._cell.checkHeight(); - }; - - CellComponent.prototype.getTable = function () { - - return this._cell.table; - }; - - CellComponent.prototype._getSelf = function () { - - return this._cell; - }; - - var Cell = function Cell(column, row) { - - this.table = column.table; - - this.column = column; - - this.row = row; - - this.element = null; - - this.value = null; - - this.oldValue = null; - - this.height = null; - - this.width = null; - - this.minWidth = null; - - this.build(); - }; - - //////////////// Setup Functions ///////////////// - - - //generate element - - Cell.prototype.build = function () { - - this.generateElement(); - - this.setWidth(this.column.width); - - this._configureCell(); - - this.setValueActual(this.column.getFieldValue(this.row.data)); - }; - - Cell.prototype.generateElement = function () { - - this.element = document.createElement('div'); - - this.element.className = "tabulator-cell"; - - this.element.setAttribute("role", "gridcell"); - - this.element = this.element; - }; - - Cell.prototype._configureCell = function () { - - var self = this, - cellEvents = self.column.cellEvents, - element = self.element, - field = this.column.getField(), - dblTap, - tapHold, - tap; - - //set text alignment - - element.style.textAlign = self.column.hozAlign; - - if (field) { - - element.setAttribute("tabulator-field", field); - } - - if (self.column.definition.cssClass) { - - element.classList.add(self.column.definition.cssClass); - } - - //set event bindings - - if (cellEvents.cellClick || self.table.options.cellClick) { - - self.element.addEventListener("click", function (e) { - - var component = self.getComponent(); - - if (cellEvents.cellClick) { - - cellEvents.cellClick.call(self.table, e, component); - } - - if (self.table.options.cellClick) { - - self.table.options.cellClick.call(self.table, e, component); - } - }); - } - - if (cellEvents.cellDblClick || this.table.options.cellDblClick) { - - element.addEventListener("dblclick", function (e) { - - var component = self.getComponent(); - - if (cellEvents.cellDblClick) { - - cellEvents.cellDblClick.call(self.table, e, component); - } - - if (self.table.options.cellDblClick) { - - self.table.options.cellDblClick.call(self.table, e, component); - } - }); - } - - if (cellEvents.cellContext || this.table.options.cellContext) { - - element.addEventListener("contextmenu", function (e) { - - var component = self.getComponent(); - - if (cellEvents.cellContext) { - - cellEvents.cellContext.call(self.table, e, component); - } - - if (self.table.options.cellContext) { - - self.table.options.cellContext.call(self.table, e, component); - } - }); - } - - if (this.table.options.tooltipGenerationMode === "hover") { - - //update tooltip on mouse enter - - element.addEventListener("mouseenter", function (e) { - - self._generateTooltip(); - }); - } - - if (cellEvents.cellTap || this.table.options.cellTap) { - - tap = false; - - element.addEventListener("touchstart", function (e) { - - tap = true; - }); - - element.addEventListener("touchend", function (e) { - - if (tap) { - - var component = self.getComponent(); - - if (cellEvents.cellTap) { - - cellEvents.cellTap.call(self.table, e, component); - } - - if (self.table.options.cellTap) { - - self.table.options.cellTap.call(self.table, e, component); - } - } - - tap = false; - }); - } - - if (cellEvents.cellDblTap || this.table.options.cellDblTap) { - - dblTap = null; - - element.addEventListener("touchend", function (e) { - - if (dblTap) { - - clearTimeout(dblTap); - - dblTap = null; - - var component = self.getComponent(); - - if (cellEvents.cellDblTap) { - - cellEvents.cellDblTap.call(self.table, e, component); - } - - if (self.table.options.cellDblTap) { - - self.table.options.cellDblTap.call(self.table, e, component); - } - } else { - - dblTap = setTimeout(function () { - - clearTimeout(dblTap); - - dblTap = null; - }, 300); - } - }); - } - - if (cellEvents.cellTapHold || this.table.options.cellTapHold) { - - tapHold = null; - - element.addEventListener("touchstart", function (e) { - - clearTimeout(tapHold); - - tapHold = setTimeout(function () { - - clearTimeout(tapHold); - - tapHold = null; - - tap = false; - - var component = self.getComponent(); - - if (cellEvents.cellTapHold) { - - cellEvents.cellTapHold.call(self.table, e, component); - } - - if (self.table.options.cellTapHold) { - - self.table.options.cellTapHold.call(self.table, e, component); - } - }, 1000); - }); - - element.addEventListener("touchend", function (e) { - - clearTimeout(tapHold); - - tapHold = null; - }); - } - - if (self.column.modules.edit) { - - self.table.modules.edit.bindEditor(self); - } - - if (self.column.definition.rowHandle && self.table.options.movableRows !== false && self.table.modExists("moveRow")) { - - self.table.modules.moveRow.initializeCell(self); - } - - //hide cell if not visible - - if (!self.column.visible) { - - self.hide(); - } - }; - - //generate cell contents - - Cell.prototype._generateContents = function () { - - var val; - - if (this.table.modExists("format")) { - - val = this.table.modules.format.formatValue(this); - } else { - - val = this.element.innerHTML = this.value; - } - - switch (typeof val === 'undefined' ? 'undefined' : _typeof(val)) { - - case "object": - - if (val instanceof Node) { - - this.element.appendChild(val); - } else { - - this.element.innerHTML = ""; - - console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:", val); - } - - break; - - case "undefined": - - case "null": - - this.element.innerHTML = ""; - - break; - - default: - - this.element.innerHTML = val; - - } - }; - - Cell.prototype.cellRendered = function () { - - if (this.table.modExists("format") && this.table.modules.format.cellRendered) { - - this.table.modules.format.cellRendered(this); - } - }; - - //generate tooltip text - - Cell.prototype._generateTooltip = function () { - - var tooltip = this.column.tooltip; - - if (tooltip) { - - if (tooltip === true) { - - tooltip = this.value; - } else if (typeof tooltip == "function") { - - tooltip = tooltip(this.getComponent()); - - if (tooltip === false) { - - tooltip = ""; - } - } - - if (typeof tooltip === "undefined") { - - tooltip = ""; - } - - this.element.setAttribute("title", tooltip); - } else { - - this.element.setAttribute("title", ""); - } - }; - - //////////////////// Getters //////////////////// - - Cell.prototype.getElement = function () { - - return this.element; - }; - - Cell.prototype.getValue = function () { - - return this.value; - }; - - Cell.prototype.getOldValue = function () { - - return this.oldValue; - }; - - //////////////////// Actions //////////////////// - - - Cell.prototype.setValue = function (value, mutate) { - - var changed = this.setValueProcessData(value, mutate), - component; - - if (changed) { - - if (this.table.options.history && this.table.modExists("history")) { - - this.table.modules.history.action("cellEdit", this, { oldValue: this.oldValue, newValue: this.value }); - } - - component = this.getComponent(); - - if (this.column.cellEvents.cellEdited) { - - this.column.cellEvents.cellEdited.call(this.table, component); - } - - this.table.options.cellEdited.call(this.table, component); - - this.table.options.dataEdited.call(this.table, this.table.rowManager.getData()); - } - - if (this.table.modExists("columnCalcs")) { - - if (this.column.definition.topCalc || this.column.definition.bottomCalc) { - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - - this.table.modules.columnCalcs.recalcRowGroup(this.row); - } else { - - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - } - } - }; - - Cell.prototype.setValueProcessData = function (value, mutate) { - - var changed = false; - - if (this.value != value) { - - changed = true; - - if (mutate) { - - if (this.column.modules.mutate) { - - value = this.table.modules.mutator.transformCell(this, value); - } - } - } - - this.setValueActual(value); - - return changed; - }; - - Cell.prototype.setValueActual = function (value) { - - this.oldValue = this.value; - - this.value = value; - - this.column.setFieldValue(this.row.data, value); - - this._generateContents(); - - this._generateTooltip(); - - //set resizable handles - - if (this.table.options.resizableColumns && this.table.modExists("resizeColumns")) { - - this.table.modules.resizeColumns.initializeColumn("cell", this.column, this.element); - } - - //handle frozen cells - - if (this.table.modExists("frozenColumns")) { - - this.table.modules.frozenColumns.layoutElement(this.element, this.column); - } - }; - - Cell.prototype.setWidth = function (width) { - - this.width = width; - - // this.element.css("width", width || ""); - - this.element.style.width = width ? width + "px" : ""; - }; - - Cell.prototype.getWidth = function () { - - return this.width || this.element.offsetWidth; - }; - - Cell.prototype.setMinWidth = function (minWidth) { - - this.minWidth = minWidth; - - this.element.style.minWidth = minWidth ? minWidth + "px" : ""; - }; - - Cell.prototype.checkHeight = function () { - - // var height = this.element.css("height"); - - - this.row.reinitializeHeight(); - }; - - Cell.prototype.clearHeight = function () { - - this.element.style.height = ""; - - this.height = null; - }; - - Cell.prototype.setHeight = function (height) { - - this.height = height; - - this.element.style.height = height ? height + "px" : ""; - }; - - Cell.prototype.getHeight = function () { - - return this.height || this.element.offsetHeight; - }; - - Cell.prototype.show = function () { - - this.element.style.display = ""; - }; - - Cell.prototype.hide = function () { - - this.element.style.display = "none"; - }; - - Cell.prototype.edit = function (force) { - - if (this.table.modExists("edit", true)) { - - return this.table.modules.edit.editCell(this, force); - } - }; - - Cell.prototype.cancelEdit = function () { - - if (this.table.modExists("edit", true)) { - - var editing = this.table.modules.edit.getCurrentCell(); - - if (editing && editing._getSelf() === this) { - - this.table.modules.edit.cancelEdit(); - } else { - - console.warn("Cancel Editor Error - This cell is not currently being edited "); - } - } - }; - - Cell.prototype.delete = function () { - - this.element.parentNode.removeChild(this.element); - - this.column.deleteCell(this); - - this.row.deleteCell(this); - }; - - //////////////// Navigation ///////////////// - - - Cell.prototype.nav = function () { - - var self = this, - nextCell = false, - index = this.row.getCellIndex(this); - - return { - - next: function next() { - - var nextCell = this.right(), - nextRow; - - if (!nextCell) { - - nextRow = self.table.rowManager.nextDisplayRow(self.row, true); - - if (nextRow) { - - nextCell = nextRow.findNextEditableCell(-1); - - if (nextCell) { - - nextCell.edit(); - - return true; - } - } - } else { - - return true; - } - - return false; - }, - - prev: function prev() { - - var nextCell = this.left(), - prevRow; - - if (!nextCell) { - - prevRow = self.table.rowManager.prevDisplayRow(self.row, true); - - if (prevRow) { - - nextCell = prevRow.findPrevEditableCell(prevRow.cells.length); - - if (nextCell) { - - nextCell.edit(); - - return true; - } - } - } else { - - return true; - } - - return false; - }, - - left: function left() { - - nextCell = self.row.findPrevEditableCell(index); - - if (nextCell) { - - nextCell.edit(); - - return true; - } else { - - return false; - } - }, - - right: function right() { - - nextCell = self.row.findNextEditableCell(index); - - if (nextCell) { - - nextCell.edit(); - - return true; - } else { - - return false; - } - }, - - up: function up() { - - var nextRow = self.table.rowManager.prevDisplayRow(self.row, true); - - if (nextRow) { - - nextRow.cells[index].edit(); - } - }, - - down: function down() { - - var nextRow = self.table.rowManager.nextDisplayRow(self.row, true); - - if (nextRow) { - - nextRow.cells[index].edit(); - } - } - - }; - }; - - Cell.prototype.getIndex = function () { - - this.row.getCellIndex(this); - }; - - //////////////// Object Generation ///////////////// - - Cell.prototype.getComponent = function () { - - return new CellComponent(this); - }; - - var FooterManager = function FooterManager(table) { - - this.table = table; - - this.active = false; - - this.element = this.createElement(); //containing element - - this.external = false; - - this.links = []; - - this._initialize(); - }; - - FooterManager.prototype.createElement = function () { - - var el = document.createElement("div"); - - el.classList.add("tabulator-footer"); - - return el; - }; - - FooterManager.prototype._initialize = function (element) { - - if (this.table.options.footerElement) { - - switch (_typeof(this.table.options.footerElement)) { - - case "string": - - if (this.table.options.footerElement[0] === "<") { - - this.element.innerHTML = this.table.options.footerElement; - } else { - - this.external = true; - - this.element = document.querySelector(this.table.options.footerElement); - } - - break; - - default: - - this.element = this.table.options.footerElement; - - break; - - } - } - }; - - FooterManager.prototype.getElement = function () { - - return this.element; - }; - - FooterManager.prototype.append = function (element, parent) { - - this.activate(parent); - - this.element.appendChild(element); - - this.table.rowManager.adjustTableSize(); - }; - - FooterManager.prototype.prepend = function (element, parent) { - - this.activate(parent); - - this.element.insertBefore(element, this.element.firstChild); - - this.table.rowManager.adjustTableSize(); - }; - - FooterManager.prototype.remove = function (element) { - - element.parentNode.removeChild(element); - - this.deactivate(); - }; - - FooterManager.prototype.deactivate = function (force) { - - if (!this.element.firstChild || force) { - - if (!this.external) { - - this.element.parentNode.removeChild(this.element); - } - - this.active = false; - } - - // this.table.rowManager.adjustTableSize(); - }; - - FooterManager.prototype.activate = function (parent) { - - if (!this.active) { - - this.active = true; - - if (!this.external) { - - this.table.element.appendChild(this.getElement()); - - this.table.element.style.display = ''; - } - } - - if (parent) { - - this.links.push(parent); - } - }; - - FooterManager.prototype.redraw = function () { - - this.links.forEach(function (link) { - - link.footerRedraw(); - }); - }; - - var Tabulator = function Tabulator(element, options) { - - this.options = {}; - - this.columnManager = null; // hold Column Manager - - this.rowManager = null; //hold Row Manager - - this.footerManager = null; //holder Footer Manager - - this.browser = ""; //hold current browser type - - this.browserSlow = false; //handle reduced functionality for slower browsers - - - this.modules = {}; //hold all modules bound to this table - - - this.initializeElement(element); - - this.initializeOptions(options || {}); - - this._create(); - - Tabulator.prototype.comms.register(this); //register table for inderdevice communication - }; - - //default setup options - - Tabulator.prototype.defaultOptions = { - - height: false, //height of tabulator - - - layout: "fitData", ///layout type "fitColumns" | "fitData" - - layoutColumnsOnNewData: false, //update column widths on setData - - - columnMinWidth: 40, //minimum global width for a column - - columnVertAlign: "top", //vertical alignment of column headers - - - resizableColumns: true, //resizable columns - - resizableRows: false, //resizable rows - - autoResize: true, //auto resize table - - - columns: [], //store for colum header info - - - data: [], //default starting data - - - nestedFieldSeparator: ".", //seperatpr for nested data - - - tooltips: false, //Tool tip value - - tooltipsHeader: false, //Tool tip for headers - - tooltipGenerationMode: "load", //when to generate tooltips - - - initialSort: false, //initial sorting criteria - - initialFilter: false, //initial filtering criteria - - - columnHeaderSortMulti: true, //multiple or single column sorting - - - sortOrderReverse: false, //reverse internal sort ordering - - - footerElement: false, //hold footer element - - - index: "id", //filed for row index - - - keybindings: [], //array for keybindings - - - clipboard: false, //enable clipboard - - clipboardCopyStyled: true, //formatted table data - - clipboardCopySelector: "active", //method of chosing which data is coppied to the clipboard - - clipboardCopyFormatter: "table", //convert data to a clipboard string - - clipboardPasteParser: "table", //convert pasted clipboard data to rows - - clipboardPasteAction: "insert", //how to insert pasted data into the table - - clipboardCopyConfig: false, //clipboard config - - - clipboardCopied: function clipboardCopied() {}, //data has been copied to the clipboard - - clipboardPasted: function clipboardPasted() {}, //data has been pasted into the table - - clipboardPasteError: function clipboardPasteError() {}, //data has not successfully been pasted into the table - - - downloadDataFormatter: false, //function to manipulate table data before it is downloaded - - downloadReady: function downloadReady(data, blob) { - return blob; - }, //function to manipulate download data - - downloadComplete: false, //function to manipulate download data - - downloadConfig: false, //download config - - - dataTree: false, //enable data tree - - dataTreeBranchElement: true, //show data tree branch element - - dataTreeChildIndent: 9, //data tree child indent in px - - dataTreeChildField: "_children", //data tre column field to look for child rows - - dataTreeCollapseElement: false, //data tree row collapse element - - dataTreeExpandElement: false, //data tree row expand element - - dataTreeStartExpanded: false, - - dataTreeRowExpanded: function dataTreeRowExpanded() {}, //row has been expanded - - dataTreeRowCollapsed: function dataTreeRowCollapsed() {}, //row has been collapsed - - - addRowPos: "bottom", //position to insert blank rows, top|bottom - - - selectable: "highlight", //highlight rows on hover - - selectableRangeMode: "drag", //highlight rows on hover - - selectableRollingSelection: true, //roll selection once maximum number of selectable rows is reached - - selectablePersistence: true, // maintain selection when table view is updated - - selectableCheck: function selectableCheck(data, row) { - return true; - }, //check wheather row is selectable - - - headerFilterPlaceholder: false, //placeholder text to display in header filters - - - history: false, //enable edit history - - - locale: false, //current system language - - langs: {}, - - virtualDom: true, //enable DOM virtualization - - - persistentLayout: false, //store column layout in memory - - persistentSort: false, //store sorting in memory - - persistentFilter: false, //store filters in memory - - persistenceID: "", //key for persistent storage - - persistenceMode: true, //mode for storing persistence information - - - responsiveLayout: false, //responsive layout flags - - responsiveLayoutCollapseStartOpen: true, //start showing collapsed data - - responsiveLayoutCollapseUseFormatters: true, //responsive layout collapse formatter - - responsiveLayoutCollapseFormatter: false, //responsive layout collapse formatter - - - pagination: false, //set pagination type - - paginationSize: false, //set number of rows to a page - - paginationButtonCount: 5, // set count of page button - - paginationElement: false, //element to hold pagination numbers - - paginationDataSent: {}, //pagination data sent to the server - - paginationDataReceived: {}, //pagination data received from the server - - paginationAddRow: "page", //add rows on table or page - - - ajaxURL: false, //url for ajax loading - - ajaxURLGenerator: false, - - ajaxParams: {}, //params for ajax loading - - ajaxConfig: "get", //ajax request type - - ajaxContentType: "form", //ajax request type - - ajaxRequestFunc: false, //promise function - - ajaxLoader: true, //show loader - - ajaxLoaderLoading: false, //loader element - - ajaxLoaderError: false, //loader element - - ajaxFiltering: false, - - ajaxSorting: false, - - ajaxProgressiveLoad: false, //progressive loading - - ajaxProgressiveLoadDelay: 0, //delay between requests - - ajaxProgressiveLoadScrollMargin: 0, //margin before scroll begins - - - groupBy: false, //enable table grouping and set field to group by - - groupStartOpen: true, //starting state of group - - groupValues: false, - - groupHeader: false, //header generation function - - - movableColumns: false, //enable movable columns - - - movableRows: false, //enable movable rows - - movableRowsConnectedTables: false, //tables for movable rows to be connected to - - movableRowsSender: false, - - movableRowsReceiver: "insert", - - movableRowsSendingStart: function movableRowsSendingStart() {}, - - movableRowsSent: function movableRowsSent() {}, - - movableRowsSentFailed: function movableRowsSentFailed() {}, - - movableRowsSendingStop: function movableRowsSendingStop() {}, - - movableRowsReceivingStart: function movableRowsReceivingStart() {}, - - movableRowsReceived: function movableRowsReceived() {}, - - movableRowsReceivedFailed: function movableRowsReceivedFailed() {}, - - movableRowsReceivingStop: function movableRowsReceivingStop() {}, - - scrollToRowPosition: "top", - - scrollToRowIfVisible: true, - - scrollToColumnPosition: "left", - - scrollToColumnIfVisible: true, - - rowFormatter: false, - - placeholder: false, - - //table building callbacks - - tableBuilding: function tableBuilding() {}, - - tableBuilt: function tableBuilt() {}, - - //render callbacks - - renderStarted: function renderStarted() {}, - - renderComplete: function renderComplete() {}, - - //row callbacks - - rowClick: false, - - rowDblClick: false, - - rowContext: false, - - rowTap: false, - - rowDblTap: false, - - rowTapHold: false, - - rowAdded: function rowAdded() {}, - - rowDeleted: function rowDeleted() {}, - - rowMoved: function rowMoved() {}, - - rowUpdated: function rowUpdated() {}, - - rowSelectionChanged: function rowSelectionChanged() {}, - - rowSelected: function rowSelected() {}, - - rowDeselected: function rowDeselected() {}, - - rowResized: function rowResized() {}, - - //cell callbacks - - //row callbacks - - cellClick: false, - - cellDblClick: false, - - cellContext: false, - - cellTap: false, - - cellDblTap: false, - - cellTapHold: false, - - cellEditing: function cellEditing() {}, - - cellEdited: function cellEdited() {}, - - cellEditCancelled: function cellEditCancelled() {}, - - //column callbacks - - columnMoved: false, - - columnResized: function columnResized() {}, - - columnTitleChanged: function columnTitleChanged() {}, - - columnVisibilityChanged: function columnVisibilityChanged() {}, - - //HTML iport callbacks - - htmlImporting: function htmlImporting() {}, - - htmlImported: function htmlImported() {}, - - //data callbacks - - dataLoading: function dataLoading() {}, - - dataLoaded: function dataLoaded() {}, - - dataEdited: function dataEdited() {}, - - //ajax callbacks - - ajaxRequesting: function ajaxRequesting() {}, - - ajaxResponse: false, - - ajaxError: function ajaxError() {}, - - //filtering callbacks - - dataFiltering: false, - - dataFiltered: false, - - //sorting callbacks - - dataSorting: function dataSorting() {}, - - dataSorted: function dataSorted() {}, - - //grouping callbacks - - groupToggleElement: "arrow", - - groupClosedShowCalcs: false, - - dataGrouping: function dataGrouping() {}, - - dataGrouped: false, - - groupVisibilityChanged: function groupVisibilityChanged() {}, - - groupClick: false, - - groupDblClick: false, - - groupContext: false, - - groupTap: false, - - groupDblTap: false, - - groupTapHold: false, - - columnCalcs: true, - - //pagination callbacks - - pageLoaded: function pageLoaded() {}, - - //localization callbacks - - localized: function localized() {}, - - //validation has failed - - validationFailed: function validationFailed() {}, - - //history callbacks - - historyUndo: function historyUndo() {}, - - historyRedo: function historyRedo() {} - - }; - - Tabulator.prototype.initializeOptions = function (options) { - - for (var key in this.defaultOptions) { - - if (key in options) { - - this.options[key] = options[key]; - } else { - - if (Array.isArray(this.defaultOptions[key])) { - - this.options[key] = []; - } else if (_typeof(this.defaultOptions[key]) === "object") { - - this.options[key] = {}; - } else { - - this.options[key] = this.defaultOptions[key]; - } - } - } - }; - - Tabulator.prototype.initializeElement = function (element) { - - if (element instanceof HTMLElement) { - - this.element = element; - - return true; - } else if (typeof element === "string") { - - this.element = document.querySelector(element); - - if (this.element) { - - return true; - } else { - - console.error("Tabulator Creation Error - no element found matching selector: ", element); - - return false; - } - } else { - - console.error("Tabulator Creation Error - Invalid element provided:", element); - - return false; - } - }; - - //convert depricated functionality to new functions - - Tabulator.prototype._mapDepricatedFunctionality = function () {}; - - //concreate table - - Tabulator.prototype._create = function () { - - this._clearObjectPointers(); - - this._mapDepricatedFunctionality(); - - this.bindModules(); - - if (this.element.tagName === "TABLE") { - - if (this.modExists("htmlTableImport", true)) { - - this.modules.htmlTableImport.parseTable(); - } - } - - this.columnManager = new ColumnManager(this); - - this.rowManager = new RowManager(this); - - this.footerManager = new FooterManager(this); - - this.columnManager.setRowManager(this.rowManager); - - this.rowManager.setColumnManager(this.columnManager); - - this._buildElement(); - - this._loadInitialData(); - }; - - //clear pointers to objects in default config object - - Tabulator.prototype._clearObjectPointers = function () { - - this.options.columns = this.options.columns.slice(0); - - this.options.data = this.options.data.slice(0); - }; - - //build tabulator element - - Tabulator.prototype._buildElement = function () { - - var element = this.element, - mod = this.modules, - options = this.options; - - options.tableBuilding.call(this); - - element.classList.add("tabulator"); - - element.setAttribute("role", "grid"); - - //empty element - - while (element.firstChild) { - element.removeChild(element.firstChild); - } //set table height - - if (options.height) { - - options.height = isNaN(options.height) ? options.height : options.height + "px"; - - element.style.height = options.height; - } - - this.rowManager.initialize(); - - this._detectBrowser(); - - if (this.modExists("layout", true)) { - - mod.layout.initialize(options.layout); - } - - //set localization - - if (options.headerFilterPlaceholder !== false) { - - mod.localize.setHeaderFilterPlaceholder(options.headerFilterPlaceholder); - } - - for (var locale in options.langs) { - - mod.localize.installLang(locale, options.langs[locale]); - } - - mod.localize.setLocale(options.locale); - - //configure placeholder element - - if (typeof options.placeholder == "string") { - - var el = document.createElement("div"); - - el.classList.add("tabulator-placeholder"); - - var span = document.createElement("span"); - - span.innerHTML = options.placeholder; - - el.appendChild(span); - - options.placeholder = el; - } - - //build table elements - - element.appendChild(this.columnManager.getElement()); - - element.appendChild(this.rowManager.getElement()); - - if (options.footerElement) { - - this.footerManager.activate(); - } - - if (options.dataTree && this.modExists("dataTree", true)) { - - mod.dataTree.initialize(); - } - - if ((options.persistentLayout || options.persistentSort || options.persistentFilter) && this.modExists("persistence", true)) { - - mod.persistence.initialize(options.persistenceMode, options.persistenceID); - } - - if (options.persistentLayout && this.modExists("persistence", true)) { - - options.columns = mod.persistence.load("columns", options.columns); - } - - if (options.movableRows && this.modExists("moveRow")) { - - mod.moveRow.initialize(); - } - - if (this.modExists("columnCalcs")) { - - mod.columnCalcs.initialize(); - } - - this.columnManager.setColumns(options.columns); - - if (this.modExists("frozenRows")) { - - this.modules.frozenRows.initialize(); - } - - if ((options.persistentSort || options.initialSort) && this.modExists("sort", true)) { - - var sorters = []; - - if (options.persistentSort && this.modExists("persistence", true)) { - - sorters = mod.persistence.load("sort"); - - if (sorters === false && options.initialSort) { - - sorters = options.initialSort; - } - } else if (options.initialSort) { - - sorters = options.initialSort; - } - - mod.sort.setSort(sorters); - } - - if ((options.persistentFilter || options.initialFilter) && this.modExists("filter", true)) { - - var filters = []; - - if (options.persistentFilter && this.modExists("persistence", true)) { - - filters = mod.persistence.load("filter"); - - if (filters === false && options.initialFilter) { - - filters = options.initialFilter; - } - } else if (options.initialFilter) { - - filters = options.initialFilter; - } - - mod.filter.setFilter(filters); - - // this.setFilter(filters); - } - - if (this.modExists("ajax")) { - - mod.ajax.initialize(); - } - - if (options.pagination && this.modExists("page", true)) { - - mod.page.initialize(); - } - - if (options.groupBy && this.modExists("groupRows", true)) { - - mod.groupRows.initialize(); - } - - if (this.modExists("keybindings")) { - - mod.keybindings.initialize(); - } - - if (this.modExists("selectRow")) { - - mod.selectRow.clearSelectionData(true); - } - - if (options.autoResize && this.modExists("resizeTable")) { - - mod.resizeTable.initialize(); - } - - if (this.modExists("clipboard")) { - - mod.clipboard.initialize(); - } - - options.tableBuilt.call(this); - }; - - Tabulator.prototype._loadInitialData = function () { - - var self = this; - - if (self.options.pagination && self.modExists("page")) { - - self.modules.page.reset(true); - - if (self.options.pagination == "local") { - - if (self.options.data.length) { - - self.rowManager.setData(self.options.data); - } else { - - if ((self.options.ajaxURL || self.options.ajaxURLGenerator) && self.modExists("ajax")) { - - self.modules.ajax.loadData(); - } else { - - self.rowManager.setData(self.options.data); - } - } - } else { - - self.modules.page.setPage(1); - } - } else { - - if (self.options.data.length) { - - self.rowManager.setData(self.options.data); - } else { - - if ((self.options.ajaxURL || self.options.ajaxURLGenerator) && self.modExists("ajax")) { - - self.modules.ajax.loadData(); - } else { - - self.rowManager.setData(self.options.data); - } - } - } - }; - - //deconstructor - - Tabulator.prototype.destroy = function () { - - var element = this.element; - - Tabulator.prototype.comms.deregister(this); //deregister table from inderdevice communication - - - //clear row data - - this.rowManager.rows.forEach(function (row) { - - row.wipe(); - }); - - this.rowManager.rows = []; - - this.rowManager.activeRows = []; - - this.rowManager.displayRows = []; - - //clear event bindings - - if (this.options.autoResize && this.modExists("resizeTable")) { - - this.modules.resizeTable.clearBindings(); - } - - if (this.modExists("keybindings")) { - - this.modules.keybindings.clearBindings(); - } - - //clear DOM - - while (element.firstChild) { - element.removeChild(element.firstChild); - }element.classList.remove("tabulator"); - }; - - Tabulator.prototype._detectBrowser = function () { - - var ua = navigator.userAgent; - - if (ua.indexOf("Trident") > -1) { - - this.browser = "ie"; - - this.browserSlow = true; - } else if (ua.indexOf("Edge") > -1) { - - this.browser = "edge"; - - this.browserSlow = true; - } else if (ua.indexOf("Firefox") > -1) { - - this.browser = "firefox"; - - this.browserSlow = false; - } else { - - this.browser = "other"; - - this.browserSlow = false; - } - }; - - ////////////////// Data Handling ////////////////// - - - //load data - - Tabulator.prototype.setData = function (data, params, config) { - - if (this.modExists("ajax")) { - - this.modules.ajax.blockActiveRequest(); - } - - return this._setData(data, params, config); - }; - - Tabulator.prototype._setData = function (data, params, config, inPosition) { - - var self = this; - - if (typeof data === "string") { - - if (data.indexOf("{") == 0 || data.indexOf("[") == 0) { - - //data is a json encoded string - - return self.rowManager.setData(JSON.parse(data), inPosition); - } else { - - if (self.modExists("ajax", true)) { - - if (params) { - - self.modules.ajax.setParams(params); - } - - if (config) { - - self.modules.ajax.setConfig(config); - } - - self.modules.ajax.setUrl(data); - - if (self.options.pagination == "remote" && self.modExists("page", true)) { - - self.modules.page.reset(true); - - return self.modules.page.setPage(1); - } else { - - //assume data is url, make ajax call to url to get data - - return self.modules.ajax.loadData(inPosition); - } - } - } - } else { - - if (data) { - - //asume data is already an object - - return self.rowManager.setData(data, inPosition); - } else { - - //no data provided, check if ajaxURL is present; - - if (self.modExists("ajax") && (self.modules.ajax.getUrl || self.options.ajaxURLGenerator)) { - - if (self.options.pagination == "remote" && self.modExists("page", true)) { - - self.modules.page.reset(true); - - return self.modules.page.setPage(1); - } else { - - return self.modules.ajax.loadData(inPosition); - } - } else { - - //empty data - - return self.rowManager.setData([], inPosition); - } - } - } - }; - - //clear data - - Tabulator.prototype.clearData = function () { - - if (this.modExists("ajax")) { - - this.modules.ajax.blockActiveRequest(); - } - - this.rowManager.clearData(); - }; - - //get table data array - - Tabulator.prototype.getData = function (active) { - - return this.rowManager.getData(active); - }; - - //get table data array count - - Tabulator.prototype.getDataCount = function (active) { - - return this.rowManager.getDataCount(active); - }; - - //search for specific row components - - Tabulator.prototype.searchRows = function (field, type, value) { - - if (this.modExists("filter", true)) { - - return this.modules.filter.search("rows", field, type, value); - } - }; - - //search for specific data - - Tabulator.prototype.searchData = function (field, type, value) { - - if (this.modExists("filter", true)) { - - return this.modules.filter.search("data", field, type, value); - } - }; - - //get table html - - Tabulator.prototype.getHtml = function (active) { - - return this.rowManager.getHtml(active); - }; - - //retrieve Ajax URL - - Tabulator.prototype.getAjaxUrl = function () { - - if (this.modExists("ajax", true)) { - - return this.modules.ajax.getUrl(); - } - }; - - //replace data, keeping table in position with same sort - - Tabulator.prototype.replaceData = function (data, params, config) { - - if (this.modExists("ajax")) { - - this.modules.ajax.blockActiveRequest(); - } - - return this._setData(data, params, config, true); - }; - - //update table data - - Tabulator.prototype.updateData = function (data) { - var _this7 = this; - - var self = this; - - var responses = 0; - - return new Promise(function (resolve, reject) { - - if (_this7.modExists("ajax")) { - - _this7.modules.ajax.blockActiveRequest(); - } - - if (typeof data === "string") { - - data = JSON.parse(data); - } - - if (data) { - - data.forEach(function (item) { - - var row = self.rowManager.findRow(item[self.options.index]); - - if (row) { - - responses++; - - row.updateData(item).then(function () { - - responses--; - - if (!responses) { - - resolve(); - } - }); - } - }); - } else { - - console.warn("Update Error - No data provided"); - - reject("Update Error - No data provided"); - } - }); - }; - - Tabulator.prototype.addData = function (data, pos, index) { - var _this8 = this; - - return new Promise(function (resolve, reject) { - - if (_this8.modExists("ajax")) { - - _this8.modules.ajax.blockActiveRequest(); - } - - if (typeof data === "string") { - - data = JSON.parse(data); - } - - if (data) { - - _this8.rowManager.addRows(data, pos, index).then(function (rows) { - - var output = []; - - rows.forEach(function (row) { - - output.push(row.getComponent()); - }); - - resolve(output); - }); - } else { - - console.warn("Update Error - No data provided"); - - reject("Update Error - No data provided"); - } - }); - }; - - //update table data - - Tabulator.prototype.updateOrAddData = function (data) { - var _this9 = this; - - var self = this, - rows = [], - responses = 0; - - return new Promise(function (resolve, reject) { - - if (_this9.modExists("ajax")) { - - _this9.modules.ajax.blockActiveRequest(); - } - - if (typeof data === "string") { - - data = JSON.parse(data); - } - - if (data) { - - data.forEach(function (item) { - - var row = self.rowManager.findRow(item[self.options.index]); - - responses++; - - if (row) { - - row.updateData(item).then(function () { - - responses--; - - rows.push(row.getComponent()); - - if (!responses) { - - resolve(rows); - } - }); - } else { - - self.rowManager.addRows(item).then(function (newRows) { - - responses--; - - rows.push(newRows[0].getComponent()); - - if (!responses) { - - resolve(rows); - } - }); - } - }); - } else { - - console.warn("Update Error - No data provided"); - - reject("Update Error - No data provided"); - } - }); - }; - - //get row object - - Tabulator.prototype.getRow = function (index) { - - var row = this.rowManager.findRow(index); - - if (row) { - - return row.getComponent(); - } else { - - console.warn("Find Error - No matching row found:", index); - - return false; - } - }; - - //get row object - - Tabulator.prototype.getRowFromPosition = function (position, active) { - - var row = this.rowManager.getRowFromPosition(position, active); - - if (row) { - - return row.getComponent(); - } else { - - console.warn("Find Error - No matching row found:", position); - - return false; - } - }; - - //delete row from table - - Tabulator.prototype.deleteRow = function (index) { - var _this10 = this; - - return new Promise(function (resolve, reject) { - - var row = _this10.rowManager.findRow(index); - - if (row) { - - row.delete().then(function () { - - resolve(); - }).catch(function (err) { - - reject(err); - }); - } else { - - console.warn("Delete Error - No matching row found:", index); - - reject("Delete Error - No matching row found"); - } - }); - }; - - //add row to table - - Tabulator.prototype.addRow = function (data, pos, index) { - var _this11 = this; - - return new Promise(function (resolve, reject) { - - if (typeof data === "string") { - - data = JSON.parse(data); - } - - _this11.rowManager.addRows(data, pos, index).then(function (rows) { - - //recalc column calculations if present - - if (_this11.modExists("columnCalcs")) { - - _this11.modules.columnCalcs.recalc(_this11.rowManager.activeRows); - } - - resolve(rows[0].getComponent()); - }); - }); - }; - - //update a row if it exitsts otherwise create it - - Tabulator.prototype.updateOrAddRow = function (index, data) { - var _this12 = this; - - return new Promise(function (resolve, reject) { - - var row = _this12.rowManager.findRow(index); - - if (typeof data === "string") { - - data = JSON.parse(data); - } - - if (row) { - - row.updateData(data).then(function () { - - //recalc column calculations if present - - if (_this12.modExists("columnCalcs")) { - - _this12.modules.columnCalcs.recalc(_this12.rowManager.activeRows); - } - - resolve(row.getComponent()); - }).catch(function (err) { - - reject(err); - }); - } else { - - row = _this12.rowManager.addRows(data).then(function (rows) { - - //recalc column calculations if present - - if (_this12.modExists("columnCalcs")) { - - _this12.modules.columnCalcs.recalc(_this12.rowManager.activeRows); - } - - resolve(rows[0].getComponent()); - }).catch(function (err) { - - reject(err); - }); - } - }); - }; - - //update row data - - Tabulator.prototype.updateRow = function (index, data) { - var _this13 = this; - - return new Promise(function (resolve, reject) { - - var row = _this13.rowManager.findRow(index); - - if (typeof data === "string") { - - data = JSON.parse(data); - } - - if (row) { - - row.updateData(data).then(function () { - - resolve(row.getComponent()); - }).catch(function (err) { - - reject(err); - }); - } else { - - console.warn("Update Error - No matching row found:", index); - - reject("Update Error - No matching row found"); - } - }); - }; - - //scroll to row in DOM - - Tabulator.prototype.scrollToRow = function (index, position, ifVisible) { - var _this14 = this; - - return new Promise(function (resolve, reject) { - - var row = _this14.rowManager.findRow(index); - - if (row) { - - _this14.rowManager.scrollToRow(row, position, ifVisible).then(function () { - - resolve(); - }).catch(function (err) { - - reject(err); - }); - } else { - - console.warn("Scroll Error - No matching row found:", index); - - reject("Scroll Error - No matching row found"); - } - }); - }; - - Tabulator.prototype.getRows = function (active) { - - return this.rowManager.getComponents(active); - }; - - //get position of row in table - - Tabulator.prototype.getRowPosition = function (index, active) { - - var row = this.rowManager.findRow(index); - - if (row) { - - return this.rowManager.getRowPosition(row, active); - } else { - - console.warn("Position Error - No matching row found:", index); - - return false; - } - }; - - //copy table data to clipboard - - Tabulator.prototype.copyToClipboard = function (selector, selectorParams, formatter, formatterParams) { - - if (this.modExists("clipboard", true)) { - - this.modules.clipboard.copy(selector, selectorParams, formatter, formatterParams); - } - }; - - /////////////// Column Functions /////////////// - - - Tabulator.prototype.setColumns = function (definition) { - - this.columnManager.setColumns(definition); - }; - - Tabulator.prototype.getColumns = function (structured) { - - return this.columnManager.getComponents(structured); - }; - - Tabulator.prototype.getColumn = function (field) { - - var col = this.columnManager.findColumn(field); - - if (col) { - - return col.getComponent(); - } else { - - console.warn("Find Error - No matching column found:", field); - - return false; - } - }; - - Tabulator.prototype.getColumnDefinitions = function () { - - return this.columnManager.getDefinitionTree(); - }; - - Tabulator.prototype.getColumnLayout = function () { - - if (this.modExists("persistence", true)) { - - return this.modules.persistence.parseColumns(this.columnManager.getColumns()); - } - }; - - Tabulator.prototype.setColumnLayout = function (layout) { - - if (this.modExists("persistence", true)) { - - this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns, layout)); - - return true; - } - - return false; - }; - - Tabulator.prototype.showColumn = function (field) { - - var column = this.columnManager.findColumn(field); - - if (column) { - - column.show(); - - if (this.options.responsiveLayout && this.modExists("responsiveLayout", true)) { - - this.modules.responsiveLayout.update(); - } - } else { - - console.warn("Column Show Error - No matching column found:", field); - - return false; - } - }; - - Tabulator.prototype.hideColumn = function (field) { - - var column = this.columnManager.findColumn(field); - - if (column) { - - column.hide(); - - if (this.options.responsiveLayout && this.modExists("responsiveLayout", true)) { - - this.modules.responsiveLayout.update(); - } - } else { - - console.warn("Column Hide Error - No matching column found:", field); - - return false; - } - }; - - Tabulator.prototype.toggleColumn = function (field) { - - var column = this.columnManager.findColumn(field); - - if (column) { - - if (column.visible) { - - column.hide(); - } else { - - column.show(); - } - } else { - - console.warn("Column Visibility Toggle Error - No matching column found:", field); - - return false; - } - }; - - Tabulator.prototype.addColumn = function (definition, before, field) { - - var column = this.columnManager.findColumn(field); - - this.columnManager.addColumn(definition, before, column); - }; - - Tabulator.prototype.deleteColumn = function (field) { - - var column = this.columnManager.findColumn(field); - - if (column) { - - column.delete(); - } else { - - console.warn("Column Delete Error - No matching column found:", field); - - return false; - } - }; - - //scroll to column in DOM - - Tabulator.prototype.scrollToColumn = function (field, position, ifVisible) { - var _this15 = this; - - return new Promise(function (resolve, reject) { - - var column = _this15.columnManager.findColumn(field); - - if (column) { - - _this15.columnManager.scrollToColumn(column, position, ifVisible).then(function () { - - resolve(); - }).catch(function (err) { - - reject(err); - }); - } else { - - console.warn("Scroll Error - No matching column found:", field); - - reject("Scroll Error - No matching column found"); - } - }); - }; - - //////////// Localization Functions //////////// - - Tabulator.prototype.setLocale = function (locale) { - - this.modules.localize.setLocale(locale); - }; - - Tabulator.prototype.getLocale = function () { - - return this.modules.localize.getLocale(); - }; - - Tabulator.prototype.getLang = function (locale) { - - return this.modules.localize.getLang(locale); - }; - - //////////// General Public Functions //////////// - - - //redraw list without updating data - - Tabulator.prototype.redraw = function (force) { - - this.columnManager.redraw(force); - - this.rowManager.redraw(force); - }; - - Tabulator.prototype.setHeight = function (height) { - - this.options.height = isNaN(height) ? height : height + "px"; - - this.element.style.height = this.options.height; - - this.rowManager.redraw(); - }; - - ///////////////////// Sorting //////////////////// - - - //trigger sort - - Tabulator.prototype.setSort = function (sortList, dir) { - - if (this.modExists("sort", true)) { - - this.modules.sort.setSort(sortList, dir); - - this.rowManager.sorterRefresh(); - } - }; - - Tabulator.prototype.getSorters = function () { - - if (this.modExists("sort", true)) { - - return this.modules.sort.getSort(); - } - }; - - Tabulator.prototype.clearSort = function () { - - if (this.modExists("sort", true)) { - - this.modules.sort.clear(); - - this.rowManager.sorterRefresh(); - } - }; - - ///////////////////// Filtering //////////////////// - - - //set standard filters - - Tabulator.prototype.setFilter = function (field, type, value) { - - if (this.modExists("filter", true)) { - - this.modules.filter.setFilter(field, type, value); - - this.rowManager.filterRefresh(); - } - }; - - //add filter to array - - Tabulator.prototype.addFilter = function (field, type, value) { - - if (this.modExists("filter", true)) { - - this.modules.filter.addFilter(field, type, value); - - this.rowManager.filterRefresh(); - } - }; - - //get all filters - - Tabulator.prototype.getFilters = function (all) { - - if (this.modExists("filter", true)) { - - return this.modules.filter.getFilters(all); - } - }; - - Tabulator.prototype.setHeaderFilterFocus = function (field) { - - if (this.modExists("filter", true)) { - - var column = this.columnManager.findColumn(field); - - if (column) { - - this.modules.filter.setHeaderFilterFocus(column); - } else { - - console.warn("Column Filter Focus Error - No matching column found:", field); - - return false; - } - } - }; - - Tabulator.prototype.setHeaderFilterValue = function (field, value) { - - if (this.modExists("filter", true)) { - - var column = this.columnManager.findColumn(field); - - if (column) { - - this.modules.filter.setHeaderFilterValue(column, value); - } else { - - console.warn("Column Filter Error - No matching column found:", field); - - return false; - } - } - }; - - Tabulator.prototype.getHeaderFilters = function () { - - if (this.modExists("filter", true)) { - - return this.modules.filter.getHeaderFilters(); - } - }; - - //remove filter from array - - Tabulator.prototype.removeFilter = function (field, type, value) { - - if (this.modExists("filter", true)) { - - this.modules.filter.removeFilter(field, type, value); - - this.rowManager.filterRefresh(); - } - }; - - //clear filters - - Tabulator.prototype.clearFilter = function (all) { - - if (this.modExists("filter", true)) { - - this.modules.filter.clearFilter(all); - - this.rowManager.filterRefresh(); - } - }; - - //clear header filters - - Tabulator.prototype.clearHeaderFilter = function () { - - if (this.modExists("filter", true)) { - - this.modules.filter.clearHeaderFilter(); - - this.rowManager.filterRefresh(); - } - }; - - ///////////////////// Filtering //////////////////// - - Tabulator.prototype.selectRow = function (rows) { - - if (this.modExists("selectRow", true)) { - - this.modules.selectRow.selectRows(rows); - } - }; - - Tabulator.prototype.deselectRow = function (rows) { - - if (this.modExists("selectRow", true)) { - - this.modules.selectRow.deselectRows(rows); - } - }; - - Tabulator.prototype.toggleSelectRow = function (row) { - - if (this.modExists("selectRow", true)) { - - this.modules.selectRow.toggleRow(row); - } - }; - - Tabulator.prototype.getSelectedRows = function () { - - if (this.modExists("selectRow", true)) { - - return this.modules.selectRow.getSelectedRows(); - } - }; - - Tabulator.prototype.getSelectedData = function () { - - if (this.modExists("selectRow", true)) { - - return this.modules.selectRow.getSelectedData(); - } - }; - - //////////// Pagination Functions //////////// - - - Tabulator.prototype.setMaxPage = function (max) { - - if (this.options.pagination && this.modExists("page")) { - - this.modules.page.setMaxPage(max); - } else { - - return false; - } - }; - - Tabulator.prototype.setPage = function (page) { - - if (this.options.pagination && this.modExists("page")) { - - this.modules.page.setPage(page); - } else { - - return false; - } - }; - - Tabulator.prototype.setPageSize = function (size) { - - if (this.options.pagination && this.modExists("page")) { - - this.modules.page.setPageSize(size); - - this.modules.page.setPage(1); - } else { - - return false; - } - }; - - Tabulator.prototype.getPageSize = function () { - - if (this.options.pagination && this.modExists("page", true)) { - - return this.modules.page.getPageSize(); - } - }; - - Tabulator.prototype.previousPage = function () { - - if (this.options.pagination && this.modExists("page")) { - - this.modules.page.previousPage(); - } else { - - return false; - } - }; - - Tabulator.prototype.nextPage = function () { - - if (this.options.pagination && this.modExists("page")) { - - this.modules.page.nextPage(); - } else { - - return false; - } - }; - - Tabulator.prototype.getPage = function () { - - if (this.options.pagination && this.modExists("page")) { - - return this.modules.page.getPage(); - } else { - - return false; - } - }; - - Tabulator.prototype.getPageMax = function () { - - if (this.options.pagination && this.modExists("page")) { - - return this.modules.page.getPageMax(); - } else { - - return false; - } - }; - - ///////////////// Grouping Functions /////////////// - - - Tabulator.prototype.setGroupBy = function (groups) { - - if (this.modExists("groupRows", true)) { - - this.options.groupBy = groups; - - this.modules.groupRows.initialize(); - - this.rowManager.refreshActiveData("display"); - } else { - - return false; - } - }; - - Tabulator.prototype.setGroupStartOpen = function (values) { - - if (this.modExists("groupRows", true)) { - - this.options.groupStartOpen = values; - - this.modules.groupRows.initialize(); - - if (this.options.groupBy) { - - this.rowManager.refreshActiveData("group"); - } else { - - console.warn("Grouping Update - cant refresh view, no groups have been set"); - } - } else { - - return false; - } - }; - - Tabulator.prototype.setGroupHeader = function (values) { - - if (this.modExists("groupRows", true)) { - - this.options.groupHeader = values; - - this.modules.groupRows.initialize(); - - if (this.options.groupBy) { - - this.rowManager.refreshActiveData("group"); - } else { - - console.warn("Grouping Update - cant refresh view, no groups have been set"); - } - } else { - - return false; - } - }; - - Tabulator.prototype.getGroups = function (values) { - - if (this.modExists("groupRows", true)) { - - return this.modules.groupRows.getGroups(true); - } else { - - return false; - } - }; - - // get grouped table data in the same format as getData() - - Tabulator.prototype.getGroupedData = function () { - - if (this.modExists("groupRows", true)) { - - return this.options.groupBy ? this.modules.groupRows.getGroupedData() : this.getData(); - } - }; - - ///////////////// Column Calculation Functions /////////////// - - Tabulator.prototype.getCalcResults = function () { - - if (this.modExists("columnCalcs", true)) { - - return this.modules.columnCalcs.getResults(); - } else { - - return false; - } - }; - - /////////////// Navigation Management ////////////// - - - Tabulator.prototype.navigatePrev = function () { - - var cell = false; - - if (this.modExists("edit", true)) { - - cell = this.modules.edit.currentCell; - - if (cell) { - - e.preventDefault(); - - return cell.nav().prev(); - } - } - - return false; - }; - - Tabulator.prototype.navigateNext = function () { - - var cell = false; - - if (this.modExists("edit", true)) { - - cell = this.modules.edit.currentCell; - - if (cell) { - - e.preventDefault(); - - return cell.nav().next(); - } - } - - return false; - }; - - Tabulator.prototype.navigateLeft = function () { - - var cell = false; - - if (this.modExists("edit", true)) { - - cell = this.modules.edit.currentCell; - - if (cell) { - - e.preventDefault(); - - return cell.nav().left(); - } - } - - return false; - }; - - Tabulator.prototype.navigateRight = function () { - - var cell = false; - - if (this.modExists("edit", true)) { - - cell = this.modules.edit.currentCell; - - if (cell) { - - e.preventDefault(); - - return cell.nav().right(); - } - } - - return false; - }; - - Tabulator.prototype.navigateUp = function () { - - var cell = false; - - if (this.modExists("edit", true)) { - - cell = this.modules.edit.currentCell; - - if (cell) { - - e.preventDefault(); - - return cell.nav().up(); - } - } - - return false; - }; - - Tabulator.prototype.navigateDown = function () { - - var cell = false; - - if (this.modExists("edit", true)) { - - cell = this.modules.edit.currentCell; - - if (cell) { - - e.preventDefault(); - - return cell.nav().dpwn(); - } - } - - return false; - }; - - /////////////// History Management ////////////// - - Tabulator.prototype.undo = function () { - - if (this.options.history && this.modExists("history", true)) { - - return this.modules.history.undo(); - } else { - - return false; - } - }; - - Tabulator.prototype.redo = function () { - - if (this.options.history && this.modExists("history", true)) { - - return this.modules.history.redo(); - } else { - - return false; - } - }; - - Tabulator.prototype.getHistoryUndoSize = function () { - - if (this.options.history && this.modExists("history", true)) { - - return this.modules.history.getHistoryUndoSize(); - } else { - - return false; - } - }; - - Tabulator.prototype.getHistoryRedoSize = function () { - - if (this.options.history && this.modExists("history", true)) { - - return this.modules.history.getHistoryRedoSize(); - } else { - - return false; - } - }; - - /////////////// Download Management ////////////// - - - Tabulator.prototype.download = function (type, filename, options) { - - if (this.modExists("download", true)) { - - this.modules.download.download(type, filename, options); - } - }; - - /////////// Inter Table Communications /////////// - - - Tabulator.prototype.tableComms = function (table, module, action, data) { - - this.modules.comms.receive(table, module, action, data); - }; - - ////////////// Extension Management ////////////// - - - //object to hold module - - Tabulator.prototype.moduleBindings = {}; - - //extend module - - Tabulator.prototype.extendModule = function (name, property, values) { - - if (Tabulator.prototype.moduleBindings[name]) { - - var source = Tabulator.prototype.moduleBindings[name].prototype[property]; - - if (source) { - - if ((typeof values === 'undefined' ? 'undefined' : _typeof(values)) == "object") { - - for (var key in values) { - - source[key] = values[key]; - } - } else { - - console.warn("Module Error - Invalid value type, it must be an object"); - } - } else { - - console.warn("Module Error - property does not exist:", property); - } - } else { - - console.warn("Module Error - module does not exist:", name); - } - }; - - //add module to tabulator - - Tabulator.prototype.registerModule = function (name, module) { - - var self = this; - - Tabulator.prototype.moduleBindings[name] = module; - }; - - //ensure that module are bound to instantiated function - - Tabulator.prototype.bindModules = function () { - - this.modules = {}; - - for (var name in Tabulator.prototype.moduleBindings) { - - this.modules[name] = new Tabulator.prototype.moduleBindings[name](this); - } - }; - - //Check for module - - Tabulator.prototype.modExists = function (plugin, required) { - - if (this.modules[plugin]) { - - return true; - } else { - - if (required) { - - console.error("Tabulator Module Not Installed: " + plugin); - } - - return false; - } - }; - - Tabulator.prototype.helpers = { - - elVisible: function elVisible(el) { - - return !(el.offsetWidth <= 0 && el.offsetHeight <= 0); - }, - - elOffset: function elOffset(el) { - - var box = el.getBoundingClientRect(); - - return { - - top: box.top + window.pageYOffset - document.documentElement.clientTop, - - left: box.left + window.pageXOffset - document.documentElement.clientLeft - - }; - }, - - deepClone: function deepClone(obj) { - - var clone = Array.isArray(obj) ? [] : {}; - - for (var i in obj) { - - if (obj[i] != null && _typeof(obj[i]) === "object") { - - if (obj[i] instanceof Date) { - - clone[i] = new Date(obj[i]); - } else { - - clone[i] = this.deepClone(obj[i]); - } - } else { - - clone[i] = obj[i]; - } - } - - return clone; - } - - }; - - Tabulator.prototype.comms = { - - tables: [], - - register: function register(table) { - - Tabulator.prototype.comms.tables.push(table); - }, - - deregister: function deregister(table) { - - var index = Tabulator.prototype.comms.tables.indexOf(table); - - if (index > -1) { - - Tabulator.prototype.comms.tables.splice(index, 1); - } - }, - - lookupTable: function lookupTable(query) { - - var results = [], - matches, - match; - - if (typeof query === "string") { - - matches = document.querySelectorAll(query); - - if (matches.length) { - - for (var i = 0; i < matches.length; i++) { - - match = Tabulator.prototype.comms.matchElement(matches[i]); - - if (match) { - - results.push(match); - } - } - } - } else if (query instanceof HTMLElement || query instanceof Tabulator) { - - match = Tabulator.prototype.comms.matchElement(query); - - if (match) { - - results.push(match); - } - } else if (Array.isArray(query)) { - - query.forEach(function (item) { - - results = results.concat(Tabulator.prototype.comms.lookupTable(item)); - }); - } else { - - console.warn("Table Connection Error - Invalid Selector", query); - } - - return results; - }, - - matchElement: function matchElement(element) { - - return Tabulator.prototype.comms.tables.find(function (table) { - - return element instanceof Tabulator ? table === element : table.element === element; - }); - } - - }; - - var Layout = function Layout(table) { - - this.table = table; - - this.mode = null; - }; - - //initialize layout system - - - Layout.prototype.initialize = function (layout) { - - if (this.modes[layout]) { - - this.mode = layout; - } else { - - console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : " + layout); - - this.mode = 'fitData'; - } - - this.table.element.setAttribute("tabulator-layout", this.mode); - }; - - Layout.prototype.getMode = function () { - - return this.mode; - }; - - //trigger table layout - - - Layout.prototype.layout = function () { - - this.modes[this.mode].call(this, this.table.columnManager.columnsByIndex); - }; - - //layout render functions - - - Layout.prototype.modes = { - - //resize columns to fit data the contain - - - "fitData": function fitData(columns) { - - columns.forEach(function (column) { - - column.reinitializeWidth(); - }); - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.update(); - } - }, - - //resize columns to fit data the contain - - - "fitDataFill": function fitDataFill(columns) { - - columns.forEach(function (column) { - - column.reinitializeWidth(); - }); - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.update(); - } - }, - - //resize columns to fit - - - "fitColumns": function fitColumns(columns) { - - var self = this; - - var totalWidth = self.table.element.clientWidth; //table element width - - - var fixedWidth = 0; //total width of columns with a defined width - - - var flexWidth = 0; //total width available to flexible columns - - - var flexGrowUnits = 0; //total number of widthGrow blocks accross all columns - - - var flexColWidth = 0; //desired width of flexible columns - - - var flexColumns = []; //array of flexible width columns - - - var fixedShrinkColumns = []; //array of fixed width columns that can shrink - - - var flexShrinkUnits = 0; //total number of widthShrink blocks accross all columns - - - var overflowWidth = 0; //horizontal overflow width - - - var gapFill = 0; //number of pixels to be added to final column to close and half pixel gaps - - - function calcWidth(width) { - - var colWidth; - - if (typeof width == "string") { - - if (width.indexOf("%") > -1) { - - colWidth = totalWidth / 100 * parseInt(width); - } else { - - colWidth = parseInt(width); - } - } else { - - colWidth = width; - } - - return colWidth; - } - - //ensure columns resize to take up the correct amount of space - - - function scaleColumns(columns, freeSpace, colWidth, shrinkCols) { - - var oversizeCols = [], - oversizeSpace = 0, - remainingSpace = 0, - nextColWidth = 0, - gap = 0, - changeUnits = 0, - undersizeCols = []; - - function calcGrow(col) { - - return colWidth * (col.column.definition.widthGrow || 1); - } - - function calcShrink(col) { - - return calcWidth(col.width) - colWidth * (col.column.definition.widthShrink || 0); - } - - columns.forEach(function (col, i) { - - var width = shrinkCols ? calcShrink(col) : calcGrow(col); - - if (col.column.minWidth >= width) { - - oversizeCols.push(col); - } else { - - undersizeCols.push(col); - - changeUnits += shrinkCols ? col.column.definition.widthShrink || 1 : col.column.definition.widthGrow || 1; - } - }); - - if (oversizeCols.length) { - - oversizeCols.forEach(function (col) { - - oversizeSpace += shrinkCols ? col.width - col.column.minWidth : col.column.minWidth; - - col.width = col.column.minWidth; - }); - - remainingSpace = freeSpace - oversizeSpace; - - nextColWidth = changeUnits ? Math.floor(remainingSpace / changeUnits) : remainingSpace; - - gap = remainingSpace - nextColWidth * changeUnits; - - gap += scaleColumns(undersizeCols, remainingSpace, nextColWidth, shrinkCols); - } else { - - gap = changeUnits ? freeSpace - Math.floor(freeSpace / changeUnits) * changeUnits : freeSpace; - - undersizeCols.forEach(function (column) { - - column.width = shrinkCols ? calcShrink(column) : calcGrow(column); - }); - } - - return gap; - } - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.update(); - } - - //adjust for vertical scrollbar if present - - - if (this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight) { - - totalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth; - } - - columns.forEach(function (column) { - - var width, minWidth, colWidth; - - if (column.visible) { - - width = column.definition.width; - - minWidth = parseInt(column.minWidth); - - if (width) { - - colWidth = calcWidth(width); - - fixedWidth += colWidth > minWidth ? colWidth : minWidth; - - if (column.definition.widthShrink) { - - fixedShrinkColumns.push({ - - column: column, - - width: colWidth > minWidth ? colWidth : minWidth - - }); - - flexShrinkUnits += column.definition.widthShrink; - } - } else { - - flexColumns.push({ - - column: column, - - width: 0 - - }); - - flexGrowUnits += column.definition.widthGrow || 1; - } - } - }); - - //calculate available space - - - flexWidth = totalWidth - fixedWidth; - - //calculate correct column size - - - flexColWidth = Math.floor(flexWidth / flexGrowUnits); - - //generate column widths - - - var gapFill = scaleColumns(flexColumns, flexWidth, flexColWidth, false); - - //increase width of last column to account for rounding errors - - - if (flexColumns.length && gapFill > 0) { - - flexColumns[flexColumns.length - 1].width += +gapFill; - } - - //caculate space for columns to be shrunk into - - - flexColumns.forEach(function (col) { - - flexWidth -= col.width; - }); - - overflowWidth = Math.abs(gapFill) + flexWidth; - - //shrink oversize columns if there is no available space - - - if (overflowWidth > 0 && flexShrinkUnits) { - - gapFill = scaleColumns(fixedShrinkColumns, overflowWidth, Math.floor(overflowWidth / flexShrinkUnits), true); - } - - //decrease width of last column to account for rounding errors - - - if (fixedShrinkColumns.length) { - - fixedShrinkColumns[fixedShrinkColumns.length - 1].width -= gapFill; - } - - flexColumns.forEach(function (col) { - - col.column.setWidth(col.width); - }); - - fixedShrinkColumns.forEach(function (col) { - - col.column.setWidth(col.width); - }); - } - - }; - - Tabulator.prototype.registerModule("layout", Layout); - - var Localize = function Localize(table) { - - this.table = table; //hold Tabulator object - - this.locale = "default"; //current locale - - this.lang = false; //current language - - this.bindings = {}; //update events to call when locale is changed - }; - - //set header placehoder - - Localize.prototype.setHeaderFilterPlaceholder = function (placeholder) { - - this.langs.default.headerFilters.default = placeholder; - }; - - //set header filter placeholder by column - - Localize.prototype.setHeaderFilterColumnPlaceholder = function (column, placeholder) { - - this.langs.default.headerFilters.columns[column] = placeholder; - - if (this.lang && !this.lang.headerFilters.columns[column]) { - - this.lang.headerFilters.columns[column] = placeholder; - } - }; - - //setup a lang description object - - Localize.prototype.installLang = function (locale, lang) { - - if (this.langs[locale]) { - - this._setLangProp(this.langs[locale], lang); - } else { - - this.langs[locale] = lang; - } - }; - - Localize.prototype._setLangProp = function (lang, values) { - - for (var key in values) { - - if (lang[key] && _typeof(lang[key]) == "object") { - - this._setLangProp(lang[key], values[key]); - } else { - - lang[key] = values[key]; - } - } - }; - - //set current locale - - Localize.prototype.setLocale = function (desiredLocale) { - - var self = this; - - desiredLocale = desiredLocale || "default"; - - //fill in any matching languge values - - function traverseLang(trans, path) { - - for (var prop in trans) { - - if (_typeof(trans[prop]) == "object") { - - if (!path[prop]) { - - path[prop] = {}; - } - - traverseLang(trans[prop], path[prop]); - } else { - - path[prop] = trans[prop]; - } - } - } - - //determing correct locale to load - - if (desiredLocale === true && navigator.language) { - - //get local from system - - desiredLocale = navigator.language.toLowerCase(); - } - - if (desiredLocale) { - - //if locale is not set, check for matching top level locale else use default - - if (!self.langs[desiredLocale]) { - - var prefix = desiredLocale.split("-")[0]; - - if (self.langs[prefix]) { - - console.warn("Localization Error - Exact matching locale not found, using closest match: ", desiredLocale, prefix); - - desiredLocale = prefix; - } else { - - console.warn("Localization Error - Matching locale not found, using default: ", desiredLocale); - - desiredLocale = "default"; - } - } - } - - self.locale = desiredLocale; - - //load default lang template - - self.lang = Tabulator.prototype.helpers.deepClone(self.langs.default || {}); - - if (desiredLocale != "default") { - - traverseLang(self.langs[desiredLocale], self.lang); - } - - self.table.options.localized.call(self.table, self.locale, self.lang); - - self._executeBindings(); - }; - - //get current locale - - Localize.prototype.getLocale = function (locale) { - - return self.locale; - }; - - //get lang object for given local or current if none provided - - Localize.prototype.getLang = function (locale) { - - return locale ? this.langs[locale] : this.lang; - }; - - //get text for current locale - - Localize.prototype.getText = function (path, value) { - - var path = value ? path + "|" + value : path, - pathArray = path.split("|"), - text = this._getLangElement(pathArray, this.locale); - - // if(text === false){ - - // console.warn("Localization Error - Matching localized text not found for given path: ", path); - - // } - - - return text || ""; - }; - - //traverse langs object and find localized copy - - Localize.prototype._getLangElement = function (path, locale) { - - var self = this; - - var root = self.lang; - - path.forEach(function (level) { - - var rootPath; - - if (root) { - - rootPath = root[level]; - - if (typeof rootPath != "undefined") { - - root = rootPath; - } else { - - root = false; - } - } - }); - - return root; - }; - - //set update binding - - Localize.prototype.bind = function (path, callback) { - - if (!this.bindings[path]) { - - this.bindings[path] = []; - } - - this.bindings[path].push(callback); - - callback(this.getText(path), this.lang); - }; - - //itterate through bindings and trigger updates - - Localize.prototype._executeBindings = function () { - - var self = this; - - var _loop = function _loop(path) { - - self.bindings[path].forEach(function (binding) { - - binding(self.getText(path), self.lang); - }); - }; - - for (var path in self.bindings) { - _loop(path); - } - }; - - //Localized text listings - - Localize.prototype.langs = { - - "default": { //hold default locale text - - "groups": { - - "item": "item", - - "items": "items" - - }, - - "columns": {}, - - "ajax": { - - "loading": "Loading", - - "error": "Error" - - }, - - "pagination": { - - "first": "First", - - "first_title": "First Page", - - "last": "Last", - - "last_title": "Last Page", - - "prev": "Prev", - - "prev_title": "Prev Page", - - "next": "Next", - - "next_title": "Next Page" - - }, - - "headerFilters": { - - "default": "filter column...", - - "columns": {} - - } - - } - - }; - - Tabulator.prototype.registerModule("localize", Localize); - - var Comms = function Comms(table) { - - this.table = table; - }; - - Comms.prototype.getConnections = function (selectors) { - - var self = this, - connections = [], - connection; - - connection = Tabulator.prototype.comms.lookupTable(selectors); - - connection.forEach(function (con) { - - if (self.table !== con) { - - connections.push(con); - } - }); - - return connections; - }; - - Comms.prototype.send = function (selectors, module, action, data) { - - var self = this, - connections = this.getConnections(selectors); - - connections.forEach(function (connection) { - - connection.tableComms(self.table.element, module, action, data); - }); - - if (!connections.length && selectors) { - - console.warn("Table Connection Error - No tables matching selector found", selectors); - } - }; - - Comms.prototype.receive = function (table, module, action, data) { - - if (this.table.modExists(module)) { - - return this.table.modules[module].commsReceived(table, action, data); - } else { - - console.warn("Inter-table Comms Error - no such module:", module); - } - }; - - Tabulator.prototype.registerModule("comms", Comms); - - var Accessor = function Accessor(table) { - this.table = table; //hold Tabulator object - this.allowedTypes = ["", "data", "download", "clipboard"]; //list of accessor types - }; - - //initialize column accessor - Accessor.prototype.initializeColumn = function (column) { - var self = this, - match = false, - config = {}; - - this.allowedTypes.forEach(function (type) { - var key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)), - accessor; - - if (column.definition[key]) { - accessor = self.lookupAccessor(column.definition[key]); - - if (accessor) { - match = true; - - config[key] = { - accessor: accessor, - params: column.definition[key + "Params"] || {} - }; - } - } - }); - - if (match) { - column.modules.accessor = config; - } - }, Accessor.prototype.lookupAccessor = function (value) { - var accessor = false; - - //set column accessor - switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { - case "string": - if (this.accessors[value]) { - accessor = this.accessors[value]; - } else { - console.warn("Accessor Error - No such accessor found, ignoring: ", value); - } - break; - - case "function": - accessor = value; - break; - } - - return accessor; - }; - - //apply accessor to row - Accessor.prototype.transformRow = function (dataIn, type) { - var self = this, - key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)); - - //clone data object with deep copy to isolate internal data from returned result - var data = Tabulator.prototype.helpers.deepClone(dataIn || {}); - - self.table.columnManager.traverse(function (column) { - var value, accessor, params, component; - - if (column.modules.accessor) { - - accessor = column.modules.accessor[key] || column.modules.accessor.accessor || false; - - if (accessor) { - value = column.getFieldValue(data); - - if (value != "undefined") { - component = column.getComponent(); - params = typeof accessor.params === "function" ? accessor.params(value, data, type, component) : accessor.params; - column.setFieldValue(data, accessor.accessor(value, data, type, params, component)); - } - } - } - }); - - return data; - }, - - //default accessors - Accessor.prototype.accessors = {}; - - Tabulator.prototype.registerModule("accessor", Accessor); - var Ajax = function Ajax(table) { - - this.table = table; //hold Tabulator object - this.config = false; //hold config object for ajax request - this.url = ""; //request URL - this.urlGenerator = false; - this.params = false; //request parameters - - this.loaderElement = this.createLoaderElement(); //loader message div - this.msgElement = this.createMsgElement(); //message element - this.loadingElement = false; - this.errorElement = false; - this.loaderPromise = false; - - this.progressiveLoad = false; - this.loading = false; - - this.requestOrder = 0; //prevent requests comming out of sequence if overridden by another load request - }; - - //initialize setup options - Ajax.prototype.initialize = function () { - this.loaderElement.appendChild(this.msgElement); - - if (this.table.options.ajaxLoaderLoading) { - this.loadingElement = this.table.options.ajaxLoaderLoading; - } - - this.loaderPromise = this.table.options.ajaxRequestFunc || this.defaultLoaderPromise; - - this.urlGenerator = this.table.options.ajaxURLGenerator || this.defaultURLGenerator; - - if (this.table.options.ajaxLoaderError) { - this.errorElement = this.table.options.ajaxLoaderError; - } - - if (this.table.options.ajaxParams) { - this.setParams(this.table.options.ajaxParams); - } - - if (this.table.options.ajaxConfig) { - this.setConfig(this.table.options.ajaxConfig); - } - - if (this.table.options.ajaxURL) { - this.setUrl(this.table.options.ajaxURL); - } - - if (this.table.options.ajaxProgressiveLoad) { - if (this.table.options.pagination) { - this.progressiveLoad = false; - console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"); - } else { - if (this.table.modExists("page")) { - this.progressiveLoad = this.table.options.ajaxProgressiveLoad; - this.table.modules.page.initializeProgressive(this.progressiveLoad); - } else { - console.error("Pagination plugin is required for progressive ajax loading"); - } - } - } - }; - - Ajax.prototype.createLoaderElement = function () { - var el = document.createElement("div"); - el.classList.add("tabulator-loader"); - return el; - }; - - Ajax.prototype.createMsgElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-loader-msg"); - el.setAttribute("role", "alert"); - - return el; - }; - - //set ajax params - Ajax.prototype.setParams = function (params, update) { - if (update) { - this.params = this.params || {}; - - for (var key in params) { - this.params[key] = params[key]; - } - } else { - this.params = params; - } - }; - - Ajax.prototype.getParams = function () { - return this.params || {}; - }; - - //load config object - Ajax.prototype.setConfig = function (config) { - this._loadDefaultConfig(); - - if (typeof config == "string") { - this.config.method = config; - } else { - for (var key in config) { - this.config[key] = config[key]; - } - } - }; - - //create config object from default - Ajax.prototype._loadDefaultConfig = function (force) { - var self = this; - if (!self.config || force) { - - self.config = {}; - - //load base config from defaults - for (var key in self.defaultConfig) { - self.config[key] = self.defaultConfig[key]; - } - } - }; - - //set request url - Ajax.prototype.setUrl = function (url) { - this.url = url; - }; - - //get request url - Ajax.prototype.getUrl = function () { - return this.url; - }; - - //lstandard loading function - Ajax.prototype.loadData = function (inPosition) { - var self = this; - - if (this.progressiveLoad) { - return this._loadDataProgressive(); - } else { - return this._loadDataStandard(inPosition); - } - }; - - Ajax.prototype.nextPage = function (diff) { - var margin; - - if (!this.loading) { - - margin = this.table.options.ajaxProgressiveLoadScrollMargin || this.table.rowManager.getElement().clientHeight * 2; - - if (diff < margin) { - this.table.modules.page.nextPage().then(function () {}).catch(function () {}); - } - } - }; - - Ajax.prototype.blockActiveRequest = function () { - this.requestOrder++; - }; - - Ajax.prototype._loadDataProgressive = function () { - this.table.rowManager.setData([]); - return this.table.modules.page.setPage(1); - }; - - Ajax.prototype._loadDataStandard = function (inPosition) { - var _this16 = this; - - return new Promise(function (resolve, reject) { - _this16.sendRequest(inPosition).then(function (data) { - _this16.table.rowManager.setData(data, inPosition); - resolve(); - }).catch(function (e) { - reject(); - }); - }); - }; - - Ajax.prototype.generateParamsList = function (data, prefix) { - var self = this, - output = []; - - prefix = prefix || ""; - - if (Array.isArray(data)) { - data.forEach(function (item, i) { - output = output.concat(self.generateParamsList(item, prefix ? prefix + "[" + i + "]" : i)); - }); - } else if ((typeof data === 'undefined' ? 'undefined' : _typeof(data)) === "object") { - for (var key in data) { - output = output.concat(self.generateParamsList(data[key], prefix ? prefix + "[" + key + "]" : key)); - } - } else { - output.push({ key: prefix, value: data }); - } - - return output; - }; - - Ajax.prototype.serializeParams = function (params) { - var output = this.generateParamsList(params), - encoded = []; - - output.forEach(function (item) { - encoded.push(encodeURIComponent(item.key) + "=" + encodeURIComponent(item.value)); - }); - - return encoded.join("&"); - }; - - //send ajax request - Ajax.prototype.sendRequest = function (silent) { - var _this17 = this; - - var self = this, - url = self.url, - requestNo, - esc, - query; - - self.requestOrder++; - requestNo = self.requestOrder; - - self._loadDefaultConfig(); - - return new Promise(function (resolve, reject) { - if (self.table.options.ajaxRequesting.call(_this17.table, self.url, self.params) !== false) { - - self.loading = true; - - if (!silent) { - self.showLoader(); - } - - _this17.loaderPromise(url, self.config, self.params).then(function (data) { - if (requestNo === self.requestOrder) { - if (self.table.options.ajaxResponse) { - data = self.table.options.ajaxResponse.call(self.table, self.url, self.params, data); - } - resolve(data); - } else { - console.warn("Ajax Response Blocked - An active ajax request was blocked by an attempt to change table data while the request was being made"); - } - - self.hideLoader(); - - self.loading = false; - }).catch(function (error) { - console.error("Ajax Load Error: ", error); - self.table.options.ajaxError.call(self.table, error); - - self.showError(); - - setTimeout(function () { - self.hideLoader(); - }, 3000); - - self.loading = false; - - reject(); - }); - } else { - reject(); - } - }); - }; - - Ajax.prototype.showLoader = function () { - var shouldLoad = typeof this.table.options.ajaxLoader === "function" ? this.table.options.ajaxLoader() : this.table.options.ajaxLoader; - - if (shouldLoad) { - - this.hideLoader(); - - while (this.msgElement.firstChild) { - this.msgElement.removeChild(this.msgElement.firstChild); - }this.msgElement.classList.remove("tabulator-error"); - this.msgElement.classList.add("tabulator-loading"); - - if (this.loadingElement) { - this.msgElement.appendChild(this.loadingElement); - } else { - this.msgElement.innerHTML = this.table.modules.localize.getText("ajax|loading"); - } - - this.table.element.appendChild(this.loaderElement); - } - }; - - Ajax.prototype.showError = function () { - this.hideLoader(); - - while (this.msgElement.firstChild) { - this.msgElement.removeChild(this.msgElement.firstChild); - }this.msgElement.classList.remove("tabulator-loading"); - this.msgElement.classList.add("tabulator-error"); - - if (this.errorElement) { - this.msgElement.appendChild(this.errorElement); - } else { - this.msgElement.innerHTML = this.table.modules.localize.getText("ajax|error"); - } - - this.table.element.appendChild(this.loaderElement); - }; - - Ajax.prototype.hideLoader = function () { - if (this.loaderElement.parentNode) { - this.loaderElement.parentNode.removeChild(this.loaderElement); - } - }; - - //default ajax config object - Ajax.prototype.defaultConfig = { - method: "GET" - }; - - Ajax.prototype.defaultURLGenerator = function (url, config, params) { - if (params && Object.keys(params).length) { - if (!config.method || config.method.toLowerCase() == "get") { - config.method = "get"; - url += "?" + this.serializeParams(params); - } - } - - return url; - }; - - Ajax.prototype.defaultLoaderPromise = function (url, config, params) { - var self = this, - contentType; - - return new Promise(function (resolve, reject) { - - //set url - url = self.urlGenerator(url, config, params); - - //set body content if not GET request - if (config.method != "get") { - contentType = _typeof(self.table.options.ajaxContentType) === "object" ? self.table.options.ajaxContentType : self.contentTypeFormatters[self.table.options.ajaxContentType]; - if (contentType) { - - for (var key in contentType.headers) { - if (!config.headers) { - config.headers = {}; - } - - if (typeof config.headers[key] === "undefined") { - config.headers[key] = contentType.headers[key]; - } - } - - config.body = contentType.body.call(self, url, config, params); - } else { - console.warn("Ajax Error - Invalid ajaxContentType value:", self.table.options.ajaxContentType); - } - } - - if (url) { - - //configure headers - if (typeof config.credentials === "undefined") { - config.credentials = 'include'; - } - - if (typeof config.headers === "undefined") { - config.headers = {}; - } - - if (typeof config.headers.Accept === "undefined") { - config.headers.Accept = "application/json"; - } - - if (typeof config.headers["X-Requested-With"] === "undefined") { - config.headers["X-Requested-With"] = "XMLHttpRequest"; - } - - //send request - fetch(url, config).then(function (response) { - if (response.ok) { - response.json().then(function (data) { - resolve(data); - }).catch(function (error) { - reject(error); - console.warn("Ajax Load Error - Invalid JSON returned", error); - }); - } else { - console.error("Ajax Load Error - Connection Error: " + response.status, response.statusText); - reject(response); - } - }).catch(function (error) { - console.error("Ajax Load Error - Connection Error: ", error); - reject(error); - }); - } else { - reject("No URL Set"); - } - }); - }; - - Ajax.prototype.contentTypeFormatters = { - "json": { - headers: { - 'Content-Type': 'application/json' - }, - body: function body(url, config, params) { - return JSON.stringify(params); - } - }, - "form": { - headers: {}, - body: function body(url, config, params) { - var output = this.generateParamsList(params), - form = new FormData(); - - output.forEach(function (item) { - form.append(item.key, item.value); - }); - - return form; - } - } - }; - - Tabulator.prototype.registerModule("ajax", Ajax); - var ColumnCalcs = function ColumnCalcs(table) { - this.table = table; //hold Tabulator object - this.topCalcs = []; - this.botCalcs = []; - this.genColumn = false; - this.topElement = this.createElement(); - this.botElement = this.createElement(); - this.topRow = false; - this.botRow = false; - this.topInitialized = false; - this.botInitialized = false; - - this.initialize(); - }; - - ColumnCalcs.prototype.createElement = function () { - var el = document.createElement("div"); - el.classList.add("tabulator-calcs-holder"); - return el; - }; - - ColumnCalcs.prototype.initialize = function () { - this.genColumn = new Column({ field: "value" }, this); - }; - - //dummy functions to handle being mock column manager - ColumnCalcs.prototype.registerColumnField = function () {}; - - //initialize column calcs - ColumnCalcs.prototype.initializeColumn = function (column) { - var def = column.definition; - - var config = { - topCalcParams: def.topCalcParams || {}, - botCalcParams: def.bottomCalcParams || {} - }; - - if (def.topCalc) { - - switch (_typeof(def.topCalc)) { - case "string": - if (this.calculations[def.topCalc]) { - config.topCalc = this.calculations[def.topCalc]; - } else { - console.warn("Column Calc Error - No such calculation found, ignoring: ", def.topCalc); - } - break; - - case "function": - config.topCalc = def.topCalc; - break; - - } - - if (config.topCalc) { - column.modules.columnCalcs = config; - this.topCalcs.push(column); - - if (this.table.options.columnCalcs != "group") { - this.initializeTopRow(); - } - } - } - - if (def.bottomCalc) { - switch (_typeof(def.bottomCalc)) { - case "string": - if (this.calculations[def.bottomCalc]) { - config.botCalc = this.calculations[def.bottomCalc]; - } else { - console.warn("Column Calc Error - No such calculation found, ignoring: ", def.bottomCalc); - } - break; - - case "function": - config.botCalc = def.bottomCalc; - break; - - } - - if (config.botCalc) { - column.modules.columnCalcs = config; - this.botCalcs.push(column); - - if (this.table.options.columnCalcs != "group") { - this.initializeBottomRow(); - } - } - } - }; - - ColumnCalcs.prototype.removeCalcs = function () { - var changed = false; - - if (this.topInitialized) { - this.topInitialized = false; - this.topElement.parentNode.removeChild(this.topElement); - changed = true; - } - - if (this.botInitialized) { - this.botInitialized = false; - this.table.footerManager.remove(this.botElement); - changed = true; - } - - if (changed) { - this.table.rowManager.adjustTableSize(); - } - }; - - ColumnCalcs.prototype.initializeTopRow = function () { - if (!this.topInitialized) { - // this.table.columnManager.headersElement.after(this.topElement); - this.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling); - this.topInitialized = true; - } - }; - - ColumnCalcs.prototype.initializeBottomRow = function () { - if (!this.botInitialized) { - this.table.footerManager.prepend(this.botElement); - this.botInitialized = true; - } - }; - - ColumnCalcs.prototype.scrollHorizontal = function (left) { - var hozAdjust = 0, - scrollWidth = this.table.columnManager.getElement().scrollWidth - this.table.element.clientWidth; - - if (this.botInitialized) { - this.botRow.getElement().style.marginLeft = -left + "px"; - } - }; - - ColumnCalcs.prototype.recalc = function (rows) { - var data, row; - - if (this.topInitialized || this.botInitialized) { - data = this.rowsToData(rows); - - if (this.topInitialized) { - row = this.generateRow("top", this.rowsToData(rows)); - this.topRow = row; - while (this.topElement.firstChild) { - this.topElement.removeChild(this.topElement.firstChild); - }this.topElement.appendChild(row.getElement()); - row.initialize(true); - } - - if (this.botInitialized) { - row = this.generateRow("bottom", this.rowsToData(rows)); - this.botRow = row; - while (this.botElement.firstChild) { - this.botElement.removeChild(this.botElement.firstChild); - }this.botElement.appendChild(row.getElement()); - row.initialize(true); - } - - this.table.rowManager.adjustTableSize(); - - //set resizable handles - if (this.table.modExists("frozenColumns")) { - this.table.modules.frozenColumns.layout(); - } - } - }; - - ColumnCalcs.prototype.recalcRowGroup = function (row) { - this.recalcGroup(this.table.modules.groupRows.getRowGroup(row)); - }; - - ColumnCalcs.prototype.recalcGroup = function (group) { - var data, rowData; - - if (group) { - if (group.calcs) { - if (group.calcs.bottom) { - data = this.rowsToData(group.rows); - rowData = this.generateRowData("bottom", data); - - group.calcs.bottom.updateData(rowData); - group.calcs.bottom.reinitialize(); - } - - if (group.calcs.top) { - data = this.rowsToData(group.rows); - rowData = this.generateRowData("top", data); - - group.calcs.top.updateData(rowData); - group.calcs.top.reinitialize(); - } - } - } - }; - - //generate top stats row - ColumnCalcs.prototype.generateTopRow = function (rows) { - return this.generateRow("top", this.rowsToData(rows)); - }; - //generate bottom stats row - ColumnCalcs.prototype.generateBottomRow = function (rows) { - return this.generateRow("bottom", this.rowsToData(rows)); - }; - - ColumnCalcs.prototype.rowsToData = function (rows) { - var data = []; - - rows.forEach(function (row) { - data.push(row.getData()); - }); - - return data; - }; - - //generate stats row - ColumnCalcs.prototype.generateRow = function (pos, data) { - var self = this, - rowData = this.generateRowData(pos, data), - row; - - if (self.table.modExists("mutator")) { - self.table.modules.mutator.disable(); - } - - row = new Row(rowData, this); - - if (self.table.modExists("mutator")) { - self.table.modules.mutator.enable(); - } - - row.getElement().classList.add("tabulator-calcs", "tabulator-calcs-" + pos); - row.type = "calc"; - - row.generateCells = function () { - - var cells = []; - - self.table.columnManager.columnsByIndex.forEach(function (column) { - - if (column.visible) { - //set field name of mock column - self.genColumn.setField(column.getField()); - self.genColumn.hozAlign = column.hozAlign; - - if (column.definition[pos + "CalcFormatter"] && self.table.modExists("format")) { - - self.genColumn.modules.format = { - formatter: self.table.modules.format.getFormatter(column.definition[pos + "CalcFormatter"]), - params: column.definition[pos + "CalcFormatterParams"] - }; - } else { - self.genColumn.modules.format = { - formatter: self.table.modules.format.getFormatter("plaintext"), - params: {} - }; - } - - //generate cell and assign to correct column - var cell = new Cell(self.genColumn, row); - cell.column = column; - cell.setWidth(column.width); - - column.cells.push(cell); - cells.push(cell); - } - }); - - this.cells = cells; - }; - - return row; - }; - - //generate stats row - ColumnCalcs.prototype.generateRowData = function (pos, data) { - var rowData = {}, - calcs = pos == "top" ? this.topCalcs : this.botCalcs, - type = pos == "top" ? "topCalc" : "botCalc", - params, - paramKey; - - calcs.forEach(function (column) { - var values = []; - - if (column.modules.columnCalcs && column.modules.columnCalcs[type]) { - data.forEach(function (item) { - values.push(column.getFieldValue(item)); - }); - - paramKey = type + "Params"; - params = typeof column.modules.columnCalcs[paramKey] === "function" ? column.modules.columnCalcs[paramKey](value, data) : column.modules.columnCalcs[paramKey]; - - column.setFieldValue(rowData, column.modules.columnCalcs[type](values, data, params)); - } - }); - - return rowData; - }; - - ColumnCalcs.prototype.hasTopCalcs = function () { - return !!this.topCalcs.length; - }, ColumnCalcs.prototype.hasBottomCalcs = function () { - return !!this.botCalcs.length; - }, - - //handle table redraw - ColumnCalcs.prototype.redraw = function () { - if (this.topRow) { - this.topRow.normalizeHeight(true); - } - if (this.botRow) { - this.botRow.normalizeHeight(true); - } - }; - - //return the calculated - ColumnCalcs.prototype.getResults = function () { - var self = this, - results = {}, - groups; - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - groups = this.table.modules.groupRows.getGroups(true); - - groups.forEach(function (group) { - results[group.getKey()] = self.getGroupResults(group); - }); - } else { - results = { - top: this.topRow ? this.topRow.getData() : {}, - bottom: this.botRow ? this.botRow.getData() : {} - }; - } - - return results; - }; - - //get results from a group - ColumnCalcs.prototype.getGroupResults = function (group) { - var self = this, - groupObj = group._getSelf(), - subGroups = group.getSubGroups(), - subGroupResults = {}, - results = {}; - - subGroups.forEach(function (subgroup) { - subGroupResults[subgroup.getKey()] = self.getGroupResults(subgroup); - }); - - results = { - top: groupObj.calcs.top ? groupObj.calcs.top.getData() : {}, - bottom: groupObj.calcs.bottom ? groupObj.calcs.bottom.getData() : {}, - groups: subGroupResults - }; - - return results; - }; - - //default calculations - ColumnCalcs.prototype.calculations = { - "avg": function avg(values, data, calcParams) { - var output = 0, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : 2; - - if (values.length) { - output = values.reduce(function (sum, value) { - value = Number(value); - return sum + value; - }); - - output = output / values.length; - - output = precision !== false ? output.toFixed(precision) : output; - } - - return parseFloat(output).toString(); - }, - "max": function max(values, data, calcParams) { - var output = null, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; - - values.forEach(function (value) { - - value = Number(value); - - if (value > output || output === null) { - output = value; - } - }); - - return output !== null ? precision !== false ? output.toFixed(precision) : output : ""; - }, - "min": function min(values, data, calcParams) { - var output = null, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; - - values.forEach(function (value) { - - value = Number(value); - - if (value < output || output === null) { - output = value; - } - }); - - return output !== null ? precision !== false ? output.toFixed(precision) : output : ""; - }, - "sum": function sum(values, data, calcParams) { - var output = 0, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; - - if (values.length) { - values.forEach(function (value) { - value = Number(value); - - output += !isNaN(value) ? Number(value) : 0; - }); - } - - return precision !== false ? output.toFixed(precision) : output; - }, - "concat": function concat(values, data, calcParams) { - var output = 0; - - if (values.length) { - output = values.reduce(function (sum, value) { - return String(sum) + String(value); - }); - } - - return output; - }, - "count": function count(values, data, calcParams) { - var output = 0; - - if (values.length) { - values.forEach(function (value) { - if (value) { - output++; - } - }); - } - - return output; - } - }; - - Tabulator.prototype.registerModule("columnCalcs", ColumnCalcs); - var Clipboard = function Clipboard(table) { - this.table = table; - this.mode = true; - this.copySelector = false; - this.copySelectorParams = {}; - this.copyFormatter = false; - this.copyFormatterParams = {}; - this.pasteParser = function () {}; - this.pasteAction = function () {}; - this.htmlElement = false; - this.config = {}; - - this.blocked = true; //block copy actions not originating from this command - }; - - Clipboard.prototype.initialize = function () { - var self = this; - - this.mode = this.table.options.clipboard; - - if (this.mode === true || this.mode === "copy") { - this.table.element.addEventListener("copy", function (e) { - var data; - - self.processConfig(); - - if (!self.blocked) { - e.preventDefault(); - - data = self.generateContent(); - - if (window.clipboardData && window.clipboardData.setData) { - window.clipboardData.setData('Text', data); - } else if (e.clipboardData && e.clipboardData.setData) { - e.clipboardData.setData('text/plain', data); - if (self.htmlElement) { - e.clipboardData.setData('text/html', self.htmlElement.outerHTML); - } - } else if (e.originalEvent && e.originalEvent.clipboardData.setData) { - e.originalEvent.clipboardData.setData('text/plain', data); - if (self.htmlElement) { - e.originalEvent.clipboardData.setData('text/html', self.htmlElement.outerHTML); - } - } - - self.table.options.clipboardCopied.call(this.table, data); - - self.reset(); - } - }); - } - - if (this.mode === true || this.mode === "paste") { - this.table.element.addEventListener("paste", function (e) { - self.paste(e); - }); - } - - this.setPasteParser(this.table.options.clipboardPasteParser); - this.setPasteAction(this.table.options.clipboardPasteAction); - }; - - Clipboard.prototype.processConfig = function () { - var config = { - columnHeaders: "groups", - rowGroups: true - }; - - if (typeof this.table.options.clipboardCopyHeader !== "undefined") { - config.columnHeaders = this.table.options.clipboardCopyHeader; - console.warn("DEPRECATION WANRING - clipboardCopyHeader option has been depricated, please use the columnHeaders property on the clipboardCopyConfig option"); - } - - if (this.table.options.clipboardCopyConfig) { - for (var key in this.table.options.clipboardCopyConfig) { - config[key] = this.table.options.clipboardCopyConfig[key]; - } - } - - if (config.rowGroups && this.table.options.groupBy && this.table.modExists("groupRows")) { - this.config.rowGroups = true; - } - - if (config.columnHeaders) { - if ((config.columnHeaders === "groups" || config === true) && this.table.columnManager.columns.length != this.table.columnManager.columnsByIndex.length) { - this.config.columnHeaders = "groups"; - } else { - this.config.columnHeaders = "columns"; - } - } else { - this.config.columnHeaders = false; - } - }; - - Clipboard.prototype.reset = function () { - this.blocked = false; - this.originalSelectionText = ""; - }; - - Clipboard.prototype.setPasteAction = function (action) { - - switch (typeof action === 'undefined' ? 'undefined' : _typeof(action)) { - case "string": - this.pasteAction = this.pasteActions[action]; - - if (!this.pasteAction) { - console.warn("Clipboard Error - No such paste action found:", action); - } - break; - - case "function": - this.pasteAction = action; - break; - } - }; - - Clipboard.prototype.setPasteParser = function (parser) { - switch (typeof parser === 'undefined' ? 'undefined' : _typeof(parser)) { - case "string": - this.pasteParser = this.pasteParsers[parser]; - - if (!this.pasteParser) { - console.warn("Clipboard Error - No such paste parser found:", parser); - } - break; - - case "function": - this.pasteParser = parser; - break; - } - }; - - Clipboard.prototype.paste = function (e) { - var data, rowData, rows; - - if (this.checkPaseOrigin(e)) { - - data = this.getPasteData(e); - - rowData = this.pasteParser.call(this, data); - - if (rowData) { - e.preventDefault(); - - if (this.table.modExists("mutator")) { - rowData = this.mutateData(rowData); - } - - rows = this.pasteAction.call(this, rowData); - this.table.options.clipboardPasted.call(this.table, data, rowData, rows); - } else { - this.table.options.clipboardPasteError.call(this.table, data); - } - } - }; - - Clipboard.prototype.mutateData = function (data) { - var self = this, - output = []; - - if (Array.isArray(data)) { - data.forEach(function (row) { - output.push(self.table.modules.mutator.transformRow(row, "clipboard")); - }); - } else { - output = data; - } - - return output; - }; - - Clipboard.prototype.checkPaseOrigin = function (e) { - var valid = true; - - if (e.target.tagName != "DIV" || this.table.modules.edit.currentCell) { - valid = false; - } - - return valid; - }; - - Clipboard.prototype.getPasteData = function (e) { - var data; - - if (window.clipboardData && window.clipboardData.getData) { - data = window.clipboardData.getData('Text'); - } else if (e.clipboardData && e.clipboardData.getData) { - data = e.clipboardData.getData('text/plain'); - } else if (e.originalEvent && e.originalEvent.clipboardData.getData) { - data = e.originalEvent.clipboardData.getData('text/plain'); - } - - return data; - }; - - Clipboard.prototype.copy = function (selector, selectorParams, formatter, formatterParams, internal) { - var range, sel; - this.blocked = false; - - if (this.mode === true || this.mode === "copy") { - - if (typeof window.getSelection != "undefined" && typeof document.createRange != "undefined") { - range = document.createRange(); - range.selectNodeContents(this.table.element); - sel = window.getSelection(); - - if (sel.toString() && internal) { - selector = "userSelection"; - formatter = "raw"; - selectorParams = sel.toString(); - } - - sel.removeAllRanges(); - sel.addRange(range); - } else if (typeof document.selection != "undefined" && typeof document.body.createTextRange != "undefined") { - textRange = document.body.createTextRange(); - textRange.moveToElementText(this.table.element); - textRange.select(); - } - - this.setSelector(selector); - this.copySelectorParams = typeof selectorParams != "undefined" && selectorParams != null ? selectorParams : this.config.columnHeaders; - this.setFormatter(formatter); - this.copyFormatterParams = typeof formatterParams != "undefined" && formatterParams != null ? formatterParams : {}; - - document.execCommand('copy'); - - if (sel) { - sel.removeAllRanges(); - } - } - }; - - Clipboard.prototype.setSelector = function (selector) { - selector = selector || this.table.options.clipboardCopySelector; - - switch (typeof selector === 'undefined' ? 'undefined' : _typeof(selector)) { - case "string": - if (this.copySelectors[selector]) { - this.copySelector = this.copySelectors[selector]; - } else { - console.warn("Clipboard Error - No such selector found:", selector); - } - break; - - case "function": - this.copySelector = selector; - break; - } - }; - - Clipboard.prototype.setFormatter = function (formatter) { - - formatter = formatter || this.table.options.clipboardCopyFormatter; - - switch (typeof formatter === 'undefined' ? 'undefined' : _typeof(formatter)) { - case "string": - if (this.copyFormatters[formatter]) { - this.copyFormatter = this.copyFormatters[formatter]; - } else { - console.warn("Clipboard Error - No such formatter found:", formatter); - } - break; - - case "function": - this.copyFormatter = formatter; - break; - } - }; - - Clipboard.prototype.generateContent = function () { - var data; - - this.htmlElement = false; - data = this.copySelector.call(this, this.config, this.copySelectorParams); - - return this.copyFormatter.call(this, data, this.config, this.copyFormatterParams); - }; - - Clipboard.prototype.generateSimpleHeaders = function (columns) { - var headers = []; - - columns.forEach(function (column) { - headers.push(column.definition.title); - }); - - return headers; - }; - - Clipboard.prototype.generateColumnGroupHeaders = function (columns) { - var _this18 = this; - - var output = []; - - this.table.columnManager.columns.forEach(function (column) { - var colData = _this18.processColumnGroup(column); - - if (colData) { - output.push(colData); - } - }); - - return output; - }; - - Clipboard.prototype.processColumnGroup = function (column) { - var _this19 = this; - - var subGroups = column.columns; - - var groupData = { - type: "group", - title: column.definition.title, - column: column - }; - - if (subGroups.length) { - groupData.subGroups = []; - groupData.width = 0; - - subGroups.forEach(function (subGroup) { - var subGroupData = _this19.processColumnGroup(subGroup); - - if (subGroupData) { - groupData.width += subGroupData.width; - groupData.subGroups.push(subGroupData); - } - }); - - if (!groupData.width) { - return false; - } - } else { - if (column.field && column.visible) { - groupData.width = 1; - } else { - return false; - } - } - - return groupData; - }; - - Clipboard.prototype.groupHeadersToRows = function (columns) { - - var headers = []; - - function parseColumnGroup(column, level) { - - if (typeof headers[level] === "undefined") { - headers[level] = []; - } - - headers[level].push(column.title); - - if (column.subGroups) { - column.subGroups.forEach(function (subGroup) { - parseColumnGroup(subGroup, level + 1); - }); - } else { - padColumnheaders(); - } - } - - function padColumnheaders() { - var max = 0; - - headers.forEach(function (title) { - var len = title.length; - if (len > max) { - max = len; - } - }); - - headers.forEach(function (title) { - var len = title.length; - if (len < max) { - for (var i = len; i < max; i++) { - title.push(""); - } - } - }); - } - - columns.forEach(function (column) { - parseColumnGroup(column, 0); - }); - - return headers; - }; - - Clipboard.prototype.rowsToData = function (rows, config, params) { - var columns = this.table.columnManager.columnsByIndex, - data = []; - - rows.forEach(function (row) { - var rowArray = [], - rowData = row.getData("clipboard"); - - columns.forEach(function (column) { - var value = column.getFieldValue(rowData); - - switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - rowArray.push(value); - }); - - data.push(rowArray); - }); - - return data; - }; - - Clipboard.prototype.buildComplexRows = function (config) { - var _this20 = this; - - var output = [], - groups = this.table.modules.groupRows.getGroups(); - - groups.forEach(function (group) { - output.push(_this20.processGroupData(group)); - }); - - return output; - }; - - Clipboard.prototype.processGroupData = function (group) { - var _this21 = this; - - var subGroups = group.getSubGroups(); - - var groupData = { - type: "group", - key: group.key - }; - - if (subGroups.length) { - groupData.subGroups = []; - - subGroups.forEach(function (subGroup) { - groupData.subGroups.push(_this21.processGroupData(subGroup)); - }); - } else { - groupData.rows = group.getRows(true); - } - - return groupData; - }; - - Clipboard.prototype.buildOutput = function (rows, config, params) { - var _this22 = this; - - var output = [], - columns = this.table.columnManager.columnsByIndex; - - if (config.columnHeaders) { - - if (config.columnHeaders == "groups") { - columns = this.generateColumnGroupHeaders(this.table.columnManager.columns); - - output = output.concat(this.groupHeadersToRows(columns)); - } else { - output.push(this.generateSimpleHeaders(columns)); - } - } - - //generate styled content - if (this.table.options.clipboardCopyStyled) { - this.generateHTML(rows, columns, config, params); - } - - //generate unstyled content - if (config.rowGroups) { - rows.forEach(function (row) { - output = output.concat(_this22.parseRowGroupData(row, config, params)); - }); - } else { - output = output.concat(this.rowsToData(rows, config, params)); - } - - return output; - }; - - Clipboard.prototype.parseRowGroupData = function (group, config, params) { - var _this23 = this; - - var groupData = []; - - groupData.push([group.key]); - - if (group.subGroups) { - group.subGroups.forEach(function (subGroup) { - groupData = groupData.concat(_this23.parseRowGroupData(subGroup, config, params)); - }); - } else { - - groupData = groupData.concat(this.rowsToData(group.rows, config, params)); - } - - return groupData; - }; - - Clipboard.prototype.generateHTML = function (rows, columns, config, params) { - var self = this, - data = [], - headers = [], - body, - oddRow, - evenRow, - firstRow, - firstCell, - firstGroup, - lastCell, - styleCells; - - //create table element - this.htmlElement = document.createElement("table"); - self.mapElementStyles(this.table.element, this.htmlElement, ["border-top", "border-left", "border-right", "border-bottom"]); - - function generateSimpleHeaders() { - var headerEl = document.createElement("tr"); - - columns.forEach(function (column) { - var columnEl = document.createElement("th"); - columnEl.innerHTML = column.definition.title; - - self.mapElementStyles(column.getElement(), columnEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - headerEl.appendChild(columnEl); - }); - - self.mapElementStyles(self.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - self.htmlElement.appendChild(document.createElement("thead").appendChild(headerEl)); - } - - function generateHeaders(headers) { - - var headerHolderEl = document.createElement("thead"); - - headers.forEach(function (columns) { - var headerEl = document.createElement("tr"); - - columns.forEach(function (column) { - var columnEl = document.createElement("th"); - - if (column.width > 1) { - columnEl.colSpan = column.width; - } - - if (column.height > 1) { - columnEl.rowSpan = column.height; - } - - columnEl.innerHTML = column.title; - - self.mapElementStyles(column.element, columnEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - headerEl.appendChild(columnEl); - }); - - self.mapElementStyles(self.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - headerHolderEl.appendChild(headerEl); - }); - - self.htmlElement.appendChild(headerHolderEl); - } - - function parseColumnGroup(column, level) { - - if (typeof headers[level] === "undefined") { - headers[level] = []; - } - - headers[level].push({ - title: column.title, - width: column.width, - height: 1, - children: !!column.subGroups, - element: column.column.getElement() - }); - - if (column.subGroups) { - column.subGroups.forEach(function (subGroup) { - parseColumnGroup(subGroup, level + 1); - }); - } - } - - function padVerticalColumnheaders() { - headers.forEach(function (row, index) { - row.forEach(function (header) { - if (!header.children) { - header.height = headers.length - index; - } - }); - }); - } - - //create headers if needed - if (config.columnHeaders) { - if (config.columnHeaders == "groups") { - columns.forEach(function (column) { - parseColumnGroup(column, 0); - }); - - padVerticalColumnheaders(); - generateHeaders(headers); - } else { - generateSimpleHeaders(); - } - } - - columns = this.table.columnManager.columnsByIndex; - - //create table body - body = document.createElement("tbody"); - - //lookup row styles - if (window.getComputedStyle) { - oddRow = this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"); - evenRow = this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"); - firstRow = this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"); - firstGroup = this.table.element.getElementsByClassName("tabulator-group")[0]; - - if (firstRow) { - styleCells = firstRow.getElementsByClassName("tabulator-cell"); - firstCell = styleCells[0]; - lastCell = styleCells[styleCells.length - 1]; - } - } - - function processRows(rowArray) { - //add rows to table - rowArray.forEach(function (row, i) { - var rowEl = document.createElement("tr"), - rowData = row.getData("clipboard"), - styleRow = firstRow; - - columns.forEach(function (column, j) { - var cellEl = document.createElement("td"), - value = column.getFieldValue(rowData); - - switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - cellEl.innerHTML = value; - - if (column.definition.align) { - cellEl.style.textAlign = column.definition.align; - } - - if (j < columns.length - 1) { - if (firstCell) { - self.mapElementStyles(firstCell, cellEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); - } - } else { - if (firstCell) { - self.mapElementStyles(firstCell, cellEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); - } - } - - rowEl.appendChild(cellEl); - }); - - if (!(i % 2) && oddRow) { - styleRow = oddRow; - } - - if (i % 2 && evenRow) { - styleRow = evenRow; - } - - if (styleRow) { - self.mapElementStyles(styleRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); - } - - body.appendChild(rowEl); - }); - } - - function processGroup(group) { - var groupEl = document.createElement("tr"), - groupCellEl = document.createElement("td"); - - groupCellEl.colSpan = columns.length; - - groupCellEl.innerHTML = group.key; - - groupEl.appendChild(groupCellEl); - body.appendChild(groupEl); - - self.mapElementStyles(firstGroup, groupEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); - - if (group.subGroups) { - group.subGroups.forEach(function (subGroup) { - processGroup(subGroup); - }); - } else { - processRows(group.rows); - } - } - - if (config.rowGroups) { - rows.forEach(function (group) { - processGroup(group); - }); - } else { - processRows(rows); - } - - this.htmlElement.appendChild(body); - }; - - Clipboard.prototype.mapElementStyles = function (from, to, props) { - - var lookup = { - "background-color": "backgroundColor", - "color": "fontColor", - "font-weight": "fontWeight", - "font-family": "fontFamily", - "font-size": "fontSize", - "border-top": "borderTop", - "border-left": "borderLeft", - "border-right": "borderRight", - "border-bottom": "borderBottom" - }; - - if (window.getComputedStyle) { - var fromStyle = window.getComputedStyle(from); - - props.forEach(function (prop) { - to.style[lookup[prop]] = fromStyle.getPropertyValue(prop); - }); - } - - // return window.getComputedStyle ? window.getComputedStyle(element, null).getPropertyValue(property) : element.style[property.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); })]; - }; - - Clipboard.prototype.copySelectors = { - userSelection: function userSelection(config, params) { - return params; - }, - selected: function selected(config, params) { - var rows = []; - - if (this.table.modExists("selectRow", true)) { - rows = this.table.modules.selectRow.getSelectedRows(); - } - - if (config.rowGroups) { - console.warn("Clipboard Warning - select coptSelector does not support row groups"); - } - - return this.buildOutput(rows, config, params); - }, - table: function table(config, params) { - if (config.rowGroups) { - console.warn("Clipboard Warning - table coptSelector does not support row groups"); - } - - return this.buildOutput(this.table.rowManager.getComponents(), config, params); - }, - active: function active(config, params) { - var rows; - - if (config.rowGroups) { - rows = this.buildComplexRows(config); - } else { - rows = this.table.rowManager.getComponents(true); - } - - return this.buildOutput(rows, config, params); - } - }; - - Clipboard.prototype.copyFormatters = { - raw: function raw(data, params) { - return data; - }, - table: function table(data, params) { - var output = []; - - data.forEach(function (row) { - row.forEach(function (value) { - if (typeof value == "undefined") { - value = ""; - } - - value = typeof value == "undefined" || value === null ? "" : value.toString(); - - if (value.match(/\r|\n/)) { - value = value.split('"').join('""'); - value = '"' + value + '"'; - } - }); - - output.push(row.join("\t")); - }); - - return output.join("\n"); - } - }; - - Clipboard.prototype.pasteParsers = { - table: function table(clipboard) { - var data = [], - success = false, - headerFindSuccess = true, - columns = this.table.columnManager.columns, - columnMap = [], - rows = []; - - //get data from clipboard into array of columns and rows. - clipboard = clipboard.split("\n"); - - clipboard.forEach(function (row) { - data.push(row.split("\t")); - }); - - if (data.length && !(data.length === 1 && data[0].length < 2)) { - success = true; - - //check if headers are present by title - data[0].forEach(function (value) { - var column = columns.find(function (column) { - return value && column.definition.title && value.trim() && column.definition.title.trim() === value.trim(); - }); - - if (column) { - columnMap.push(column); - } else { - headerFindSuccess = false; - } - }); - - //check if column headers are present by field - if (!headerFindSuccess) { - headerFindSuccess = true; - columnMap = []; - - data[0].forEach(function (value) { - var column = columns.find(function (column) { - return value && column.field && value.trim() && column.field.trim() === value.trim(); - }); - - if (column) { - columnMap.push(column); - } else { - headerFindSuccess = false; - } - }); - - if (!headerFindSuccess) { - columnMap = this.table.columnManager.columnsByIndex; - } - } - - //remove header row if found - if (headerFindSuccess) { - data.shift(); - } - - data.forEach(function (item) { - var row = {}; - - item.forEach(function (value, i) { - if (columnMap[i]) { - row[columnMap[i].field] = value; - } - }); - - rows.push(row); - }); - - return rows; - } else { - return false; - } - } - }; - - Clipboard.prototype.pasteActions = { - replace: function replace(rows) { - return this.table.setData(rows); - }, - update: function update(rows) { - return this.table.updateOrAddData(rows); - }, - insert: function insert(rows) { - return this.table.addData(rows); - } - }; - - Tabulator.prototype.registerModule("clipboard", Clipboard); - - var DataTree = function DataTree(table) { - this.table = table; - this.indent = 10; - this.field = ""; - this.collapseEl = null; - this.expandEl = null; - this.branchEl = null; - - this.startOpen = function () {}; - - this.displayIndex = 0; - }; - - DataTree.prototype.initialize = function () { - var dummyEl = null, - options = this.table.options; - - this.field = options.dataTreeChildField; - this.indent = options.dataTreeChildIndent; - - if (options.dataTreeBranchElement) { - - if (options.dataTreeBranchElement === true) { - this.branchEl = document.createElement("div"); - this.branchEl.classList.add("tabulator-data-tree-branch"); - } else { - if (typeof options.dataTreeBranchElement === "string") { - dummyEl = document.createElement("div"); - dummyEl.innerHTML = options.dataTreeBranchElement; - this.branchEl = dummyEl.firstChild; - } else { - this.branchEl = options.dataTreeBranchElement; - } - } - } - - if (options.dataTreeCollapseElement) { - if (typeof options.dataTreeCollapseElement === "string") { - dummyEl = document.createElement("div"); - dummyEl.innerHTML = options.dataTreeCollapseElement; - this.collapseEl = dummyEl.firstChild; - } else { - this.collapseEl = options.dataTreeCollapseElement; - } - } else { - this.collapseEl = document.createElement("div"); - this.collapseEl.classList.add("tabulator-data-tree-control"); - this.collapseEl.innerHTML = "
"; - } - - if (options.dataTreeExpandElement) { - if (typeof options.dataTreeExpandElement === "string") { - dummyEl = document.createElement("div"); - dummyEl.innerHTML = options.dataTreeExpandElement; - this.expandEl = dummyEl.firstChild; - } else { - this.expandEl = options.dataTreeExpandElement; - } - } else { - this.expandEl = document.createElement("div"); - this.expandEl.classList.add("tabulator-data-tree-control"); - this.expandEl.innerHTML = "
"; - } - - switch (_typeof(options.dataTreeStartExpanded)) { - case "boolean": - this.startOpen = function (row, index) { - return options.dataTreeStartExpanded; - }; - break; - - case "function": - this.startOpen = options.dataTreeStartExpanded; - break; - - default: - this.startOpen = function (row, index) { - return options.dataTreeStartExpanded[index]; - }; - break; - } - }; - - DataTree.prototype.initializeRow = function (row) { - - var children = typeof row.getData()[this.field] !== "undefined"; - - row.modules.dataTree = { - index: 0, - open: children ? this.startOpen(row.getComponent(), 0) : false, - controlEl: false, - branchEl: false, - parent: false, - children: children - }; - }; - - DataTree.prototype.layoutRow = function (row) { - var cell = row.getCells()[0], - el = cell.getElement(), - config = row.modules.dataTree; - - el.style.paddingLeft = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-left')) + config.index * this.indent + "px"; - - if (config.branchEl) { - config.branchEl.parentNode.removeChild(config.branchEl); - } - - this.generateControlElement(row, el); - - if (config.index && this.branchEl) { - config.branchEl = this.branchEl.cloneNode(true); - el.insertBefore(config.branchEl, el.firstChild); - el.style.paddingLeft = parseInt(el.style.paddingLeft) + (config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1) + "px"; - } - }; - - DataTree.prototype.generateControlElement = function (row, el) { - var _this24 = this; - - var config = row.modules.dataTree, - el = el || row.getCells()[0].getElement(), - oldControl = config.controlEl; - - if (config.children !== false) { - - if (config.open) { - config.controlEl = this.collapseEl.cloneNode(true); - config.controlEl.addEventListener("click", function (e) { - e.stopPropagation(); - _this24.collapseRow(row); - }); - } else { - config.controlEl = this.expandEl.cloneNode(true); - config.controlEl.addEventListener("click", function (e) { - e.stopPropagation(); - _this24.expandRow(row); - }); - } - - config.controlEl.addEventListener("mousedown", function (e) { - e.stopPropagation(); - }); - - if (oldControl && oldControl.parentNode === el) { - oldControl.parentNode.replaceChild(config.controlEl, oldControl); - } else { - el.insertBefore(config.controlEl, el.firstChild); - } - } - }; - - DataTree.prototype.setDisplayIndex = function (index) { - this.displayIndex = index; - }; - - DataTree.prototype.getDisplayIndex = function () { - return this.displayIndex; - }; - - DataTree.prototype.getRows = function (rows) { - var _this25 = this; - - var output = []; - - rows.forEach(function (row, i) { - var config = row.modules.dataTree.children, - children; - - output.push(row); - - if (!config.index && config.children !== false) { - children = _this25.getChildren(row); - - children.forEach(function (child) { - output.push(child); - }); - } - }); - - return output; - }; - - DataTree.prototype.getChildren = function (row) { - var _this26 = this; - - var config = row.modules.dataTree, - output = []; - - if (config.children !== false && config.open) { - if (!Array.isArray(config.children)) { - config.children = this.generateChildren(row); - } - - config.children.forEach(function (child) { - output.push(child); - - var subChildren = _this26.getChildren(child); - - subChildren.forEach(function (sub) { - output.push(sub); - }); - }); - } - - return output; - }; - - DataTree.prototype.generateChildren = function (row) { - var _this27 = this; - - var children = []; - - row.getData()[this.field].forEach(function (childData) { - var childRow = new Row(childData || {}, _this27.table.rowManager); - childRow.modules.dataTree.index = row.modules.dataTree.index + 1; - childRow.modules.dataTree.parent = row; - childRow.modules.dataTree.open = _this27.startOpen(row, childRow.modules.dataTree.index); - children.push(childRow); - }); - - return children; - }; - - DataTree.prototype.expandRow = function (row, silent) { - var config = row.modules.dataTree; - - if (config.children !== false) { - config.open = true; - - row.reinitialize(); - - this.table.rowManager.refreshActiveData("tree", false, true); - - this.table.options.dataTreeRowExpanded(row.getComponent(), row.modules.dataTree.index); - } - }; - - DataTree.prototype.collapseRow = function (row) { - var config = row.modules.dataTree; - - if (config.children !== false) { - config.open = false; - - row.reinitialize(); - - this.table.rowManager.refreshActiveData("tree", false, true); - - this.table.options.dataTreeRowCollapsed(row.getComponent(), row.modules.dataTree.index); - } - }; - - DataTree.prototype.toggleRow = function (row) { - var config = row.modules.dataTree; - - if (config.children !== false) { - if (config.open) { - this.collapseRow(row); - } else { - this.expandRow(row); - } - } - }; - - DataTree.prototype.getTreeParent = function (row) { - return row.modules.dataTree.parent ? row.modules.dataTree.parent.getComponent() : false; - }; - - DataTree.prototype.getTreeChildren = function (row) { - var config = row.modules.dataTree, - output = []; - - if (config.children) { - - if (!Array.isArray(config.children)) { - config.children = this.generateChildren(row); - } - - config.children.forEach(function (childRow) { - if (childRow instanceof Row) { - output.push(childRow.getComponent()); - } - }); - } - - return output; - }; - - DataTree.prototype.checkForRestyle = function (cell) { - if (!cell.row.cells.indexOf(cell)) { - if (cell.row.modules.dataTree.children !== false) { - cell.row.reinitialize(); - } - } - }; - - Tabulator.prototype.registerModule("dataTree", DataTree); - var Download = function Download(table) { - this.table = table; //hold Tabulator object - this.fields = {}; //hold filed multi dimension arrays - this.columnsByIndex = []; //hold columns in their order in the table - this.columnsByField = {}; //hold columns with lookup by field name - this.config = {}; - }; - - //trigger file download - Download.prototype.download = function (type, filename, options, interceptCallback) { - var self = this, - downloadFunc = false; - this.processConfig(); - - function buildLink(data, mime) { - if (interceptCallback) { - interceptCallback(data); - } else { - self.triggerDownload(data, mime, type, filename); - } - } - - if (typeof type == "function") { - downloadFunc = type; - } else { - if (self.downloaders[type]) { - downloadFunc = self.downloaders[type]; - } else { - console.warn("Download Error - No such download type found: ", type); - } - } - - this.processColumns(); - - if (downloadFunc) { - downloadFunc.call(this, self.processDefinitions(), self.processData(), options || {}, buildLink, this.config); - } - }; - - Download.prototype.processConfig = function () { - var config = { //download config - columnGroups: true, - rowGroups: true - }; - - if (this.table.options.downloadConfig) { - for (var key in this.table.options.downloadConfig) { - config[key] = this.table.options.downloadConfig[key]; - } - } - - if (config.rowGroups && this.table.options.groupBy && this.table.modExists("groupRows")) { - this.config.rowGroups = true; - } - - if (config.columnGroups && this.table.columnManager.columns.length != this.table.columnManager.columnsByIndex.length) { - this.config.columnGroups = true; - } - }; - - Download.prototype.processColumns = function () { - var self = this; - - self.columnsByIndex = []; - self.columnsByField = {}; - - self.table.columnManager.columnsByIndex.forEach(function (column) { - - if (column.field && column.visible && column.definition.download !== false) { - self.columnsByIndex.push(column); - self.columnsByField[column.field] = column; - } - }); - }; - - Download.prototype.processDefinitions = function () { - var self = this, - processedDefinitions = []; - - if (this.config.columnGroups) { - self.table.columnManager.columns.forEach(function (column) { - var colData = self.processColumnGroup(column); - - if (colData) { - processedDefinitions.push(colData); - } - }); - } else { - self.columnsByIndex.forEach(function (column) { - if (column.download !== false) { - //isolate definiton from defintion object - processedDefinitions.push(self.processDefinition(column)); - } - }); - } - - return processedDefinitions; - }; - - Download.prototype.processColumnGroup = function (column) { - var _this28 = this; - - var subGroups = column.columns; - - var groupData = { - type: "group", - title: column.definition.title - }; - - if (subGroups.length) { - groupData.subGroups = []; - groupData.width = 0; - - subGroups.forEach(function (subGroup) { - var subGroupData = _this28.processColumnGroup(subGroup); - - if (subGroupData) { - groupData.width += subGroupData.width; - groupData.subGroups.push(subGroupData); - } - }); - - if (!groupData.width) { - return false; - } - } else { - if (column.field && column.visible && column.definition.download !== false) { - groupData.width = 1; - groupData.definition = this.processDefinition(column); - } else { - return false; - } - } - - return groupData; - }; - - Download.prototype.processDefinition = function (column) { - var def = {}; - - for (var key in column.definition) { - def[key] = column.definition[key]; - } - - if (typeof column.definition.downloadTitle != "undefined") { - def.title = column.definition.downloadTitle; - } - - return def; - }; - - Download.prototype.processData = function () { - var _this29 = this; - - var self = this, - data = [], - groups = []; - - if (this.config.rowGroups) { - groups = this.table.modules.groupRows.getGroups(); - - groups.forEach(function (group) { - data.push(_this29.processGroupData(group)); - }); - } else { - data = self.table.rowManager.getData(true, "download"); - } - - //bulk data processing - if (typeof self.table.options.downloadDataFormatter == "function") { - data = self.table.options.downloadDataFormatter(data); - } - - return data; - }; - - Download.prototype.processGroupData = function (group) { - var _this30 = this; - - var subGroups = group.getSubGroups(); - - var groupData = { - type: "group", - key: group.key - }; - - if (subGroups.length) { - groupData.subGroups = []; - - subGroups.forEach(function (subGroup) { - groupData.subGroups.push(_this30.processGroupData(subGroup)); - }); - } else { - groupData.rows = group.getData(true, "download"); - } - - return groupData; - }; - - Download.prototype.triggerDownload = function (data, mime, type, filename) { - var element = document.createElement('a'), - blob = new Blob([data], { type: mime }), - filename = filename || "Tabulator." + (typeof type === "function" ? "txt" : type); - - blob = this.table.options.downloadReady.call(this.table, data, blob); - - if (blob) { - - if (navigator.msSaveOrOpenBlob) { - navigator.msSaveOrOpenBlob(blob, filename); - } else { - element.setAttribute('href', window.URL.createObjectURL(blob)); - - //set file title - element.setAttribute('download', filename); - - //trigger download - element.style.display = 'none'; - document.body.appendChild(element); - element.click(); - - //remove temporary link element - document.body.removeChild(element); - } - - if (this.table.options.downloadComplete) { - this.table.options.downloadComplete(); - } - } - }; - - //nested field lookup - Download.prototype.getFieldValue = function (field, data) { - var column = this.columnsByField[field]; - - if (column) { - return column.getFieldValue(data); - } - - return false; - }; - - Download.prototype.commsReceived = function (table, action, data) { - switch (action) { - case "intercept": - this.download(data.type, "", data.options, data.intercept); - break; - } - }; - - //downloaders - Download.prototype.downloaders = { - csv: function csv(columns, data, options, setFileContents, config) { - var self = this, - titles = [], - fields = [], - delimiter = options && options.delimiter ? options.delimiter : ",", - fileContents; - - //build column headers - function parseSimpleTitles() { - columns.forEach(function (column) { - titles.push('"' + String(column.title).split('"').join('""') + '"'); - fields.push(column.field); - }); - } - - function parseColumnGroup(column, level) { - if (column.subGroups) { - column.subGroups.forEach(function (subGroup) { - parseColumnGroup(subGroup, level + 1); - }); - } else { - titles.push('"' + String(column.title).split('"').join('""') + '"'); - fields.push(column.definition.field); - } - } - - if (config.columnGroups) { - console.warn("Download Warning - CSV downloader cannot process column groups"); - - columns.forEach(function (column) { - parseColumnGroup(column, 0); - }); - } else { - parseSimpleTitles(); - } - - //generate header row - fileContents = [titles.join(delimiter)]; - - function parseRows(data) { - //generate each row of the table - data.forEach(function (row) { - var rowData = []; - - fields.forEach(function (field) { - var value = self.getFieldValue(field, row); - - switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - //escape quotation marks - rowData.push('"' + String(value).split('"').join('""') + '"'); - }); - - fileContents.push(rowData.join(delimiter)); - }); - } - - function parseGroup(group) { - if (group.subGroups) { - group.subGroups.forEach(function (subGroup) { - parseGroup(subGroup); - }); - } else { - parseRows(group.rows); - } - } - - if (config.rowGroups) { - console.warn("Download Warning - CSV downloader cannot process row groups"); - - data.forEach(function (group) { - parseGroup(group); - }); - } else { - parseRows(data); - } - - setFileContents(fileContents.join("\n"), "text/csv"); - }, - - json: function json(columns, data, options, setFileContents, config) { - var fileContents = JSON.stringify(data, null, '\t'); - - setFileContents(fileContents, "application/json"); - }, - - pdf: function pdf(columns, data, options, setFileContents, config) { - var self = this, - fields = [], - header = [], - body = [], - table = "", - groupRowIndexs = [], - autoTableParams = {}, - rowGroupStyles = {}, - jsPDFParams = options.jsPDF || {}, - title = options && options.title ? options.title : ""; - - if (!jsPDFParams.orientation) { - jsPDFParams.orientation = options.orientation || "landscape"; - } - - if (!jsPDFParams.unit) { - jsPDFParams.unit = "pt"; - } - - //build column headers - function parseSimpleTitles() { - columns.forEach(function (column) { - if (column.field) { - header.push(column.title || ""); - fields.push(column.field); - } - }); - } - - function parseColumnGroup(column, level) { - if (column.subGroups) { - column.subGroups.forEach(function (subGroup) { - parseColumnGroup(subGroup, level + 1); - }); - } else { - header.push(column.title || ""); - fields.push(column.definition.field); - } - } - - if (config.columnGroups) { - console.warn("Download Warning - PDF downloader cannot process column groups"); - - columns.forEach(function (column) { - parseColumnGroup(column, 0); - }); - } else { - parseSimpleTitles(); - } - - function parseValue(value) { - switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - return value; - } - - function parseRows(data) { - //build table rows - data.forEach(function (row) { - var rowData = []; - - fields.forEach(function (field) { - var value = self.getFieldValue(field, row); - rowData.push(parseValue(value)); - }); - - body.push(rowData); - }); - } - - function parseGroup(group) { - var groupData = []; - - groupData.push(parseValue(group.key)); - - groupRowIndexs.push(body.length); - - body.push(groupData); - - if (group.subGroups) { - group.subGroups.forEach(function (subGroup) { - parseGroup(subGroup); - }); - } else { - parseRows(group.rows); - } - } - - if (config.rowGroups) { - data.forEach(function (group) { - parseGroup(group); - }); - } else { - parseRows(data); - } - - var doc = new jsPDF(jsPDFParams); //set document to landscape, better for most tables - - if (options && options.autoTable) { - if (typeof options.autoTable === "function") { - autoTableParams = options.autoTable(doc) || {}; - } else { - autoTableParams = options.autoTable; - } - } - - if (config.rowGroups) { - var createdCell = function createdCell(cell, data) { - if (groupRowIndexs.indexOf(data.row.index) > -1) { - for (var key in rowGroupStyles) { - cell.styles[key] = rowGroupStyles[key]; - } - } - }; - - rowGroupStyles = options.rowGroupStyles || { - fontStyle: "bold", - fontSize: 12, - cellPadding: 6, - fillColor: 220 - }; - - if (!autoTableParams.createdCell) { - autoTableParams.createdCell = createdCell; - } else { - var createdCellHolder = autoTableParams.createdCell; - - autoTableParams.createdCell = function (cell, data) { - createdCell(cell, data); - createdCellHolder(cell, data); - }; - } - } - - if (title) { - autoTableParams.addPageContent = function (data) { - doc.text(title, 40, 30); - }; - } - - doc.autoTable(header, body, autoTableParams); - - setFileContents(doc.output("arraybuffer"), "application/pdf"); - }, - - xlsx: function xlsx(columns, data, options, setFileContents, config) { - var self = this, - sheetName = options.sheetName || "Sheet1", - workbook = { SheetNames: [], Sheets: {} }, - groupRowIndexs = [], - groupColumnIndexs = [], - output; - - function generateSheet() { - var titles = [], - fields = [], - rows = [], - worksheet; - - //convert rows to worksheet - function rowsToSheet() { - var sheet = {}; - var range = { s: { c: 0, r: 0 }, e: { c: fields.length, r: rows.length } }; - - XLSX.utils.sheet_add_aoa(sheet, rows); - - sheet['!ref'] = XLSX.utils.encode_range(range); - - var merges = generateMerges(); - - if (merges.length) { - sheet["!merges"] = merges; - } - - return sheet; - } - - function parseSimpleTitles() { - //get field lists - columns.forEach(function (column) { - titles.push(column.title); - fields.push(column.field); - }); - - rows.push(titles); - } - - function parseColumnGroup(column, level) { - - if (typeof titles[level] === "undefined") { - titles[level] = []; - } - - if (typeof groupColumnIndexs[level] === "undefined") { - groupColumnIndexs[level] = []; - } - - if (column.width > 1) { - - groupColumnIndexs[level].push({ - type: "hoz", - start: titles[level].length, - end: titles[level].length + column.width - 1 - }); - } - - titles[level].push(column.title); - - if (column.subGroups) { - column.subGroups.forEach(function (subGroup) { - parseColumnGroup(subGroup, level + 1); - }); - } else { - fields.push(column.definition.field); - padColumnTitles(fields.length - 1, level); - - groupColumnIndexs[level].push({ - type: "vert", - start: fields.length - 1 - }); - } - } - - function padColumnTitles() { - var max = 0; - - titles.forEach(function (title) { - var len = title.length; - if (len > max) { - max = len; - } - }); - - titles.forEach(function (title) { - var len = title.length; - if (len < max) { - for (var i = len; i < max; i++) { - title.push(""); - } - } - }); - } - - if (config.columnGroups) { - columns.forEach(function (column) { - parseColumnGroup(column, 0); - }); - - titles.forEach(function (title) { - rows.push(title); - }); - } else { - parseSimpleTitles(); - } - - function generateMerges() { - var output = []; - - groupRowIndexs.forEach(function (index) { - output.push({ s: { r: index, c: 0 }, e: { r: index, c: fields.length - 1 } }); - }); - - groupColumnIndexs.forEach(function (merges, level) { - merges.forEach(function (merge) { - if (merge.type === "hoz") { - output.push({ s: { r: level, c: merge.start }, e: { r: level, c: merge.end } }); - } else { - if (level != titles.length - 1) { - output.push({ s: { r: level, c: merge.start }, e: { r: titles.length - 1, c: merge.start } }); - } - } - }); - }); - - return output; - } - - //generate each row of the table - function parseRows(data) { - data.forEach(function (row) { - var rowData = []; - - fields.forEach(function (field) { - var value = self.getFieldValue(field, row); - - rowData.push((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === "object" ? JSON.stringify(value) : value); - }); - - rows.push(rowData); - }); - } - - function parseGroup(group) { - var groupData = []; - - groupData.push(group.key); - - groupRowIndexs.push(rows.length); - - rows.push(groupData); - - if (group.subGroups) { - group.subGroups.forEach(function (subGroup) { - parseGroup(subGroup); - }); - } else { - parseRows(group.rows); - } - } - - if (config.rowGroups) { - data.forEach(function (group) { - parseGroup(group); - }); - } else { - parseRows(data); - } - - worksheet = rowsToSheet(); - - return worksheet; - } - - if (options.sheetOnly) { - setFileContents(generateSheet()); - return; - } - - if (options.sheets) { - for (var sheet in options.sheets) { - - if (options.sheets[sheet] === true) { - workbook.SheetNames.push(sheet); - workbook.Sheets[sheet] = generateSheet(); - } else { - - workbook.SheetNames.push(sheet); - - this.table.modules.comms.send(options.sheets[sheet], "download", "intercept", { - type: "xlsx", - options: { sheetOnly: true }, - intercept: function intercept(data) { - workbook.Sheets[sheet] = data; - } - }); - } - } - } else { - workbook.SheetNames.push(sheetName); - workbook.Sheets[sheetName] = generateSheet(); - } - - //convert workbook to binary array - function s2ab(s) { - var buf = new ArrayBuffer(s.length); - var view = new Uint8Array(buf); - for (var i = 0; i != s.length; ++i) { - view[i] = s.charCodeAt(i) & 0xFF; - }return buf; - } - - output = XLSX.write(workbook, { bookType: 'xlsx', bookSST: true, type: 'binary' }); - - setFileContents(s2ab(output), "application/octet-stream"); - } - - }; - - Tabulator.prototype.registerModule("download", Download); - var Edit = function Edit(table) { - this.table = table; //hold Tabulator object - this.currentCell = false; //hold currently editing cell - this.mouseClick = false; //hold mousedown state to prevent click binding being overriden by editor opening - this.recursionBlock = false; //prevent focus recursion - this.invalidEdit = false; - }; - - //initialize column editor - Edit.prototype.initializeColumn = function (column) { - var self = this, - config = { - editor: false, - blocked: false, - check: column.definition.editable, - params: column.definition.editorParams || {} - }; - - //set column editor - switch (_typeof(column.definition.editor)) { - case "string": - - if (column.definition.editor === "tick") { - column.definition.editor = "tickCross"; - console.warn("DEPRECATION WANRING - the tick editor has been depricated, please use the tickCross editor"); - } - - if (self.editors[column.definition.editor]) { - config.editor = self.editors[column.definition.editor]; - } else { - console.warn("Editor Error - No such editor found: ", column.definition.editor); - } - break; - - case "function": - config.editor = column.definition.editor; - break; - - case "boolean": - - if (column.definition.editor === true) { - - if (typeof column.definition.formatter !== "function") { - - if (column.definition.formatter === "tick") { - column.definition.formatter = "tickCross"; - console.warn("DEPRECATION WANRING - the tick editor has been depricated, please use the tickCross editor"); - } - - if (self.editors[column.definition.formatter]) { - config.editor = self.editors[column.definition.formatter]; - } else { - config.editor = self.editors["input"]; - } - } else { - console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ", column.definition.formatter); - } - } - break; - } - - if (config.editor) { - column.modules.edit = config; - } - }; - - Edit.prototype.getCurrentCell = function () { - return this.currentCell ? this.currentCell.getComponent() : false; - }; - - Edit.prototype.clearEditor = function () { - var cell = this.currentCell, - cellEl; - - this.invalidEdit = false; - - if (cell) { - this.currentCell = false; - - cellEl = cell.getElement(); - cellEl.classList.remove("tabulator-validation-fail"); - cellEl.classList.remove("tabulator-editing"); - while (cellEl.firstChild) { - cellEl.removeChild(cellEl.firstChild); - }cell.row.getElement().classList.remove("tabulator-row-editing"); - } - }; - - Edit.prototype.cancelEdit = function () { - - if (this.currentCell) { - var cell = this.currentCell; - var component = this.currentCell.getComponent(); - - this.clearEditor(); - cell.setValueActual(cell.getValue()); - - if (cell.column.cellEvents.cellEditCancelled) { - cell.column.cellEvents.cellEditCancelled.call(this.table, component); - } - - this.table.options.cellEditCancelled.call(this.table, component); - } - }; - - //return a formatted value for a cell - Edit.prototype.bindEditor = function (cell) { - var self = this, - element = cell.getElement(); - - element.setAttribute("tabindex", 0); - - element.addEventListener("click", function (e) { - if (!element.classList.contains("tabulator-editing")) { - element.focus(); - } - }); - - element.addEventListener("mousedown", function (e) { - self.mouseClick = true; - }); - - element.addEventListener("focus", function (e) { - if (!self.recursionBlock) { - self.edit(cell, e, false); - } - }); - }; - - Edit.prototype.focusCellNoEvent = function (cell) { - this.recursionBlock = true; - cell.getElement().focus(); - this.recursionBlock = false; - }; - - Edit.prototype.editCell = function (cell, forceEdit) { - this.focusCellNoEvent(cell); - this.edit(cell, false, forceEdit); - }; - - Edit.prototype.edit = function (cell, e, forceEdit) { - var self = this, - allowEdit = true, - rendered = function rendered() {}, - element = cell.getElement(), - cellEditor, - component, - params; - - //prevent editing if another cell is refusing to leave focus (eg. validation fail) - if (this.currentCell) { - if (!this.invalidEdit) { - this.cancelEdit(); - } - return; - } - - //handle successfull value change - function success(value) { - - if (self.currentCell === cell) { - var valid = true; - - if (cell.column.modules.validate && self.table.modExists("validate")) { - valid = self.table.modules.validate.validate(cell.column.modules.validate, cell.getComponent(), value); - } - - if (valid === true) { - self.clearEditor(); - cell.setValue(value, true); - - if (self.table.options.dataTree && self.table.modExists("dataTree")) { - self.table.modules.dataTree.checkForRestyle(cell); - } - } else { - self.invalidEdit = true; - element.classList.add("tabulator-validation-fail"); - self.focusCellNoEvent(cell); - rendered(); - self.table.options.validationFailed.call(self.table, cell.getComponent(), value, valid); - } - } else { - // console.warn("Edit Success Error - cannot call success on a cell that is no longer being edited"); - } - } - - //handle aborted edit - function cancel() { - if (self.currentCell === cell) { - self.cancelEdit(); - - if (self.table.options.dataTree && self.table.modExists("dataTree")) { - self.table.modules.dataTree.checkForRestyle(cell); - } - } else { - // console.warn("Edit Success Error - cannot call cancel on a cell that is no longer being edited"); - } - } - - function onRendered(callback) { - rendered = callback; - } - - if (!cell.column.modules.edit.blocked) { - if (e) { - e.stopPropagation(); - } - - switch (_typeof(cell.column.modules.edit.check)) { - case "function": - allowEdit = cell.column.modules.edit.check(cell.getComponent()); - break; - - case "boolean": - allowEdit = cell.column.modules.edit.check; - break; - } - - if (allowEdit || forceEdit) { - - self.cancelEdit(); - - self.currentCell = cell; - - component = cell.getComponent(); - - if (this.mouseClick) { - this.mouseClick = false; - - if (cell.column.cellEvents.cellClick) { - cell.column.cellEvents.cellClick.call(this.table, e, component); - } - } - - if (cell.column.cellEvents.cellEditing) { - cell.column.cellEvents.cellEditing.call(this.table, component); - } - - self.table.options.cellEditing.call(this.table, component); - - params = typeof cell.column.modules.edit.params === "function" ? cell.column.modules.edit.params(component) : cell.column.modules.edit.params; - - cellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params); - - //if editor returned, add to DOM, if false, abort edit - if (cellEditor !== false) { - - if (cellEditor instanceof Node) { - element.classList.add("tabulator-editing"); - cell.row.getElement().classList.add("tabulator-row-editing"); - while (element.firstChild) { - element.removeChild(element.firstChild); - }element.appendChild(cellEditor); - - //trigger onRendered Callback - rendered(); - - //prevent editing from triggering rowClick event - var children = element.children; - - for (var i = 0; i < children.length; i++) { - children[i].addEventListener("click", function (e) { - e.stopPropagation(); - }); - } - } else { - console.warn("Edit Error - Editor should return an instance of Node, the editor returned:", cellEditor); - element.blur(); - return false; - } - } else { - element.blur(); - return false; - } - - return true; - } else { - this.mouseClick = false; - element.blur(); - return false; - } - } else { - this.mouseClick = false; - element.blur(); - return false; - } - }; - - //default data editors - Edit.prototype.editors = { - - //input element - input: function input(cell, onRendered, success, cancel, editorParams) { - - //create and style input - var cellValue = cell.getValue(), - input = document.createElement("input"); - - input.setAttribute("type", "text"); - - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - - input.value = typeof cellValue !== "undefined" ? cellValue : ""; - - onRendered(function () { - input.focus(); - input.style.height = "100%"; - }); - - function onChange(e) { - if ((cellValue === null || typeof cellValue === "undefined") && input.value !== "" || input.value != cellValue) { - success(input.value); - } else { - cancel(); - } - } - - //submit new value on blur or change - input.addEventListener("change", onChange); - input.addEventListener("blur", onChange); - - //submit new value on enter - input.addEventListener("keydown", function (e) { - switch (e.keyCode) { - case 13: - success(input.value); - break; - - case 27: - cancel(); - break; - } - }); - - return input; - }, - - //resizable text area element - textarea: function textarea(cell, onRendered, success, cancel, editorParams) { - var self = this, - cellValue = cell.getValue(), - value = String(typeof cellValue == "null" || typeof cellValue == "undefined" ? "" : cellValue), - count = (value.match(/(?:\r\n|\r|\n)/g) || []).length + 1, - input = document.createElement("textarea"), - scrollHeight = 0; - - //create and style input - input.style.display = "block"; - input.style.padding = "2px"; - input.style.height = "100%"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - input.style.whiteSpace = "pre-wrap"; - input.style.resize = "none"; - - input.value = value; - - onRendered(function () { - input.focus(); - input.style.height = "100%"; - }); - - function onChange(e) { - - if ((cellValue === null || typeof cellValue === "undefined") && input.value !== "" || input.value != cellValue) { - success(input.value); - setTimeout(function () { - cell.getRow().normalizeHeight(); - }, 300); - } else { - cancel(); - } - } - - //submit new value on blur or change - input.addEventListener("change", onChange); - input.addEventListener("blur", onChange); - - input.addEventListener("keyup", function () { - - input.style.height = ""; - - var heightNow = input.scrollHeight; - - input.style.height = heightNow + "px"; - - if (heightNow != scrollHeight) { - scrollHeight = heightNow; - cell.getRow().normalizeHeight(); - } - }); - - input.addEventListener("keydown", function (e) { - if (e.keyCode == 27) { - cancel(); - } - }); - - return input; - }, - - //input element with type of number - number: function number(cell, onRendered, success, cancel, editorParams) { - - var cellValue = cell.getValue(), - input = document.createElement("input"); - - input.setAttribute("type", "number"); - - if (typeof editorParams.max != "undefined") { - input.setAttribute("max", editorParams.max); - } - - if (typeof editorParams.min != "undefined") { - input.setAttribute("min", editorParams.min); - } - - if (typeof editorParams.step != "undefined") { - input.setAttribute("step", editorParams.step); - } - - //create and style input - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - - input.value = cellValue; - - onRendered(function () { - input.focus(); - input.style.height = "100%"; - }); - - function onChange() { - var value = input.value; - - if (!isNaN(value) && value !== "") { - value = Number(value); - } - - if (value != cellValue) { - success(value); - } else { - cancel(); - } - } - - //submit new value on blur - input.addEventListener("blur", function (e) { - onChange(); - }); - - //submit new value on enter - input.addEventListener("keydown", function (e) { - switch (e.keyCode) { - case 13: - case 9: - onChange(); - break; - - case 27: - cancel(); - break; - } - }); - - return input; - }, - - //input element with type of number - range: function range(cell, onRendered, success, cancel, editorParams) { - - var cellValue = cell.getValue(), - input = document.createElement("input"); - - input.setAttribute("type", "range"); - - if (typeof editorParams.max != "undefined") { - input.setAttribute("max", editorParams.max); - } - - if (typeof editorParams.min != "undefined") { - input.setAttribute("min", editorParams.min); - } - - if (typeof editorParams.step != "undefined") { - input.setAttribute("step", editorParams.step); - } - - //create and style input - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - - input.value = cellValue; - - onRendered(function () { - input.focus(); - input.style.height = "100%"; - }); - - function onChange() { - var value = input.value; - - if (!isNaN(value) && value !== "") { - value = Number(value); - } - - if (value != cellValue) { - success(value); - } else { - cancel(); - } - } - - //submit new value on blur - input.addEventListener("blur", function (e) { - onChange(); - }); - - //submit new value on enter - input.addEventListener("keydown", function (e) { - switch (e.keyCode) { - case 13: - case 9: - onChange(); - break; - - case 27: - cancel(); - break; - } - }); - - return input; - }, - - //select - select: function select(cell, onRendered, success, cancel, editorParams) { - var self = this, - cellEl = cell.getElement(), - initialValue = cell.getValue(), - input = document.createElement("input"), - listEl = document.createElement("div"), - dataItems = [], - displayItems = [], - currentItem = {}, - blurable = true; - - if (Array.isArray(editorParams) || !Array.isArray(editorParams) && (typeof editorParams === 'undefined' ? 'undefined' : _typeof(editorParams)) === "object" && !editorParams.values) { - console.warn("DEPRECATION WANRING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"); - editorParams = { values: editorParams }; - } - - function getUniqueColumnValues() { - var output = {}, - column = cell.getColumn()._getSelf(), - data = self.table.getData(); - - data.forEach(function (row) { - var val = column.getFieldValue(row); - - if (val !== null && typeof val !== "undefined" && val !== "") { - output[val] = true; - } - }); - - return Object.keys(output); - } - - function parseItems(inputValues, curentValue) { - var dataList = []; - var displayList = []; - - function processComplexListItem(item) { - var item = { - label: editorParams.listItemFormatter ? editorParams.listItemFormatter(item.value, item.label) : item.label, - value: item.value, - element: false - }; - - if (item.value === curentValue) { - setCurrentItem(item); - } - - dataList.push(item); - displayList.push(item); - - return item; - } - - if (typeof inputValues == "function") { - inputValues = inputValues(cell); - } - - if (Array.isArray(inputValues)) { - inputValues.forEach(function (value) { - var item; - - if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === "object") { - - if (value.options) { - item = { - label: value.label, - group: true, - element: false - }; - - displayList.push(item); - - value.options.forEach(function (item) { - processComplexListItem(item); - }); - } else { - processComplexListItem(value); - } - } else { - item = { - label: editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value, - value: value, - element: false - }; - - if (item.value === curentValue) { - setCurrentItem(item); - } - - dataList.push(item); - displayList.push(item); - } - }); - } else { - for (var key in inputValues) { - var item = { - label: editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : inputValues[key], - value: key, - element: false - }; - - if (item.value === curentValue) { - setCurrentItem(item); - } - - dataList.push(item); - displayList.push(item); - } - } - - dataItems = dataList; - displayItems = displayList; - - fillList(); - } - - function fillList() { - while (listEl.firstChild) { - listEl.removeChild(listEl.firstChild); - }displayItems.forEach(function (item) { - var el = item.element; - - if (!el) { - - if (item.group) { - el = document.createElement("div"); - el.classList.add("tabulator-edit-select-list-group"); - el.tabIndex = 0; - el.innerHTML = item.label === "" ? " " : item.label; - } else { - el = document.createElement("div"); - el.classList.add("tabulator-edit-select-list-item"); - el.tabIndex = 0; - el.innerHTML = item.label === "" ? " " : item.label; - - el.addEventListener("click", function () { - setCurrentItem(item); - chooseItem(); - }); - - if (item === currentItem) { - el.classList.add("active"); - } - } - - el.addEventListener("mousedown", function () { - blurable = false; - - setTimeout(function () { - blurable = true; - }, 10); - }); - - item.element = el; - } - - listEl.appendChild(el); - }); - } - - function setCurrentItem(item) { - - if (currentItem && currentItem.element) { - currentItem.element.classList.remove("active"); - } - - currentItem = item; - input.value = item.label === " " ? "" : item.label; - - if (item.element) { - item.element.classList.add("active"); - } - } - - function chooseItem() { - hideList(); - - if (initialValue !== currentItem.value) { - initialValue = currentItem.value; - success(currentItem.value); - } else { - cancel(); - } - } - - function cancelItem() { - hideList(); - cancel(); - } - - function showList() { - if (!listEl.parentNode) { - - if (editorParams.values === true) { - parseItems(getUniqueColumnValues(), initialValue); - } else { - parseItems(editorParams.values || [], initialValue); - } - - var offset = Tabulator.prototype.helpers.elOffset(cellEl); - - listEl.style.minWidth = cellEl.offsetWidth + "px"; - - listEl.style.top = offset.top + cellEl.offsetHeight + "px"; - listEl.style.left = offset.left + "px"; - document.body.appendChild(listEl); - } - } - - function hideList() { - if (listEl.parentNode) { - listEl.parentNode.removeChild(listEl); - } - } - - //style input - input.setAttribute("type", "text"); - - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - input.readonly = true; - - //allow key based navigation - input.addEventListener("keydown", function (e) { - var index; - - switch (e.keyCode) { - case 38: - //up arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - - index = dataItems.indexOf(currentItem); - - if (index > 0) { - setCurrentItem(dataItems[index - 1]); - } - break; - - case 40: - //down arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - - index = dataItems.indexOf(currentItem); - - if (index < dataItems.length - 1) { - if (index == -1) { - setCurrentItem(dataItems[0]); - } else { - setCurrentItem(dataItems[index + 1]); - } - } - break; - - case 13: - //enter - chooseItem(); - break; - - case 27: - //escape - cancelItem(); - break; - } - }); - - input.addEventListener("blur", function (e) { - if (blurable) { - cancelItem(); - } - }); - - input.addEventListener("focus", function (e) { - showList(); - }); - - //style list element - listEl = document.createElement("div"); - listEl.classList.add("tabulator-edit-select-list"); - - onRendered(function () { - input.style.height = "100%"; - input.focus(); - }); - - return input; - }, - - //autocomplete - autocomplete: function autocomplete(cell, onRendered, success, cancel, editorParams) { - var self = this, - cellEl = cell.getElement(), - initialValue = cell.getValue(), - input = document.createElement("input"), - listEl = document.createElement("div"), - allItems = [], - displayItems = [], - currentItem = {}, - blurable = true; - - function getUniqueColumnValues() { - var output = {}, - column = cell.getColumn()._getSelf(), - data = self.table.getData(); - - data.forEach(function (row) { - var val = column.getFieldValue(row); - - if (val !== null && typeof val !== "undefined" && val !== "") { - output[val] = true; - } - }); - - return Object.keys(output); - } - - function parseItems(inputValues, curentValue) { - var itemList = []; - - if (Array.isArray(inputValues)) { - inputValues.forEach(function (value) { - var item = { - title: editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value, - value: value, - element: false - }; - - if (item.value === curentValue) { - setCurrentItem(item); - } - - itemList.push(item); - }); - } else { - for (var key in inputValues) { - var item = { - title: editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : inputValues[key], - value: key, - element: false - }; - - if (item.value === curentValue) { - setCurrentItem(item); - } - - itemList.push(item); - } - } - - allItems = itemList; - } - - function filterList(term) { - var matches = []; - - if (editorParams.searchFunc) { - matches = editorParams.searchFunc(term, values); - } else { - if (term === "") { - - if (editorParams.showListOnEmpty) { - allItems.forEach(function (item) { - matches.push(item); - }); - } - } else { - allItems.forEach(function (item) { - - if (item.value !== null || typeof item.value !== "undefined") { - if (String(item.value).toLowerCase().indexOf(String(term).toLowerCase()) > -1) { - matches.push(item); - } - } - }); - } - } - - displayItems = matches; - - fillList(); - } - - function fillList() { - var current = false; - - while (listEl.firstChild) { - listEl.removeChild(listEl.firstChild); - }displayItems.forEach(function (item) { - var el = item.element; - - if (!el) { - el = document.createElement("div"); - el.classList.add("tabulator-edit-select-list-item"); - el.tabIndex = 0; - el.innerHTML = item.title; - - el.addEventListener("click", function () { - setCurrentItem(item); - chooseItem(); - }); - - el.addEventListener("mousedown", function () { - blurable = false; - - setTimeout(function () { - blurable = true; - }, 10); - }); - - item.element = el; - - if (item === currentItem) { - item.element.classList.add("active"); - current = true; - } - } - - listEl.appendChild(el); - }); - - if (!current) { - setCurrentItem(false); - } - } - - function setCurrentItem(item, showInputValue) { - if (currentItem && currentItem.element) { - currentItem.element.classList.remove("active"); - } - - currentItem = item; - - if (item && item.element) { - item.element.classList.add("active"); - } - } - - function chooseItem() { - hideList(); - - if (currentItem) { - if (initialValue !== currentItem.value) { - initialValue = currentItem.value; - input.value = currentItem.value; - success(input.value); - } else { - cancel(); - } - } else { - if (editorParams.freetext) { - initialValue = input.value; - success(input.value); - } else { - if (editorParams.allowEmpty && input.value === "") { - initialValue = input.value; - success(input.value); - } else { - cancel(); - } - } - } - } - - function cancelItem() { - hideList(); - cancel(); - } - - function showList() { - if (!listEl.parentNode) { - while (listEl.firstChild) { - listEl.removeChild(listEl.firstChild); - }if (editorParams.values === true) { - parseItems(getUniqueColumnValues(), initialValue); - } else { - parseItems(editorParams.values || [], initialValue); - } - - var offset = Tabulator.prototype.helpers.elOffset(cellEl); - - listEl.style.minWidth = cellEl.offsetWidth + "px"; - - listEl.style.top = offset.top + cellEl.offsetHeight + "px"; - listEl.style.left = offset.left + "px"; - document.body.appendChild(listEl); - } - } - - function hideList() { - if (listEl.parentNode) { - listEl.parentNode.removeChild(listEl); - } - } - - //style input - input.setAttribute("type", "text"); - - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - - //allow key based navigation - input.addEventListener("keydown", function (e) { - var index; - - switch (e.keyCode) { - case 38: - //up arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - - index = displayItems.indexOf(currentItem); - - if (index > 0) { - setCurrentItem(displayItems[index - 1]); - } else { - setCurrentItem(false); - } - break; - - case 40: - //down arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - - index = displayItems.indexOf(currentItem); - - if (index < displayItems.length - 1) { - if (index == -1) { - setCurrentItem(displayItems[0]); - } else { - setCurrentItem(displayItems[index + 1]); - } - } - break; - - case 13: - //enter - chooseItem(); - break; - - case 27: - //escape - cancelItem(); - break; - } - }); - - input.addEventListener("keyup", function (e) { - - switch (e.keyCode) { - case 38: //up arrow - case 37: //left arrow - case 39: //up arrow - case 40: //right arrow - case 13: //enter - case 27: - //escape - break; - - default: - filterList(input.value); - } - }); - - input.addEventListener("blur", function (e) { - if (blurable) { - chooseItem(); - } - }); - - input.addEventListener("focus", function (e) { - showList(); - input.value = initialValue; - filterList(initialValue); - }); - - //style list element - listEl = document.createElement("div"); - listEl.classList.add("tabulator-edit-select-list"); - - onRendered(function () { - input.style.height = "100%"; - input.focus(); - }); - - return input; - }, - - //start rating - star: function star(cell, onRendered, success, cancel, editorParams) { - var self = this, - element = cell.getElement(), - value = cell.getValue(), - maxStars = element.getElementsByTagName("svg").length || 5, - size = element.getElementsByTagName("svg")[0] ? element.getElementsByTagName("svg")[0].getAttribute("width") : 14, - stars = [], - starsHolder = document.createElement("div"), - star = document.createElementNS('http://www.w3.org/2000/svg', "svg"); - - //change star type - function starChange(val) { - stars.forEach(function (star, i) { - if (i < val) { - if (self.table.browser == "ie") { - star.setAttribute("class", "tabulator-star-active"); - } else { - star.classList.replace("tabulator-star-inactive", "tabulator-star-active"); - } - - star.innerHTML = ''; - } else { - if (self.table.browser == "ie") { - star.setAttribute("class", "tabulator-star-inactive"); - } else { - star.classList.replace("tabulator-star-active", "tabulator-star-inactive"); - } - - star.innerHTML = ''; - } - }); - } - - //build stars - function buildStar(i) { - var nextStar = star.cloneNode(true); - - stars.push(nextStar); - - nextStar.addEventListener("mouseover", function (e) { - e.stopPropagation(); - starChange(i); - }); - - nextStar.addEventListener("click", function (e) { - e.stopPropagation(); - success(i); - }); - - starsHolder.appendChild(nextStar); - } - - //handle keyboard navigation value change - function changeValue(val) { - value = val; - starChange(val); - } - - //style cell - element.style.whiteSpace = "nowrap"; - element.style.overflow = "hidden"; - element.style.textOverflow = "ellipsis"; - - //style holding element - starsHolder.style.verticalAlign = "middle"; - starsHolder.style.display = "inline-block"; - starsHolder.style.padding = "4px"; - - //style star - star.setAttribute("width", size); - star.setAttribute("height", size); - star.setAttribute("viewBox", "0 0 512 512"); - star.setAttribute("xml:space", "preserve"); - star.style.padding = "0 1px"; - - //create correct number of stars - for (var i = 1; i <= maxStars; i++) { - buildStar(i); - } - - //ensure value does not exceed number of stars - value = Math.min(parseInt(value), maxStars); - - // set initial styling of stars - starChange(value); - - starsHolder.addEventListener("mouseover", function (e) { - starChange(0); - }); - - starsHolder.addEventListener("click", function (e) { - success(0); - }); - - element.addEventListener("blur", function (e) { - cancel(); - }); - - //allow key based navigation - element.addEventListener("keydown", function (e) { - switch (e.keyCode) { - case 39: - //right arrow - changeValue(value + 1); - break; - - case 37: - //left arrow - changeValue(value - 1); - break; - - case 13: - //enter - success(value); - break; - - case 27: - //escape - cancel(); - break; - } - }); - - return starsHolder; - }, - - //draggable progress bar - progress: function progress(cell, onRendered, success, cancel, editorParams) { - var element = cell.getElement(), - max = typeof editorParams.max === "undefined" ? element.getElementsByTagName("div")[0].getAttribute("max") || 100 : editorParams.max, - min = typeof editorParams.min === "undefined" ? element.getElementsByTagName("div")[0].getAttribute("min") || 0 : editorParams.min, - percent = (max - min) / 100, - value = cell.getValue() || 0, - handle = document.createElement("div"), - bar = document.createElement("div"), - mouseDrag, - mouseDragWidth; - - //set new value - function updateValue() { - var calcVal = percent * Math.round(bar.offsetWidth / (element.clientWidth / 100)) + min; - success(calcVal); - element.setAttribute("aria-valuenow", calcVal); - element.setAttribute("aria-label", value); - } - - //style handle - handle.style.position = "absolute"; - handle.style.right = "0"; - handle.style.top = "0"; - handle.style.bottom = "0"; - handle.style.width = "5px"; - handle.classList.add("tabulator-progress-handle"); - - //style bar - bar.style.display = "inline-block"; - bar.style.position = "absolute"; - bar.style.top = "8px"; - bar.style.bottom = "8px"; - bar.style.left = "4px"; - bar.style.marginRight = "4px"; - bar.style.backgroundColor = "#488CE9"; - bar.style.maxWidth = "100%"; - bar.style.minWidth = "0%"; - - //style cell - element.style.padding = "0 4px"; - - //make sure value is in range - value = Math.min(parseFloat(value), max); - value = Math.max(parseFloat(value), min); - - //workout percentage - value = 100 - Math.round((value - min) / percent); - bar.style.right = value + "%"; - - element.setAttribute("aria-valuemin", min); - element.setAttribute("aria-valuemax", max); - - bar.appendChild(handle); - - handle.addEventListener("mousedown", function (e) { - mouseDrag = e.screenX; - mouseDragWidth = bar.offsetWidth; - }); - - handle.addEventListener("mouseover", function () { - handle.style.cursor = "ew-resize"; - }); - - element.addEventListener("mousemove", function (e) { - if (mouseDrag) { - bar.style.width = mouseDragWidth + e.screenX - mouseDrag + "px"; - } - }); - - element.addEventListener("mouseup", function (e) { - if (mouseDrag) { - e.stopPropagation(); - e.stopImmediatePropagation(); - - mouseDrag = false; - mouseDragWidth = false; - - updateValue(); - } - }); - - //allow key based navigation - element.addEventListener("keydown", function (e) { - switch (e.keyCode) { - case 39: - //right arrow - bar.style.width = bar.clientWidth + element.clientWidth / 100 + "px"; - break; - - case 37: - //left arrow - bar.style.width = bar.clientWidth - element.clientWidth / 100 + "px"; - break; - - case 13: - //enter - updateValue(); - break; - - case 27: - //escape - cancel(); - break; - - } - }); - - element.addEventListener("blur", function () { - cancel(); - }); - - return bar; - }, - - //checkbox - tickCross: function tickCross(cell, onRendered, success, cancel, editorParams) { - var value = cell.getValue(), - input = document.createElement("input"), - tristate = editorParams.tristate, - indetermValue = typeof editorParams.indeterminateValue === "undefined" ? null : editorParams.indeterminateValue, - indetermState = false; - - input.setAttribute("type", "checkbox"); - input.style.marginTop = "5px"; - input.style.boxSizing = "border-box"; - - input.value = value; - - if (tristate && (typeof value === "undefined" || value === indetermValue || value === "")) { - indetermState = true; - input.indeterminate = true; - } - - if (this.table.browser != "firefox") { - //prevent blur issue on mac firefox - onRendered(function () { - input.focus(); - }); - } - - input.checked = value === true || value === "true" || value === "True" || value === 1; - - function setValue(blur) { - if (tristate) { - if (!blur) { - if (input.checked && !indetermState) { - input.checked = false; - input.indeterminate = true; - indetermState = true; - return indetermValue; - } else { - indetermState = false; - return input.checked; - } - } else { - if (indetermState) { - return indetermValue; - } else { - return input.checked; - } - } - } else { - return input.checked; - } - } - - //submit new value on blur - input.addEventListener("change", function (e) { - success(setValue()); - }); - - input.addEventListener("blur", function (e) { - success(setValue(true)); - }); - - //submit new value on enter - input.addEventListener("keydown", function (e) { - if (e.keyCode == 13) { - success(setValue()); - } - if (e.keyCode == 27) { - cancel(); - } - }); - - return input; - } - }; - - Tabulator.prototype.registerModule("edit", Edit); - var Filter = function Filter(table) { - - this.table = table; //hold Tabulator object - - this.filterList = []; //hold filter list - this.headerFilters = {}; //hold column filters - this.headerFilterElements = []; //hold header filter elements for manipulation - this.headerFilterColumns = []; //hold columns that use header filters - - this.changed = false; //has filtering changed since last render - }; - - //initialize column header filter - Filter.prototype.initializeColumn = function (column, value) { - var self = this, - field = column.getField(), - prevSuccess, - params; - - //handle successfull value change - function success(value) { - var filterType = column.modules.filter.tagType == "input" && column.modules.filter.attrType == "text" || column.modules.filter.tagType == "textarea" ? "partial" : "match", - type = "", - filterFunc; - - if (typeof prevSuccess === "undefined" || prevSuccess !== value) { - - prevSuccess = value; - - if (!column.modules.filter.emptyFunc(value)) { - column.modules.filter.value = value; - - switch (_typeof(column.definition.headerFilterFunc)) { - case "string": - if (self.filters[column.definition.headerFilterFunc]) { - type = column.definition.headerFilterFunc; - filterFunc = function filterFunc(data) { - return self.filters[column.definition.headerFilterFunc](value, column.getFieldValue(data)); - }; - } else { - console.warn("Header Filter Error - Matching filter function not found: ", column.definition.headerFilterFunc); - } - break; - - case "function": - filterFunc = function filterFunc(data) { - var params = column.definition.headerFilterFuncParams || {}; - var fieldVal = column.getFieldValue(data); - - params = typeof params === "function" ? params(value, fieldVal, data) : params; - - return column.definition.headerFilterFunc(value, fieldVal, data, params); - }; - - type = filterFunc; - break; - } - - if (!filterFunc) { - switch (filterType) { - case "partial": - filterFunc = function filterFunc(data) { - return String(column.getFieldValue(data)).toLowerCase().indexOf(String(value).toLowerCase()) > -1; - }; - type = "like"; - break; - - default: - filterFunc = function filterFunc(data) { - return column.getFieldValue(data) == value; - }; - type = "="; - } - } - - self.headerFilters[field] = { value: value, func: filterFunc, type: type }; - } else { - delete self.headerFilters[field]; - } - - self.changed = true; - - self.table.rowManager.filterRefresh(); - } - } - - column.modules.filter = { - success: success, - attrType: false, - tagType: false, - emptyFunc: false - }; - - this.generateHeaderFilterElement(column); - }; - - Filter.prototype.generateHeaderFilterElement = function (column, initialValue) { - var self = this, - success = column.modules.filter.success, - field = column.getField(), - filterElement, - editor, - editorElement, - cellWrapper, - typingTimer, - searchTrigger, - params; - - //handle aborted edit - function cancel() {} - - if (column.modules.filter.headerElement && column.modules.filter.headerElement.parentNode) { - column.modules.filter.headerElement.parentNode.removeChild(column.modules.filter.headerElement); - } - - if (field) { - - //set empty value function - column.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function (value) { - return !value && value !== "0"; - }; - - filterElement = document.createElement("div"); - filterElement.classList.add("tabulator-header-filter"); - - //set column editor - switch (_typeof(column.definition.headerFilter)) { - case "string": - if (self.table.modules.edit.editors[column.definition.headerFilter]) { - editor = self.table.modules.edit.editors[column.definition.headerFilter]; - - if ((column.definition.headerFilter === "tick" || column.definition.headerFilter === "tickCross") && !column.definition.headerFilterEmptyCheck) { - column.modules.filter.emptyFunc = function (value) { - return value !== true && value !== false; - }; - } - } else { - console.warn("Filter Error - Cannot build header filter, No such editor found: ", column.definition.editor); - } - break; - - case "function": - editor = column.definition.headerFilter; - break; - - case "boolean": - if (column.modules.edit && column.modules.edit.editor) { - editor = column.modules.edit.editor; - } else { - if (column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]) { - editor = self.table.modules.edit.editors[column.definition.formatter]; - - if ((column.definition.formatter === "tick" || column.definition.formatter === "tickCross") && !column.definition.headerFilterEmptyCheck) { - column.modules.filter.emptyFunc = function (value) { - return value !== true && value !== false; - }; - } - } else { - editor = self.table.modules.edit.editors["input"]; - } - } - break; - } - - if (editor) { - - cellWrapper = { - getValue: function getValue() { - return typeof initialValue !== "undefined" ? initialValue : ""; - }, - getField: function getField() { - return column.definition.field; - }, - getElement: function getElement() { - return filterElement; - }, - getColumn: function getColumn() { - return column.getComponent(); - }, - getRow: function getRow() { - return { - normalizeHeight: function normalizeHeight() {} - }; - } - }; - - params = column.definition.headerFilterParams || {}; - - params = typeof params === "function" ? params.call(self.table) : params; - - editorElement = editor.call(this.table.modules.edit, cellWrapper, function () {}, success, cancel, params); - - if (!editorElement) { - console.warn("Filter Error - Cannot add filter to " + field + " column, editor returned a value of false"); - return; - } - - if (!(editorElement instanceof Node)) { - console.warn("Filter Error - Cannot add filter to " + field + " column, editor should return an instance of Node, the editor returned:", editorElement); - return; - } - - //set Placeholder Text - if (field) { - self.table.modules.localize.bind("headerFilters|columns|" + column.definition.field, function (value) { - editorElement.setAttribute("placeholder", typeof value !== "undefined" && value ? value : self.table.modules.localize.getText("headerFilters|default")); - }); - } else { - self.table.modules.localize.bind("headerFilters|default", function (value) { - editorElement.setAttribute("placeholder", typeof self.column.definition.headerFilterPlaceholder !== "undefined" && self.column.definition.headerFilterPlaceholder ? self.column.definition.headerFilterPlaceholder : value); - }); - } - - //focus on element on click - editorElement.addEventListener("click", function (e) { - e.stopPropagation(); - editorElement.focus(); - }); - - //live update filters as user types - typingTimer = false; - - searchTrigger = function searchTrigger(e) { - if (typingTimer) { - clearTimeout(typingTimer); - } - - typingTimer = setTimeout(function () { - success(editorElement.value); - }, 300); - }; - - column.modules.filter.headerElement = editorElement; - column.modules.filter.attrType = editorElement.hasAttribute("type") ? editorElement.getAttribute("type").toLowerCase() : ""; - column.modules.filter.tagType = editorElement.tagName.toLowerCase(); - - if (column.definition.headerFilterLiveFilter !== false) { - - if (!(column.definition.headerFilter === "autocomplete" || column.definition.editor === "autocomplete" && column.definition.headerFilter === true)) { - editorElement.addEventListener("keyup", searchTrigger); - editorElement.addEventListener("search", searchTrigger); - - //update number filtered columns on change - if (column.modules.filter.attrType == "number") { - editorElement.addEventListener("change", function (e) { - success(editorElement.value); - }); - } - - //change text inputs to search inputs to allow for clearing of field - if (column.modules.filter.attrType == "text" && this.table.browser !== "ie") { - editorElement.setAttribute("type", "search"); - // editorElement.off("change blur"); //prevent blur from triggering filter and preventing selection click - } - } - - //prevent input and select elements from propegating click to column sorters etc - if (column.modules.filter.tagType == "input" || column.modules.filter.tagType == "select" || column.modules.filter.tagType == "textarea") { - editorElement.addEventListener("mousedown", function (e) { - e.stopPropagation(); - }); - } - } - - filterElement.appendChild(editorElement); - - column.contentElement.appendChild(filterElement); - - self.headerFilterElements.push(editorElement); - self.headerFilterColumns.push(column); - } - } else { - console.warn("Filter Error - Cannot add header filter, column has no field set:", column.definition.title); - } - }; - - //hide all header filter elements (used to ensure correct column widths in "fitData" layout mode) - Filter.prototype.hideHeaderFilterElements = function () { - this.headerFilterElements.forEach(function (element) { - element.style.display = 'none'; - }); - }; - - //show all header filter elements (used to ensure correct column widths in "fitData" layout mode) - Filter.prototype.showHeaderFilterElements = function () { - this.headerFilterElements.forEach(function (element) { - element.style.display = ''; - }); - }; - - //programatically set value of header filter - Filter.prototype.setHeaderFilterFocus = function (column) { - if (column.modules.filter && column.modules.filter.headerElement) { - column.modules.filter.headerElement.focus(); - } else { - console.warn("Column Filter Focus Error - No header filter set on column:", column.getField()); - } - }; - - //programatically set value of header filter - Filter.prototype.setHeaderFilterValue = function (column, value) { - if (column) { - if (column.modules.filter && column.modules.filter.headerElement) { - this.generateHeaderFilterElement(column, value); - column.modules.filter.success(value); - } else { - console.warn("Column Filter Error - No header filter set on column:", column.getField()); - } - } - }; - - Filter.prototype.reloadHeaderFilter = function (column) { - if (column) { - if (column.modules.filter && column.modules.filter.headerElement) { - this.generateHeaderFilterElement(column, column.modules.filter.value); - } else { - console.warn("Column Filter Error - No header filter set on column:", column.getField()); - } - } - }; - - //check if the filters has changed since last use - Filter.prototype.hasChanged = function () { - var changed = this.changed; - this.changed = false; - return changed; - }; - - //set standard filters - Filter.prototype.setFilter = function (field, type, value) { - var self = this; - - self.filterList = []; - - if (!Array.isArray(field)) { - field = [{ field: field, type: type, value: value }]; - } - - self.addFilter(field); - }; - - //add filter to array - Filter.prototype.addFilter = function (field, type, value) { - var self = this; - - if (!Array.isArray(field)) { - field = [{ field: field, type: type, value: value }]; - } - - field.forEach(function (filter) { - - filter = self.findFilter(filter); - - if (filter) { - self.filterList.push(filter); - - self.changed = true; - } - }); - - if (this.table.options.persistentFilter && this.table.modExists("persistence", true)) { - this.table.modules.persistence.save("filter"); - } - }; - - Filter.prototype.findFilter = function (filter) { - var self = this, - column; - - if (Array.isArray(filter)) { - return this.findSubFilters(filter); - } - - var filterFunc = false; - - if (typeof filter.field == "function") { - filterFunc = function filterFunc(data) { - return filter.field(data, filter.type || {}); // pass params to custom filter function - }; - } else { - - if (self.filters[filter.type]) { - - column = self.table.columnManager.getColumnByField(filter.field); - - if (column) { - filterFunc = function filterFunc(data) { - return self.filters[filter.type](filter.value, column.getFieldValue(data)); - }; - } else { - filterFunc = function filterFunc(data) { - return self.filters[filter.type](filter.value, data[filter.field]); - }; - } - } else { - console.warn("Filter Error - No such filter type found, ignoring: ", filter.type); - } - } - - filter.func = filterFunc; - - return filter.func ? filter : false; - }; - - Filter.prototype.findSubFilters = function (filters) { - var self = this, - output = []; - - filters.forEach(function (filter) { - filter = self.findFilter(filter); - - if (filter) { - output.push(filter); - } - }); - - return output.length ? output : false; - }; - - //get all filters - Filter.prototype.getFilters = function (all, ajax) { - var self = this, - output = []; - - if (all) { - output = self.getHeaderFilters(); - } - - self.filterList.forEach(function (filter) { - output.push({ field: filter.field, type: filter.type, value: filter.value }); - }); - - if (ajax) { - output.forEach(function (item) { - if (typeof item.type == "function") { - item.type = "function"; - } - }); - } - - return output; - }; - - //get all filters - Filter.prototype.getHeaderFilters = function () { - var self = this, - output = []; - - for (var key in this.headerFilters) { - output.push({ field: key, type: this.headerFilters[key].type, value: this.headerFilters[key].value }); - } - - return output; - }; - - //remove filter from array - Filter.prototype.removeFilter = function (field, type, value) { - var self = this; - - if (!Array.isArray(field)) { - field = [{ field: field, type: type, value: value }]; - } - - field.forEach(function (filter) { - var index = -1; - - if (_typeof(filter.field) == "object") { - index = self.filterList.findIndex(function (element) { - return filter === element; - }); - } else { - index = self.filterList.findIndex(function (element) { - return filter.field === element.field && filter.type === element.type && filter.value === element.value; - }); - } - - if (index > -1) { - self.filterList.splice(index, 1); - self.changed = true; - } else { - console.warn("Filter Error - No matching filter type found, ignoring: ", filter.type); - } - }); - - if (this.table.options.persistentFilter && this.table.modExists("persistence", true)) { - this.table.modules.persistence.save("filter"); - } - }; - - //clear filters - Filter.prototype.clearFilter = function (all) { - this.filterList = []; - - if (all) { - this.clearHeaderFilter(); - } - - this.changed = true; - - if (this.table.options.persistentFilter && this.table.modExists("persistence", true)) { - this.table.modules.persistence.save("filter"); - } - }; - - //clear header filters - Filter.prototype.clearHeaderFilter = function () { - var self = this; - - this.headerFilters = {}; - - this.headerFilterColumns.forEach(function (column) { - column.modules.filter.value = null; - self.reloadHeaderFilter(column); - }); - - this.changed = true; - }; - - //search data and return matching rows - Filter.prototype.search = function (searchType, field, type, value) { - var self = this, - activeRows = [], - filterList = []; - - if (!Array.isArray(field)) { - field = [{ field: field, type: type, value: value }]; - } - - field.forEach(function (filter) { - filter = self.findFilter(filter); - - if (filter) { - filterList.push(filter); - } - }); - - this.table.rowManager.rows.forEach(function (row) { - var match = true; - - filterList.forEach(function (filter) { - if (!self.filterRecurse(filter, row.getData())) { - match = false; - } - }); - - if (match) { - activeRows.push(searchType === "data" ? row.getData("data") : row.getComponent()); - } - }); - - return activeRows; - }; - - //filter row array - Filter.prototype.filter = function (rowList, filters) { - var self = this, - activeRows = [], - activeRowComponents = []; - - if (self.table.options.dataFiltering) { - self.table.options.dataFiltering.call(self.table, self.getFilters()); - } - - if (!self.table.options.ajaxFiltering && (self.filterList.length || Object.keys(self.headerFilters).length)) { - - rowList.forEach(function (row) { - if (self.filterRow(row)) { - activeRows.push(row); - } - }); - } else { - activeRows = rowList.slice(0); - } - - if (self.table.options.dataFiltered) { - - activeRows.forEach(function (row) { - activeRowComponents.push(row.getComponent()); - }); - - self.table.options.dataFiltered.call(self.table, self.getFilters(), activeRowComponents); - } - - return activeRows; - }; - - //filter individual row - Filter.prototype.filterRow = function (row, filters) { - var self = this, - match = true, - data = row.getData(); - - self.filterList.forEach(function (filter) { - if (!self.filterRecurse(filter, data)) { - match = false; - } - }); - - for (var field in self.headerFilters) { - if (!self.headerFilters[field].func(data)) { - match = false; - } - } - - return match; - }; - - Filter.prototype.filterRecurse = function (filter, data) { - var self = this, - match = false; - - if (Array.isArray(filter)) { - filter.forEach(function (subFilter) { - if (self.filterRecurse(subFilter, data)) { - match = true; - } - }); - } else { - match = filter.func(data); - } - - return match; - }; - - //list of available filters - Filter.prototype.filters = { - - //equal to - "=": function _(filterVal, rowVal) { - return rowVal == filterVal ? true : false; - }, - - //less than - "<": function _(filterVal, rowVal) { - return rowVal < filterVal ? true : false; - }, - - //less than or equal to - "<=": function _(filterVal, rowVal) { - return rowVal <= filterVal ? true : false; - }, - - //greater than - ">": function _(filterVal, rowVal) { - return rowVal > filterVal ? true : false; - }, - - //greater than or equal to - ">=": function _(filterVal, rowVal) { - return rowVal >= filterVal ? true : false; - }, - - //not equal to - "!=": function _(filterVal, rowVal) { - return rowVal != filterVal ? true : false; - }, - - "regex": function regex(filterVal, rowVal) { - - if (typeof filterVal == "string") { - filterVal = new RegExp(filterVal); - } - - return filterVal.test(rowVal); - }, - - //contains the string - "like": function like(filterVal, rowVal) { - if (filterVal === null || typeof filterVal === "undefined") { - return rowVal === filterVal ? true : false; - } else { - if (typeof rowVal !== 'undefined' && rowVal !== null) { - return String(rowVal).toLowerCase().indexOf(filterVal.toLowerCase()) > -1 ? true : false; - } else { - return false; - } - } - }, - - //in array - "in": function _in(filterVal, rowVal) { - if (Array.isArray(filterVal)) { - return filterVal.indexOf(rowVal) > -1; - } else { - console.warn("Filter Error - filter value is not an array:", filterVal); - return false; - } - } - }; - - Tabulator.prototype.registerModule("filter", Filter); - var Format = function Format(table) { - this.table = table; //hold Tabulator object - }; - - //initialize column formatter - Format.prototype.initializeColumn = function (column) { - var self = this, - config = { params: column.definition.formatterParams || {} }; - - //set column formatter - switch (_typeof(column.definition.formatter)) { - case "string": - - if (column.definition.formatter === "tick") { - column.definition.formatter = "tickCross"; - - if (typeof config.params.crossElement == "undefined") { - config.params.crossElement = false; - } - - console.warn("DEPRECATION WANRING - the tick formatter has been depricated, please use the tickCross formatter with the crossElement param set to false"); - } - - if (self.formatters[column.definition.formatter]) { - config.formatter = self.formatters[column.definition.formatter]; - } else { - console.warn("Formatter Error - No such formatter found: ", column.definition.formatter); - config.formatter = self.formatters.plaintext; - } - break; - - case "function": - config.formatter = column.definition.formatter; - break; - - default: - config.formatter = self.formatters.plaintext; - break; - } - - column.modules.format = config; - }; - - Format.prototype.cellRendered = function (cell) { - if (cell.column.modules.format.renderedCallback) { - cell.column.modules.format.renderedCallback(); - } - }; - - //return a formatted value for a cell - Format.prototype.formatValue = function (cell) { - var component = cell.getComponent(), - params = typeof cell.column.modules.format.params === "function" ? cell.column.modules.format.params(component) : cell.column.modules.format.params; - - function onRendered(callback) { - cell.column.modules.format.renderedCallback = callback; - } - - return cell.column.modules.format.formatter.call(this, component, params, onRendered); - }; - - Format.prototype.sanitizeHTML = function (value) { - if (value) { - var entityMap = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '/': '/', - '`': '`', - '=': '=' - }; - - return String(value).replace(/[&<>"'`=\/]/g, function (s) { - return entityMap[s]; - }); - } else { - return value; - } - }; - - Format.prototype.emptyToSpace = function (value) { - return value === null || typeof value === "undefined" ? " " : value; - }; - - //get formatter for cell - Format.prototype.getFormatter = function (formatter) { - var formatter; - - switch (typeof formatter === 'undefined' ? 'undefined' : _typeof(formatter)) { - case "string": - if (this.formatters[formatter]) { - formatter = this.formatters[formatter]; - } else { - console.warn("Formatter Error - No such formatter found: ", formatter); - formatter = this.formatters.plaintext; - } - break; - - case "function": - formatter = formatter; - break; - - default: - formatter = this.formatters.plaintext; - break; - } - - return formatter; - }; - - //default data formatters - Format.prototype.formatters = { - //plain text value - plaintext: function plaintext(cell, formatterParams, onRendered) { - return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); - }, - - //html text value - html: function html(cell, formatterParams, onRendered) { - return cell.getValue(); - }, - - //multiline text area - textarea: function textarea(cell, formatterParams, onRendered) { - cell.getElement().style.whiteSpace = "pre-wrap"; - return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); - }, - - //currency formatting - money: function money(cell, formatterParams, onRendered) { - var floatVal = parseFloat(cell.getValue()), - number, - integer, - decimal, - rgx; - - var decimalSym = formatterParams.decimal || "."; - var thousandSym = formatterParams.thousand || ","; - var symbol = formatterParams.symbol || ""; - var after = !!formatterParams.symbolAfter; - var precision = typeof formatterParams.precision !== "undefined" ? formatterParams.precision : 2; - - if (isNaN(floatVal)) { - return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); - } - - number = precision !== false ? floatVal.toFixed(precision) : floatVal; - number = String(number).split("."); - - integer = number[0]; - decimal = number.length > 1 ? decimalSym + number[1] : ""; - - rgx = /(\d+)(\d{3})/; - - while (rgx.test(integer)) { - integer = integer.replace(rgx, "$1" + thousandSym + "$2"); - } - - return after ? integer + decimal + symbol : symbol + integer + decimal; - }, - - //clickable anchor tag - link: function link(cell, formatterParams, onRendered) { - var value = this.sanitizeHTML(cell.getValue()), - urlPrefix = formatterParams.urlPrefix || "", - label = this.emptyToSpace(value), - el = document.createElement("a"), - data; - - if (formatterParams.labelField) { - data = cell.getData(); - label = data[formatterParams.labelField]; - } - - if (formatterParams.label) { - switch (_typeof(formatterParams.label)) { - case "string": - label = formatterParams.label; - break; - - case "function": - label = formatterParams.label(cell); - break; - } - } - - if (formatterParams.urlField) { - data = cell.getData(); - value = data[formatterParams.urlField]; - } - - if (formatterParams.url) { - switch (_typeof(formatterParams.url)) { - case "string": - value = formatterParams.url; - break; - - case "function": - value = formatterParams.url(cell); - break; - } - } - - el.setAttribute("href", urlPrefix + value); - - if (formatterParams.target) { - el.setAttribute("target", formatterParams.target); - } - - el.innerHTML = this.emptyToSpace(label); - - return el; - }, - - //image element - image: function image(cell, formatterParams, onRendered) { - var el = document.createElement("img"); - el.setAttribute("src", cell.getValue()); - - switch (_typeof(formatterParams.height)) { - case "number": - element.style.height = formatterParams.height + "px"; - break; - - case "string": - element.style.height = formatterParams.height; - break; - } - - switch (_typeof(formatterParams.width)) { - case "number": - element.style.width = formatterParams.width + "px"; - break; - - case "string": - element.style.width = formatterParams.width; - break; - } - - el.addEventListener("load", function () { - cell.getRow().normalizeHeight(); - }); - - return el; - }, - - //tick or cross - tickCross: function tickCross(cell, formatterParams, onRendered) { - var value = cell.getValue(), - element = cell.getElement(), - empty = formatterParams.allowEmpty, - truthy = formatterParams.allowTruthy, - tick = typeof formatterParams.tickElement !== "undefined" ? formatterParams.tickElement : '', - cross = typeof formatterParams.crossElement !== "undefined" ? formatterParams.crossElement : ''; - - if (truthy && value || value === true || value === "true" || value === "True" || value === 1 || value === "1") { - element.setAttribute("aria-checked", true); - return tick || ""; - } else { - if (empty && (value === "null" || value === "" || value === null || typeof value === "undefined")) { - element.setAttribute("aria-checked", "mixed"); - return ""; - } else { - element.setAttribute("aria-checked", false); - return cross || ""; - } - } - }, - - datetime: function datetime(cell, formatterParams, onRendered) { - var inputFormat = formatterParams.inputFormat || "YYYY-MM-DD hh:mm:ss"; - var outputFormat = formatterParams.outputFormat || "DD/MM/YYYY hh:mm:ss"; - var invalid = typeof formatterParams.invalidPlaceholder !== "undefined" ? formatterParams.invalidPlaceholder : ""; - var value = cell.getValue(); - - var newDatetime = moment(value, inputFormat); - - if (newDatetime.isValid()) { - return newDatetime.format(outputFormat); - } else { - - if (invalid === true) { - return value; - } else if (typeof invalid === "function") { - return invalid(value); - } else { - return invalid; - } - } - }, - - datetimediff: function datetime(cell, formatterParams, onRendered) { - var inputFormat = formatterParams.inputFormat || "YYYY-MM-DD hh:mm:ss"; - var invalid = typeof formatterParams.invalidPlaceholder !== "undefined" ? formatterParams.invalidPlaceholder : ""; - var suffix = typeof formatterParams.suffix !== "undefined" ? formatterParams.suffix : false; - var unit = typeof formatterParams.unit !== "undefined" ? formatterParams.unit : undefined; - var humanize = typeof formatterParams.humanize !== "undefined" ? formatterParams.humanize : false; - var date = typeof formatterParams.date !== "undefined" ? formatterParams.date : moment(); - var value = cell.getValue(); - - var newDatetime = moment(value, inputFormat); - - if (newDatetime.isValid()) { - if (humanize) { - return moment.duration(newDatetime.diff(date)).humanize(suffix); - } else { - return newDatetime.diff(date, unit) + (suffix ? " " + suffix : ""); - } - } else { - - if (invalid === true) { - return value; - } else if (typeof invalid === "function") { - return invalid(value); - } else { - return invalid; - } - } - }, - - //select - lookup: function lookup(cell, formatterParams, onRendered) { - var value = cell.getValue(); - - if (typeof formatterParams[value] === "undefined") { - console.warn('Missing display value for ' + value); - return value; - } - - return formatterParams[value]; - }, - - //star rating - star: function star(cell, formatterParams, onRendered) { - var value = cell.getValue(), - element = cell.getElement(), - maxStars = formatterParams && formatterParams.stars ? formatterParams.stars : 5, - stars = document.createElement("span"), - star = document.createElementNS('http://www.w3.org/2000/svg', "svg"), - starActive = '', - starInactive = ''; - - //style stars holder - stars.style.verticalAlign = "middle"; - - //style star - star.setAttribute("width", "14"); - star.setAttribute("height", "14"); - star.setAttribute("viewBox", "0 0 512 512"); - star.setAttribute("xml:space", "preserve"); - star.style.padding = "0 1px"; - - value = parseInt(value) < maxStars ? parseInt(value) : maxStars; - - for (var i = 1; i <= maxStars; i++) { - var nextStar = star.cloneNode(true); - nextStar.innerHTML = i <= value ? starActive : starInactive; - - stars.appendChild(nextStar); - } - - element.style.whiteSpace = "nowrap"; - element.style.overflow = "hidden"; - element.style.textOverflow = "ellipsis"; - - element.setAttribute("aria-label", value); - - return stars; - }, - - //progress bar - progress: function progress(cell, formatterParams, onRendered) { - //progress bar - var value = this.sanitizeHTML(cell.getValue()) || 0, - element = cell.getElement(), - max = formatterParams && formatterParams.max ? formatterParams.max : 100, - min = formatterParams && formatterParams.min ? formatterParams.min : 0, - legendAlign = formatterParams && formatterParams.legendAlign ? formatterParams.legendAlign : "center", - percent, - percentValue, - color, - legend, - legendColor, - top, - left, - right, - bottom; - - //make sure value is in range - percentValue = parseFloat(value) <= max ? parseFloat(value) : max; - percentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min; - - //workout percentage - percent = (max - min) / 100; - percentValue = Math.round((percentValue - min) / percent); - - //set bar color - switch (_typeof(formatterParams.color)) { - case "string": - color = formatterParams.color; - break; - case "function": - color = formatterParams.color(value); - break; - case "object": - if (Array.isArray(formatterParams.color)) { - var unit = 100 / formatterParams.color.length; - var index = Math.floor(percentValue / unit); - - index = Math.min(index, formatterParams.color.length - 1); - index = Math.max(index, 0); - color = formatterParams.color[index]; - break; - } - default: - color = "#2DC214"; - } - - //generate legend - switch (_typeof(formatterParams.legend)) { - case "string": - legend = formatterParams.legend; - break; - case "function": - legend = formatterParams.legend(value); - break; - case "boolean": - legend = value; - break; - default: - legend = false; - } - - //set legend color - switch (_typeof(formatterParams.legendColor)) { - case "string": - legendColor = formatterParams.legendColor; - break; - case "function": - legendColor = formatterParams.legendColor(value); - break; - case "object": - if (Array.isArray(formatterParams.legendColor)) { - var unit = 100 / formatterParams.legendColor.length; - var index = Math.floor(percentValue / unit); - - index = Math.min(index, formatterParams.legendColor.length - 1); - index = Math.max(index, 0); - legendColor = formatterParams.legendColor[index]; - } - break; - default: - legendColor = "#000"; - } - - element.style.minWidth = "30px"; - element.style.position = "relative"; - - element.setAttribute("aria-label", percentValue); - - return "
" + (legend ? "
" + legend + "
" : ""); - }, - - //background color - color: function color(cell, formatterParams, onRendered) { - cell.getElement().style.backgroundColor = this.sanitizeHTML(cell.getValue()); - return ""; - }, - - //tick icon - buttonTick: function buttonTick(cell, formatterParams, onRendered) { - return ''; - }, - - //cross icon - buttonCross: function buttonCross(cell, formatterParams, onRendered) { - return ''; - }, - - //current row number - rownum: function rownum(cell, formatterParams, onRendered) { - return this.table.rowManager.activeRows.indexOf(cell.getRow()._getSelf()) + 1; - }, - - //row handle - handle: function handle(cell, formatterParams, onRendered) { - cell.getElement().classList.add("tabulator-row-handle"); - return "
"; - }, - - responsiveCollapse: function responsiveCollapse(cell, formatterParams, onRendered) { - var self = this, - open = false, - el = document.createElement("div"); - - function toggleList(isOpen) { - var collapse = cell.getRow().getElement().getElementsByClassName("tabulator-responsive-collapse")[0]; - - open = isOpen; - - if (open) { - el.classList.add("open"); - if (collapse) { - collapse.style.display = ''; - } - } else { - el.classList.remove("open"); - if (collapse) { - collapse.style.display = 'none'; - } - } - } - - el.classList.add("tabulator-responsive-collapse-toggle"); - el.innerHTML = "+-"; - - cell.getElement().classList.add("tabulator-row-handle"); - - if (self.table.options.responsiveLayoutCollapseStartOpen) { - open = true; - } - - el.addEventListener("click", function () { - toggleList(!open); - }); - - toggleList(open); - - return el; - } - }; - - Tabulator.prototype.registerModule("format", Format); - var FrozenColumns = function FrozenColumns(table) { - this.table = table; //hold Tabulator object - this.leftColumns = []; - this.rightColumns = []; - this.leftMargin = 0; - this.rightMargin = 0; - this.initializationMode = "left"; - this.active = false; - }; - - //reset initial state - FrozenColumns.prototype.reset = function () { - this.initializationMode = "left"; - this.leftColumns = []; - this.rightColumns = []; - this.active = false; - }; - - //initialize specific column - FrozenColumns.prototype.initializeColumn = function (column) { - var config = { margin: 0, edge: false }; - - if (column.definition.frozen) { - - if (!column.parent.isGroup) { - - if (!column.isGroup) { - config.position = this.initializationMode; - - if (this.initializationMode == "left") { - this.leftColumns.push(column); - } else { - this.rightColumns.unshift(column); - } - - this.active = true; - - column.modules.frozen = config; - } else { - console.warn("Frozen Column Error - Column Groups cannot be frozen"); - } - } else { - console.warn("Frozen Column Error - Grouped columns cannot be frozen"); - } - } else { - this.initializationMode = "right"; - } - }; - - //layout columns appropropriatly - FrozenColumns.prototype.layout = function () { - var self = this, - tableHolder = this.table.rowManager.element, - rightMargin = 0; - - if (self.active) { - - //calculate row padding - - self.leftMargin = self._calcSpace(self.leftColumns, self.leftColumns.length); - self.table.columnManager.headersElement.style.marginLeft = self.leftMargin + "px"; - - self.rightMargin = self._calcSpace(self.rightColumns, self.rightColumns.length); - self.table.columnManager.element.style.paddingRight = self.rightMargin + "px"; - - self.table.rowManager.activeRows.forEach(function (row) { - self.layoutRow(row); - }); - - if (self.table.modExists("columnCalcs")) { - if (self.table.modules.columnCalcs.topInitialized && self.table.modules.columnCalcs.topRow) { - self.layoutRow(self.table.modules.columnCalcs.topRow); - } - if (self.table.modules.columnCalcs.botInitialized && self.table.modules.columnCalcs.botRow) { - self.layoutRow(self.table.modules.columnCalcs.botRow); - } - } - - //calculate left columns - self.leftColumns.forEach(function (column, i) { - column.modules.frozen.margin = self._calcSpace(self.leftColumns, i) + self.table.columnManager.scrollLeft; - - if (i == self.leftColumns.length - 1) { - column.modules.frozen.edge = true; - } else { - column.modules.frozen.edge = false; - } - - self.layoutColumn(column); - }); - - //calculate right frozen columns - rightMargin = self.table.rowManager.element.clientWidth + self.table.columnManager.scrollLeft; - - // if(tableHolder.scrollHeight > tableHolder.clientHeight){ - // rightMargin -= tableHolder.offsetWidth - tableHolder.clientWidth; - // } - - self.rightColumns.forEach(function (column, i) { - column.modules.frozen.margin = rightMargin - self._calcSpace(self.rightColumns, i + 1); - - if (i == self.rightColumns.length - 1) { - column.modules.frozen.edge = true; - } else { - column.modules.frozen.edge = false; - } - - self.layoutColumn(column); - }); - - this.table.rowManager.tableElement.style.marginRight = this.rightMargin + "px"; - } - }; - - FrozenColumns.prototype.layoutColumn = function (column) { - var self = this; - - self.layoutElement(column.getElement(), column); - - column.cells.forEach(function (cell) { - self.layoutElement(cell.getElement(), column); - }); - }; - - FrozenColumns.prototype.layoutRow = function (row) { - var rowEl = row.getElement(); - - rowEl.style.paddingLeft = this.leftMargin + "px"; - // rowEl.style.paddingRight = this.rightMargin + "px"; - }; - - FrozenColumns.prototype.layoutElement = function (element, column) { - - if (column.modules.frozen) { - element.style.position = "absolute"; - element.style.left = column.modules.frozen.margin + "px"; - - element.classList.add("tabulator-frozen"); - - if (column.modules.frozen.edge) { - element.classList.add("tabulator-frozen-" + column.modules.frozen.position); - } - } - }; - - FrozenColumns.prototype._calcSpace = function (columns, index) { - var width = 0; - - for (var i = 0; i < index; i++) { - if (columns[i].visible) { - width += columns[i].getWidth(); - } - } - - return width; - }; - - Tabulator.prototype.registerModule("frozenColumns", FrozenColumns); - var FrozenRows = function FrozenRows(table) { - this.table = table; //hold Tabulator object - this.topElement = document.createElement("div"); - this.rows = []; - this.displayIndex = 0; //index in display pipeline - }; - - FrozenRows.prototype.initialize = function () { - this.rows = []; - - this.topElement.classList.add("tabulator-frozen-rows-holder"); - - // this.table.columnManager.element.append(this.topElement); - this.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling); - }; - - FrozenRows.prototype.setDisplayIndex = function (index) { - this.displayIndex = index; - }; - - FrozenRows.prototype.getDisplayIndex = function () { - return this.displayIndex; - }; - - FrozenRows.prototype.isFrozen = function () { - return !!this.rows.length; - }; - - //filter frozen rows out of display data - FrozenRows.prototype.getRows = function (rows) { - var self = this, - frozen = [], - output = rows.slice(0); - - this.rows.forEach(function (row) { - var index = output.indexOf(row); - - if (index > -1) { - output.splice(index, 1); - } - }); - - return output; - }; - - FrozenRows.prototype.freezeRow = function (row) { - if (!row.modules.frozen) { - row.modules.frozen = true; - this.topElement.appendChild(row.getElement()); - row.initialize(); - row.normalizeHeight(); - this.table.rowManager.adjustTableSize(); - - this.rows.push(row); - - this.table.rowManager.refreshActiveData("display"); - - this.styleRows(); - } else { - console.warn("Freeze Error - Row is already frozen"); - } - }; - - FrozenRows.prototype.unfreezeRow = function (row) { - var index = this.rows.indexOf(row); - - if (row.modules.frozen) { - - row.modules.frozen = false; - - var rowEl = row.getElement(); - rowEl.parentNode.removeChild(rowEl); - - this.table.rowManager.adjustTableSize(); - - this.rows.splice(index, 1); - - this.table.rowManager.refreshActiveData("display"); - - if (this.rows.length) { - this.styleRows(); - } - } else { - console.warn("Freeze Error - Row is already unfrozen"); - } - }; - - FrozenRows.prototype.styleRows = function (row) { - var self = this; - - this.rows.forEach(function (row, i) { - self.table.rowManager.styleRow(row, i); - }); - }; - - Tabulator.prototype.registerModule("frozenRows", FrozenRows); - - //public group object - var GroupComponent = function GroupComponent(group) { - this._group = group; - this.type = "GroupComponent"; - }; - - GroupComponent.prototype.getKey = function () { - return this._group.key; - }; - - GroupComponent.prototype.getElement = function () { - return this._group.element; - }; - - GroupComponent.prototype.getRows = function () { - return this._group.getRows(true); - }; - - GroupComponent.prototype.getSubGroups = function () { - return this._group.getSubGroups(true); - }; - - GroupComponent.prototype.getParentGroup = function () { - return this._group.parent ? this._group.parent.getComponent() : false; - }; - - GroupComponent.prototype.getVisibility = function () { - return this._group.visible; - }; - - GroupComponent.prototype.show = function () { - this._group.show(); - }; - - GroupComponent.prototype.hide = function () { - this._group.hide(); - }; - - GroupComponent.prototype.toggle = function () { - this._group.toggleVisibility(); - }; - - GroupComponent.prototype._getSelf = function () { - return this._group; - }; - - GroupComponent.prototype.getTable = function () { - return this._group.table; - }; - - ////////////////////////////////////////////////// - //////////////// Group Functions ///////////////// - ////////////////////////////////////////////////// - - var Group = function Group(groupManager, parent, level, key, field, generator, oldGroup) { - - this.groupManager = groupManager; - this.parent = parent; - this.key = key; - this.level = level; - this.field = field; - this.hasSubGroups = level < groupManager.groupIDLookups.length - 1; - this.addRow = this.hasSubGroups ? this._addRowToGroup : this._addRow; - this.type = "group"; //type of element - this.old = oldGroup; - this.rows = []; - this.groups = []; - this.groupList = []; - this.generator = generator; - this.elementContents = false; - this.height = 0; - this.outerHeight = 0; - this.initialized = false; - this.calcs = {}; - this.initialized = false; - this.modules = {}; - - this.visible = oldGroup ? oldGroup.visible : typeof groupManager.startOpen[level] !== "undefined" ? groupManager.startOpen[level] : groupManager.startOpen[0]; - - this.createElements(); - this.addBindings(); - - this.createValueGroups(); - }; - - Group.prototype.createElements = function () { - this.element = document.createElement("div"); - this.element.classList.add("tabulator-row"); - this.element.classList.add("tabulator-group"); - this.element.classList.add("tabulator-group-level-" + this.level); - this.element.setAttribute("role", "rowgroup"); - - this.arrowElement = document.createElement("div"); - this.arrowElement.classList.add("tabulator-arrow"); - }; - - Group.prototype.createValueGroups = function () { - var _this31 = this; - - var level = this.level + 1; - if (this.groupManager.allowedValues && this.groupManager.allowedValues[level]) { - this.groupManager.allowedValues[level].forEach(function (value) { - _this31._createGroup(value, level); - }); - } - }; - - Group.prototype.addBindings = function () { - var self = this, - dblTap, - tapHold, - tap, - toggleElement; - - //handle group click events - if (self.groupManager.table.options.groupClick) { - self.element.addEventListener("click", function (e) { - self.groupManager.table.options.groupClick(e, self.getComponent()); - }); - } - - if (self.groupManager.table.options.groupDblClick) { - self.element.addEventListener("dblclick", function (e) { - self.groupManager.table.options.groupDblClick(e, self.getComponent()); - }); - } - - if (self.groupManager.table.options.groupContext) { - self.element.addEventListener("contextmenu", function (e) { - self.groupManager.table.options.groupContext(e, self.getComponent()); - }); - } - - if (self.groupManager.table.options.groupTap) { - - tap = false; - - self.element.addEventListener("touchstart", function (e) { - tap = true; - }); - - self.element.addEventListener("touchend", function (e) { - if (tap) { - self.groupManager.table.options.groupTap(e, self.getComponent()); - } - - tap = false; - }); - } - - if (self.groupManager.table.options.groupDblTap) { - - dblTap = null; - - self.element.addEventListener("touchend", function (e) { - - if (dblTap) { - clearTimeout(dblTap); - dblTap = null; - - self.groupManager.table.options.groupDblTap(e, self.getComponent()); - } else { - - dblTap = setTimeout(function () { - clearTimeout(dblTap); - dblTap = null; - }, 300); - } - }); - } - - if (self.groupManager.table.options.groupTapHold) { - - tapHold = null; - - self.element.addEventListener("touchstart", function (e) { - clearTimeout(tapHold); - - tapHold = setTimeout(function () { - clearTimeout(tapHold); - tapHold = null; - tap = false; - self.groupManager.table.options.groupTapHold(e, self.getComponent()); - }, 1000); - }); - - self.element.addEventListener("touchend", function (e) { - clearTimeout(tapHold); - tapHold = null; - }); - } - - if (self.groupManager.table.options.groupToggleElement) { - toggleElement = self.groupManager.table.options.groupToggleElement == "arrow" ? self.arrowElement : self.element; - - toggleElement.addEventListener("click", function (e) { - e.stopPropagation(); - e.stopImmediatePropagation(); - self.toggleVisibility(); - }); - } - }; - - Group.prototype._createGroup = function (groupID, level) { - var groupKey = level + "_" + groupID; - var group = new Group(this.groupManager, this, level, groupID, this.groupManager.groupIDLookups[level].field, this.groupManager.headerGenerator[level] || this.groupManager.headerGenerator[0], this.old ? this.old.groups[groupKey] : false); - - this.groups[groupKey] = group; - this.groupList.push(group); - }; - - Group.prototype._addRowToGroup = function (row) { - - var level = this.level + 1; - - if (this.hasSubGroups) { - var groupID = this.groupManager.groupIDLookups[level].func(row.getData()), - groupKey = level + "_" + groupID; - - if (this.groupManager.allowedValues && this.groupManager.allowedValues[level]) { - if (this.groups[groupKey]) { - this.groups[groupKey].addRow(row); - } - } else { - if (!this.groups[groupKey]) { - this._createGroup(groupID, level); - } - - this.groups[groupKey].addRow(row); - } - } - }; - - Group.prototype._addRow = function (row) { - this.rows.push(row); - row.modules.group = this; - }; - - Group.prototype.insertRow = function (row, to, after) { - var data = this.conformRowData({}); - - row.updateData(data); - - var toIndex = this.rows.indexOf(to); - - if (toIndex > -1) { - if (after) { - this.rows.splice(toIndex + 1, 0, row); - } else { - this.rows.splice(toIndex, 0, row); - } - } else { - if (after) { - this.rows.push(row); - } else { - this.rows.unshift(row); - } - } - - row.modules.group = this; - - this.generateGroupHeaderContents(); - - if (this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.options.columnCalcs != "table") { - this.groupManager.table.modules.columnCalcs.recalcGroup(this); - } - }; - - Group.prototype.getRowIndex = function (row) {}; - - //update row data to match grouping contraints - Group.prototype.conformRowData = function (data) { - if (this.field) { - data[this.field] = this.key; - } else { - console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"); - } - - if (this.parent) { - data = this.parent.conformRowData(data); - } - - return data; - }; - - Group.prototype.removeRow = function (row) { - var index = this.rows.indexOf(row); - - if (index > -1) { - this.rows.splice(index, 1); - } - - if (!this.rows.length) { - if (this.parent) { - this.parent.removeGroup(this); - } else { - this.groupManager.removeGroup(this); - } - - this.groupManager.updateGroupRows(true); - } else { - this.generateGroupHeaderContents(); - if (this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.options.columnCalcs != "table") { - this.groupManager.table.modules.columnCalcs.recalcGroup(this); - } - } - }; - - Group.prototype.removeGroup = function (group) { - var groupKey = group.level + "_" + group.key, - index; - - if (this.groups[groupKey]) { - delete this.groups[groupKey]; - - index = this.groupList.indexOf(group); - - if (index > -1) { - this.groupList.splice(index, 1); - } - - if (!this.groupList.length) { - if (this.parent) { - this.parent.removeGroup(this); - } else { - this.groupManager.removeGroup(this); - } - } - } - }; - - Group.prototype.getHeadersAndRows = function () { - var output = []; - - output.push(this); - - this._visSet(); - - if (this.visible) { - - if (this.groupList.length) { - this.groupList.forEach(function (group) { - output = output.concat(group.getHeadersAndRows()); - }); - } else { - if (this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()) { - this.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows); - output.push(this.calcs.top); - } - - output = output.concat(this.rows); - - if (this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()) { - this.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows); - output.push(this.calcs.bottom); - } - } - } else { - if (!this.groupList.length && this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.options.groupClosedShowCalcs) { - if (this.groupManager.table.modExists("columnCalcs")) { - if (this.groupManager.table.modules.columnCalcs.hasTopCalcs()) { - this.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows); - output.push(this.calcs.top); - } - - if (this.groupManager.table.modules.columnCalcs.hasBottomCalcs()) { - this.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows); - output.push(this.calcs.bottom); - } - } - } - } - - return output; - }; - - Group.prototype.getData = function (visible, transform) { - var self = this, - output = []; - - this._visSet(); - - if (!visible || visible && this.visible) { - this.rows.forEach(function (row) { - output.push(row.getData(transform || "data")); - }); - } - - return output; - }; - - // Group.prototype.getRows = function(){ - // this._visSet(); - - // return this.visible ? this.rows : []; - // }; - - Group.prototype.getRowCount = function () { - var count = 0; - - if (this.groupList.length) { - this.groupList.forEach(function (group) { - count += group.getRowCount(); - }); - } else { - count = this.rows.length; - } - return count; - }; - - Group.prototype.toggleVisibility = function () { - if (this.visible) { - this.hide(); - } else { - this.show(); - } - }; - - Group.prototype.hide = function () { - this.visible = false; - - if (this.groupManager.table.rowManager.getRenderMode() == "classic" && !this.groupManager.table.options.pagination) { - - this.element.classList.remove("tabulator-group-visible"); - - if (this.groupList.length) { - this.groupList.forEach(function (group) { - - var el; - - if (group.calcs.top) { - el = group.calcs.top.getElement(); - el.parentNode.removeChild(el); - } - - if (group.calcs.bottom) { - el = group.calcs.bottom.getElement(); - el.parentNode.removeChild(el); - } - - var rows = group.getHeadersAndRows(); - - rows.forEach(function (row) { - var rowEl = row.getElement(); - rowEl.parentNode.removeChild(rowEl); - }); - }); - } else { - this.rows.forEach(function (row) { - var rowEl = row.getElement(); - rowEl.parentNode.removeChild(rowEl); - }); - } - - this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex()); - } else { - this.groupManager.updateGroupRows(true); - } - - this.groupManager.table.options.groupVisibilityChanged.call(this.table, this.getComponent(), false); - }; - - Group.prototype.show = function () { - var self = this; - - self.visible = true; - - if (this.groupManager.table.rowManager.getRenderMode() == "classic" && !this.groupManager.table.options.pagination) { - - this.element.classList.add("tabulator-group-visible"); - - var prev = self.getElement(); - - if (this.groupList.length) { - this.groupList.forEach(function (group) { - var rows = group.getHeadersAndRows(); - - rows.forEach(function (row) { - var rowEl = row.getElement(); - prev.parentNode.insertBefore(rowEl, prev.nextSibling); - row.initialize(); - prev = rowEl; - }); - }); - } else { - self.rows.forEach(function (row) { - var rowEl = row.getElement(); - prev.parentNode.insertBefore(rowEl, prev.nextSibling); - row.initialize(); - prev = rowEl; - }); - } - - this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex()); - } else { - this.groupManager.updateGroupRows(true); - } - - this.groupManager.table.options.groupVisibilityChanged.call(this.table, this.getComponent(), true); - }; - - Group.prototype._visSet = function () { - var data = []; - - if (typeof this.visible == "function") { - - this.rows.forEach(function (row) { - data.push(row.getData()); - }); - - this.visible = this.visible(this.key, this.getRowCount(), data, this.getComponent()); - } - }; - - Group.prototype.getRowGroup = function (row) { - var match = false; - if (this.groupList.length) { - this.groupList.forEach(function (group) { - var result = group.getRowGroup(row); - - if (result) { - match = result; - } - }); - } else { - if (this.rows.find(function (item) { - return item === row; - })) { - match = this; - } - } - - return match; - }; - - Group.prototype.getSubGroups = function (component) { - var output = []; - - this.groupList.forEach(function (child) { - output.push(component ? child.getComponent() : child); - }); - - return output; - }; - - Group.prototype.getRows = function (compoment) { - var output = []; - - this.rows.forEach(function (row) { - output.push(compoment ? row.getComponent() : row); - }); - - return output; - }; - - Group.prototype.generateGroupHeaderContents = function () { - var data = []; - - this.rows.forEach(function (row) { - data.push(row.getData()); - }); - - this.elementContents = this.generator(this.key, this.getRowCount(), data, this.getComponent()); - - while (this.element.firstChild) { - this.element.removeChild(this.element.firstChild); - }if (typeof this.elementContents === "string") { - this.element.innerHTML = this.elementContents; - } else { - this.element.appendChild(this.elementContents); - } - - this.element.insertBefore(this.arrowElement, this.element.firstChild); - }; - - ////////////// Standard Row Functions ////////////// - - Group.prototype.getElement = function () { - this.addBindingsd = false; - - this._visSet(); - - if (this.visible) { - this.element.classList.add("tabulator-group-visible"); - } else { - this.element.classList.remove("tabulator-group-visible"); - } - - this.element.childNodes.forEach(function (child) { - child.parentNode.removeChild(child); - }); - - this.generateGroupHeaderContents(); - - // this.addBindings(); - - return this.element; - }; - - //normalize the height of elements in the row - Group.prototype.normalizeHeight = function () { - this.setHeight(this.element.clientHeight); - }; - - Group.prototype.initialize = function (force) { - if (!this.initialized || force) { - this.normalizeHeight(); - this.initialized = true; - } - }; - - Group.prototype.reinitialize = function () { - this.initialized = false; - this.height = 0; - - if (Tabulator.prototype.helpers.elVisible(this.element)) { - this.initialize(true); - } - }; - - Group.prototype.setHeight = function (height) { - if (this.height != height) { - this.height = height; - this.outerHeight = this.element.offsetHeight; - } - }; - - //return rows outer height - Group.prototype.getHeight = function () { - return this.outerHeight; - }; - - Group.prototype.getGroup = function () { - return this; - }; - - Group.prototype.reinitializeHeight = function () {}; - Group.prototype.calcHeight = function () {}; - Group.prototype.setCellHeight = function () {}; - Group.prototype.clearCellHeight = function () {}; - - //////////////// Object Generation ///////////////// - Group.prototype.getComponent = function () { - return new GroupComponent(this); - }; - - ////////////////////////////////////////////////// - ////////////// Group Row Extension /////////////// - ////////////////////////////////////////////////// - - var GroupRows = function GroupRows(table) { - - this.table = table; //hold Tabulator object - - this.groupIDLookups = false; //enable table grouping and set field to group by - this.startOpen = [function () { - return false; - }]; //starting state of group - this.headerGenerator = [function () { - return ""; - }]; - this.groupList = []; //ordered list of groups - this.allowedValues = false; - this.groups = {}; //hold row groups - this.displayIndex = 0; //index in display pipeline - }; - - //initialize group configuration - GroupRows.prototype.initialize = function () { - var self = this, - groupBy = self.table.options.groupBy, - startOpen = self.table.options.groupStartOpen, - groupHeader = self.table.options.groupHeader; - - this.allowedValues = self.table.options.groupValues; - - self.headerGenerator = [function () { - return ""; - }]; - this.startOpen = [function () { - return false; - }]; //starting state of group - - self.table.modules.localize.bind("groups|item", function (langValue, lang) { - self.headerGenerator[0] = function (value, count, data) { - //header layout function - return (typeof value === "undefined" ? "" : value) + "(" + count + " " + (count === 1 ? langValue : lang.groups.items) + ")"; - }; - }); - - this.groupIDLookups = []; - - if (Array.isArray(groupBy) || groupBy) { - if (this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "table" && this.table.options.columnCalcs != "both") { - this.table.modules.columnCalcs.removeCalcs(); - } - } else { - if (this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "group") { - - var cols = this.table.columnManager.getRealColumns(); - - cols.forEach(function (col) { - if (col.definition.topCalc) { - self.table.modules.columnCalcs.initializeTopRow(); - } - - if (col.definition.bottomCalc) { - self.table.modules.columnCalcs.initializeBottomRow(); - } - }); - } - } - - if (!Array.isArray(groupBy)) { - groupBy = [groupBy]; - } - - groupBy.forEach(function (group, i) { - var lookupFunc, column; - - if (typeof group == "function") { - lookupFunc = group; - } else { - column = self.table.columnManager.getColumnByField(group); - - if (column) { - lookupFunc = function lookupFunc(data) { - return column.getFieldValue(data); - }; - } else { - lookupFunc = function lookupFunc(data) { - return data[group]; - }; - } - } - - self.groupIDLookups.push({ - field: typeof group === "function" ? false : group, - func: lookupFunc, - values: self.allowedValues ? self.allowedValues[i] : false - }); - }); - - if (startOpen) { - - if (!Array.isArray(startOpen)) { - startOpen = [startOpen]; - } - - startOpen.forEach(function (level) { - level = typeof level == "function" ? level : function () { - return true; - }; - }); - - self.startOpen = startOpen; - } - - if (groupHeader) { - self.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader]; - } - - this.initialized = true; - }; - - GroupRows.prototype.setDisplayIndex = function (index) { - this.displayIndex = index; - }; - - GroupRows.prototype.getDisplayIndex = function () { - return this.displayIndex; - }; - - //return appropriate rows with group headers - GroupRows.prototype.getRows = function (rows) { - if (this.groupIDLookups.length) { - - this.table.options.dataGrouping.call(this.table); - - this.generateGroups(rows); - - if (this.table.options.dataGrouped) { - this.table.options.dataGrouped.call(this.table, this.getGroups(true)); - } - - return this.updateGroupRows(); - } else { - return rows.slice(0); - } - }; - - GroupRows.prototype.getGroups = function (compoment) { - var groupComponents = []; - - this.groupList.forEach(function (group) { - groupComponents.push(compoment ? group.getComponent() : group); - }); - - return groupComponents; - }; - - GroupRows.prototype.pullGroupListData = function (groupList) { - var self = this; - var groupListData = []; - - groupList.forEach(function (group) { - var groupHeader = {}; - groupHeader.level = 0; - groupHeader.rowCount = 0; - groupHeader.headerContent = ""; - var childData = []; - - if (group.hasSubGroups) { - childData = self.pullGroupListData(group.groupList); - - groupHeader.level = group.level; - groupHeader.rowCount = childData.length - group.groupList.length; // data length minus number of sub-headers - groupHeader.headerContent = group.generator(group.key, groupHeader.rowCount, group.rows, group); - - groupListData.push(groupHeader); - groupListData = groupListData.concat(childData); - } else { - groupHeader.level = group.level; - groupHeader.headerContent = group.generator(group.key, group.rows.length, group.rows, group); - groupHeader.rowCount = group.getRows().length; - - groupListData.push(groupHeader); - - group.getRows().forEach(function (row) { - groupListData.push(row.getData("data")); - }); - } - }); - - return groupListData; - }; - - GroupRows.prototype.getGroupedData = function () { - - return this.pullGroupListData(this.groupList); - }; - - GroupRows.prototype.getRowGroup = function (row) { - var match = false; - - this.groupList.forEach(function (group) { - var result = group.getRowGroup(row); - - if (result) { - match = result; - } - }); - - return match; - }; - - GroupRows.prototype.countGroups = function () { - return this.groupList.length; - }; - - GroupRows.prototype.generateGroups = function (rows) { - var self = this, - oldGroups = self.groups; - - self.groups = {}; - self.groupList = []; - - if (this.allowedValues && this.allowedValues[0]) { - this.allowedValues[0].forEach(function (value) { - self.createGroup(value, 0, oldGroups); - }); - - rows.forEach(function (row) { - self.assignRowToExistingGroup(row, oldGroups); - }); - } else { - rows.forEach(function (row) { - self.assignRowToGroup(row, oldGroups); - }); - } - }; - - GroupRows.prototype.createGroup = function (groupID, level, oldGroups) { - var groupKey = level + "_" + groupID, - group; - - oldGroups = oldGroups || []; - - group = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]); - - this.groups[groupKey] = group; - this.groupList.push(group); - }; - - GroupRows.prototype.assignRowToGroup = function (row, oldGroups) { - var groupID = this.groupIDLookups[0].func(row.getData()), - groupKey = "0_" + groupID; - - if (!this.groups[groupKey]) { - this.createGroup(groupID, 0, oldGroups); - } - - this.groups[groupKey].addRow(row); - }; - - GroupRows.prototype.assignRowToExistingGroup = function (row, oldGroups) { - var groupID = this.groupIDLookups[0].func(row.getData()), - groupKey = "0_" + groupID; - - if (this.groups[groupKey]) { - this.groups[groupKey].addRow(row); - } - }; - - GroupRows.prototype.assignRowToGroup = function (row, oldGroups) { - var groupID = this.groupIDLookups[0].func(row.getData()), - newGroupNeeded = !this.groups["0_" + groupID]; - - if (newGroupNeeded) { - this.createGroup(groupID, 0, oldGroups); - } - - this.groups["0_" + groupID].addRow(row); - - return !newGroupNeeded; - }; - - GroupRows.prototype.updateGroupRows = function (force) { - var self = this, - output = [], - oldRowCount; - - self.groupList.forEach(function (group) { - output = output.concat(group.getHeadersAndRows()); - }); - - //force update of table display - if (force) { - - var displayIndex = self.table.rowManager.setDisplayRows(output, this.getDisplayIndex()); - - if (displayIndex !== true) { - this.setDisplayIndex(displayIndex); - } - - self.table.rowManager.refreshActiveData("group", true, true); - } - - return output; - }; - - GroupRows.prototype.scrollHeaders = function (left) { - this.groupList.forEach(function (group) { - group.arrowElement.style.marginLeft = left + "px"; - }); - }; - - GroupRows.prototype.removeGroup = function (group) { - var groupKey = group.level + "_" + group.key, - index; - - if (this.groups[groupKey]) { - delete this.groups[groupKey]; - - index = this.groupList.indexOf(group); - - if (index > -1) { - this.groupList.splice(index, 1); - } - } - }; - - Tabulator.prototype.registerModule("groupRows", GroupRows); - var History = function History(table) { - this.table = table; //hold Tabulator object - - this.history = []; - this.index = -1; - }; - - History.prototype.clear = function () { - this.history = []; - this.index = -1; - }; - - History.prototype.action = function (type, component, data) { - - this.history = this.history.slice(0, this.index + 1); - - this.history.push({ - type: type, - component: component, - data: data - }); - - this.index++; - }; - - History.prototype.getHistoryUndoSize = function () { - return this.index + 1; - }; - - History.prototype.getHistoryRedoSize = function () { - return this.history.length - (this.index + 1); - }; - - History.prototype.undo = function () { - - if (this.index > -1) { - var action = this.history[this.index]; - - this.undoers[action.type].call(this, action); - - this.index--; - - this.table.options.historyUndo.call(this.table, action.type, action.component.getComponent(), action.data); - - return true; - } else { - console.warn("History Undo Error - No more history to undo"); - return false; - } - }; - - History.prototype.redo = function () { - if (this.history.length - 1 > this.index) { - - this.index++; - - var action = this.history[this.index]; - - this.redoers[action.type].call(this, action); - - this.table.options.historyRedo.call(this.table, action.type, action.component.getComponent(), action.data); - - return true; - } else { - console.warn("History Redo Error - No more history to redo"); - return false; - } - }; - - History.prototype.undoers = { - cellEdit: function cellEdit(action) { - action.component.setValueProcessData(action.data.oldValue); - }, - - rowAdd: function rowAdd(action) { - action.component.deleteActual(); - }, - - rowDelete: function rowDelete(action) { - var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); - - this._rebindRow(action.component, newRow); - }, - - rowMove: function rowMove(action) { - this.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.pos], false); - this.table.rowManager.redraw(); - } - }; - - History.prototype.redoers = { - cellEdit: function cellEdit(action) { - action.component.setValueProcessData(action.data.newValue); - }, - - rowAdd: function rowAdd(action) { - var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); - - this._rebindRow(action.component, newRow); - }, - - rowDelete: function rowDelete(action) { - action.component.deleteActual(); - }, - - rowMove: function rowMove(action) { - this.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.pos], false); - this.table.rowManager.redraw(); - } - }; - - //rebind rows to new element after deletion - History.prototype._rebindRow = function (oldRow, newRow) { - this.history.forEach(function (action) { - if (action.component instanceof Row) { - if (action.component === oldRow) { - action.component = newRow; - } - } else if (action.component instanceof Cell) { - if (action.component.row === oldRow) { - var field = action.component.column.getField(); - - if (field) { - action.component = newRow.getCell(field); - } - } - } - }); - }; - - Tabulator.prototype.registerModule("history", History); - var HtmlTableImport = function HtmlTableImport(table) { - this.table = table; //hold Tabulator object - this.fieldIndex = []; - this.hasIndex = false; - }; - - HtmlTableImport.prototype.parseTable = function () { - var self = this, - element = self.table.element, - options = self.table.options, - columns = options.columns, - headers = element.getElementsByTagName("th"), - rows = element.getElementsByTagName("tbody")[0], - data = [], - newTable; - - self.hasIndex = false; - - self.table.options.htmlImporting.call(this.table); - - rows = rows ? rows.getElementsByTagName("tr") : []; - - //check for tablator inline options - self._extractOptions(element, options); - - if (headers.length) { - self._extractHeaders(headers, rows); - } else { - self._generateBlankHeaders(headers, rows); - } - - //iterate through table rows and build data set - for (var index = 0; index < rows.length; index++) { - var row = rows[index], - cells = row.getElementsByTagName("td"), - item = {}; - - //create index if the dont exist in table - if (!self.hasIndex) { - item[options.index] = index; - } - - for (var i = 0; i < cells.length; i++) { - var cell = cells[i]; - if (typeof this.fieldIndex[i] !== "undefined") { - item[this.fieldIndex[i]] = cell.innerHTML; - } - } - - //add row data to item - data.push(item); - } - - //create new element - var newElement = document.createElement("div"); - - //transfer attributes to new element - var attributes = element.attributes; - - // loop through attributes and apply them on div - - for (var i in attributes) { - if (_typeof(attributes[i]) == "object") { - newElement.setAttribute(attributes[i].name, attributes[i].value); - } - } - - // replace table with div element - element.parentNode.replaceChild(newElement, element); - - options.data = data; - - self.table.options.htmlImported.call(this.table); - - // // newElement.tabulator(options); - - this.table.element = newElement; - }; - - //extract tabulator attribute options - HtmlTableImport.prototype._extractOptions = function (element, options) { - var attributes = element.attributes; - - for (var index in attributes) { - var attrib = attributes[index]; - var name; - - if ((typeof attrib === 'undefined' ? 'undefined' : _typeof(attrib)) == "object" && attrib.name && attrib.name.indexOf("tabulator-") === 0) { - name = attrib.name.replace("tabulator-", ""); - - for (var key in options) { - if (key.toLowerCase() == name) { - options[key] = this._attribValue(attrib.value); - } - } - } - } - }; - - //get value of attribute - HtmlTableImport.prototype._attribValue = function (value) { - if (value === "true") { - return true; - } - - if (value === "false") { - return false; - } - - return value; - }; - - //find column if it has already been defined - HtmlTableImport.prototype._findCol = function (title) { - var match = this.table.options.columns.find(function (column) { - return column.title === title; - }); - - return match || false; - }; - - //extract column from headers - HtmlTableImport.prototype._extractHeaders = function (headers, rows) { - for (var index = 0; index < headers.length; index++) { - var header = headers[index], - exists = false, - col = this._findCol(header.textContent), - width, - attributes; - - if (col) { - exists = true; - } else { - col = { title: header.textContent.trim() }; - } - - if (!col.field) { - col.field = header.textContent.trim().toLowerCase().replace(" ", "_"); - } - - width = header.getAttribute("width"); - - if (width && !col.width) { - col.width = width; - } - - //check for tablator inline options - attributes = header.attributes; - - // //check for tablator inline options - this._extractOptions(header, col); - - for (var i in attributes) { - var attrib = attributes[i], - name; - - if ((typeof attrib === 'undefined' ? 'undefined' : _typeof(attrib)) == "object" && attrib.name && attrib.name.indexOf("tabulator-") === 0) { - - name = attrib.name.replace("tabulator-", ""); - - col[name] = this._attribValue(attrib.value); - } - } - - this.fieldIndex[index] = col.field; - - if (col.field == this.table.options.index) { - this.hasIndex = true; - } - - if (!exists) { - this.table.options.columns.push(col); - } - } - }; - - //generate blank headers - HtmlTableImport.prototype._generateBlankHeaders = function (headers, rows) { - for (var index = 0; index < headers.length; index++) { - var header = headers[index], - col = { title: "", field: "col" + index }; - - this.fieldIndex[index] = col.field; - - var width = header.getAttribute("width"); - - if (width) { - col.width = width; - } - - this.table.options.columns.push(col); - } - }; - - Tabulator.prototype.registerModule("htmlTableImport", HtmlTableImport); - var Keybindings = function Keybindings(table) { - this.table = table; //hold Tabulator object - this.watchKeys = null; - this.pressedKeys = null; - this.keyupBinding = false; - this.keydownBinding = false; - }; - - Keybindings.prototype.initialize = function () { - var bindings = this.table.options.keybindings, - mergedBindings = {}; - - this.watchKeys = {}; - this.pressedKeys = []; - - if (bindings !== false) { - - for (var key in this.bindings) { - mergedBindings[key] = this.bindings[key]; - } - - if (Object.keys(bindings).length) { - - for (var _key in bindings) { - mergedBindings[_key] = bindings[_key]; - } - } - - this.mapBindings(mergedBindings); - this.bindEvents(); - } - }; - - Keybindings.prototype.mapBindings = function (bindings) { - var _this32 = this; - - var self = this; - - var _loop2 = function _loop2(key) { - - if (_this32.actions[key]) { - - if (bindings[key]) { - - if (_typeof(bindings[key]) !== "object") { - bindings[key] = [bindings[key]]; - } - - bindings[key].forEach(function (binding) { - self.mapBinding(key, binding); - }); - } - } else { - console.warn("Key Binding Error - no such action:", key); - } - }; - - for (var key in bindings) { - _loop2(key); - } - }; - - Keybindings.prototype.mapBinding = function (action, symbolsList) { - var self = this; - - var binding = { - action: this.actions[action], - keys: [], - ctrl: false, - shift: false - }; - - var symbols = symbolsList.toString().toLowerCase().split(" ").join("").split("+"); - - symbols.forEach(function (symbol) { - switch (symbol) { - case "ctrl": - binding.ctrl = true; - break; - - case "shift": - binding.shift = true; - break; - - default: - symbol = parseInt(symbol); - binding.keys.push(symbol); - - if (!self.watchKeys[symbol]) { - self.watchKeys[symbol] = []; - } - - self.watchKeys[symbol].push(binding); - } - }); - }; - - Keybindings.prototype.bindEvents = function () { - var self = this; - - this.keyupBinding = function (e) { - var code = e.keyCode; - var bindings = self.watchKeys[code]; - - if (bindings) { - - self.pressedKeys.push(code); - - bindings.forEach(function (binding) { - self.checkBinding(e, binding); - }); - } - }; - - this.keydownBinding = function (e) { - var code = e.keyCode; - var bindings = self.watchKeys[code]; - - if (bindings) { - - var index = self.pressedKeys.indexOf(code); - - if (index > -1) { - self.pressedKeys.splice(index, 1); - } - } - }; - - this.table.element.addEventListener("keydown", this.keyupBinding); - - this.table.element.addEventListener("keyup", this.keydownBinding); - }; - - Keybindings.prototype.clearBindings = function () { - if (this.keyupBinding) { - this.table.element.removeEventListener("keydown", this.keyupBinding); - } - - if (this.keydownBinding) { - this.table.element.removeEventListener("keyup", this.keydownBinding); - } - }; - - Keybindings.prototype.checkBinding = function (e, binding) { - var self = this, - match = true; - - if (e.ctrlKey == binding.ctrl && e.shiftKey == binding.shift) { - binding.keys.forEach(function (key) { - var index = self.pressedKeys.indexOf(key); - - if (index == -1) { - match = false; - } - }); - - if (match) { - binding.action.call(self, e); - } - - return true; - } - - return false; - }; - - //default bindings - Keybindings.prototype.bindings = { - navPrev: "shift + 9", - navNext: 9, - navUp: 38, - navDown: 40, - scrollPageUp: 33, - scrollPageDown: 34, - scrollToStart: 36, - scrollToEnd: 35, - undo: "ctrl + 90", - redo: "ctrl + 89", - copyToClipboard: "ctrl + 67" - }; - - //default actions - Keybindings.prototype.actions = { - keyBlock: function keyBlock(e) { - e.stopPropagation(); - e.preventDefault(); - }, - scrollPageUp: function scrollPageUp(e) { - var rowManager = this.table.rowManager, - newPos = rowManager.scrollTop - rowManager.height, - scrollMax = rowManager.element.scrollHeight; - - e.preventDefault(); - - if (rowManager.displayRowsCount) { - if (newPos >= 0) { - rowManager.element.scrollTop = newPos; - } else { - rowManager.scrollToRow(rowManager.getDisplayRows()[0]); - } - } - - this.table.element.focus(); - }, - scrollPageDown: function scrollPageDown(e) { - var rowManager = this.table.rowManager, - newPos = rowManager.scrollTop + rowManager.height, - scrollMax = rowManager.element.scrollHeight; - - e.preventDefault(); - - if (rowManager.displayRowsCount) { - if (newPos <= scrollMax) { - rowManager.element.scrollTop = newPos; - } else { - rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]); - } - } - - this.table.element.focus(); - }, - scrollToStart: function scrollToStart(e) { - var rowManager = this.table.rowManager; - - e.preventDefault(); - - if (rowManager.displayRowsCount) { - rowManager.scrollToRow(rowManager.getDisplayRows()[0]); - } - - this.table.element.focus(); - }, - scrollToEnd: function scrollToEnd(e) { - var rowManager = this.table.rowManager; - - e.preventDefault(); - - if (rowManager.displayRowsCount) { - rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]); - } - - this.table.element.focus(); - }, - navPrev: function navPrev(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().prev(); - } - } - }, - - navNext: function navNext(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().next(); - } - } - }, - - navLeft: function navLeft(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().left(); - } - } - }, - - navRight: function navRight(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().right(); - } - } - }, - - navUp: function navUp(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().up(); - } - } - }, - - navDown: function navDown(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().down(); - } - } - }, - - undo: function undo(e) { - var cell = false; - if (this.table.options.history && this.table.modExists("history") && this.table.modExists("edit")) { - - cell = this.table.modules.edit.currentCell; - - if (!cell) { - e.preventDefault(); - this.table.modules.history.undo(); - } - } - }, - - redo: function redo(e) { - var cell = false; - if (this.table.options.history && this.table.modExists("history") && this.table.modExists("edit")) { - - cell = this.table.modules.edit.currentCell; - - if (!cell) { - e.preventDefault(); - this.table.modules.history.redo(); - } - } - }, - - copyToClipboard: function copyToClipboard(e) { - if (!this.table.modules.edit.currentCell) { - if (this.table.modExists("clipboard", true)) { - this.table.modules.clipboard.copy(!this.table.options.selectable || this.table.options.selectable == "highlight" ? "active" : "selected", null, null, null, true); - } - } - } - }; - - Tabulator.prototype.registerModule("keybindings", Keybindings); - var MoveColumns = function MoveColumns(table) { - this.table = table; //hold Tabulator object - this.placeholderElement = this.createPlaceholderElement(); - this.hoverElement = false; //floating column header element - this.checkTimeout = false; //click check timeout holder - this.checkPeriod = 250; //period to wait on mousedown to consider this a move and not a click - this.moving = false; //currently moving column - this.toCol = false; //destination column - this.toColAfter = false; //position of moving column relative to the desitnation column - this.startX = 0; //starting position within header element - this.autoScrollMargin = 40; //auto scroll on edge when within margin - this.autoScrollStep = 5; //auto scroll distance in pixels - this.autoScrollTimeout = false; //auto scroll timeout - - this.moveHover = this.moveHover.bind(this); - this.endMove = this.endMove.bind(this); - }; - - MoveColumns.prototype.createPlaceholderElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-col"); - el.classList.add("tabulator-col-placeholder"); - - return el; - }; - - MoveColumns.prototype.initializeColumn = function (column) { - var self = this, - config = {}, - colEl; - - if (!column.modules.frozen) { - - colEl = column.getElement(); - - config.mousemove = function (e) { - if (column.parent === self.moving.parent) { - if (e.pageX - Tabulator.prototype.helpers.elOffset(colEl).left + self.table.columnManager.element.scrollLeft > column.getWidth() / 2) { - if (self.toCol !== column || !self.toColAfter) { - colEl.parentNode.insertBefore(self.placeholderElement, colEl.nextSibling); - self.moveColumn(column, true); - } - } else { - if (self.toCol !== column || self.toColAfter) { - colEl.parentNode.insertBefore(self.placeholderElement, colEl); - self.moveColumn(column, false); - } - } - } - }.bind(self); - - colEl.addEventListener("mousedown", function (e) { - if (e.which === 1) { - self.checkTimeout = setTimeout(function () { - self.startMove(e, column); - }, self.checkPeriod); - } - }); - - colEl.addEventListener("mouseup", function (e) { - if (e.which === 1) { - if (self.checkTimeout) { - clearTimeout(self.checkTimeout); - } - } - }); - } - - column.modules.moveColumn = config; - }; - - MoveColumns.prototype.startMove = function (e, column) { - var element = column.getElement(); - - this.moving = column; - this.startX = e.pageX - Tabulator.prototype.helpers.elOffset(element).left; - - this.table.element.classList.add("tabulator-block-select"); - - //create placeholder - - this.placeholderElement.style.width = column.getWidth() + "px"; - this.placeholderElement.style.height = column.getHeight() + "px"; - - element.parentNode.insertBefore(this.placeholderElement, element); - element.parentNode.removeChild(element); - - //create hover element - this.hoverElement = element.cloneNode(true); - this.hoverElement.classList.add("tabulator-moving"); - - this.table.columnManager.getElement().appendChild(this.hoverElement); - - this.hoverElement.style.left = "0"; - this.hoverElement.style.bottom = "0"; - - this._bindMouseMove(); - - document.body.addEventListener("mousemove", this.moveHover); - document.body.addEventListener("mouseup", this.endMove); - - this.moveHover(e); - }; - - MoveColumns.prototype._bindMouseMove = function () { - this.table.columnManager.columnsByIndex.forEach(function (column) { - if (column.modules.moveColumn.mousemove) { - column.getElement().addEventListener("mousemove", column.modules.moveColumn.mousemove); - } - }); - }; - - MoveColumns.prototype._unbindMouseMove = function () { - this.table.columnManager.columnsByIndex.forEach(function (column) { - if (column.modules.moveColumn.mousemove) { - column.getElement().removeEventListener("mousemove", column.modules.moveColumn.mousemove); - } - }); - }; - - MoveColumns.prototype.moveColumn = function (column, after) { - var movingCells = this.moving.getCells(); - - this.toCol = column; - this.toColAfter = after; - - if (after) { - column.getCells().forEach(function (cell, i) { - var cellEl = cell.getElement(); - cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling); - }); - } else { - column.getCells().forEach(function (cell, i) { - var cellEl = cell.getElement(); - cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl); - }); - } - }; - - MoveColumns.prototype.endMove = function (e) { - if (e.which === 1) { - this._unbindMouseMove(); - - this.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling); - this.placeholderElement.parentNode.removeChild(this.placeholderElement); - this.hoverElement.parentNode.removeChild(this.hoverElement); - - this.table.element.classList.remove("tabulator-block-select"); - - if (this.toCol) { - this.table.columnManager.moveColumn(this.moving, this.toCol, this.toColAfter); - } - - this.moving = false; - this.toCol = false; - this.toColAfter = false; - - document.body.removeEventListener("mousemove", this.moveHover); - document.body.removeEventListener("mouseup", this.endMove); - } - }; - - MoveColumns.prototype.moveHover = function (e) { - var self = this, - columnHolder = self.table.columnManager.getElement(), - scrollLeft = columnHolder.scrollLeft, - xPos = e.pageX - Tabulator.prototype.helpers.elOffset(columnHolder).left + scrollLeft, - scrollPos; - - self.hoverElement.style.left = xPos - self.startX + "px"; - - if (xPos - scrollLeft < self.autoScrollMargin) { - if (!self.autoScrollTimeout) { - self.autoScrollTimeout = setTimeout(function () { - scrollPos = Math.max(0, scrollLeft - 5); - self.table.rowManager.getElement().scrollLeft = scrollPos; - self.autoScrollTimeout = false; - }, 1); - } - } - - if (scrollLeft + columnHolder.clientWidth - xPos < self.autoScrollMargin) { - if (!self.autoScrollTimeout) { - self.autoScrollTimeout = setTimeout(function () { - scrollPos = Math.min(columnHolder.clientWidth, scrollLeft + 5); - self.table.rowManager.getElement().scrollLeft = scrollPos; - self.autoScrollTimeout = false; - }, 1); - } - } - }; - - Tabulator.prototype.registerModule("moveColumn", MoveColumns); - var MoveRows = function MoveRows(table) { - - this.table = table; //hold Tabulator object - this.placeholderElement = this.createPlaceholderElement(); - this.hoverElement = false; //floating row header element - this.checkTimeout = false; //click check timeout holder - this.checkPeriod = 150; //period to wait on mousedown to consider this a move and not a click - this.moving = false; //currently moving row - this.toRow = false; //destination row - this.toRowAfter = false; //position of moving row relative to the desitnation row - this.hasHandle = false; //row has handle instead of fully movable row - this.startY = 0; //starting Y position within header element - this.startX = 0; //starting X position within header element - - this.moveHover = this.moveHover.bind(this); - this.endMove = this.endMove.bind(this); - this.tableRowDropEvent = false; - - this.connection = false; - this.connections = []; - - this.connectedTable = false; - this.connectedRow = false; - }; - - MoveRows.prototype.createPlaceholderElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-row"); - el.classList.add("tabulator-row-placeholder"); - - return el; - }; - - MoveRows.prototype.initialize = function (handle) { - this.connection = this.table.options.movableRowsConnectedTables; - }; - - MoveRows.prototype.setHandle = function (handle) { - this.hasHandle = handle; - }; - - MoveRows.prototype.initializeRow = function (row) { - var self = this, - config = {}, - rowEl; - - //inter table drag drop - config.mouseup = function (e) { - self.tableRowDrop(e, row); - }.bind(self); - - //same table drag drop - config.mousemove = function (e) { - if (e.pageY - Tabulator.prototype.helpers.elOffset(row.element).top + self.table.rowManager.element.scrollTop > row.getHeight() / 2) { - if (self.toRow !== row || !self.toRowAfter) { - var rowEl = row.getElement(); - rowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling); - self.moveRow(row, true); - } - } else { - if (self.toRow !== row || self.toRowAfter) { - var rowEl = row.getElement(); - rowEl.parentNode.insertBefore(self.placeholderElement, rowEl); - self.moveRow(row, false); - } - } - }.bind(self); - - if (!this.hasHandle) { - - rowEl = row.getElement(); - - rowEl.addEventListener("mousedown", function (e) { - if (e.which === 1) { - self.checkTimeout = setTimeout(function () { - self.startMove(e, row); - }, self.checkPeriod); - } - }); - - rowEl.addEventListener("mouseup", function (e) { - if (e.which === 1) { - if (self.checkTimeout) { - clearTimeout(self.checkTimeout); - } - } - }); - } - - row.modules.moveRow = config; - }; - - MoveRows.prototype.initializeCell = function (cell) { - var self = this, - cellEl = cell.getElement(); - - cellEl.addEventListener("mousedown", function (e) { - if (e.which === 1) { - self.checkTimeout = setTimeout(function () { - self.startMove(e, cell.row); - }, self.checkPeriod); - } - }); - - cellEl.addEventListener("mouseup", function (e) { - if (e.which === 1) { - if (self.checkTimeout) { - clearTimeout(self.checkTimeout); - } - } - }); - }; - - MoveRows.prototype._bindMouseMove = function () { - var self = this; - - self.table.rowManager.getDisplayRows().forEach(function (row) { - if (row.type === "row" && row.modules.moveRow.mousemove) { - row.getElement().addEventListener("mousemove", row.modules.moveRow.mousemove); - } - }); - }; - - MoveRows.prototype._unbindMouseMove = function () { - var self = this; - - self.table.rowManager.getDisplayRows().forEach(function (row) { - if (row.type === "row" && row.modules.moveRow.mousemove) { - row.getElement().removeEventListener("mousemove", row.modules.moveRow.mousemove); - } - }); - }; - - MoveRows.prototype.startMove = function (e, row) { - var element = row.getElement(); - - this.setStartPosition(e, row); - - this.moving = row; - - this.table.element.classList.add("tabulator-block-select"); - - //create placeholder - this.placeholderElement.style.width = row.getWidth() + "px"; - this.placeholderElement.style.height = row.getHeight() + "px"; - - if (!this.connection) { - element.parentNode.insertBefore(this.placeholderElement, element); - element.parentNode.removeChild(element); - } else { - this.table.element.classList.add("tabulator-movingrow-sending"); - this.connectToTables(row); - } - - //create hover element - this.hoverElement = element.cloneNode(true); - this.hoverElement.classList.add("tabulator-moving"); - - if (this.connection) { - document.body.appendChild(this.hoverElement); - this.hoverElement.style.left = "0"; - this.hoverElement.style.top = "0"; - this.hoverElement.style.width = this.table.element.clientWidth + "px"; - this.hoverElement.style.whiteSpace = "nowrap"; - this.hoverElement.style.overflow = "hidden"; - this.hoverElement.style.pointerEvents = "none"; - } else { - this.table.rowManager.getTableElement().appendChild(this.hoverElement); - - this.hoverElement.style.left = "0"; - this.hoverElement.style.top = "0"; - - this._bindMouseMove(); - } - - document.body.addEventListener("mousemove", this.moveHover); - document.body.addEventListener("mouseup", this.endMove); - - this.moveHover(e); - }; - - MoveRows.prototype.setStartPosition = function (e, row) { - var element, position; - - element = row.getElement(); - if (this.connection) { - position = element.getBoundingClientRect(); - - this.startX = position.left - e.pageX + window.scrollX; - this.startY = position.top - e.pageY + window.scrollY; - } else { - this.startY = e.pageY - element.getBoundingClientRect().top; - } - }; - - MoveRows.prototype.endMove = function (e) { - if (!e || e.which === 1) { - this._unbindMouseMove(); - - if (!this.connection) { - this.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling); - this.placeholderElement.parentNode.removeChild(this.placeholderElement); - } - - this.hoverElement.parentNode.removeChild(this.hoverElement); - - this.table.element.classList.remove("tabulator-block-select"); - - if (this.toRow) { - this.table.rowManager.moveRow(this.moving, this.toRow, this.toRowAfter); - } - - this.moving = false; - this.toRow = false; - this.toRowAfter = false; - - document.body.removeEventListener("mousemove", this.moveHover); - document.body.removeEventListener("mouseup", this.endMove); - - if (this.connection) { - this.table.element.classList.remove("tabulator-movingrow-sending"); - this.disconnectFromTables(); - } - } - }; - - MoveRows.prototype.moveRow = function (row, after) { - this.toRow = row; - this.toRowAfter = after; - }; - - MoveRows.prototype.moveHover = function (e) { - if (this.connection) { - this.moveHoverConnections.call(this, e); - } else { - this.moveHoverTable.call(this, e); - } - }; - - MoveRows.prototype.moveHoverTable = function (e) { - var rowHolder = this.table.rowManager.getElement(), - scrollTop = rowHolder.scrollTop, - yPos = e.pageY - rowHolder.getBoundingClientRect().top + scrollTop, - scrollPos; - - this.hoverElement.style.top = yPos - this.startY + "px"; - }; - - MoveRows.prototype.moveHoverConnections = function (e) { - this.hoverElement.style.left = this.startX + e.pageX + "px"; - this.hoverElement.style.top = this.startY + e.pageY + "px"; - }; - - //establish connection with other tables - MoveRows.prototype.connectToTables = function (row) { - var self = this, - connections = this.table.modules.comms.getConnections(this.connection); - - this.table.options.movableRowsSendingStart.call(this.table, connections); - - this.table.modules.comms.send(this.connection, "moveRow", "connect", { - row: row - }); - }; - - //disconnect from other tables - MoveRows.prototype.disconnectFromTables = function () { - var self = this, - connections = this.table.modules.comms.getConnections(this.connection); - - this.table.options.movableRowsSendingStop.call(this.table, connections); - - this.table.modules.comms.send(this.connection, "moveRow", "disconnect"); - }; - - //accept incomming connection - MoveRows.prototype.connect = function (table, row) { - var self = this; - if (!this.connectedTable) { - this.connectedTable = table; - this.connectedRow = row; - - this.table.element.classList.add("tabulator-movingrow-receiving"); - - self.table.rowManager.getDisplayRows().forEach(function (row) { - if (row.type === "row" && row.modules.moveRow && row.modules.moveRow.mouseup) { - row.getElement().addEventListener("mouseup", row.modules.moveRow.mouseup); - } - }); - - self.tableRowDropEvent = self.tableRowDrop.bind(self); - - self.table.element.addEventListener("mouseup", self.tableRowDropEvent); - - this.table.options.movableRowsReceivingStart.call(this.table, row, table); - - return true; - } else { - console.warn("Move Row Error - Table cannot accept connection, already connected to table:", this.connectedTable); - return false; - } - }; - - //close incomming connection - MoveRows.prototype.disconnect = function (table) { - var self = this; - if (table === this.connectedTable) { - this.connectedTable = false; - this.connectedRow = false; - - this.table.element.classList.remove("tabulator-movingrow-receiving"); - - self.table.rowManager.getDisplayRows().forEach(function (row) { - if (row.type === "row" && row.modules.moveRow && row.modules.moveRow.mouseup) { - row.getElement().removeEventListener("mouseup", row.modules.moveRow.mouseup); - } - }); - - self.table.element.removeEventListener("mouseup", self.tableRowDropEvent); - - this.table.options.movableRowsReceivingStop.call(this.table, table); - } else { - console.warn("Move Row Error - trying to disconnect from non connected table"); - } - }; - - MoveRows.prototype.dropComplete = function (table, row, success) { - var sender = false; - - if (success) { - - switch (_typeof(this.table.options.movableRowsSender)) { - case "string": - sender = this.senders[this.table.options.movableRowsSender]; - break; - - case "function": - sender = this.table.options.movableRowsSender; - break; - } - - if (sender) { - sender.call(this, this.moving.getComponent(), row ? row.getComponent() : undefined, table); - } else { - if (this.table.options.movableRowsSender) { - console.warn("Mover Row Error - no matching sender found:", this.table.options.movableRowsSender); - } - } - - this.table.options.movableRowsSent.call(this.table, this.moving.getComponent(), row ? row.getComponent() : undefined, table); - } else { - this.table.options.movableRowsSentFailed.call(this.table, this.moving.getComponent(), row ? row.getComponent() : undefined, table); - } - - this.endMove(); - }; - - MoveRows.prototype.tableRowDrop = function (e, row) { - var receiver = false, - success = false; - - e.stopImmediatePropagation(); - - switch (_typeof(this.table.options.movableRowsReceiver)) { - case "string": - receiver = this.receivers[this.table.options.movableRowsReceiver]; - break; - - case "function": - receiver = this.table.options.movableRowsReceiver; - break; - } - - if (receiver) { - success = receiver.call(this, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); - } else { - console.warn("Mover Row Error - no matching receiver found:", this.table.options.movableRowsReceiver); - } - - if (success) { - this.table.options.movableRowsReceived.call(this.table, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); - } else { - this.table.options.movableRowsReceivedFailed.call(this.table, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); - } - - this.table.modules.comms.send(this.connectedTable, "moveRow", "dropcomplete", { - row: row, - success: success - }); - }; - - MoveRows.prototype.receivers = { - insert: function insert(fromRow, toRow, fromTable) { - this.table.addRow(fromRow.getData(), undefined, toRow); - return true; - }, - - add: function add(fromRow, toRow, fromTable) { - this.table.addRow(fromRow.getData()); - return true; - }, - - update: function update(fromRow, toRow, fromTable) { - if (toRow) { - toRow.update(fromRow.getData()); - return true; - } - - return false; - }, - - replace: function replace(fromRow, toRow, fromTable) { - if (toRow) { - this.table.addRow(fromRow.getData(), undefined, toRow); - toRow.delete(); - return true; - } - - return false; - } - }; - - MoveRows.prototype.senders = { - delete: function _delete(fromRow, toRow, toTable) { - fromRow.delete(); - } - }; - - MoveRows.prototype.commsReceived = function (table, action, data) { - switch (action) { - case "connect": - return this.connect(table, data.row); - break; - - case "disconnect": - return this.disconnect(table); - break; - - case "dropcomplete": - return this.dropComplete(table, data.row, data.success); - break; - } - }; - - Tabulator.prototype.registerModule("moveRow", MoveRows); - var Mutator = function Mutator(table) { - this.table = table; //hold Tabulator object - this.allowedTypes = ["", "data", "edit", "clipboard"]; //list of muatation types - this.enabled = true; - }; - - //initialize column mutator - Mutator.prototype.initializeColumn = function (column) { - var self = this, - match = false, - config = {}; - - this.allowedTypes.forEach(function (type) { - var key = "mutator" + (type.charAt(0).toUpperCase() + type.slice(1)), - mutator; - - if (column.definition[key]) { - mutator = self.lookupMutator(column.definition[key]); - - if (mutator) { - match = true; - - config[key] = { - mutator: mutator, - params: column.definition[key + "Params"] || {} - }; - } - } - }); - - if (match) { - column.modules.mutate = config; - } - }; - - Mutator.prototype.lookupMutator = function (value) { - var mutator = false; - - //set column mutator - switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { - case "string": - if (this.mutators[value]) { - mutator = this.mutators[value]; - } else { - console.warn("Mutator Error - No such mutator found, ignoring: ", value); - } - break; - - case "function": - mutator = value; - break; - } - - return mutator; - }; - - //apply mutator to row - Mutator.prototype.transformRow = function (data, type, update) { - var self = this, - key = "mutator" + (type.charAt(0).toUpperCase() + type.slice(1)), - value; - - if (this.enabled) { - - self.table.columnManager.traverse(function (column) { - var mutator, params, component; - - if (column.modules.mutate) { - mutator = column.modules.mutate[key] || column.modules.mutate.mutator || false; - - if (mutator) { - value = column.getFieldValue(data); - - if (!update || update && typeof value !== "undefined") { - component = column.getComponent(); - params = typeof mutator.params === "function" ? mutator.params(value, data, type, component) : mutator.params; - column.setFieldValue(data, mutator.mutator(value, data, type, params, component)); - } - } - } - }); - } - - return data; - }; - - //apply mutator to new cell value - Mutator.prototype.transformCell = function (cell, value) { - var mutator = cell.column.modules.mutate.mutatorEdit || cell.column.modules.mutate.mutator || false; - - if (mutator) { - return mutator.mutator(value, cell.row.getData(), "edit", mutator.params, cell.getComponent()); - } else { - return value; - } - }; - - Mutator.prototype.enable = function () { - this.enabled = true; - }; - - Mutator.prototype.disable = function () { - this.enabled = false; - }; - - //default mutators - Mutator.prototype.mutators = {}; - - Tabulator.prototype.registerModule("mutator", Mutator); - var Page = function Page(table) { - - this.table = table; //hold Tabulator object - - this.mode = "local"; - this.progressiveLoad = false; - - this.size = 0; - this.page = 1; - this.count = 5; - this.max = 1; - - this.displayIndex = 0; //index in display pipeline - - this.createElements(); - }; - - Page.prototype.createElements = function () { - - var button; - - this.element = document.createElement("span"); - this.element.classList.add("tabulator-paginator"); - - this.pagesElement = document.createElement("span"); - this.pagesElement.classList.add("tabulator-pages"); - - button = document.createElement("button"); - button.classList.add("tabulator-page"); - button.setAttribute("type", "button"); - button.setAttribute("role", "button"); - button.setAttribute("aria-label", ""); - button.setAttribute("title", ""); - - this.firstBut = button.cloneNode(true); - this.firstBut.setAttribute("data-page", "first"); - - this.prevBut = button.cloneNode(true); - this.prevBut.setAttribute("data-page", "prev"); - - this.nextBut = button.cloneNode(true); - this.nextBut.setAttribute("data-page", "next"); - - this.lastBut = button.cloneNode(true); - this.lastBut.setAttribute("data-page", "last"); - }; - - //setup pageination - Page.prototype.initialize = function (hidden) { - var self = this; - - //update param names - for (var key in self.table.options.paginationDataSent) { - self.paginationDataSentNames[key] = self.table.options.paginationDataSent[key]; - } - - for (var _key2 in self.table.options.paginationDataReceived) { - self.paginationDataReceivedNames[_key2] = self.table.options.paginationDataReceived[_key2]; - } - - //build pagination element - - //bind localizations - self.table.modules.localize.bind("pagination|first", function (value) { - self.firstBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|first_title", function (value) { - self.firstBut.setAttribute("aria-label", value); - self.firstBut.setAttribute("title", value); - }); - - self.table.modules.localize.bind("pagination|prev", function (value) { - self.prevBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|prev_title", function (value) { - self.prevBut.setAttribute("aria-label", value); - self.prevBut.setAttribute("title", value); - }); - - self.table.modules.localize.bind("pagination|next", function (value) { - self.nextBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|next_title", function (value) { - self.nextBut.setAttribute("aria-label", value); - self.nextBut.setAttribute("title", value); - }); - - self.table.modules.localize.bind("pagination|last", function (value) { - self.lastBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|last_title", function (value) { - self.lastBut.setAttribute("aria-label", value); - self.lastBut.setAttribute("title", value); - }); - - //click bindings - self.firstBut.addEventListener("click", function () { - self.setPage(1); - }); - - self.prevBut.addEventListener("click", function () { - self.previousPage(); - }); - - self.nextBut.addEventListener("click", function () { - self.nextPage().then(function () {}).catch(function () {}); - }); - - self.lastBut.addEventListener("click", function () { - self.setPage(self.max); - }); - - if (self.table.options.paginationElement) { - self.element = self.table.options.paginationElement; - } - - //append to DOM - self.element.appendChild(self.firstBut); - self.element.appendChild(self.prevBut); - self.element.appendChild(self.pagesElement); - self.element.appendChild(self.nextBut); - self.element.appendChild(self.lastBut); - - if (!self.table.options.paginationElement && !hidden) { - self.table.footerManager.append(self.element, self); - } - - //set default values - self.mode = self.table.options.pagination; - self.size = self.table.options.paginationSize || Math.floor(self.table.rowManager.getElement().clientHeight / 24); - self.count = self.table.options.paginationButtonCount; - }; - - Page.prototype.initializeProgressive = function (mode) { - this.initialize(true); - this.mode = "progressive_" + mode; - this.progressiveLoad = true; - }; - - Page.prototype.setDisplayIndex = function (index) { - this.displayIndex = index; - }; - - Page.prototype.getDisplayIndex = function () { - return this.displayIndex; - }; - - //calculate maximum page from number of rows - Page.prototype.setMaxRows = function (rowCount) { - if (!rowCount) { - this.max = 1; - } else { - this.max = Math.ceil(rowCount / this.size); - } - - if (this.page > this.max) { - this.page = this.max; - } - }; - - //reset to first page without triggering action - Page.prototype.reset = function (force) { - if (this.mode == "local" || force) { - this.page = 1; - } - return true; - }; - - //set the maxmum page - Page.prototype.setMaxPage = function (max) { - this.max = max || 1; - - if (this.page > this.max) { - this.page = this.max; - this.trigger(); - } - }; - - //set current page number - Page.prototype.setPage = function (page) { - var _this33 = this; - - return new Promise(function (resolve, reject) { - if (page > 0 && page <= _this33.max) { - _this33.page = page; - _this33.trigger().then(function () { - resolve(); - }).catch(function () { - reject(); - }); - } else { - console.warn("Pagination Error - Requested page is out of range of 1 - " + _this33.max + ":", page); - reject(); - } - }); - }; - - Page.prototype.setPageSize = function (size) { - if (size > 0) { - this.size = size; - } - }; - - //setup the pagination buttons - Page.prototype._setPageButtons = function () { - var self = this; - - var leftSize = Math.floor((this.count - 1) / 2); - var rightSize = Math.ceil((this.count - 1) / 2); - var min = this.max - this.page + leftSize + 1 < this.count ? this.max - this.count + 1 : Math.max(this.page - leftSize, 1); - var max = this.page <= rightSize ? Math.min(this.count, this.max) : Math.min(this.page + rightSize, this.max); - - while (self.pagesElement.firstChild) { - self.pagesElement.removeChild(self.pagesElement.firstChild); - }if (self.page == 1) { - self.firstBut.disabled = true; - self.prevBut.disabled = true; - } else { - self.firstBut.disabled = false; - self.prevBut.disabled = false; - } - - if (self.page == self.max) { - self.lastBut.disabled = true; - self.nextBut.disabled = true; - } else { - self.lastBut.disabled = false; - self.nextBut.disabled = false; - } - - for (var i = min; i <= max; i++) { - if (i > 0 && i <= self.max) { - self.pagesElement.appendChild(self._generatePageButton(i)); - } - } - - this.footerRedraw(); - }; - - Page.prototype._generatePageButton = function (page) { - var self = this, - button = document.createElement("button"); - - button.classList.add("tabulator-page"); - if (page == self.page) { - button.classList.add("active"); - } - - button.setAttribute("type", "button"); - button.setAttribute("role", "button"); - button.setAttribute("aria-label", "Show Page " + page); - button.setAttribute("title", "Show Page " + page); - button.setAttribute("data-page", page); - button.textContent = page; - - button.addEventListener("click", function (e) { - self.setPage(page); - }); - - return button; - }; - - //previous page - Page.prototype.previousPage = function () { - var _this34 = this; - - return new Promise(function (resolve, reject) { - if (_this34.page > 1) { - _this34.page--; - _this34.trigger().then(function () { - resolve(); - }).catch(function () { - reject(); - }); - } else { - console.warn("Pagination Error - Previous page would be less than page 1:", 0); - reject(); - } - }); - }; - - //next page - Page.prototype.nextPage = function () { - var _this35 = this; - - return new Promise(function (resolve, reject) { - if (_this35.page < _this35.max) { - _this35.page++; - _this35.trigger().then(function () { - resolve(); - }).catch(function () { - reject(); - }); - } else { - if (!_this35.progressiveLoad) { - console.warn("Pagination Error - Next page would be greater than maximum page of " + _this35.max + ":", _this35.max + 1); - } - reject(); - } - }); - }; - - //return current page number - Page.prototype.getPage = function () { - return this.page; - }; - - //return max page number - Page.prototype.getPageMax = function () { - return this.max; - }; - - Page.prototype.getPageSize = function (size) { - return this.size; - }; - - Page.prototype.getMode = function () { - return this.mode; - }; - - //return appropriate rows for current page - Page.prototype.getRows = function (data) { - var output, start, end; - - if (this.mode == "local") { - output = []; - start = this.size * (this.page - 1); - end = start + parseInt(this.size); - - this._setPageButtons(); - - for (var i = start; i < end; i++) { - if (data[i]) { - output.push(data[i]); - } - } - - return output; - } else { - - this._setPageButtons(); - - return data.slice(0); - } - }; - - Page.prototype.trigger = function () { - var _this36 = this; - - var left; - - return new Promise(function (resolve, reject) { - - switch (_this36.mode) { - case "local": - left = _this36.table.rowManager.scrollLeft; - - _this36.table.rowManager.refreshActiveData("page"); - _this36.table.rowManager.scrollHorizontal(left); - - _this36.table.options.pageLoaded.call(_this36.table, _this36.getPage()); - resolve(); - break; - - case "remote": - case "progressive_load": - case "progressive_scroll": - _this36.table.modules.ajax.blockActiveRequest(); - _this36._getRemotePage().then(function () { - resolve(); - }).catch(function () { - reject(); - }); - break; - - default: - console.warn("Pagination Error - no such pagination mode:", _this36.mode); - reject(); - } - }); - }; - - Page.prototype._getRemotePage = function () { - var _this37 = this; - - var self = this, - oldParams, - pageParams; - - return new Promise(function (resolve, reject) { - - if (!self.table.modExists("ajax", true)) { - reject(); - } - - //record old params and restore after request has been made - oldParams = Tabulator.prototype.helpers.deepClone(self.table.modules.ajax.getParams() || {}); - pageParams = self.table.modules.ajax.getParams(); - - //configure request params - pageParams[_this37.paginationDataSentNames.page] = self.page; - - //set page size if defined - if (_this37.size) { - pageParams[_this37.paginationDataSentNames.size] = _this37.size; - } - - //set sort data if defined - if (_this37.table.options.ajaxSorting && _this37.table.modExists("sort")) { - var sorters = self.table.modules.sort.getSort(); - - sorters.forEach(function (item) { - delete item.column; - }); - - pageParams[_this37.paginationDataSentNames.sorters] = sorters; - } - - //set filter data if defined - if (_this37.table.options.ajaxFiltering && _this37.table.modExists("filter")) { - var filters = self.table.modules.filter.getFilters(true, true); - pageParams[_this37.paginationDataSentNames.filters] = filters; - } - - self.table.modules.ajax.setParams(pageParams); - - self.table.modules.ajax.sendRequest(_this37.progressiveLoad).then(function (data) { - self._parseRemoteData(data); - resolve(); - }).catch(function (e) { - reject(); - }); - - self.table.modules.ajax.setParams(oldParams); - }); - }; - - Page.prototype._parseRemoteData = function (data) { - var self = this, - left, - data, - margin; - - if (typeof data[this.paginationDataReceivedNames.last_page] === "undefined") { - console.warn("Remote Pagination Error - Server response missing '" + this.paginationDataReceivedNames.last_page + "' property"); - } - - if (data[this.paginationDataReceivedNames.data]) { - this.max = parseInt(data[this.paginationDataReceivedNames.last_page]) || 1; - - if (this.progressiveLoad) { - switch (this.mode) { - case "progressive_load": - this.table.rowManager.addRows(data[this.paginationDataReceivedNames.data]); - if (this.page < this.max) { - setTimeout(function () { - self.nextPage().then(function () {}).catch(function () {}); - }, self.table.options.ajaxProgressiveLoadDelay); - } - break; - - case "progressive_scroll": - data = this.table.rowManager.getData().concat(data[this.paginationDataReceivedNames.data]); - - this.table.rowManager.setData(data, true); - - margin = this.table.options.ajaxProgressiveLoadScrollMargin || this.table.rowManager.element.clientHeight * 2; - - if (self.table.rowManager.element.scrollHeight <= self.table.rowManager.element.clientHeight + margin) { - self.nextPage().then(function () {}).catch(function () {}); - } - break; - } - } else { - left = this.table.rowManager.scrollLeft; - - this.table.rowManager.setData(data[this.paginationDataReceivedNames.data]); - - this.table.rowManager.scrollHorizontal(left); - - this.table.columnManager.scrollHorizontal(left); - - this.table.options.pageLoaded.call(this.table, this.getPage()); - } - } else { - console.warn("Remote Pagination Error - Server response missing '" + this.paginationDataReceivedNames.data + "' property"); - } - }; - - //handle the footer element being redrawn - Page.prototype.footerRedraw = function () { - var footer = this.table.footerManager.element; - - if (Math.ceil(footer.clientWidth) - footer.scrollWidth < 0) { - this.pagesElement.style.display = 'none'; - } else { - this.pagesElement.style.display = ''; - - if (Math.ceil(footer.clientWidth) - footer.scrollWidth < 0) { - this.pagesElement.style.display = 'none'; - } - } - }; - - //set the paramter names for pagination requests - Page.prototype.paginationDataSentNames = { - "page": "page", - "size": "size", - "sorters": "sorters", - // "sort_dir":"sort_dir", - "filters": "filters" - }; - - //set the property names for pagination responses - Page.prototype.paginationDataReceivedNames = { - "current_page": "current_page", - "last_page": "last_page", - "data": "data" - }; - - Tabulator.prototype.registerModule("page", Page); - - var Persistence = function Persistence(table) { - this.table = table; //hold Tabulator object - this.mode = ""; - this.id = ""; - this.persistProps = ["field", "width", "visible"]; - }; - - //setup parameters - Persistence.prototype.initialize = function (mode, id) { - //determine persistent layout storage type - this.mode = mode !== true ? mode : typeof window.localStorage !== 'undefined' ? "local" : "cookie"; - - //set storage tag - this.id = "tabulator-" + (id || this.table.element.getAttribute("id") || ""); - }; - - //load saved definitions - Persistence.prototype.load = function (type, current) { - - var data = this.retreiveData(type); - - if (current) { - data = data ? this.mergeDefinition(current, data) : current; - } - - return data; - }; - - //retreive data from memory - Persistence.prototype.retreiveData = function (type) { - var data = "", - id = this.id + (type === "columns" ? "" : "-" + type); - - switch (this.mode) { - case "local": - data = localStorage.getItem(id); - break; - - case "cookie": - - //find cookie - var cookie = document.cookie, - cookiePos = cookie.indexOf(id + "="), - end = void 0; - - //if cookie exists, decode and load column data into tabulator - if (cookiePos > -1) { - cookie = cookie.substr(cookiePos); - - end = cookie.indexOf(";"); - - if (end > -1) { - cookie = cookie.substr(0, end); - } - - data = cookie.replace(id + "=", ""); - } - break; - - default: - console.warn("Persistance Load Error - invalid mode selected", this.mode); - } - - return data ? JSON.parse(data) : false; - }; - - //merge old and new column defintions - Persistence.prototype.mergeDefinition = function (oldCols, newCols) { - var self = this, - output = []; - - // oldCols = oldCols || []; - newCols = newCols || []; - - newCols.forEach(function (column, to) { - - var from = self._findColumn(oldCols, column); - - if (from) { - - from.width = column.width; - from.visible = column.visible; - - if (from.columns) { - from.columns = self.mergeDefinition(from.columns, column.columns); - } - - output.push(from); - } - }); - oldCols.forEach(function (column, i) { - var from = self._findColumn(newCols, column); - if (!from) { - if (output.length > i) { - output.splice(i, 0, column); - } else { - output.push(column); - } - } - }); - - return output; - }; - - //find matching columns - Persistence.prototype._findColumn = function (columns, subject) { - var type = subject.columns ? "group" : subject.field ? "field" : "object"; - - return columns.find(function (col) { - switch (type) { - case "group": - return col.title === subject.title && col.columns.length === subject.columns.length; - break; - - case "field": - return col.field === subject.field; - break; - - case "object": - return col === subject; - break; - } - }); - }; - - //save data - Persistence.prototype.save = function (type) { - var data = {}; - - switch (type) { - case "columns": - data = this.parseColumns(this.table.columnManager.getColumns()); - break; - - case "filter": - data = this.table.modules.filter.getFilters(); - break; - - case "sort": - data = this.validateSorters(this.table.modules.sort.getSort()); - break; - } - - var id = this.id + (type === "columns" ? "" : "-" + type); - - this.saveData(id, data); - }; - - //ensure sorters contain no function data - Persistence.prototype.validateSorters = function (data) { - data.forEach(function (item) { - item.column = item.field; - delete item.field; - }); - - return data; - }; - - //save data to chosed medium - Persistence.prototype.saveData = function (id, data) { - - data = JSON.stringify(data); - - switch (this.mode) { - case "local": - localStorage.setItem(id, data); - break; - - case "cookie": - var expireDate = new Date(); - expireDate.setDate(expireDate.getDate() + 10000); - - //save cookie - document.cookie = id + "=" + data + "; expires=" + expireDate.toUTCString(); - break; - - default: - console.warn("Persistance Save Error - invalid mode selected", this.mode); - } - }; - - //build premission list - Persistence.prototype.parseColumns = function (columns) { - var self = this, - definitions = []; - - columns.forEach(function (column) { - var def = {}; - - if (column.isGroup) { - def.title = column.getDefinition().title; - def.columns = self.parseColumns(column.getColumns()); - } else { - def.title = column.getDefinition().title; - def.field = column.getField(); - def.width = column.getWidth(); - def.visible = column.visible; - } - - definitions.push(def); - }); - - return definitions; - }; - - Tabulator.prototype.registerModule("persistence", Persistence); - - var ResizeColumns = function ResizeColumns(table) { - this.table = table; //hold Tabulator object - this.startColumn = false; - this.startX = false; - this.startWidth = false; - this.handle = null; - this.prevHandle = null; - }; - - ResizeColumns.prototype.initializeColumn = function (type, column, element) { - var self = this, - variableHeight = false, - mode = this.table.options.resizableColumns; - - //set column resize mode - if (type === "header") { - variableHeight = column.definition.formatter == "textarea" || column.definition.variableHeight; - column.modules.resize = { variableHeight: variableHeight }; - } - - if (mode === true || mode == type) { - - var handle = document.createElement('div'); - handle.className = "tabulator-col-resize-handle"; - - var prevHandle = document.createElement('div'); - prevHandle.className = "tabulator-col-resize-handle prev"; - - handle.addEventListener("click", function (e) { - e.stopPropagation(); - }); - - handle.addEventListener("mousedown", function (e) { - var nearestColumn = column.getLastColumn(); - - if (nearestColumn && self._checkResizability(nearestColumn)) { - self.startColumn = column; - self._mouseDown(e, nearestColumn); - } - }); - - //reszie column on double click - handle.addEventListener("dblclick", function (e) { - if (self._checkResizability(column)) { - column.reinitializeWidth(true); - } - }); - - prevHandle.addEventListener("click", function (e) { - e.stopPropagation(); - }); - - prevHandle.addEventListener("mousedown", function (e) { - var nearestColumn, colIndex, prevColumn; - - nearestColumn = column.getFirstColumn(); - - if (nearestColumn) { - colIndex = self.table.columnManager.findColumnIndex(nearestColumn); - prevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false; - - if (prevColumn && self._checkResizability(prevColumn)) { - self.startColumn = column; - self._mouseDown(e, prevColumn); - } - } - }); - - //resize column on double click - prevHandle.addEventListener("dblclick", function (e) { - var nearestColumn, colIndex, prevColumn; - - nearestColumn = column.getFirstColumn(); - - if (nearestColumn) { - colIndex = self.table.columnManager.findColumnIndex(nearestColumn); - prevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false; - - if (prevColumn && self._checkResizability(prevColumn)) { - prevColumn.reinitializeWidth(true); - } - } - }); - - element.appendChild(handle); - element.appendChild(prevHandle); - } - }; - - ResizeColumns.prototype._checkResizability = function (column) { - return typeof column.definition.resizable != "undefined" ? column.definition.resizable : this.table.options.resizableColumns; - }; - - ResizeColumns.prototype._mouseDown = function (e, column) { - var self = this; - - self.table.element.classList.add("tabulator-block-select"); - - function mouseMove(e) { - column.setWidth(self.startWidth + (e.screenX - self.startX)); - - if (!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight) { - column.checkCellHeights(); - } - } - - function mouseUp(e) { - - //block editor from taking action while resizing is taking place - if (self.startColumn.modules.edit) { - self.startColumn.modules.edit.blocked = false; - } - - if (self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight) { - column.checkCellHeights(); - } - - document.body.removeEventListener("mouseup", mouseUp); - document.body.removeEventListener("mousemove", mouseMove); - - self.table.element.classList.remove("tabulator-block-select"); - - if (self.table.options.persistentLayout && self.table.modExists("persistence", true)) { - self.table.modules.persistence.save("columns"); - } - - self.table.options.columnResized.call(self.table, self.startColumn.getComponent()); - } - - e.stopPropagation(); //prevent resize from interfereing with movable columns - - //block editor from taking action while resizing is taking place - if (self.startColumn.modules.edit) { - self.startColumn.modules.edit.blocked = true; - } - - self.startX = e.screenX; - self.startWidth = column.getWidth(); - - document.body.addEventListener("mousemove", mouseMove); - document.body.addEventListener("mouseup", mouseUp); - }; - - Tabulator.prototype.registerModule("resizeColumns", ResizeColumns); - var ResizeRows = function ResizeRows(table) { - this.table = table; //hold Tabulator object - this.startColumn = false; - this.startY = false; - this.startHeight = false; - this.handle = null; - this.prevHandle = null; - }; - - ResizeRows.prototype.initializeRow = function (row) { - var self = this, - rowEl = row.getElement(); - - var handle = document.createElement('div'); - handle.className = "tabulator-row-resize-handle"; - - var prevHandle = document.createElement('div'); - prevHandle.className = "tabulator-row-resize-handle prev"; - - handle.addEventListener("click", function (e) { - e.stopPropagation(); - }); - - handle.addEventListener("mousedown", function (e) { - self.startRow = row; - self._mouseDown(e, row); - }); - - prevHandle.addEventListener("click", function (e) { - e.stopPropagation(); - }); - - prevHandle.addEventListener("mousedown", function (e) { - var prevRow = self.table.rowManager.prevDisplayRow(row); - - if (prevRow) { - self.startRow = prevRow; - self._mouseDown(e, prevRow); - } - }); - - rowEl.appendChild(handle); - rowEl.appendChild(prevHandle); - }; - - ResizeRows.prototype._mouseDown = function (e, row) { - var self = this; - - self.table.element.classList.add("tabulator-block-select"); - - function mouseMove(e) { - row.setHeight(self.startHeight + (e.screenY - self.startY)); - } - - function mouseUp(e) { - - // //block editor from taking action while resizing is taking place - // if(self.startColumn.modules.edit){ - // self.startColumn.modules.edit.blocked = false; - // } - - document.body.removeEventListener("mouseup", mouseMove); - document.body.removeEventListener("mousemove", mouseMove); - - self.table.element.classList.remove("tabulator-block-select"); - - self.table.options.rowResized.call(this.table, row.getComponent()); - } - - e.stopPropagation(); //prevent resize from interfereing with movable columns - - //block editor from taking action while resizing is taking place - // if(self.startColumn.modules.edit){ - // self.startColumn.modules.edit.blocked = true; - // } - - self.startY = e.screenY; - self.startHeight = row.getHeight(); - - document.body.addEventListener("mousemove", mouseMove); - - document.body.addEventListener("mouseup", mouseUp); - }; - - Tabulator.prototype.registerModule("resizeRows", ResizeRows); - var ResizeTable = function ResizeTable(table) { - this.table = table; //hold Tabulator object - this.binding = false; - this.observer = false; - }; - - ResizeTable.prototype.initialize = function (row) { - var table = this.table, - observer; - - if (typeof ResizeObserver !== "undefined" && table.rowManager.getRenderMode() === "virtual") { - this.observer = new ResizeObserver(function (entry) { - table.redraw(); - }); - - this.observer.observe(table.element); - } else { - this.binding = function () { - table.redraw(); - }; - - window.addEventListener("resize", this.binding); - } - }; - - ResizeTable.prototype.clearBindings = function (row) { - if (this.binding) { - window.removeEventListener("resize", this.binding); - } - - if (this.observer) { - this.observer.unobserve(this.table.element); - } - }; - - Tabulator.prototype.registerModule("resizeTable", ResizeTable); - var ResponsiveLayout = function ResponsiveLayout(table) { - this.table = table; //hold Tabulator object - this.columns = []; - this.hiddenColumns = []; - this.mode = ""; - this.index = 0; - this.collapseFormatter = []; - this.collapseStartOpen = true; - }; - - //generate resposive columns list - ResponsiveLayout.prototype.initialize = function () { - var self = this, - columns = []; - - this.mode = this.table.options.responsiveLayout; - this.collapseFormatter = this.table.options.responsiveLayoutCollapseFormatter || this.formatCollapsedData; - this.collapseStartOpen = this.table.options.responsiveLayoutCollapseStartOpen; - this.hiddenColumns = []; - - //detemine level of responsivity for each column - this.table.columnManager.columnsByIndex.forEach(function (column, i) { - if (column.modules.responsive) { - if (column.modules.responsive.order && column.modules.responsive.visible) { - column.modules.responsive.index = i; - columns.push(column); - - if (!column.visible && self.mode === "collapse") { - self.hiddenColumns.push(column); - } - } - } - }); - - //sort list by responsivity - columns = columns.reverse(); - columns = columns.sort(function (a, b) { - var diff = b.modules.responsive.order - a.modules.responsive.order; - return diff || b.modules.responsive.index - a.modules.responsive.index; - }); - - this.columns = columns; - - if (this.mode === "collapse") { - this.generateCollapsedContent(); - } - }; - - //define layout information - ResponsiveLayout.prototype.initializeColumn = function (column) { - var def = column.getDefinition(); - - column.modules.responsive = { order: typeof def.responsive === "undefined" ? 1 : def.responsive, visible: def.visible === false ? false : true }; - }; - - ResponsiveLayout.prototype.layoutRow = function (row) { - var rowEl = row.getElement(), - el = document.createElement("div"); - - el.classList.add("tabulator-responsive-collapse"); - - if (!rowEl.classList.contains("tabulator-calcs")) { - row.modules.responsiveLayout = { - element: el - }; - - if (!this.collapseStartOpen) { - el.style.display = 'none'; - } - - rowEl.appendChild(el); - - this.generateCollapsedRowContent(row); - } - }; - - //update column visibility - ResponsiveLayout.prototype.updateColumnVisibility = function (column, visible) { - var index; - if (column.modules.responsive) { - column.modules.responsive.visible = visible; - this.initialize(); - } - }; - - ResponsiveLayout.prototype.hideColumn = function (column) { - column.hide(false, true); - - if (this.mode === "collapse") { - this.hiddenColumns.unshift(column); - this.generateCollapsedContent(); - } - }; - - ResponsiveLayout.prototype.showColumn = function (column) { - var index; - - column.show(false, true); - //set column width to prevent calculation loops on uninitialized columns - column.setWidth(column.getWidth()); - - if (this.mode === "collapse") { - index = this.hiddenColumns.indexOf(column); - - if (index > -1) { - this.hiddenColumns.splice(index, 1); - } - - this.generateCollapsedContent(); - } - }; - - //redraw columns to fit space - ResponsiveLayout.prototype.update = function () { - var self = this, - working = true; - - while (working) { - - var width = self.table.modules.layout.getMode() == "fitColumns" ? self.table.columnManager.getFlexBaseWidth() : self.table.columnManager.getWidth(); - - var diff = self.table.columnManager.element.clientWidth - width; - - if (diff < 0) { - //table is too wide - var column = self.columns[self.index]; - - if (column) { - self.hideColumn(column); - self.index++; - } else { - working = false; - } - } else { - - //table has spare space - var _column = self.columns[self.index - 1]; - - if (_column) { - if (diff > 0) { - if (diff >= _column.getWidth()) { - self.showColumn(_column); - self.index--; - } else { - working = false; - } - } else { - working = false; - } - } else { - working = false; - } - } - - if (!self.table.rowManager.activeRowsCount) { - self.table.rowManager.renderEmptyScroll(); - } - } - }; - - ResponsiveLayout.prototype.generateCollapsedContent = function () { - var self = this, - rows = this.table.rowManager.getDisplayRows(); - - rows.forEach(function (row) { - self.generateCollapsedRowContent(row); - }); - }; - - ResponsiveLayout.prototype.generateCollapsedRowContent = function (row) { - var el, contents; - - if (row.modules.responsiveLayout) { - el = row.modules.responsiveLayout.element; - - while (el.firstChild) { - el.removeChild(el.firstChild); - }contents = this.collapseFormatter(this.generateCollapsedRowData(row)); - - if (contents) { - el.appendChild(contents); - } - } - }; - - ResponsiveLayout.prototype.generateCollapsedRowData = function (row) { - var self = this, - data = row.getData(), - output = {}, - mockCellComponent; - - this.hiddenColumns.forEach(function (column) { - var value = column.getFieldValue(data); - - if (column.definition.title && column.field) { - if (column.modules.format && self.table.options.responsiveLayoutCollapseUseFormatters) { - - mockCellComponent = { - value: false, - data: {}, - getValue: function getValue() { - return value; - }, - getData: function getData() { - return data; - }, - getElement: function getElement() { - return document.createElement("div"); - }, - getRow: function getRow() { - return row.getComponent(); - }, - getColumn: function getColumn() { - return column.getComponent(); - } - }; - - output[column.definition.title] = column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params); - } else { - output[column.definition.title] = value; - } - } - }); - - return output; - }; - - ResponsiveLayout.prototype.formatCollapsedData = function (data) { - var list = document.createElement("table"), - listContents = ""; - - for (var key in data) { - listContents += "" + key + "" + data[key] + ""; - } - - list.innerHTML = listContents; - - return Object.keys(data).length ? list : ""; - }; - - Tabulator.prototype.registerModule("responsiveLayout", ResponsiveLayout); - - var SelectRow = function SelectRow(table) { - this.table = table; //hold Tabulator object - this.selecting = false; //flag selecting in progress - this.lastClickedRow = false; //last clicked row - this.selectPrev = []; //hold previously selected element for drag drop selection - this.selectedRows = []; //hold selected rows - }; - - SelectRow.prototype.clearSelectionData = function (silent) { - this.selecting = false; - this.lastClickedRow = false; - this.selectPrev = []; - this.selectedRows = []; - - if (!silent) { - this._rowSelectionChanged(); - } - }; - - SelectRow.prototype.initializeRow = function (row) { - var self = this, - element = row.getElement(); - - // trigger end of row selection - var endSelect = function endSelect() { - - setTimeout(function () { - self.selecting = false; - }, 50); - - document.body.removeEventListener("mouseup", endSelect); - }; - - row.modules.select = { selected: false }; - - //set row selection class - if (self.table.options.selectableCheck.call(this.table, row.getComponent())) { - element.classList.add("tabulator-selectable"); - element.classList.remove("tabulator-unselectable"); - - if (self.table.options.selectable && self.table.options.selectable != "highlight") { - if (self.table.options.selectableRangeMode && self.table.options.selectableRangeMode === "click") { - element.addEventListener("click", function (e) { - if (e.shiftKey) { - self.lastClickedRow = self.lastClickedRow || row; - - var lastClickedRowIdx = self.table.rowManager.getDisplayRowIndex(self.lastClickedRow); - var rowIdx = self.table.rowManager.getDisplayRowIndex(row); - - var fromRowIdx = lastClickedRowIdx <= rowIdx ? lastClickedRowIdx : rowIdx; - var toRowIdx = lastClickedRowIdx >= rowIdx ? lastClickedRowIdx : rowIdx; - - var rows = self.table.rowManager.getDisplayRows().slice(0); - var toggledRows = rows.splice(fromRowIdx, toRowIdx - fromRowIdx + 1); - - if (e.ctrlKey) { - toggledRows.forEach(function (toggledRow) { - if (toggledRow !== self.lastClickedRow) { - self.toggleRow(toggledRow); - } - }); - self.lastClickedRow = row; - } else { - self.deselectRows(); - self.selectRows(toggledRows); - } - } else if (e.ctrlKey) { - self.toggleRow(row); - self.lastClickedRow = row; - } else { - self.deselectRows(); - self.selectRows(row); - self.lastClickedRow = row; - } - }); - } else { - element.addEventListener("click", function (e) { - if (!self.selecting) { - self.toggleRow(row); - } - }); - - element.addEventListener("mousedown", function (e) { - if (e.shiftKey) { - self.selecting = true; - - self.selectPrev = []; - - document.body.addEventListener("mouseup", endSelect); - document.body.addEventListener("keyup", endSelect); - - self.toggleRow(row); - - return false; - } - }); - - element.addEventListener("mouseenter", function (e) { - if (self.selecting) { - self.toggleRow(row); - - if (self.selectPrev[1] == row) { - self.toggleRow(self.selectPrev[0]); - } - } - }); - - element.addEventListener("mouseout", function (e) { - if (self.selecting) { - self.selectPrev.unshift(row); - } - }); - } - } - } else { - element.classList.add("tabulator-unselectable"); - element.classList.remove("tabulator-selectable"); - } - }; - - //toggle row selection - SelectRow.prototype.toggleRow = function (row) { - if (this.table.options.selectableCheck.call(this.table, row.getComponent())) { - if (row.modules.select.selected) { - this._deselectRow(row); - } else { - this._selectRow(row); - } - } - }; - - //select a number of rows - SelectRow.prototype.selectRows = function (rows) { - var self = this; - - switch (typeof rows === 'undefined' ? 'undefined' : _typeof(rows)) { - case "undefined": - self.table.rowManager.rows.forEach(function (row) { - self._selectRow(row, false, true); - }); - - self._rowSelectionChanged(); - break; - - case "boolean": - if (rows === true) { - self.table.rowManager.activeRows.forEach(function (row) { - self._selectRow(row, false, true); - }); - - self._rowSelectionChanged(); - } - break; - - default: - if (Array.isArray(rows)) { - rows.forEach(function (row) { - self._selectRow(row); - }); - - self._rowSelectionChanged(); - } else { - self._selectRow(rows); - } - break; - } - }; - - //select an individual row - SelectRow.prototype._selectRow = function (rowInfo, silent, force) { - var index; - - //handle max row count - if (!isNaN(this.table.options.selectable) && this.table.options.selectable !== true && !force) { - if (this.selectedRows.length >= this.table.options.selectable) { - if (this.table.options.selectableRollingSelection) { - this._deselectRow(this.selectedRows[0]); - } else { - return false; - } - } - } - - var row = this.table.rowManager.findRow(rowInfo); - - if (row) { - if (this.selectedRows.indexOf(row) == -1) { - row.modules.select.selected = true; - row.getElement().classList.add("tabulator-selected"); - - this.selectedRows.push(row); - - if (!silent) { - this.table.options.rowSelected.call(this.table, row.getComponent()); - this._rowSelectionChanged(); - } - } - } else { - if (!silent) { - console.warn("Selection Error - No such row found, ignoring selection:" + rowInfo); - } - } - }; - - SelectRow.prototype.isRowSelected = function (row) { - return this.selectedRows.indexOf(row) !== -1; - }; - - //deselect a number of rows - SelectRow.prototype.deselectRows = function (rows) { - var self = this, - rowCount; - - if (typeof rows == "undefined") { - - rowCount = self.selectedRows.length; - - for (var i = 0; i < rowCount; i++) { - self._deselectRow(self.selectedRows[0], false); - } - - self._rowSelectionChanged(); - } else { - if (Array.isArray(rows)) { - rows.forEach(function (row) { - self._deselectRow(row); - }); - - self._rowSelectionChanged(); - } else { - self._deselectRow(rows); - } - } - }; - - //deselect an individual row - SelectRow.prototype._deselectRow = function (rowInfo, silent) { - var self = this, - row = self.table.rowManager.findRow(rowInfo), - index; - - if (row) { - index = self.selectedRows.findIndex(function (selectedRow) { - return selectedRow == row; - }); - - if (index > -1) { - - row.modules.select.selected = false; - row.getElement().classList.remove("tabulator-selected"); - self.selectedRows.splice(index, 1); - - if (!silent) { - self.table.options.rowDeselected.call(this.table, row.getComponent()); - self._rowSelectionChanged(); - } - } - } else { - if (!silent) { - console.warn("Deselection Error - No such row found, ignoring selection:" + rowInfo); - } - } - }; - - SelectRow.prototype.getSelectedData = function () { - var data = []; - - this.selectedRows.forEach(function (row) { - data.push(row.getData()); - }); - - return data; - }; - - SelectRow.prototype.getSelectedRows = function () { - - var rows = []; - - this.selectedRows.forEach(function (row) { - rows.push(row.getComponent()); - }); - - return rows; - }; - - SelectRow.prototype._rowSelectionChanged = function () { - this.table.options.rowSelectionChanged.call(this.table, this.getSelectedData(), this.getSelectedRows()); - }; - - Tabulator.prototype.registerModule("selectRow", SelectRow); - - var Sort = function Sort(table) { - this.table = table; //hold Tabulator object - this.sortList = []; //holder current sort - this.changed = false; //has the sort changed since last render - }; - - //initialize column header for sorting - Sort.prototype.initializeColumn = function (column, content) { - var self = this, - sorter = false, - colEl, - arrowEl; - - switch (_typeof(column.definition.sorter)) { - case "string": - if (self.sorters[column.definition.sorter]) { - sorter = self.sorters[column.definition.sorter]; - } else { - console.warn("Sort Error - No such sorter found: ", column.definition.sorter); - } - break; - - case "function": - sorter = column.definition.sorter; - break; - } - - column.modules.sort = { - sorter: sorter, dir: "none", - params: column.definition.sorterParams || {}, - startingDir: column.definition.headerSortStartingDir || "asc" - }; - - if (column.definition.headerSort !== false) { - - colEl = column.getElement(); - - colEl.classList.add("tabulator-sortable"); - - arrowEl = document.createElement("div"); - arrowEl.classList.add("tabulator-arrow"); - //create sorter arrow - content.appendChild(arrowEl); - - //sort on click - colEl.addEventListener("click", function (e) { - var dir = "", - sorters = [], - match = false; - - if (column.modules.sort) { - dir = column.modules.sort.dir == "asc" ? "desc" : column.modules.sort.dir == "desc" ? "asc" : column.modules.sort.startingDir; - - if (self.table.options.columnHeaderSortMulti && (e.shiftKey || e.ctrlKey)) { - sorters = self.getSort(); - - match = sorters.findIndex(function (sorter) { - return sorter.field === column.getField(); - }); - - if (match > -1) { - sorters[match].dir = sorters[match].dir == "asc" ? "desc" : "asc"; - - if (match != sorters.length - 1) { - sorters.push(sorters.splice(match, 1)[0]); - } - } else { - sorters.push({ column: column, dir: dir }); - } - - //add to existing sort - self.setSort(sorters); - } else { - //sort by column only - self.setSort(column, dir); - } - - self.table.rowManager.sorterRefresh(); - } - }); - } - }; - - //check if the sorters have changed since last use - Sort.prototype.hasChanged = function () { - var changed = this.changed; - this.changed = false; - return changed; - }; - - //return current sorters - Sort.prototype.getSort = function () { - var self = this, - sorters = []; - - self.sortList.forEach(function (item) { - if (item.column) { - sorters.push({ column: item.column.getComponent(), field: item.column.getField(), dir: item.dir }); - } - }); - - return sorters; - }; - - //change sort list and trigger sort - Sort.prototype.setSort = function (sortList, dir) { - var self = this, - newSortList = []; - - if (!Array.isArray(sortList)) { - sortList = [{ column: sortList, dir: dir }]; - } - - sortList.forEach(function (item) { - var column; - - column = self.table.columnManager.findColumn(item.column); - - if (column) { - item.column = column; - newSortList.push(item); - self.changed = true; - } else { - console.warn("Sort Warning - Sort field does not exist and is being ignored: ", item.column); - } - }); - - self.sortList = newSortList; - - if (this.table.options.persistentSort && this.table.modExists("persistence", true)) { - this.table.modules.persistence.save("sort"); - } - }; - - //clear sorters - Sort.prototype.clear = function () { - this.setSort([]); - }; - - //find appropriate sorter for column - Sort.prototype.findSorter = function (column) { - var row = this.table.rowManager.activeRows[0], - sorter = "string", - field, - value; - - if (row) { - row = row.getData(); - field = column.getField(); - - if (field) { - - value = column.getFieldValue(row); - - switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { - case "undefined": - sorter = "string"; - break; - - case "boolean": - sorter = "boolean"; - break; - - default: - if (!isNaN(value) && value !== "") { - sorter = "number"; - } else { - if (value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)) { - sorter = "alphanum"; - } - } - break; - } - } - } - - return this.sorters[sorter]; - }; - - //work through sort list sorting data - Sort.prototype.sort = function () { - var self = this, - lastSort, - sortList; - - sortList = this.table.options.sortOrderReverse ? self.sortList.slice().reverse() : self.sortList; - - if (self.table.options.dataSorting) { - self.table.options.dataSorting.call(self.table, self.getSort()); - } - - self.clearColumnHeaders(); - - if (!self.table.options.ajaxSorting) { - - sortList.forEach(function (item, i) { - - if (item.column && item.column.modules.sort) { - - //if no sorter has been defined, take a guess - if (!item.column.modules.sort.sorter) { - item.column.modules.sort.sorter = self.findSorter(item.column); - } - - self._sortItem(item.column, item.dir, sortList, i); - } - - self.setColumnHeader(item.column, item.dir); - }); - } else { - sortList.forEach(function (item, i) { - self.setColumnHeader(item.column, item.dir); - }); - } - - if (self.table.options.dataSorted) { - self.table.options.dataSorted.call(self.table, self.getSort(), self.table.rowManager.getComponents(true)); - } - }; - - //clear sort arrows on columns - Sort.prototype.clearColumnHeaders = function () { - this.table.columnManager.getRealColumns().forEach(function (column) { - if (column.modules.sort) { - column.modules.sort.dir = "none"; - column.getElement().setAttribute("aria-sort", "none"); - } - }); - }; - - //set the column header sort direction - Sort.prototype.setColumnHeader = function (column, dir) { - column.modules.sort.dir = dir; - column.getElement().setAttribute("aria-sort", dir); - }; - - //sort each item in sort list - Sort.prototype._sortItem = function (column, dir, sortList, i) { - var self = this; - - var activeRows = self.table.rowManager.activeRows; - - var params = typeof column.modules.sort.params === "function" ? column.modules.sort.params(column.getComponent(), dir) : column.modules.sort.params; - - activeRows.sort(function (a, b) { - - var result = self._sortRow(a, b, column, dir, params); - - //if results match recurse through previous searchs to be sure - if (result === 0 && i) { - for (var j = i - 1; j >= 0; j--) { - result = self._sortRow(a, b, sortList[j].column, sortList[j].dir, params); - - if (result !== 0) { - break; - } - } - } - - return result; - }); - }; - - //process individual rows for a sort function on active data - Sort.prototype._sortRow = function (a, b, column, dir, params) { - var el1Comp, el2Comp, colComp; - - //switch elements depending on search direction - var el1 = dir == "asc" ? a : b; - var el2 = dir == "asc" ? b : a; - - a = column.getFieldValue(el1.getData()); - b = column.getFieldValue(el2.getData()); - - a = typeof a !== "undefined" ? a : ""; - b = typeof b !== "undefined" ? b : ""; - - el1Comp = el1.getComponent(); - el2Comp = el2.getComponent(); - - return column.modules.sort.sorter.call(this, a, b, el1Comp, el2Comp, column.getComponent(), dir, params); - }; - - //default data sorters - Sort.prototype.sorters = { - - //sort numbers - number: function number(a, b, aRow, bRow, column, dir, params) { - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - - a = parseFloat(String(a).replace(",", "")); - b = parseFloat(String(b).replace(",", "")); - - //handle non numeric values - if (isNaN(a)) { - emptyAlign = isNaN(b) ? 0 : -1; - } else if (isNaN(b)) { - emptyAlign = 1; - } else { - //compare valid values - return a - b; - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - }, - - //sort strings - string: function string(a, b, aRow, bRow, column, dir, params) { - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - var locale; - - //handle empty values - if (!a) { - emptyAlign = !b ? 0 : -1; - } else if (!b) { - emptyAlign = 1; - } else { - //compare valid values - switch (_typeof(params.locale)) { - case "boolean": - if (params.locale) { - locale = this.table.modules.localize.getLocale(); - } - break; - case "string": - locale = params.locale; - break; - } - - return String(a).toLowerCase().localeCompare(String(b).toLowerCase(), locale); - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - }, - - //sort date - date: function date(a, b, aRow, bRow, column, dir, params) { - if (!params.format) { - params.format = "DD/MM/YYYY"; - } - - return this.sorters.datetime.call(this, a, b, aRow, bRow, column, dir, params); - }, - - //sort hh:mm formatted times - time: function time(a, b, aRow, bRow, column, dir, params) { - if (!params.format) { - params.format = "hh:mm"; - } - - return this.sorters.datetime.call(this, a, b, aRow, bRow, column, dir, params); - }, - - //sort datetime - datetime: function datetime(a, b, aRow, bRow, column, dir, params) { - var format = params.format || "DD/MM/YYYY hh:mm:ss", - alignEmptyValues = params.alignEmptyValues, - emptyAlign = 0; - - if (typeof moment != "undefined") { - a = moment(a, format); - b = moment(b, format); - - if (!a.isValid()) { - emptyAlign = !b.isValid() ? 0 : -1; - } else if (!b.isValid()) { - emptyAlign = 1; - } else { - //compare valid values - return a - b; - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - } else { - console.error("Sort Error - 'datetime' sorter is dependant on moment.js"); - } - }, - - //sort booleans - boolean: function boolean(a, b, aRow, bRow, column, dir, params) { - var el1 = a === true || a === "true" || a === "True" || a === 1 ? 1 : 0; - var el2 = b === true || b === "true" || b === "True" || b === 1 ? 1 : 0; - - return el1 - el2; - }, - - //sort if element contains any data - array: function array(a, b, aRow, bRow, column, dir, params) { - var el1 = 0; - var el2 = 0; - var type = params.type || "length"; - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - - function calc(value) { - - switch (type) { - case "length": - return value.length; - break; - - case "sum": - return value.reduce(function (c, d) { - return c + d; - }); - break; - - case "max": - return Math.max.apply(null, value); - break; - - case "min": - return Math.min.apply(null, value); - break; - - case "avg": - return value.reduce(function (c, d) { - return c + d; - }) / value.length; - break; - } - } - - //handle non array values - if (!Array.isArray(a)) { - alignEmptyValues = !Array.isArray(b) ? 0 : -1; - } else if (!Array.isArray(b)) { - alignEmptyValues = 1; - } else { - - //compare valid values - el1 = a ? calc(a) : 0; - el2 = b ? calc(b) : 0; - - return el1 - el2; - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - }, - - //sort if element contains any data - exists: function exists(a, b, aRow, bRow, column, dir, params) { - var el1 = typeof a == "undefined" ? 0 : 1; - var el2 = typeof b == "undefined" ? 0 : 1; - - return el1 - el2; - }, - - //sort alpha numeric strings - alphanum: function alphanum(as, bs, aRow, bRow, column, dir, params) { - var a, - b, - a1, - b1, - i = 0, - L, - rx = /(\d+)|(\D+)/g, - rd = /\d/; - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - - //handle empty values - if (!as && as !== 0) { - emptyAlign = !bs && bs !== 0 ? 0 : -1; - } else if (!bs && bs !== 0) { - emptyAlign = 1; - } else { - - if (isFinite(as) && isFinite(bs)) return as - bs; - a = String(as).toLowerCase(); - b = String(bs).toLowerCase(); - if (a === b) return 0; - if (!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1; - a = a.match(rx); - b = b.match(rx); - L = a.length > b.length ? b.length : a.length; - while (i < L) { - a1 = a[i]; - b1 = b[i++]; - if (a1 !== b1) { - if (isFinite(a1) && isFinite(b1)) { - if (a1.charAt(0) === "0") a1 = "." + a1; - if (b1.charAt(0) === "0") b1 = "." + b1; - return a1 - b1; - } else return a1 > b1 ? 1 : -1; - } - } - - return a.length > b.length; - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - } - }; - - Tabulator.prototype.registerModule("sort", Sort); - - var Validate = function Validate(table) { - this.table = table; - }; - - //validate - Validate.prototype.initializeColumn = function (column) { - var self = this, - config = [], - validator; - - if (column.definition.validator) { - - if (Array.isArray(column.definition.validator)) { - column.definition.validator.forEach(function (item) { - validator = self._extractValidator(item); - - if (validator) { - config.push(validator); - } - }); - } else { - validator = this._extractValidator(column.definition.validator); - - if (validator) { - config.push(validator); - } - } - - column.modules.validate = config.length ? config : false; - } - }; - - Validate.prototype._extractValidator = function (value) { - var parts, type, params; - - switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { - case "string": - parts = value.split(":", 2); - type = parts.shift(); - params = parts[0]; - - return this._buildValidator(type, params); - break; - - case "function": - return this._buildValidator(value); - break; - - case "object": - return this._buildValidator(value.type, value.parameters); - break; - } - }; - - Validate.prototype._buildValidator = function (type, params) { - - var func = typeof type == "function" ? type : this.validators[type]; - - if (!func) { - console.warn("Validator Setup Error - No matching validator found:", type); - return false; - } else { - return { - type: typeof type == "function" ? "function" : type, - func: func, - params: params - }; - } - }; - - Validate.prototype.validate = function (validators, cell, value) { - var self = this, - valid = []; - - if (validators) { - validators.forEach(function (item) { - if (!item.func.call(self, cell, value, item.params)) { - valid.push({ - type: item.type, - parameters: item.params - }); - } - }); - } - - return valid.length ? valid : true; - }; - - Validate.prototype.validators = { - - //is integer - integer: function integer(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - value = Number(value); - return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; - }, - - //is float - float: function float(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - value = Number(value); - return typeof value === 'number' && isFinite(value) && value % 1 !== 0; - }, - - //must be a number - numeric: function numeric(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return !isNaN(value); - }, - - //must be a string - string: function string(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return isNaN(value); - }, - - //maximum value - max: function max(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return parseFloat(value) <= parameters; - }, - - //minimum value - min: function min(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return parseFloat(value) >= parameters; - }, - - //minimum string length - minLength: function minLength(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return String(value).length >= parameters; - }, - - //maximum string length - maxLength: function maxLength(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return String(value).length <= parameters; - }, - - //in provided value list - in: function _in(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - if (typeof parameters == "string") { - parameters = parameters.split("|"); - } - - return value === "" || parameters.indexOf(value) > -1; - }, - - //must match provided regex - regex: function regex(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - var reg = new RegExp(parameters); - - return reg.test(value); - }, - - //value must be unique in this column - unique: function unique(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - var unique = true; - - var cellData = cell.getData(); - var column = cell.getColumn()._getSelf(); - - this.table.rowManager.rows.forEach(function (row) { - var data = row.getData(); - - if (data !== cellData) { - if (value == column.getFieldValue(data)) { - unique = false; - } - } - }); - - return unique; - }, - - //must have a value - required: function required(cell, value, parameters) { - return value !== "" & value !== null && typeof value !== "undefined"; - } - }; - - Tabulator.prototype.registerModule("validate", Validate); - - return Tabulator; -}); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator.min.js deleted file mode 100644 index 4fc653dfa1..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t,e){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Tabulator=e()}(this,function(){"use strict";Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),o=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;no?(e=t-o,this.element.style.marginLeft=-e+"px"):this.element.style.marginLeft=0,this.scrollLeft=t,this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()},t.prototype.setColumns=function(t,e){for(var o=this;o.headersElement.firstChild;)o.headersElement.removeChild(o.headersElement.firstChild);o.columns=[],o.columnsByIndex=[],o.columnsByField=[],o.table.modExists("frozenColumns")&&o.table.modules.frozenColumns.reset(),t.forEach(function(t,e){o._addColumn(t)}),o._reIndexColumns(),o.table.options.responsiveLayout&&o.table.modExists("responsiveLayout",!0)&&o.table.modules.responsiveLayout.initialize(),o.redraw(!0)},t.prototype._addColumn=function(t,e,o){var n=new i(t,this),s=n.getElement(),r=o?this.findColumnIndex(o):o;if(o&&r>-1){var a=this.columns.indexOf(o.getTopColumn()),l=o.getElement();e?(this.columns.splice(a,0,n),l.parentNode.insertBefore(s,l)):(this.columns.splice(a+1,0,n),l.parentNode.insertBefore(s,l.nextSibling))}else e?(this.columns.unshift(n),this.headersElement.insertBefore(n.getElement(),this.headersElement.firstChild)):(this.columns.push(n),this.headersElement.appendChild(n.getElement()));return n},t.prototype.registerColumnField=function(t){t.definition.field&&(this.columnsByField[t.definition.field]=t)},t.prototype.registerColumnPosition=function(t){this.columnsByIndex.push(t)},t.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach(function(t){t.reRegisterPosition()})},t.prototype._verticalAlignHeaders=function(){var t=this,e=0;t.columns.forEach(function(t){var o;t.clearVerticalAlign(),(o=t.getHeight())>e&&(e=o)}),t.columns.forEach(function(o){o.verticalAlign(t.table.options.columnVertAlign,e)}),t.rowManager.adjustTableSize()},t.prototype.findColumn=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t)))return this.columnsByField[t]||!1;if(t instanceof i)return t;if(t instanceof o)return t._getSelf()||!1;if(t instanceof HTMLElement){return e.columns.find(function(e){return e.element===t})||!1}return!1},t.prototype.getColumnByField=function(t){return this.columnsByField[t]},t.prototype.getColumnByIndex=function(t){return this.columnsByIndex[t]},t.prototype.getColumns=function(){return this.columns},t.prototype.findColumnIndex=function(t){return this.columnsByIndex.findIndex(function(e){return t===e})},t.prototype.getRealColumns=function(){return this.columnsByIndex},t.prototype.traverse=function(t){this.columnsByIndex.forEach(function(e,o){t(e,o)})},t.prototype.getDefinitions=function(t){var e=this,o=[];return e.columnsByIndex.forEach(function(e){(!t||t&&e.visible)&&o.push(e.getDefinition())}),o},t.prototype.getDefinitionTree=function(){var t=this,e=[];return t.columns.forEach(function(t){e.push(t.getDefinition(!0))}),e},t.prototype.getComponents=function(t){var e=this,o=[];return(t?e.columns:e.columnsByIndex).forEach(function(t){o.push(t.getComponent())}),o},t.prototype.getWidth=function(){var t=0;return this.columnsByIndex.forEach(function(e){e.visible&&(t+=e.getWidth())}),t},t.prototype.moveColumn=function(t,e,o){this._moveColumnInArray(this.columns,t,e,o),this._moveColumnInArray(this.columnsByIndex,t,e,o,!0),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.options.columnMoved&&this.table.options.columnMoved.call(this.table,t.getComponent(),this.table.columnManager.getComponents()),this.table.options.persistentLayout&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("columns")},t.prototype._moveColumnInArray=function(t,e,o,i,n){var s,r=t.indexOf(e);r>-1&&(t.splice(r,1),s=t.indexOf(o),s>-1?i&&(s+=1):s=r,t.splice(s,0,e),n&&this.table.rowManager.rows.forEach(function(t){if(t.cells.length){var e=t.cells.splice(r,1)[0];t.cells.splice(s,0,e)}}))},t.prototype.scrollToColumn=function(t,e,o){var i=this,n=0,s=0,r=0,a=t.getElement();return new Promise(function(l,u){if(void 0===e&&(e=i.table.options.scrollToColumnPosition),void 0===o&&(o=i.table.options.scrollToColumnIfVisible),t.visible){switch(e){case"middle":case"center":r=-i.element.clientWidth/2;break;case"right":r=a.clientWidth-i.headersElement.clientWidth}if(!o&&(s=a.offsetLeft)>0&&s+a.offsetWidtht.rowManager.element.clientHeight&&(e-=t.rowManager.element.offsetWidth-t.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var n,s,r;i.visible&&(n=i.definition.width||0,s=void 0===i.minWidth?t.table.options.columnMinWidth:parseInt(i.minWidth),r="string"==typeof n?n.indexOf("%")>-1?e/100*parseInt(n):parseInt(n):n,o+=r>s?r:s)}),o},t.prototype.addColumn=function(t,e,o){var i=this._addColumn(t,e,o);this._reIndexColumns(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),this.redraw(),"fitColumns"!=this.table.modules.layout.getMode()&&i.reinitializeWidth(),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},t.prototype.deregisterColumn=function(t){var e,o=t.getField();o&&delete this.columnsByField[o],e=this.columnsByIndex.indexOf(t),e>-1&&this.columnsByIndex.splice(e,1),e=this.columns.indexOf(t),e>-1&&this.columns.splice(e,1),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.redraw()},t.prototype.redraw=function(t){t&&(c.prototype.helpers.elVisible(this.element)&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),"fitColumns"==this.table.modules.layout.getMode()?this.table.modules.layout.layout():t?this.table.modules.layout.layout():this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),t&&(this.table.options.persistentLayout&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("columns"),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.redraw()),this.table.footerManager.redraw()};var o=function(t){this._column=t,this.type="ColumnComponent"};o.prototype.getElement=function(){return this._column.getElement()},o.prototype.getDefinition=function(){return this._column.getDefinition()},o.prototype.getField=function(){return this._column.getField()},o.prototype.getCells=function(){var t=[];return this._column.cells.forEach(function(e){t.push(e.getComponent())}),t},o.prototype.getVisibility=function(){return this._column.visible},o.prototype.show=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.show()}):this._column.show()},o.prototype.hide=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.hide()}):this._column.hide()},o.prototype.toggle=function(){this._column.visible?this.hide():this.show()},o.prototype.delete=function(){this._column.delete()},o.prototype.getSubColumns=function(){var t=[];return this._column.columns.length&&this._column.columns.forEach(function(e){t.push(e.getComponent())}),t},o.prototype.getParentColumn=function(){return this._column.parent instanceof i&&this._column.parent.getComponent()},o.prototype._getSelf=function(){return this._column},o.prototype.scrollTo=function(){return this._column.table.columnManager.scrollToColumn(this._column)},o.prototype.getTable=function(){return this._column.table},o.prototype.headerFilterFocus=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterFocus(this._column)},o.prototype.reloadHeaderFilter=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.reloadHeaderFilter(this._column)},o.prototype.setHeaderFilterValue=function(t){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterValue(this._column,t)};var i=function t(e,o){var i=this;this.table=o.table,this.definition=e,this.parent=o,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.setField(this.definition.field),this.modules={},this.cellEvents={cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1},this.width=null,this.minWidth=null,this.widthFixed=!1,this.visible=!0,e.columns?(this.isGroup=!0,e.columns.forEach(function(e,o){var n=new t(e,i);i.attachColumn(n)}),i.checkColumnVisibility()):o.registerColumnField(this),e.rowHandle&&!1!==this.table.options.movableRows&&this.table.modExists("moveRow")&&this.table.modules.moveRow.setHandle(!0),this._buildHeader()};i.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.setAttribute("role","columnheader"),t.setAttribute("aria-sort","none"),t},i.prototype.createGroupElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col-group-cols"),t},i.prototype.setField=function(t){this.field=t,this.fieldStructure=t?this.table.options.nestedFieldSeparator?t.split(this.table.options.nestedFieldSeparator):[t]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNesteData:this._setFlatData},i.prototype.registerColumnPosition=function(t){this.parent.registerColumnPosition(t)},i.prototype.registerColumnField=function(t){this.parent.registerColumnField(t)},i.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach(function(t){t.reRegisterPosition()}):this.registerColumnPosition(this)},i.prototype.setTooltip=function(){var t=this,e=t.definition,o=e.headerTooltip||!1===e.tooltip?e.headerTooltip:t.table.options.tooltipsHeader;o?!0===o?e.field?t.table.modules.localize.bind("columns|"+e.field,function(o){t.element.setAttribute("title",o||e.title)}):t.element.setAttribute("title",e.title):("function"==typeof o&&!1===(o=o(t.getComponent()))&&(o=""),t.element.setAttribute("title",o)):t.element.setAttribute("title","")},i.prototype._buildHeader=function(){for(var t=this,e=t.definition;t.element.firstChild;)t.element.removeChild(t.element.firstChild);e.headerVertical&&(t.element.classList.add("tabulator-col-vertical"),"flip"===e.headerVertical&&t.element.classList.add("tabulator-col-vertical-flip")),t.contentElement=t._bindEvents(),t.contentElement=t._buildColumnHeaderContent(),t.element.appendChild(t.contentElement),t.isGroup?t._buildGroupHeader():t._buildColumnHeader(),t.setTooltip(),t.table.options.resizableColumns&&t.table.modExists("resizeColumns")&&t.table.modules.resizeColumns.initializeColumn("header",t,t.element),e.headerFilter&&t.table.modExists("filter")&&t.table.modExists("edit")&&(void 0!==e.headerFilterPlaceholder&&e.field&&t.table.modules.localize.setHeaderFilterColumnPlaceholder(e.field,e.headerFilterPlaceholder),t.table.modules.filter.initializeColumn(t)),t.table.modExists("frozenColumns")&&t.table.modules.frozenColumns.initializeColumn(t),t.table.options.movableColumns&&!t.isGroup&&t.table.modExists("moveColumn")&&t.table.modules.moveColumn.initializeColumn(t),(e.topCalc||e.bottomCalc)&&t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.initializeColumn(t),t.element.addEventListener("mouseenter",function(e){t.setTooltip()})},i.prototype._bindEvents=function(){var t,e,o,i=this,n=i.definition;"function"==typeof n.headerClick&&i.element.addEventListener("click",function(t){n.headerClick(t,i.getComponent())}),"function"==typeof n.headerDblClick&&i.element.addEventListener("dblclick",function(t){n.headerDblClick(t,i.getComponent())}),"function"==typeof n.headerContext&&i.element.addEventListener("contextmenu",function(t){n.headerContext(t,i.getComponent())}),"function"==typeof n.headerTap&&(o=!1,i.element.addEventListener("touchstart",function(t){o=!0}),i.element.addEventListener("touchend",function(t){o&&n.headerTap(t,i.getComponent()),o=!1})),"function"==typeof n.headerDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null,n.headerDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),"function"==typeof n.headerTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,n.headerTapHold(t,i.getComponent())},1e3)}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null})),"function"==typeof n.cellClick&&(i.cellEvents.cellClick=n.cellClick),"function"==typeof n.cellDblClick&&(i.cellEvents.cellDblClick=n.cellDblClick),"function"==typeof n.cellContext&&(i.cellEvents.cellContext=n.cellContext),"function"==typeof n.cellTap&&(i.cellEvents.cellTap=n.cellTap),"function"==typeof n.cellDblTap&&(i.cellEvents.cellDblTap=n.cellDblTap),"function"==typeof n.cellTapHold&&(i.cellEvents.cellTapHold=n.cellTapHold),"function"==typeof n.cellEdited&&(i.cellEvents.cellEdited=n.cellEdited),"function"==typeof n.cellEditing&&(i.cellEvents.cellEditing=n.cellEditing),"function"==typeof n.cellEditCancelled&&(i.cellEvents.cellEditCancelled=n.cellEditCancelled)},i.prototype._buildColumnHeader=function(){var t=this,e=t.definition,o=t.table;o.modExists("sort")&&o.modules.sort.initializeColumn(t,t.contentElement),o.modExists("format")&&o.modules.format.initializeColumn(t),void 0!==e.editor&&o.modExists("edit")&&o.modules.edit.initializeColumn(t),void 0!==e.validator&&o.modExists("validate")&&o.modules.validate.initializeColumn(t),o.modExists("mutator")&&o.modules.mutator.initializeColumn(t),o.modExists("accessor")&&o.modules.accessor.initializeColumn(t),_typeof(o.options.responsiveLayout)&&o.modExists("responsiveLayout")&&o.modules.responsiveLayout.initializeColumn(t),void 0!==e.visible&&(e.visible?t.show(!0):t.hide(!0)),e.cssClass&&t.element.classList.add(e.cssClass),e.field&&this.element.setAttribute("tabulator-field",e.field),t.setMinWidth(void 0===e.minWidth?t.table.options.columnMinWidth:e.minWidth),t.reinitializeWidth(),t.tooltip=t.definition.tooltip||!1===t.definition.tooltip?t.definition.tooltip:t.table.options.tooltips,t.hozAlign=void 0===t.definition.align?"":t.definition.align},i.prototype._buildColumnHeaderContent=function(){var t=this,e=(t.definition,t.table,document.createElement("div"));return e.classList.add("tabulator-col-content"),e.appendChild(t._buildColumnHeaderTitle()),e},i.prototype._buildColumnHeaderTitle=function(){var t=this,e=t.definition,o=t.table,i=document.createElement("div");if(i.classList.add("tabulator-col-title"),e.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor"),n.addEventListener("click",function(t){t.stopPropagation(),n.focus()}),n.addEventListener("change",function(){e.title=n.value,o.options.columnTitleChanged.call(t.table,t.getComponent())}),i.appendChild(n),e.field?o.modules.localize.bind("columns|"+e.field,function(t){n.value=t||e.title||" "}):n.value=e.title||" "}else e.field?o.modules.localize.bind("columns|"+e.field,function(o){t._formatColumnHeaderTitle(i,o||e.title||" ")}):t._formatColumnHeaderTitle(i,e.title||" ");return i},i.prototype._formatColumnHeaderTitle=function(t,e){var o,i,n,s;if(this.definition.titleFormatter&&this.table.modExists("format"))switch(o=this.table.modules.format.getFormatter(this.definition.titleFormatter),s={getValue:function(){return e},getElement:function(){return t}},n=this.definition.titleFormatterParams||{},n="function"==typeof n?n():n,i=o.call(this.table.modules.format,s,n),void 0===i?"undefined":_typeof(i)){case"object":i instanceof Node?this.element.appendChild(i):(this.element.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":case"null":this.element.innerHTML="";break;default:this.element.innerHTML=i}else t.innerHTML=e},i.prototype._buildGroupHeader=function(){this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.element.appendChild(this.groupElement)},i.prototype._getFlatData=function(t){return t[this.field]},i.prototype._getNestedData=function(t){for(var e,o=t,i=this.fieldStructure,n=i.length,s=0;se&&(e=o)}),e&&t.setWidthActual(e+1))},i.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},i.prototype.getComponent=function(){return new o(this)};var n=function(t){this.table=t,this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="classic",this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[]};n.prototype.createHolderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-tableHolder"),t.setAttribute("tabindex",0),t},n.prototype.createTableElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-table"),t},n.prototype.getElement=function(){return this.element},n.prototype.getTableElement=function(){return this.tableElement},n.prototype.getRowPosition=function(t,e){return e?this.activeRows.indexOf(t):this.rows.indexOf(t)},n.prototype.setColumnManager=function(t){this.columnManager=t},n.prototype.initialize=function(){var t=this;t.setRenderMode(),t.element.appendChild(t.tableElement),t.firstRender=!0,t.element.addEventListener("scroll",function(){var e=t.element.scrollLeft;t.scrollLeft!=e&&(t.columnManager.scrollHorizontal(e),t.table.options.groupBy&&t.table.modules.groupRows.scrollHeaders(e),t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.scrollHorizontal(e)),t.scrollLeft=e}),"virtual"===this.renderMode&&t.element.addEventListener("scroll",function(){var e=t.element.scrollTop,o=t.scrollTop>e;t.scrollTop!=e?(t.scrollTop=e,t.scrollVertical(o),"scroll"==t.table.options.ajaxProgressiveLoad&&t.table.modules.ajax.nextPage(t.element.scrollHeight-t.element.clientHeight-e)):t.scrollTop=e})},n.prototype.findRow=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t))){if(void 0===t||null===t)return!1;return e.rows.find(function(o){return o.data[e.table.options.index]==t})||!1}if(t instanceof r)return t;if(t instanceof s)return t._getSelf()||!1;if(t instanceof HTMLElement){return e.rows.find(function(e){return e.element===t})||!1}return!1},n.prototype.getRowFromPosition=function(t,e){return e?this.activeRows[t]:this.rows[t]},n.prototype.scrollToRow=function(t,e,o){var i,n=this,s=this.getDisplayRows().indexOf(t),r=t.getElement(),a=0;return new Promise(function(t,l){if(s>-1){if(void 0===e&&(e=n.table.options.scrollToRowPosition),void 0===o&&(o=n.table.options.scrollToRowIfVisible),"nearest"===e)switch(n.renderMode){case"classic":i=c.prototype.helpers.elOffset(r).top,e=Math.abs(n.element.scrollTop-i)>Math.abs(n.element.scrollTop+n.element.clientHeight-i)?"bottom":"top";break;case"virtual":e=Math.abs(n.vDomTop-s)>Math.abs(n.vDomBottom-s)?"bottom":"top"}if(!o&&c.prototype.helpers.elVisible(r)&&(a=c.prototype.helpers.elOffset(r).top-c.prototype.helpers.elOffset(n.element).top)>0&&a-1&&this.activeRows.splice(o,1),e>-1&&this.rows.splice(e,1),this.setActiveRows(this.activeRows),this.displayRowIterator(function(e){var o=e.indexOf(t);o>-1&&e.splice(o,1)}),this.reRenderInPosition(),this.table.options.rowDeleted.call(this.table,t.getComponent()),this.table.options.dataEdited.call(this.table,this.getData()),this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.updateGroupRows(!0):this.table.options.pagination&&this.table.modExists("page")?this.refreshActiveData(!1,!1,!0):this.table.options.pagination&&this.table.modExists("page")&&this.refreshActiveData("page")},n.prototype.addRow=function(t,e,o,i){var n=this.addRowActual(t,e,o,i);return this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowAdd",n,{data:t,pos:e,index:o}),n},n.prototype.addRows=function(t,e,o){var i=this,n=this,s=0,r=[];return new Promise(function(a,l){e=i.findAddRowPos(e),Array.isArray(t)||(t=[t]),s=t.length-1,(void 0===o&&e||void 0!==o&&!e)&&t.reverse(),t.forEach(function(t,i){var s=n.addRow(t,e,o,!0);r.push(s)}),i.table.options.groupBy&&i.table.modExists("groupRows")?i.table.modules.groupRows.updateGroupRows(!0):i.table.options.pagination&&i.table.modExists("page")?i.refreshActiveData(!1,!1,!0):i.reRenderInPosition(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),a(r)})},n.prototype.findAddRowPos=function(t){return void 0===t&&(t=this.table.options.addRowPos),"pos"===t&&(t=!0),"bottom"===t&&(t=!1),t},n.prototype.addRowActual=function(t,e,o,i){var n,s=t instanceof r?t:new r(t||{},this),a=this.findAddRowPos(e);if(!o&&this.table.options.pagination&&"page"==this.table.options.paginationAddRow&&(n=this.getDisplayRows(),a?n.length?o=n[0]:this.activeRows.length&&(o=this.activeRows[this.activeRows.length-1],a=!1):n.length&&(o=n[n.length-1],a=!(n.length1&&(!o||o&&-1==l.indexOf(o)?a?l[0]!==s&&(o=l[0],this._moveRowInArray(s.getGroup().rows,s,o,a)):l[l.length-1]!==s&&(o=l[l.length-1], -this._moveRowInArray(s.getGroup().rows,s,o,a)):this._moveRowInArray(s.getGroup().rows,s,o,a))}if(o){var u=this.rows.indexOf(o),c=this.activeRows.indexOf(o);this.displayRowIterator(function(t){var e=t.indexOf(o);e>-1&&t.splice(a?e:e+1,0,s)}),c>-1&&this.activeRows.splice(a?c:c+1,0,s),u>-1&&this.rows.splice(a?u:u+1,0,s)}else a?(this.displayRowIterator(function(t){t.unshift(s)}),this.activeRows.unshift(s),this.rows.unshift(s)):(this.displayRowIterator(function(t){t.push(s)}),this.activeRows.push(s),this.rows.push(s));return this.setActiveRows(this.activeRows),this.table.options.rowAdded.call(this.table,s.getComponent()),this.table.options.dataEdited.call(this.table,this.getData()),i||this.reRenderInPosition(),s},n.prototype.moveRow=function(t,e,o){this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowMove",t,{pos:this.getRowPosition(t),to:e,after:o}),this.moveRowActual(t,e,o),this.table.options.rowMoved.call(this.table,t.getComponent())},n.prototype.moveRowActual=function(t,e,o){var i=this;if(this._moveRowInArray(this.rows,t,e,o),this._moveRowInArray(this.activeRows,t,e,o),this.displayRowIterator(function(n){i._moveRowInArray(n,t,e,o)}),this.table.options.groupBy&&this.table.modExists("groupRows")){var n=e.getGroup(),s=t.getGroup();n===s?this._moveRowInArray(n.rows,t,e,o):(s&&s.removeRow(t),n.insertRow(t,e,o))}},n.prototype._moveRowInArray=function(t,e,o,i){var n,s,r,a;if(e!==o&&(n=t.indexOf(e),n>-1&&(t.splice(n,1),s=t.indexOf(o),s>-1?i?t.splice(s+1,0,e):t.splice(s,0,e):t.splice(n,0,e)),t===this.getDisplayRows())){r=nn?s:n+1;for(var l=r;l<=a;l++)t[l]&&this.styleRow(t[l],l)}},n.prototype.clearData=function(){this.setData([])},n.prototype.getRowIndex=function(t){return this.findRowIndex(t,this.rows)},n.prototype.getDisplayRowIndex=function(t){var e=this.getDisplayRows().indexOf(t);return e>-1&&e},n.prototype.nextDisplayRow=function(t,e){var o=this.getDisplayRowIndex(t),i=!1;return!1!==o&&o-1)&&o},n.prototype.getData=function(t,e){var o=this,i=[];return(t?o.activeRows:o.rows).forEach(function(t){i.push(t.getData(e||"data"))}),i},n.prototype.getHtml=function(t){var e=this.getData(t),o=[],i="",n="";return this.table.columnManager.getColumns().forEach(function(t){var e=t.getDefinition();t.visible&&!e.hideInHtml&&(i+=""+(e.title||"")+"",o.push(t))}),e.forEach(function(t){var e="";o.forEach(function(o){var i=o.getFieldValue(t);void 0!==i&&null!==i||(i=":"),e+=""+i+""}),n+=""+e+""}),"\n\n\t\t\t\n\n\t\t\t"+i+"\n\n\t\t\t\n\n\t\t\t"+n+"\n\n\t\t\t
"},n.prototype.getComponents=function(t){var e=this,o=[];return(t?e.activeRows:e.rows).forEach(function(t){o.push(t.getComponent())}),o},n.prototype.getDataCount=function(t){return t?this.rows.length:this.activeRows.length},n.prototype._genRemoteRequest=function(){var t=this,e=t.table,o=e.options,i={};if(e.modExists("page")){if(o.ajaxSorting){var n=t.table.modules.sort.getSort();n.forEach(function(t){delete t.column}),i[t.table.modules.page.paginationDataSentNames.sorters]=n}if(o.ajaxFiltering){var s=t.table.modules.filter.getFilters(!0,!0);i[t.table.modules.page.paginationDataSentNames.filters]=s}t.table.modules.ajax.setParams(i,!0)}e.modules.ajax.sendRequest().then(function(e){t.setData(e)}).catch(function(t){})},n.prototype.filterRefresh=function(){var t=this.table,e=t.options,o=this.scrollLeft;e.ajaxFiltering?"remote"==e.pagination&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1)):e.ajaxProgressiveLoad?t.modules.ajax.loadData():this._genRemoteRequest():this.refreshActiveData("filter"),this.scrollHorizontal(o)},n.prototype.sorterRefresh=function(){var t=this.table,e=this.table.options,o=this.scrollLeft;e.ajaxSorting?("remote"==e.pagination||e.progressiveLoad)&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1)):e.ajaxProgressiveLoad?t.modules.ajax.loadData():this._genRemoteRequest():this.refreshActiveData("sort"),this.scrollHorizontal(o)},n.prototype.scrollHorizontal=function(t){this.scrollLeft=t,this.element.scrollLeft=t,this.table.options.groupBy&&this.table.modules.groupRows.scrollHeaders(t),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.scrollHorizontal(t)},n.prototype.refreshActiveData=function(t,e,o){var i,n=this,s=this.table;switch(t||(t="all"),s.options.selectable&&!s.options.selectablePersistence&&s.modExists("selectRow")&&s.modules.selectRow.deselectRows(),t){case"all":case"filter":e?e=!1:s.modExists("filter")?n.setActiveRows(s.modules.filter.filter(n.rows)):n.setActiveRows(n.rows.slice(0));case"sort":e?e=!1:s.modExists("sort")&&s.modules.sort.sort();case"display":this.resetDisplayRows();case"freeze":e?e=!1:this.table.modExists("frozenRows")&&s.modules.frozenRows.isFrozen()&&(s.modules.frozenRows.getDisplayIndex()||s.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()),i=s.modules.frozenRows.getDisplayIndex(),!0!==(i=n.setDisplayRows(s.modules.frozenRows.getRows(this.getDisplayRows(i-1)),i))&&s.modules.frozenRows.setDisplayIndex(i));case"group":e?e=!1:s.options.groupBy&&s.modExists("groupRows")&&(s.modules.groupRows.getDisplayIndex()||s.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()),i=s.modules.groupRows.getDisplayIndex(),!0!==(i=n.setDisplayRows(s.modules.groupRows.getRows(this.getDisplayRows(i-1)),i))&&s.modules.groupRows.setDisplayIndex(i));case"tree":e?e=!1:s.options.dataTree&&s.modExists("dataTree")&&(s.modules.dataTree.getDisplayIndex()||s.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()),i=s.modules.dataTree.getDisplayIndex(),!0!==(i=n.setDisplayRows(s.modules.dataTree.getRows(this.getDisplayRows(i-1)),i))&&s.modules.dataTree.setDisplayIndex(i)),s.options.pagination&&s.modExists("page")&&!o&&"local"==s.modules.page.getMode()&&s.modules.page.reset();case"page":e?e=!1:s.options.pagination&&s.modExists("page")&&(s.modules.page.getDisplayIndex()||s.modules.page.setDisplayIndex(this.getNextDisplayIndex()),i=s.modules.page.getDisplayIndex(),"local"==s.modules.page.getMode()&&s.modules.page.setMaxRows(this.getDisplayRows(i-1).length),!0!==(i=n.setDisplayRows(s.modules.page.getRows(this.getDisplayRows(i-1)),i))&&s.modules.page.setDisplayIndex(i))}c.prototype.helpers.elVisible(n.element)&&(o?n.reRenderInPosition():(n.renderTable(),s.options.layoutColumnsOnNewData&&n.table.columnManager.redraw(!0))),s.modExists("columnCalcs")&&s.modules.columnCalcs.recalc(this.activeRows)},n.prototype.setActiveRows=function(t){this.activeRows=t,this.activeRowsCount=this.activeRows.length},n.prototype.resetDisplayRows=function(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length,this.table.modExists("frozenRows")&&this.table.modules.frozenRows.setDisplayIndex(0),this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.setDisplayIndex(0),this.table.options.pagination&&this.table.modExists("page")&&this.table.modules.page.setDisplayIndex(0)},n.prototype.getNextDisplayIndex=function(){return this.displayRows.length},n.prototype.setDisplayRows=function(t,e){var o=!0;return e&&void 0!==this.displayRows[e]?(this.displayRows[e]=t,o=!0):(this.displayRows.push(t),o=e=this.displayRows.length-1),e==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length),o},n.prototype.getDisplayRows=function(t){return void 0===t?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[t]||[]},n.prototype.displayRowIterator=function(t){this.displayRows.forEach(t),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length},n.prototype.getRows=function(){return this.rows},n.prototype.reRenderInPosition=function(t){if("virtual"==this.getRenderMode()){for(var e=this.element.scrollTop,o=!1,i=!1,n=this.scrollLeft,s=this.getDisplayRows(),r=this.vDomTop;r<=this.vDomBottom;r++)if(s[r]){var a=e-s[r].getElement().offsetTop;if(!(!1===i||Math.abs(a)this.element.clientWidth?this.element.offsetHeight-this.element.clientHeight:0)),this.scrollTop=Math.min(this.scrollTop,this.element.scrollHeight-this.height),this.element.scrollWidth>this.element.offsetWidth&&(this.scrollTop+=this.element.offsetHeight-this.element.clientHeight),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,s.scrollTop=this.scrollTop,n.style.minWidth=d?i.table.columnManager.getWidth()+"px":"",i.table.options.groupBy&&"fitDataFill"!=i.table.modules.layout.getMode()&&i.displayRowsCount==i.table.modules.groupRows.countGroups()&&(i.tableElement.style.minWidth=i.table.columnManager.getWidth())}else this.renderEmptyScroll()},n.prototype.scrollVertical=function(t){var e=this.scrollTop-this.vDomScrollPosTop,o=this.scrollTop-this.vDomScrollPosBottom,i=2*this.vDomWindowBuffer;if(-e>i||o>i){var n=this.scrollLeft;this._virtualRenderFill(Math.floor(this.element.scrollTop/this.element.scrollHeight*this.displayRowsCount)),this.scrollHorizontal(n)}else t?(e<0&&this._addTopRow(-e),e<0&&this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer&&this._removeBottomRow(-o)):(e>=0&&this.scrollTop>this.vDomWindowBuffer&&this._removeTopRow(e),o>=0&&this._addBottomRow(o))},n.prototype._addTopRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomTop){var n=this.vDomTop-1,s=i[n],r=s.getHeight()||this.vDomRowHeight;t>=r&&(this.styleRow(s,n),o.insertBefore(s.getElement(),o.firstChild),s.initialized&&s.heightInitialized||(this.vDomTopNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomTopPad-=r,this.vDomTopPad<0&&(this.vDomTopPad=n*this.vDomRowHeight),n||(this.vDomTopPad=0),o.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=r,this.vDomTop--),t=-(this.scrollTop-this.vDomScrollPosTop),e=(i[this.vDomTop-1].getHeight()||this.vDomRowHeight)?this._addTopRow(t,e+1):this._quickNormalizeRowHeight(this.vDomTopNewRows)}},n.prototype._removeTopRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomTop],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode.removeChild(n),this.vDomTopPad+=i,e.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?i:i+this.vDomWindowBuffer,this.vDomTop++,t=this.scrollTop-this.vDomScrollPosTop,this._removeTopRow(t)}},n.prototype._addBottomRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomBottom=r&&(this.styleRow(s,n),o.appendChild(s.getElement()),s.initialized&&s.heightInitialized||(this.vDomBottomNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomBottomPad-=r,(this.vDomBottomPad<0||n==this.displayRowsCount-1)&&(this.vDomBottomPad=0),o.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=r,this.vDomBottom++),t=this.scrollTop-this.vDomScrollPosBottom,e=(i[this.vDomBottom+1].getHeight()||this.vDomRowHeight)?this._addBottomRow(t,e+1):this._quickNormalizeRowHeight(this.vDomBottomNewRows)}},n.prototype._removeBottomRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomBottom],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode&&n.parentNode.removeChild(n),this.vDomBottomPad+=i,this.vDomBottomPad<0&&(this.vDomBottomPad=0),e.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=i,this.vDomBottom--,t=-(this.scrollTop-this.vDomScrollPosBottom),this._removeBottomRow(t)}},n.prototype._quickNormalizeRowHeight=function(t){t.forEach(function(t){t.calcHeight()}),t.forEach(function(t){t.setCellHeight()}),t.length=0},n.prototype.normalizeHeight=function(){this.activeRows.forEach(function(t){t.normalizeHeight()})},n.prototype.adjustTableSize=function(){if("virtual"===this.renderMode){this.height=this.element.clientHeight,this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height;var t=this.columnManager.getElement().offsetHeight+(this.table.footerManager&&!this.table.footerManager.external?this.table.footerManager.getElement().offsetHeight:0);this.element.style.minHeight="calc(100% - "+t+"px)",this.element.style.height="calc(100% - "+t+"px)",this.element.style.maxHeight="calc(100% - "+t+"px)"}},n.prototype.reinitialize=function(){this.rows.forEach(function(t){t.reinitialize()})},n.prototype.redraw=function(t){var e=this.scrollLeft;this.adjustTableSize(),t?this.renderTable():("classic"==self.renderMode?self.table.options.groupBy?self.refreshActiveData("group",!1,!1):this._simpleRender():(this.reRenderInPosition(),this.scrollHorizontal(e)),this.displayRowsCount||this.table.options.placeholder&&this.getElement().appendChild(this.table.options.placeholder))},n.prototype.resetScroll=function(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var t=document.createEvent("Event");t.initEvent("scroll",!1,!0),this.element.dispatchEvent(t)}else this.element.dispatchEvent(new Event("scroll"))};var s=function(t){this._row=t};s.prototype.getData=function(t){return this._row.getData(t)},s.prototype.getElement=function(){return this._row.getElement()},s.prototype.getCells=function(){var t=[];return this._row.getCells().forEach(function(e){t.push(e.getComponent())}),t},s.prototype.getCell=function(t){var e=this._row.getCell(t);return!!e&&e.getComponent()},s.prototype.getIndex=function(){return this._row.getData("data")[this._row.table.options.index]},s.prototype.getPosition=function(t){return this._row.table.rowManager.getRowPosition(this._row,t)},s.prototype.delete=function(){return this._row.delete()},s.prototype.scrollTo=function(){return this._row.table.rowManager.scrollToRow(this._row)},s.prototype.update=function(t){return this._row.updateData(t)},s.prototype.normalizeHeight=function(){this._row.normalizeHeight(!0)},s.prototype.select=function(){this._row.table.modules.selectRow.selectRows(this._row)},s.prototype.deselect=function(){this._row.table.modules.selectRow.deselectRows(this._row)},s.prototype.toggleSelect=function(){this._row.table.modules.selectRow.toggleRow(this._row)},s.prototype.isSelected=function(){return this._row.table.modules.selectRow.isRowSelected(this._row)},s.prototype._getSelf=function(){return this._row},s.prototype.freeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.freezeRow(this._row)},s.prototype.unfreeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.unfreezeRow(this._row)},s.prototype.treeCollapse=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.collapseRow(this._row)},s.prototype.treeExpand=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.expandRow(this._row)},s.prototype.treeToggle=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.toggleRow(this._row)},s.prototype.getTreeParent=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeParent(this._row)},s.prototype.getTreeChildren=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeChildren(this._row)},s.prototype.reformat=function(){return this._row.reinitialize()},s.prototype.getGroup=function(){return this._row.getGroup().getComponent()},s.prototype.getTable=function(){return this._row.table},s.prototype.getNextRow=function(){return this._row.nextRow()},s.prototype.getPrevRow=function(){return this._row.prevRow()};var r=function(t,e){this.table=e.table,this.parent=e,this.data={},this.type="row",this.element=this.createElement(),this.modules={},this.cells=[],this.height=0,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.setData(t),this.generateElement()};r.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-row"),t.setAttribute("role","row"),t},r.prototype.getElement=function(){return this.element},r.prototype.generateElement=function(){var t,e,o,i=this;!1!==i.table.options.selectable&&i.table.modExists("selectRow")&&i.table.modules.selectRow.initializeRow(this),!1!==i.table.options.movableRows&&i.table.modExists("moveRow")&&i.table.modules.moveRow.initializeRow(this),!1!==i.table.options.dataTree&&i.table.modExists("dataTree")&&i.table.modules.dataTree.initializeRow(this),i.table.options.rowClick&&i.element.addEventListener("click",function(t){i.table.options.rowClick(t,i.getComponent())}),i.table.options.rowDblClick&&i.element.addEventListener("dblclick",function(t){i.table.options.rowDblClick(t,i.getComponent())}),i.table.options.rowContext&&i.element.addEventListener("contextmenu",function(t){i.table.options.rowContext(t,i.getComponent())}),i.table.options.rowTap&&(o=!1,i.element.addEventListener("touchstart",function(t){o=!0}),i.element.addEventListener("touchend",function(t){o&&i.table.options.rowTap(t,i.getComponent()),o=!1})),i.table.options.rowDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null,i.table.options.rowDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),i.table.options.rowTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,i.table.options.rowTapHold(t,i.getComponent())},1e3)}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null}))},r.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},r.prototype.initialize=function(t){var e=this;if(!e.initialized||t){for(e.deleteCells();e.element.firstChild;)e.element.removeChild(e.element.firstChild);this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutRow(this),this.generateCells(),e.cells.forEach(function(t){e.element.appendChild(t.getElement()),t.cellRendered()}),t&&e.normalizeHeight(),e.table.options.dataTree&&e.table.modExists("dataTree")&&e.table.modules.dataTree.layoutRow(this),"collapse"===e.table.options.responsiveLayout&&e.table.modExists("responsiveLayout")&&e.table.modules.responsiveLayout.layoutRow(this),e.table.options.rowFormatter&&e.table.options.rowFormatter(e.getComponent()),e.table.options.resizableRows&&e.table.modExists("resizeRows")&&e.table.modules.resizeRows.initializeRow(e),e.initialized=!0}},r.prototype.reinitializeHeight=function(){this.heightInitialized=!1,null!==this.element.offsetParent&&this.normalizeHeight(!0)},r.prototype.reinitialize=function(){this.initialized=!1,this.heightInitialized=!1,this.height=0,null!==this.element.offsetParent&&this.initialize(!0)},r.prototype.calcHeight=function(){var t=0,e=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach(function(e){var o=e.getHeight();o>t&&(t=o)}),this.height=Math.max(t,e),this.outerHeight=this.element.offsetHeight},r.prototype.setCellHeight=function(){var t=this.height;this.cells.forEach(function(e){e.setHeight(t)}),this.heightInitialized=!0},r.prototype.clearCellHeight=function(){this.cells.forEach(function(t){t.clearHeight()})},r.prototype.normalizeHeight=function(t){t&&this.clearCellHeight(),this.calcHeight(),this.setCellHeight()},r.prototype.setHeight=function(t){this.height=t,this.setCellHeight()},r.prototype.setHeight=function(t,e){(this.height!=t||e)&&(this.height=t,this.setCellHeight(),this.outerHeight=this.element.offsetHeight)},r.prototype.getHeight=function(){return this.outerHeight},r.prototype.getWidth=function(){return this.element.offsetWidth},r.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},r.prototype.setData=function(t){var e=this;e.table.modExists("mutator")?e.data=e.table.modules.mutator.transformRow(t,"data"):e.data=t},r.prototype.updateData=function(t){var e=this,o=this;return new Promise(function(i,n){"string"==typeof t&&(t=JSON.parse(t)),o.table.modExists("mutator")&&(t=o.table.modules.mutator.transformRow(t,"data",!0));for(var s in t)o.data[s]=t[s];for(var s in t){var r=e.getCell(s);r&&r.getValue()!=t[s]&&r.setValueProcessData(t[s])}c.prototype.helpers.elVisible(e.element)?(o.normalizeHeight(),o.table.options.rowFormatter&&o.table.options.rowFormatter(o.getComponent())):(e.initialized=!1,e.height=0),o.table.options.rowUpdated.call(e.table,o.getComponent()),i()})},r.prototype.getData=function(t){var e=this;return t?e.table.modExists("accessor")?e.table.modules.accessor.transformRow(e.data,t):void 0:this.data},r.prototype.getCell=function(t){return t=this.table.columnManager.findColumn(t),this.cells.find(function(e){return e.column===t})},r.prototype.getCellIndex=function(t){return this.cells.findIndex(function(e){return e===t})},r.prototype.findNextEditableCell=function(t){var e=!1;if(t0)for(var o=t-1;o>=0;o--){var i=this.cells[o],n=!0;if(i.column.modules.edit&&c.prototype.helpers.elVisible(i.getElement())&&("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n)){e=i;break}}return e},r.prototype.getCells=function(){return this.cells},r.prototype.nextRow=function(){var t=this.table.rowManager.nextDisplayRow(this,!0);return!!t&&t.getComponent()},r.prototype.prevRow=function(){var t=this.table.rowManager.prevDisplayRow(this,!0);return!!t&&t.getComponent()},r.prototype.delete=function(){var t=this;return new Promise(function(e,o){var i=t.table.rowManager.getRowIndex(t);t.deleteActual(),t.table.options.history&&t.table.modExists("history")&&(i&&(i=t.table.rowManager.rows[i-1]),t.table.modules.history.action("rowDelete",t,{data:t.getData(),pos:!i,index:i})),e()})},r.prototype.deleteActual=function(){this.table.rowManager.getRowIndex(this);this.table.modExists("selectRow")&&this.table.modules.selectRow._deselectRow(this,!0),this.table.rowManager.deleteRow(this),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.modules.group&&this.modules.group.removeRow(this),this.table.modExists("columnCalcs")&&(this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.columnCalcs.recalcRowGroup(this):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows))},r.prototype.deleteCells=function(){for(var t=this.cells.length,e=0;e-1?(this.browser="ie",this.browserSlow=!0):t.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):t.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1)},c.prototype.setData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o)},c.prototype._setData=function(t,e,o,i){var n=this;return"string"!=typeof t?t?n.rowManager.setData(t,i):n.modExists("ajax")&&(n.modules.ajax.getUrl||n.options.ajaxURLGenerator)?"remote"==n.options.pagination&&n.modExists("page",!0)?(n.modules.page.reset(!0),n.modules.page.setPage(1)):n.modules.ajax.loadData(i):n.rowManager.setData([],i):0==t.indexOf("{")||0==t.indexOf("[")?n.rowManager.setData(JSON.parse(t),i):n.modExists("ajax",!0)?(e&&n.modules.ajax.setParams(e),o&&n.modules.ajax.setConfig(o),n.modules.ajax.setUrl(t),"remote"==n.options.pagination&&n.modExists("page",!0)?(n.modules.page.reset(!0),n.modules.page.setPage(1)):n.modules.ajax.loadData(i)):void 0},c.prototype.clearData=function(){this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this.rowManager.clearData()},c.prototype.getData=function(t){return this.rowManager.getData(t)},c.prototype.getDataCount=function(t){return this.rowManager.getDataCount(t)},c.prototype.searchRows=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("rows",t,e,o)},c.prototype.searchData=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("data",t,e,o)},c.prototype.getHtml=function(t){return this.rowManager.getHtml(t)},c.prototype.getAjaxUrl=function(){if(this.modExists("ajax",!0))return this.modules.ajax.getUrl()},c.prototype.replaceData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o,!0)},c.prototype.updateData=function(t){var e=this,o=this,i=0;return new Promise(function(n,s){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach(function(t){var e=o.rowManager.findRow(t[o.options.index]);e&&(i++,e.updateData(t).then(function(){--i||n()}))}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},c.prototype.addData=function(t,e,o){var i=this;return new Promise(function(n,s){i.modExists("ajax")&&i.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?i.rowManager.addRows(t,e,o).then(function(t){var e=[];t.forEach(function(t){e.push(t.getComponent())}),n(e)}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},c.prototype.updateOrAddData=function(t){var e=this,o=this,i=[],n=0;return new Promise(function(s,r){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach(function(t){var e=o.rowManager.findRow(t[o.options.index]);n++,e?e.updateData(t).then(function(){n--,i.push(e.getComponent()),n||s(i)}):o.rowManager.addRows(t).then(function(t){n--,i.push(t[0].getComponent()),n||s(i)})}):(console.warn("Update Error - No data provided"),r("Update Error - No data provided"))})},c.prototype.getRow=function(t){var e=this.rowManager.findRow(t);return e?e.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},c.prototype.getRowFromPosition=function(t,e){var o=this.rowManager.getRowFromPosition(t,e);return o?o.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},c.prototype.deleteRow=function(t){var e=this;return new Promise(function(o,i){var n=e.rowManager.findRow(t);n?n.delete().then(function(){o()}).catch(function(t){i(t)}):(console.warn("Delete Error - No matching row found:",t),i("Delete Error - No matching row found"))})},c.prototype.addRow=function(t,e,o){var i=this;return new Promise(function(n,s){"string"==typeof t&&(t=JSON.parse(t)),i.rowManager.addRows(t,e,o).then(function(t){i.modExists("columnCalcs")&&i.modules.columnCalcs.recalc(i.rowManager.activeRows),n(t[0].getComponent())})})},c.prototype.updateOrAddRow=function(t,e){var o=this;return new Promise(function(i,n){var s=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),s?s.updateData(e).then(function(){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(s.getComponent())}).catch(function(t){n(t)}):s=o.rowManager.addRows(e).then(function(t){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(t[0].getComponent())}).catch(function(t){n(t)})})},c.prototype.updateRow=function(t,e){var o=this;return new Promise(function(i,n){var s=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),s?s.updateData(e).then(function(){i(s.getComponent())}).catch(function(t){n(t)}):(console.warn("Update Error - No matching row found:",t),n("Update Error - No matching row found"))})},c.prototype.scrollToRow=function(t,e,o){var i=this;return new Promise(function(n,s){var r=i.rowManager.findRow(t);r?i.rowManager.scrollToRow(r,e,o).then(function(){n()}).catch(function(t){s(t)}):(console.warn("Scroll Error - No matching row found:",t),s("Scroll Error - No matching row found"))})},c.prototype.getRows=function(t){return this.rowManager.getComponents(t)},c.prototype.getRowPosition=function(t,e){var o=this.rowManager.findRow(t);return o?this.rowManager.getRowPosition(o,e):(console.warn("Position Error - No matching row found:",t),!1)},c.prototype.copyToClipboard=function(t,e,o,i){this.modExists("clipboard",!0)&&this.modules.clipboard.copy(t,e,o,i)},c.prototype.setColumns=function(t){this.columnManager.setColumns(t)},c.prototype.getColumns=function(t){return this.columnManager.getComponents(t)},c.prototype.getColumn=function(t){var e=this.columnManager.findColumn(t);return e?e.getComponent():(console.warn("Find Error - No matching column found:",t),!1)},c.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()},c.prototype.getColumnLayout=function(){if(this.modExists("persistence",!0))return this.modules.persistence.parseColumns(this.columnManager.getColumns())},c.prototype.setColumnLayout=function(t){return!!this.modExists("persistence",!0)&&(this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,t)),!0)},c.prototype.showColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Show Error - No matching column found:",t),!1;e.show(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},c.prototype.hideColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Hide Error - No matching column found:",t),!1;e.hide(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},c.prototype.toggleColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Visibility Toggle Error - No matching column found:",t),!1;e.visible?e.hide():e.show()},c.prototype.addColumn=function(t,e,o){var i=this.columnManager.findColumn(o);this.columnManager.addColumn(t,e,i)},c.prototype.deleteColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Delete Error - No matching column found:",t),!1;e.delete()},c.prototype.scrollToColumn=function(t,e,o){var i=this;return new Promise(function(n,s){var r=i.columnManager.findColumn(t);r?i.columnManager.scrollToColumn(r,e,o).then(function(){n()}).catch(function(t){s(t)}):(console.warn("Scroll Error - No matching column found:",t),s("Scroll Error - No matching column found"))})},c.prototype.setLocale=function(t){this.modules.localize.setLocale(t)},c.prototype.getLocale=function(){return this.modules.localize.getLocale()},c.prototype.getLang=function(t){return this.modules.localize.getLang(t)},c.prototype.redraw=function(t){this.columnManager.redraw(t),this.rowManager.redraw(t)},c.prototype.setHeight=function(t){this.options.height=isNaN(t)?t:t+"px",this.element.style.height=this.options.height,this.rowManager.redraw()},c.prototype.setSort=function(t,e){this.modExists("sort",!0)&&(this.modules.sort.setSort(t,e),this.rowManager.sorterRefresh())},c.prototype.getSorters=function(){if(this.modExists("sort",!0))return this.modules.sort.getSort()},c.prototype.clearSort=function(){this.modExists("sort",!0)&&(this.modules.sort.clear(),this.rowManager.sorterRefresh())},c.prototype.setFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.setFilter(t,e,o),this.rowManager.filterRefresh())},c.prototype.addFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.addFilter(t,e,o),this.rowManager.filterRefresh())},c.prototype.getFilters=function(t){if(this.modExists("filter",!0))return this.modules.filter.getFilters(t)},c.prototype.setHeaderFilterFocus=function(t){if(this.modExists("filter",!0)){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Filter Focus Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterFocus(e)}},c.prototype.setHeaderFilterValue=function(t,e){if(this.modExists("filter",!0)){var o=this.columnManager.findColumn(t);if(!o)return console.warn("Column Filter Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterValue(o,e)}},c.prototype.getHeaderFilters=function(){if(this.modExists("filter",!0))return this.modules.filter.getHeaderFilters()},c.prototype.removeFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.removeFilter(t,e,o),this.rowManager.filterRefresh())},c.prototype.clearFilter=function(t){this.modExists("filter",!0)&&(this.modules.filter.clearFilter(t),this.rowManager.filterRefresh())},c.prototype.clearHeaderFilter=function(){this.modExists("filter",!0)&&(this.modules.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},c.prototype.selectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.selectRows(t)},c.prototype.deselectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.deselectRows(t)},c.prototype.toggleSelectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.toggleRow(t)},c.prototype.getSelectedRows=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedRows()},c.prototype.getSelectedData=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedData()},c.prototype.setMaxPage=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setMaxPage(t)},c.prototype.setPage=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPage(t)},c.prototype.setPageSize=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPageSize(t),this.modules.page.setPage(1)},c.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",!0))return this.modules.page.getPageSize()},c.prototype.previousPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.previousPage()},c.prototype.nextPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.nextPage()},c.prototype.getPage=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPage()},c.prototype.getPageMax=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPageMax()},c.prototype.setGroupBy=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupBy=t,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display")},c.prototype.setGroupStartOpen=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupStartOpen=t,this.modules.groupRows.initialize(),this.options.groupBy?this.rowManager.refreshActiveData("group"):console.warn("Grouping Update - cant refresh view, no groups have been set")},c.prototype.setGroupHeader=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupHeader=t,this.modules.groupRows.initialize(),this.options.groupBy?this.rowManager.refreshActiveData("group"):console.warn("Grouping Update - cant refresh view, no groups have been set")},c.prototype.getGroups=function(t){return!!this.modExists("groupRows",!0)&&this.modules.groupRows.getGroups(!0)},c.prototype.getGroupedData=function(){if(this.modExists("groupRows",!0))return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()},c.prototype.getCalcResults=function(){return!!this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.getResults()},c.prototype.navigatePrev=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().prev())},c.prototype.navigateNext=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().next())},c.prototype.navigateLeft=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().left())},c.prototype.navigateRight=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().right())},c.prototype.navigateUp=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().up())},c.prototype.navigateDown=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().dpwn())},c.prototype.undo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.undo()},c.prototype.redo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.redo()},c.prototype.getHistoryUndoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryUndoSize()},c.prototype.getHistoryRedoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryRedoSize()},c.prototype.download=function(t,e,o){this.modExists("download",!0)&&this.modules.download.download(t,e,o)},c.prototype.tableComms=function(t,e,o,i){this.modules.comms.receive(t,e,o,i)},c.prototype.moduleBindings={},c.prototype.extendModule=function(t,e,o){if(c.prototype.moduleBindings[t]){var i=c.prototype.moduleBindings[t].prototype[e];if(i)if("object"==(void 0===o?"undefined":_typeof(o)))for(var n in o)i[n]=o[n];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",e)}else console.warn("Module Error - module does not exist:",t)},c.prototype.registerModule=function(t,e){c.prototype.moduleBindings[t]=e},c.prototype.bindModules=function(){this.modules={};for(var t in c.prototype.moduleBindings)this.modules[t]=new c.prototype.moduleBindings[t](this)},c.prototype.modExists=function(t,e){return!!this.modules[t]||(e&&console.error("Tabulator Module Not Installed: "+t),!1)},c.prototype.helpers={elVisible:function(t){return!(t.offsetWidth<=0&&t.offsetHeight<=0)},elOffset:function(t){var e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset-document.documentElement.clientTop,left:e.left+window.pageXOffset-document.documentElement.clientLeft}},deepClone:function(t){var e=Array.isArray(t)?[]:{};for(var o in t)null!=t[o]&&"object"===_typeof(t[o])?t[o]instanceof Date?e[o]=new Date(t[o]):e[o]=this.deepClone(t[o]):e[o]=t[o];return e}},c.prototype.comms={tables:[],register:function(t){c.prototype.comms.tables.push(t)},deregister:function(t){var e=c.prototype.comms.tables.indexOf(t);e>-1&&c.prototype.comms.tables.splice(e,1)},lookupTable:function(t){var e,o,i=[];if("string"==typeof t){if(e=document.querySelectorAll(t),e.length)for(var n=0;n-1?n/100*parseInt(t):parseInt(t):t}function o(t,i,n,s){function r(t){return n*(t.column.definition.widthGrow||1)}function a(t){return e(t.width)-n*(t.column.definition.widthShrink||0)}var l=[],u=0,c=0,d=0,h=0,p=0,m=[];return t.forEach(function(t,e){var o=s?a(t):r(t);t.column.minWidth>=o?l.push(t):(m.push(t),p+=s?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1)}),l.length?(l.forEach(function(t){u+=s?t.width-t.column.minWidth:t.column.minWidth,t.width=t.column.minWidth}),c=i-u,d=p?Math.floor(c/p):c,h=c-d*p,h+=o(m,c,d,s)):(h=p?i-Math.floor(i/p)*p:i,m.forEach(function(t){t.width=s?a(t):r(t)})),h}var i=this,n=i.table.element.clientWidth,s=0,r=0,a=0,l=0,u=[],c=[],d=0,h=0,p=0;this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(n-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth), -t.forEach(function(t){var o,i,n;t.visible&&(o=t.definition.width,i=parseInt(t.minWidth),o?(n=e(o),s+=n>i?n:i,t.definition.widthShrink&&(c.push({column:t,width:n>i?n:i}),d+=t.definition.widthShrink)):(u.push({column:t,width:0}),a+=t.definition.widthGrow||1))}),r=n-s,l=Math.floor(r/a);var p=o(u,r,l,!1);u.length&&p>0&&(u[u.length-1].width+=+p),u.forEach(function(t){r-=t.width}),h=Math.abs(p)+r,h>0&&d&&(p=o(c,h,Math.floor(h/d),!0)),c.length&&(c[c.length-1].width-=p),u.forEach(function(t){t.column.setWidth(t.width)}),c.forEach(function(t){t.column.setWidth(t.width)})}},c.prototype.registerModule("layout",d);var h=function(t){this.table=t,this.locale="default",this.lang=!1,this.bindings={}};h.prototype.setHeaderFilterPlaceholder=function(t){this.langs.default.headerFilters.default=t},h.prototype.setHeaderFilterColumnPlaceholder=function(t,e){this.langs.default.headerFilters.columns[t]=e,this.lang&&!this.lang.headerFilters.columns[t]&&(this.lang.headerFilters.columns[t]=e)},h.prototype.installLang=function(t,e){this.langs[t]?this._setLangProp(this.langs[t],e):this.langs[t]=e},h.prototype._setLangProp=function(t,e){for(var o in e)t[o]&&"object"==_typeof(t[o])?this._setLangProp(t[o],e[o]):t[o]=e[o]},h.prototype.setLocale=function(t){function e(t,o){for(var i in t)"object"==_typeof(t[i])?(o[i]||(o[i]={}),e(t[i],o[i])):o[i]=t[i]}var o=this;if(t=t||"default",!0===t&&navigator.language&&(t=navigator.language.toLowerCase()),t&&!o.langs[t]){var i=t.split("-")[0];o.langs[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",t,i),t=i):(console.warn("Localization Error - Matching locale not found, using default: ",t),t="default")}o.locale=t,o.lang=c.prototype.helpers.deepClone(o.langs.default||{}),"default"!=t&&e(o.langs[t],o.lang),o.table.options.localized.call(o.table,o.locale,o.lang),o._executeBindings()},h.prototype.getLocale=function(t){return self.locale},h.prototype.getLang=function(t){return t?this.langs[t]:this.lang},h.prototype.getText=function(t,e){var t=e?t+"|"+e:t,o=t.split("|");return this._getLangElement(o,this.locale)||""},h.prototype._getLangElement=function(t,e){var o=this,i=o.lang;return t.forEach(function(t){var e;i&&(e=i[t],i=void 0!==e&&e)}),i},h.prototype.bind=function(t,e){this.bindings[t]||(this.bindings[t]=[]),this.bindings[t].push(e),e(this.getText(t),this.lang)},h.prototype._executeBindings=function(){var t=this;for(var e in t.bindings)!function(e){t.bindings[e].forEach(function(o){o(t.getText(e),t.lang)})}(e)},h.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page"},headerFilters:{default:"filter column...",columns:{}}}},c.prototype.registerModule("localize",h);var p=function(t){this.table=t};p.prototype.getConnections=function(t){var e,o=this,i=[];return e=c.prototype.comms.lookupTable(t),e.forEach(function(t){o.table!==t&&i.push(t)}),i},p.prototype.send=function(t,e,o,i){var n=this,s=this.getConnections(t);s.forEach(function(t){t.tableComms(n.table.element,e,o,i)}),!s.length&&t&&console.warn("Table Connection Error - No tables matching selector found",t)},p.prototype.receive=function(t,e,o,i){if(this.table.modExists(e))return this.table.modules[e].commsReceived(t,o,i);console.warn("Inter-table Comms Error - no such module:",e)},c.prototype.registerModule("comms",p);var m=function(t){this.table=t,this.allowedTypes=["","data","download","clipboard"]};m.prototype.initializeColumn=function(t){var e=this,o=!1,i={};this.allowedTypes.forEach(function(n){var s,r="accessor"+(n.charAt(0).toUpperCase()+n.slice(1));t.definition[r]&&(s=e.lookupAccessor(t.definition[r]))&&(o=!0,i[r]={accessor:s,params:t.definition[r+"Params"]||{}})}),o&&(t.modules.accessor=i)},m.prototype.lookupAccessor=function(t){var e=!1;switch(void 0===t?"undefined":_typeof(t)){case"string":this.accessors[t]?e=this.accessors[t]:console.warn("Accessor Error - No such accessor found, ignoring: ",t);break;case"function":e=t}return e},m.prototype.transformRow=function(t,e){var o=this,i="accessor"+(e.charAt(0).toUpperCase()+e.slice(1)),n=c.prototype.helpers.deepClone(t||{});return o.table.columnManager.traverse(function(t){var o,s,r,a;t.modules.accessor&&(s=t.modules.accessor[i]||t.modules.accessor.accessor||!1)&&"undefined"!=(o=t.getFieldValue(n))&&(a=t.getComponent(),r="function"==typeof s.params?s.params(o,n,e,a):s.params,t.setFieldValue(n,s.accessor(o,n,e,r,a)))}),n},m.prototype.accessors={},c.prototype.registerModule("accessor",m);var f=function(t){this.table=t,this.config=!1,this.url="",this.urlGenerator=!1,this.params=!1,this.loaderElement=this.createLoaderElement(),this.msgElement=this.createMsgElement(),this.loadingElement=!1,this.errorElement=!1,this.loaderPromise=!1,this.progressiveLoad=!1,this.loading=!1,this.requestOrder=0};f.prototype.initialize=function(){this.loaderElement.appendChild(this.msgElement),this.table.options.ajaxLoaderLoading&&(this.loadingElement=this.table.options.ajaxLoaderLoading),this.loaderPromise=this.table.options.ajaxRequestFunc||this.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||this.defaultURLGenerator,this.table.options.ajaxLoaderError&&(this.errorElement=this.table.options.ajaxLoaderError),this.table.options.ajaxParams&&this.setParams(this.table.options.ajaxParams),this.table.options.ajaxConfig&&this.setConfig(this.table.options.ajaxConfig),this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.table.options.ajaxProgressiveLoad&&(this.table.options.pagination?(this.progressiveLoad=!1,console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time")):this.table.modExists("page")?(this.progressiveLoad=this.table.options.ajaxProgressiveLoad,this.table.modules.page.initializeProgressive(this.progressiveLoad)):console.error("Pagination plugin is required for progressive ajax loading"))},f.prototype.createLoaderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-loader"),t},f.prototype.createMsgElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-loader-msg"),t.setAttribute("role","alert"),t},f.prototype.setParams=function(t,e){if(e){this.params=this.params||{};for(var o in t)this.params[o]=t[o]}else this.params=t},f.prototype.getParams=function(){return this.params||{}},f.prototype.setConfig=function(t){if(this._loadDefaultConfig(),"string"==typeof t)this.config.method=t;else for(var e in t)this.config[e]=t[e]},f.prototype._loadDefaultConfig=function(t){var e=this;if(!e.config||t){e.config={};for(var o in e.defaultConfig)e.config[o]=e.defaultConfig[o]}},f.prototype.setUrl=function(t){this.url=t},f.prototype.getUrl=function(){return this.url},f.prototype.loadData=function(t){return this.progressiveLoad?this._loadDataProgressive():this._loadDataStandard(t)},f.prototype.nextPage=function(t){var e;this.loading||(e=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.getElement().clientHeight,ti||null===i)&&(i=t)}),null!==i?!1!==n?i.toFixed(n):i:""},min:function(t,e,o){var i=null,n=void 0!==o.precision&&o.precision;return t.forEach(function(t){((t=Number(t))t&&(t=o)}),i.forEach(function(e){var o=e.length;if(o1&&(e.colSpan=t.width),t.height>1&&(e.rowSpan=t.height),e.innerHTML=t.title,m.mapElementStyles(t.element,e,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),o.appendChild(e)}),m.mapElementStyles(m.table.columnManager.getHeadersElement(),o,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.appendChild(o)}),m.htmlElement.appendChild(e)}(f)):function(){var t=document.createElement("tr");e.forEach(function(e){var o=document.createElement("th");o.innerHTML=e.definition.title,m.mapElementStyles(e.getElement(),o,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),t.appendChild(o)}),m.mapElementStyles(m.table.columnManager.getHeadersElement(),t,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),m.htmlElement.appendChild(document.createElement("thead").appendChild(t))}()),e=this.table.columnManager.columnsByIndex,a=document.createElement("tbody"),window.getComputedStyle&&(l=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),u=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),c=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),h=this.table.element.getElementsByClassName("tabulator-group")[0],c&&(p=c.getElementsByClassName("tabulator-cell"),d=p[0],p[p.length-1])),o.rowGroups?t.forEach(function(t){r(t)}):s(t),this.htmlElement.appendChild(a)},b.prototype.mapElementStyles=function(t,e,o){var i={"background-color":"backgroundColor",color:"fontColor","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom"};if(window.getComputedStyle){var n=window.getComputedStyle(t);o.forEach(function(t){e.style[i[t]]=n.getPropertyValue(t)})}},b.prototype.copySelectors={userSelection:function(t,e){return e},selected:function(t,e){var o=[];return this.table.modExists("selectRow",!0)&&(o=this.table.modules.selectRow.getSelectedRows()),t.rowGroups&&console.warn("Clipboard Warning - select coptSelector does not support row groups"),this.buildOutput(o,t,e)},table:function(t,e){return t.rowGroups&&console.warn("Clipboard Warning - table coptSelector does not support row groups"),this.buildOutput(this.table.rowManager.getComponents(),t,e)},active:function(t,e){var o;return o=t.rowGroups?this.buildComplexRows(t):this.table.rowManager.getComponents(!0),this.buildOutput(o,t,e)}},b.prototype.copyFormatters={raw:function(t,e){return t},table:function(t,e){var o=[];return t.forEach(function(t){t.forEach(function(t){void 0===t&&(t=""),t=void 0===t||null===t?"":t.toString(),t.match(/\r|\n/)&&(t=t.split('"').join('""'),t='"'+t+'"')}),o.push(t.join("\t"))}),o.join("\n")}},b.prototype.pasteParsers={table:function(t){var e=[],o=!0,i=this.table.columnManager.columns,n=[],s=[];return t=t.split("\n"),t.forEach(function(t){e.push(t.split("\t"))}),!(!e.length||1===e.length&&e[0].length<2)&&(!0,e[0].forEach(function(t){var e=i.find(function(e){return t&&e.definition.title&&t.trim()&&e.definition.title.trim()===t.trim()});e?n.push(e):o=!1}),o||(o=!0,n=[],e[0].forEach(function(t){var e=i.find(function(e){return t&&e.field&&t.trim()&&e.field.trim()===t.trim()});e?n.push(e):o=!1}),o||(n=this.table.columnManager.columnsByIndex)),o&&e.shift(),e.forEach(function(t){var e={};t.forEach(function(t,o){n[o]&&(e[n[o].field]=t)}),s.push(e)}),s)}},b.prototype.pasteActions={replace:function(t){return this.table.setData(t)},update:function(t){return this.table.updateOrAddData(t)},insert:function(t){return this.table.addData(t)}},c.prototype.registerModule("clipboard",b);var v=function(t){this.table=t,this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null, -this.startOpen=function(){},this.displayIndex=0};v.prototype.initialize=function(){var t=null,e=this.table.options;switch(this.field=e.dataTreeChildField,this.indent=e.dataTreeChildIndent,e.dataTreeBranchElement&&(!0===e.dataTreeBranchElement?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):"string"==typeof e.dataTreeBranchElement?(t=document.createElement("div"),t.innerHTML=e.dataTreeBranchElement,this.branchEl=t.firstChild):this.branchEl=e.dataTreeBranchElement),e.dataTreeCollapseElement?"string"==typeof e.dataTreeCollapseElement?(t=document.createElement("div"),t.innerHTML=e.dataTreeCollapseElement,this.collapseEl=t.firstChild):this.collapseEl=e.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.innerHTML="
"),e.dataTreeExpandElement?"string"==typeof e.dataTreeExpandElement?(t=document.createElement("div"),t.innerHTML=e.dataTreeExpandElement,this.expandEl=t.firstChild):this.expandEl=e.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.innerHTML="
"),_typeof(e.dataTreeStartExpanded)){case"boolean":this.startOpen=function(t,o){return e.dataTreeStartExpanded};break;case"function":this.startOpen=e.dataTreeStartExpanded;break;default:this.startOpen=function(t,o){return e.dataTreeStartExpanded[o]}}},v.prototype.initializeRow=function(t){var e=void 0!==t.getData()[this.field];t.modules.dataTree={index:0,open:!!e&&this.startOpen(t.getComponent(),0),controlEl:!1,branchEl:!1,parent:!1,children:e}},v.prototype.layoutRow=function(t){var e=t.getCells()[0],o=e.getElement(),i=t.modules.dataTree;o.style.paddingLeft=parseInt(window.getComputedStyle(o,null).getPropertyValue("padding-left"))+i.index*this.indent+"px",i.branchEl&&i.branchEl.parentNode.removeChild(i.branchEl),this.generateControlElement(t,o),i.index&&this.branchEl&&(i.branchEl=this.branchEl.cloneNode(!0),o.insertBefore(i.branchEl,o.firstChild),o.style.paddingLeft=parseInt(o.style.paddingLeft)+(i.branchEl.offsetWidth+i.branchEl.style.marginRight)*(i.index-1)+"px")},v.prototype.generateControlElement=function(t,e){var o=this,i=t.modules.dataTree,e=e||t.getCells()[0].getElement(),n=i.controlEl;!1!==i.children&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",function(e){e.stopPropagation(),o.collapseRow(t)})):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",function(e){e.stopPropagation(),o.expandRow(t)})),i.controlEl.addEventListener("mousedown",function(t){t.stopPropagation()}),n&&n.parentNode===e?n.parentNode.replaceChild(i.controlEl,n):e.insertBefore(i.controlEl,e.firstChild))},v.prototype.setDisplayIndex=function(t){this.displayIndex=t},v.prototype.getDisplayIndex=function(){return this.displayIndex},v.prototype.getRows=function(t){var e=this,o=[];return t.forEach(function(t,i){var n,s=t.modules.dataTree.children;o.push(t),s.index||!1===s.children||(n=e.getChildren(t),n.forEach(function(t){o.push(t)}))}),o},v.prototype.getChildren=function(t){var e=this,o=t.modules.dataTree,i=[];return!1!==o.children&&o.open&&(Array.isArray(o.children)||(o.children=this.generateChildren(t)),o.children.forEach(function(t){i.push(t),e.getChildren(t).forEach(function(t){i.push(t)})})),i},v.prototype.generateChildren=function(t){var e=this,o=[];return t.getData()[this.field].forEach(function(i){var n=new r(i||{},e.table.rowManager);n.modules.dataTree.index=t.modules.dataTree.index+1,n.modules.dataTree.parent=t,n.modules.dataTree.open=e.startOpen(t,n.modules.dataTree.index),o.push(n)}),o},v.prototype.expandRow=function(t,e){var o=t.modules.dataTree;!1!==o.children&&(o.open=!0,t.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowExpanded(t.getComponent(),t.modules.dataTree.index))},v.prototype.collapseRow=function(t){var e=t.modules.dataTree;!1!==e.children&&(e.open=!1,t.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowCollapsed(t.getComponent(),t.modules.dataTree.index))},v.prototype.toggleRow=function(t){var e=t.modules.dataTree;!1!==e.children&&(e.open?this.collapseRow(t):this.expandRow(t))},v.prototype.getTreeParent=function(t){return!!t.modules.dataTree.parent&&t.modules.dataTree.parent.getComponent()},v.prototype.getTreeChildren=function(t){var e=t.modules.dataTree,o=[];return e.children&&(Array.isArray(e.children)||(e.children=this.generateChildren(t)),e.children.forEach(function(t){t instanceof r&&o.push(t.getComponent())})),o},v.prototype.checkForRestyle=function(t){t.row.cells.indexOf(t)||!1!==t.row.modules.dataTree.children&&t.row.reinitialize()},c.prototype.registerModule("dataTree",v);var y=function(t){this.table=t,this.fields={},this.columnsByIndex=[],this.columnsByField={},this.config={}};y.prototype.download=function(t,e,o,i){function n(o,n){i?i(o):s.triggerDownload(o,n,t,e)}var s=this,r=!1;this.processConfig(),"function"==typeof t?r=t:s.downloaders[t]?r=s.downloaders[t]:console.warn("Download Error - No such download type found: ",t),this.processColumns(),r&&r.call(this,s.processDefinitions(),s.processData(),o||{},n,this.config)},y.prototype.processConfig=function(){var t={columnGroups:!0,rowGroups:!0};if(this.table.options.downloadConfig)for(var e in this.table.options.downloadConfig)t[e]=this.table.options.downloadConfig[e];t.rowGroups&&this.table.options.groupBy&&this.table.modExists("groupRows")&&(this.config.rowGroups=!0),t.columnGroups&&this.table.columnManager.columns.length!=this.table.columnManager.columnsByIndex.length&&(this.config.columnGroups=!0)},y.prototype.processColumns=function(){var t=this;t.columnsByIndex=[],t.columnsByField={},t.table.columnManager.columnsByIndex.forEach(function(e){e.field&&e.visible&&!1!==e.definition.download&&(t.columnsByIndex.push(e),t.columnsByField[e.field]=e)})},y.prototype.processDefinitions=function(){var t=this,e=[];return this.config.columnGroups?t.table.columnManager.columns.forEach(function(o){var i=t.processColumnGroup(o);i&&e.push(i)}):t.columnsByIndex.forEach(function(o){!1!==o.download&&e.push(t.processDefinition(o))}),e},y.prototype.processColumnGroup=function(t){var e=this,o=t.columns,i={type:"group",title:t.definition.title};if(o.length){if(i.subGroups=[],i.width=0,o.forEach(function(t){var o=e.processColumnGroup(t);o&&(i.width+=o.width,i.subGroups.push(o))}),!i.width)return!1}else{if(!t.field||!t.visible||!1===t.definition.download)return!1;i.width=1,i.definition=this.processDefinition(t)}return i},y.prototype.processDefinition=function(t){var e={};for(var o in t.definition)e[o]=t.definition[o];return void 0!==t.definition.downloadTitle&&(e.title=t.definition.downloadTitle),e},y.prototype.processData=function(){var t=this,e=this,o=[],i=[];return this.config.rowGroups?(i=this.table.modules.groupRows.getGroups(),i.forEach(function(e){o.push(t.processGroupData(e))})):o=e.table.rowManager.getData(!0,"download"),"function"==typeof e.table.options.downloadDataFormatter&&(o=e.table.options.downloadDataFormatter(o)),o},y.prototype.processGroupData=function(t){var e=this,o=t.getSubGroups(),i={type:"group",key:t.key};return o.length?(i.subGroups=[],o.forEach(function(t){i.subGroups.push(e.processGroupData(t))})):i.rows=t.getData(!0,"download"),i},y.prototype.triggerDownload=function(t,e,o,i){var n=document.createElement("a"),s=new Blob([t],{type:e}),i=i||"Tabulator."+("function"==typeof o?"txt":o);(s=this.table.options.downloadReady.call(this.table,t,s))&&(navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(s,i):(n.setAttribute("href",window.URL.createObjectURL(s)),n.setAttribute("download",i),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)),this.table.options.downloadComplete&&this.table.options.downloadComplete())},y.prototype.getFieldValue=function(t,e){var o=this.columnsByField[t];return!!o&&o.getFieldValue(e)},y.prototype.commsReceived=function(t,e,o){switch(e){case"intercept":this.download(o.type,"",o.options,o.intercept)}},y.prototype.downloaders={csv:function(t,e,o,i,n){function s(t,e){t.subGroups?t.subGroups.forEach(function(t){s(t,e+1)}):(c.push('"'+String(t.title).split('"').join('""')+'"'),d.push(t.definition.field))}function r(t){t.forEach(function(t){var e=[];d.forEach(function(o){var i=u.getFieldValue(o,t);switch(void 0===i?"undefined":_typeof(i)){case"object":i=JSON.stringify(i);break;case"undefined":case"null":i="";break;default:i=i}e.push('"'+String(i).split('"').join('""')+'"')}),l.push(e.join(h))})}function a(t){t.subGroups?t.subGroups.forEach(function(t){a(t)}):r(t.rows)}var l,u=this,c=[],d=[],h=o&&o.delimiter?o.delimiter:",";n.columnGroups?(console.warn("Download Warning - CSV downloader cannot process column groups"),t.forEach(function(t){s(t,0)})):function(){t.forEach(function(t){c.push('"'+String(t.title).split('"').join('""')+'"'),d.push(t.field)})}(),l=[c.join(h)],n.rowGroups?(console.warn("Download Warning - CSV downloader cannot process row groups"),e.forEach(function(t){a(t)})):r(e),i(l.join("\n"),"text/csv")},json:function(t,e,o,i,n){i(JSON.stringify(e,null,"\t"),"application/json")},pdf:function(t,e,o,i,n){function s(t,e){t.subGroups?t.subGroups.forEach(function(t){s(t,e+1)}):(d.push(t.title||""),c.push(t.definition.field))}function r(t){switch(void 0===t?"undefined":_typeof(t)){case"object":t=JSON.stringify(t);break;case"undefined":case"null":t="";break;default:t=t}return t}function a(t){t.forEach(function(t){var e=[];c.forEach(function(o){var i=u.getFieldValue(o,t);e.push(r(i))}),h.push(e)})}function l(t){var e=[];e.push(r(t.key)),p.push(h.length),h.push(e),t.subGroups?t.subGroups.forEach(function(t){l(t)}):a(t.rows)}var u=this,c=[],d=[],h=[],p=[],m={},f={},g=o.jsPDF||{},b=o&&o.title?o.title:"";g.orientation||(g.orientation=o.orientation||"landscape"),g.unit||(g.unit="pt"),n.columnGroups?(console.warn("Download Warning - PDF downloader cannot process column groups"),t.forEach(function(t){s(t,0)})):function(){t.forEach(function(t){t.field&&(d.push(t.title||""),c.push(t.field))})}(),n.rowGroups?e.forEach(function(t){l(t)}):a(e);var v=new jsPDF(g);if(o&&o.autoTable&&(m="function"==typeof o.autoTable?o.autoTable(v)||{}:o.autoTable),n.rowGroups){var y=function(t,e){if(p.indexOf(e.row.index)>-1)for(var o in f)t.styles[o]=f[o]};if(f=o.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},m.createdCell){var w=m.createdCell;m.createdCell=function(t,e){y(t,e),w(t,e)}}else m.createdCell=y}b&&(m.addPageContent=function(t){v.text(b,40,30)}),v.autoTable(d,h,m),i(v.output("arraybuffer"),"application/pdf")},xlsx:function(t,e,o,i,n){function s(){function o(t,e){void 0===u[e]&&(u[e]=[]),void 0===d[e]&&(d[e]=[]),t.width>1&&d[e].push({type:"hoz",start:u[e].length,end:u[e].length+t.width-1}),u[e].push(t.title),t.subGroups?t.subGroups.forEach(function(t){o(t,e+1)}):(h.push(t.definition.field),i(h.length),d[e].push({type:"vert",start:h.length-1}))}function i(){var t=0;u.forEach(function(e){var o=e.length;o>t&&(t=o)}),u.forEach(function(e){var o=e.length;if(o0&&l(y[e-1]);break;case 40:t.stopImmediatePropagation(),t.stopPropagation(),e=y.indexOf(E),e-1&&e.push(o)}),E=e,l()}function l(){for(var t=!1;y.firstChild;)y.removeChild(y.firstChild);E.forEach(function(e){var o=e.element;o||(o=document.createElement("div"),o.classList.add("tabulator-edit-select-list-item"),o.tabIndex=0,o.innerHTML=e.title,o.addEventListener("click",function(){u(e),d()}),o.addEventListener("mousedown",function(){x=!1,setTimeout(function(){x=!0},10)}),e.element=o,e===C&&(e.element.classList.add("active"),t=!0)),y.appendChild(o)}),t||u(!1)}function u(t,e){C&&C.element&&C.element.classList.remove("active"),C=t,t&&t.element&&t.element.classList.add("active")}function d(){m(),C?b!==C.value?(b=C.value,v.value=C.value,o(v.value)):i():n.freetext?(b=v.value,o(v.value)):n.allowEmpty&&""===v.value?(b=v.value,o(v.value)):i()}function h(){m(),i()}function p(){if(!y.parentNode){for(;y.firstChild;)y.removeChild(y.firstChild);!0===n.values?r(s(),b):r(n.values||[],b);var t=c.prototype.helpers.elOffset(g);y.style.minWidth=g.offsetWidth+"px",y.style.top=t.top+g.offsetHeight+"px",y.style.left=t.left+"px",document.body.appendChild(y)}}function m(){y.parentNode&&y.parentNode.removeChild(y)}var f=this,g=t.getElement(),b=t.getValue(),v=document.createElement("input"),y=document.createElement("div"),w=[],E=[],C={},x=!0;return v.setAttribute("type","text"),v.style.padding="4px",v.style.width="100%",v.style.boxSizing="border-box",v.addEventListener("keydown",function(t){var e;switch(t.keyCode){case 38:t.stopImmediatePropagation(),t.stopPropagation(),e=E.indexOf(C),u(e>0?E[e-1]:!1);break;case 40:t.stopImmediatePropagation(),t.stopPropagation(),e=E.indexOf(C),e'):("ie"==a.table.browser?e.setAttribute("class","tabulator-star-inactive"):e.classList.replace("tabulator-star-active","tabulator-star-inactive"),e.innerHTML='')})}function r(t){u=t,s(t)}var a=this,l=t.getElement(),u=t.getValue(),c=l.getElementsByTagName("svg").length||5,d=l.getElementsByTagName("svg")[0]?l.getElementsByTagName("svg")[0].getAttribute("width"):14,h=[],p=document.createElement("div"),m=document.createElementNS("http://www.w3.org/2000/svg","svg");l.style.whiteSpace="nowrap",l.style.overflow="hidden",l.style.textOverflow="ellipsis",p.style.verticalAlign="middle",p.style.display="inline-block",p.style.padding="4px",m.setAttribute("width",d),m.setAttribute("height",d),m.setAttribute("viewBox","0 0 512 512"),m.setAttribute("xml:space","preserve"),m.style.padding="0 1px";for(var f=1;f<=c;f++)!function(t){var e=m.cloneNode(!0);h.push(e),e.addEventListener("mouseover",function(e){e.stopPropagation(),s(t)}),e.addEventListener("click",function(e){e.stopPropagation(),o(t)}),p.appendChild(e)}(f);return u=Math.min(parseInt(u),c),s(u),p.addEventListener("mouseover",function(t){s(0)}),p.addEventListener("click",function(t){o(0)}),l.addEventListener("blur",function(t){i()}),l.addEventListener("keydown",function(t){switch(t.keyCode){case 39:r(u+1);break;case 37:r(u-1);break;case 13:o(u);break;case 27:i()}}),p},progress:function(t,e,o,i,n){function s(){var t=d*Math.round(m.offsetWidth/(l.clientWidth/100))+c;o(t),l.setAttribute("aria-valuenow",t),l.setAttribute("aria-label",h)}var r,a,l=t.getElement(),u=void 0===n.max?l.getElementsByTagName("div")[0].getAttribute("max")||100:n.max,c=void 0===n.min?l.getElementsByTagName("div")[0].getAttribute("min")||0:n.min,d=(u-c)/100,h=t.getValue()||0,p=document.createElement("div"),m=document.createElement("div");return p.style.position="absolute",p.style.right="0",p.style.top="0",p.style.bottom="0",p.style.width="5px",p.classList.add("tabulator-progress-handle"),m.style.display="inline-block",m.style.position="absolute",m.style.top="8px",m.style.bottom="8px",m.style.left="4px",m.style.marginRight="4px",m.style.backgroundColor="#488CE9",m.style.maxWidth="100%",m.style.minWidth="0%",l.style.padding="0 4px",h=Math.min(parseFloat(h),u),h=Math.max(parseFloat(h),c),h=100-Math.round((h-c)/d),m.style.right=h+"%",l.setAttribute("aria-valuemin",c),l.setAttribute("aria-valuemax",u),m.appendChild(p),p.addEventListener("mousedown",function(t){r=t.screenX,a=m.offsetWidth}),p.addEventListener("mouseover",function(){p.style.cursor="ew-resize"}),l.addEventListener("mousemove",function(t){r&&(m.style.width=a+t.screenX-r+"px")}),l.addEventListener("mouseup",function(t){r&&(t.stopPropagation(),t.stopImmediatePropagation(),r=!1,a=!1,s())}),l.addEventListener("keydown",function(t){switch(t.keyCode){case 39:m.style.width=m.clientWidth+l.clientWidth/100+"px";break;case 37:m.style.width=m.clientWidth-l.clientWidth/100+"px";break;case 13:s();break;case 27:i()}}),l.addEventListener("blur",function(){i()}),m},tickCross:function(t,e,o,i,n){function s(t){return l?t?c?u:a.checked:a.checked&&!c?(a.checked=!1,a.indeterminate=!0,c=!0,u):(c=!1,a.checked):a.checked}var r=t.getValue(),a=document.createElement("input"),l=n.tristate,u=void 0===n.indeterminateValue?null:n.indeterminateValue,c=!1;return a.setAttribute("type","checkbox"),a.style.marginTop="5px",a.style.boxSizing="border-box",a.value=r,!l||void 0!==r&&r!==u&&""!==r||(c=!0,a.indeterminate=!0),"firefox"!=this.table.browser&&e(function(){a.focus()}),a.checked=!0===r||"true"===r||"True"===r||1===r,a.addEventListener("change",function(t){o(s())}),a.addEventListener("blur",function(t){o(s(!0))}),a.addEventListener("keydown",function(t){13==t.keyCode&&o(s()),27==t.keyCode&&i()}),a}},c.prototype.registerModule("edit",w);var E=function(t){this.table=t,this.filterList=[],this.headerFilters={},this.headerFilterElements=[],this.headerFilterColumns=[],this.changed=!1};E.prototype.initializeColumn=function(t,e){function o(e){var o,r="input"==t.modules.filter.tagType&&"text"==t.modules.filter.attrType||"textarea"==t.modules.filter.tagType?"partial":"match",a="";if(void 0===i||i!==e){if(i=e,t.modules.filter.emptyFunc(e))delete n.headerFilters[s];else{switch(t.modules.filter.value=e,_typeof(t.definition.headerFilterFunc)){case"string":n.filters[t.definition.headerFilterFunc]?(a=t.definition.headerFilterFunc,o=function(o){return n.filters[t.definition.headerFilterFunc](e,t.getFieldValue(o))}):console.warn("Header Filter Error - Matching filter function not found: ",t.definition.headerFilterFunc);break;case"function":o=function(o){var i=t.definition.headerFilterFuncParams||{},n=t.getFieldValue(o);return i="function"==typeof i?i(e,n,o):i,t.definition.headerFilterFunc(e,n,o,i)},a=o}if(!o)switch(r){case"partial":o=function(o){return String(t.getFieldValue(o)).toLowerCase().indexOf(String(e).toLowerCase())>-1},a="like";break;default:o=function(o){return t.getFieldValue(o)==e},a="="}n.headerFilters[s]={value:e,func:o,type:a}}n.changed=!0,n.table.rowManager.filterRefresh()}}var i,n=this,s=t.getField();t.modules.filter={success:o,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(t)},E.prototype.generateHeaderFilterElement=function(t,e){function o(){}var i,n,s,r,a,l,u,c=this,d=t.modules.filter.success,h=t.getField() -;if(t.modules.filter.headerElement&&t.modules.filter.headerElement.parentNode&&t.modules.filter.headerElement.parentNode.removeChild(t.modules.filter.headerElement),h){switch(t.modules.filter.emptyFunc=t.definition.headerFilterEmptyCheck||function(t){return!t&&"0"!==t},i=document.createElement("div"),i.classList.add("tabulator-header-filter"),_typeof(t.definition.headerFilter)){case"string":c.table.modules.edit.editors[t.definition.headerFilter]?(n=c.table.modules.edit.editors[t.definition.headerFilter],"tick"!==t.definition.headerFilter&&"tickCross"!==t.definition.headerFilter||t.definition.headerFilterEmptyCheck||(t.modules.filter.emptyFunc=function(t){return!0!==t&&!1!==t})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",t.definition.editor);break;case"function":n=t.definition.headerFilter;break;case"boolean":t.modules.edit&&t.modules.edit.editor?n=t.modules.edit.editor:t.definition.formatter&&c.table.modules.edit.editors[t.definition.formatter]?(n=c.table.modules.edit.editors[t.definition.formatter],"tick"!==t.definition.formatter&&"tickCross"!==t.definition.formatter||t.definition.headerFilterEmptyCheck||(t.modules.filter.emptyFunc=function(t){return!0!==t&&!1!==t})):n=c.table.modules.edit.editors.input}if(n){if(r={getValue:function(){return void 0!==e?e:""},getField:function(){return t.definition.field},getElement:function(){return i},getColumn:function(){return t.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},u=t.definition.headerFilterParams||{},u="function"==typeof u?u.call(c.table):u,!(s=n.call(this.table.modules.edit,r,function(){},d,o,u)))return void console.warn("Filter Error - Cannot add filter to "+h+" column, editor returned a value of false");if(!(s instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+h+" column, editor should return an instance of Node, the editor returned:",s);h?c.table.modules.localize.bind("headerFilters|columns|"+t.definition.field,function(t){s.setAttribute("placeholder",void 0!==t&&t?t:c.table.modules.localize.getText("headerFilters|default"))}):c.table.modules.localize.bind("headerFilters|default",function(t){s.setAttribute("placeholder",void 0!==c.column.definition.headerFilterPlaceholder&&c.column.definition.headerFilterPlaceholder?c.column.definition.headerFilterPlaceholder:t)}),s.addEventListener("click",function(t){t.stopPropagation(),s.focus()}),a=!1,l=function(t){a&&clearTimeout(a),a=setTimeout(function(){d(s.value)},300)},t.modules.filter.headerElement=s,t.modules.filter.attrType=s.hasAttribute("type")?s.getAttribute("type").toLowerCase():"",t.modules.filter.tagType=s.tagName.toLowerCase(),!1!==t.definition.headerFilterLiveFilter&&("autocomplete"===t.definition.headerFilter||"autocomplete"===t.definition.editor&&!0===t.definition.headerFilter||(s.addEventListener("keyup",l),s.addEventListener("search",l),"number"==t.modules.filter.attrType&&s.addEventListener("change",function(t){d(s.value)}),"text"==t.modules.filter.attrType&&"ie"!==this.table.browser&&s.setAttribute("type","search")),"input"!=t.modules.filter.tagType&&"select"!=t.modules.filter.tagType&&"textarea"!=t.modules.filter.tagType||s.addEventListener("mousedown",function(t){t.stopPropagation()})),i.appendChild(s),t.contentElement.appendChild(i),c.headerFilterElements.push(s),c.headerFilterColumns.push(t)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",t.definition.title)},E.prototype.hideHeaderFilterElements=function(){this.headerFilterElements.forEach(function(t){t.style.display="none"})},E.prototype.showHeaderFilterElements=function(){this.headerFilterElements.forEach(function(t){t.style.display=""})},E.prototype.setHeaderFilterFocus=function(t){t.modules.filter&&t.modules.filter.headerElement?t.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",t.getField())},E.prototype.setHeaderFilterValue=function(t,e){t&&(t.modules.filter&&t.modules.filter.headerElement?(this.generateHeaderFilterElement(t,e),t.modules.filter.success(e)):console.warn("Column Filter Error - No header filter set on column:",t.getField()))},E.prototype.reloadHeaderFilter=function(t){t&&(t.modules.filter&&t.modules.filter.headerElement?this.generateHeaderFilterElement(t,t.modules.filter.value):console.warn("Column Filter Error - No header filter set on column:",t.getField()))},E.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},E.prototype.setFilter=function(t,e,o){var i=this;i.filterList=[],Array.isArray(t)||(t=[{field:t,type:e,value:o}]),i.addFilter(t)},E.prototype.addFilter=function(t,e,o){var i=this;Array.isArray(t)||(t=[{field:t,type:e,value:o}]),t.forEach(function(t){(t=i.findFilter(t))&&(i.filterList.push(t),i.changed=!0)}),this.table.options.persistentFilter&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("filter")},E.prototype.findFilter=function(t){var e,o=this;if(Array.isArray(t))return this.findSubFilters(t);var i=!1;return"function"==typeof t.field?i=function(e){return t.field(e,t.type||{})}:o.filters[t.type]?(e=o.table.columnManager.getColumnByField(t.field),i=e?function(i){return o.filters[t.type](t.value,e.getFieldValue(i))}:function(e){return o.filters[t.type](t.value,e[t.field])}):console.warn("Filter Error - No such filter type found, ignoring: ",t.type),t.func=i,!!t.func&&t},E.prototype.findSubFilters=function(t){var e=this,o=[];return t.forEach(function(t){(t=e.findFilter(t))&&o.push(t)}),!!o.length&&o},E.prototype.getFilters=function(t,e){var o=this,i=[];return t&&(i=o.getHeaderFilters()),o.filterList.forEach(function(t){i.push({field:t.field,type:t.type,value:t.value})}),e&&i.forEach(function(t){"function"==typeof t.type&&(t.type="function")}),i},E.prototype.getHeaderFilters=function(){var t=[];for(var e in this.headerFilters)t.push({field:e,type:this.headerFilters[e].type,value:this.headerFilters[e].value});return t},E.prototype.removeFilter=function(t,e,o){var i=this;Array.isArray(t)||(t=[{field:t,type:e,value:o}]),t.forEach(function(t){var e=-1;e="object"==_typeof(t.field)?i.filterList.findIndex(function(e){return t===e}):i.filterList.findIndex(function(e){return t.field===e.field&&t.type===e.type&&t.value===e.value}),e>-1?(i.filterList.splice(e,1),i.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",t.type)}),this.table.options.persistentFilter&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("filter")},E.prototype.clearFilter=function(t){this.filterList=[],t&&this.clearHeaderFilter(),this.changed=!0,this.table.options.persistentFilter&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("filter")},E.prototype.clearHeaderFilter=function(){var t=this;this.headerFilters={},this.headerFilterColumns.forEach(function(e){e.modules.filter.value=null,t.reloadHeaderFilter(e)}),this.changed=!0},E.prototype.search=function(t,e,o,i){var n=this,s=[],r=[];return Array.isArray(e)||(e=[{field:e,type:o,value:i}]),e.forEach(function(t){(t=n.findFilter(t))&&r.push(t)}),this.table.rowManager.rows.forEach(function(e){var o=!0;r.forEach(function(t){n.filterRecurse(t,e.getData())||(o=!1)}),o&&s.push("data"===t?e.getData("data"):e.getComponent())}),s},E.prototype.filter=function(t,e){var o=this,i=[],n=[];return o.table.options.dataFiltering&&o.table.options.dataFiltering.call(o.table,o.getFilters()),o.table.options.ajaxFiltering||!o.filterList.length&&!Object.keys(o.headerFilters).length?i=t.slice(0):t.forEach(function(t){o.filterRow(t)&&i.push(t)}),o.table.options.dataFiltered&&(i.forEach(function(t){n.push(t.getComponent())}),o.table.options.dataFiltered.call(o.table,o.getFilters(),n)),i},E.prototype.filterRow=function(t,e){var o=this,i=!0,n=t.getData();o.filterList.forEach(function(t){o.filterRecurse(t,n)||(i=!1)});for(var s in o.headerFilters)o.headerFilters[s].func(n)||(i=!1);return i},E.prototype.filterRecurse=function(t,e){var o=this,i=!1;return Array.isArray(t)?t.forEach(function(t){o.filterRecurse(t,e)&&(i=!0)}):i=t.func(e),i},E.prototype.filters={"=":function(t,e){return e==t},"<":function(t,e){return e":function(t,e){return e>t},">=":function(t,e){return e>=t},"!=":function(t,e){return e!=t},regex:function(t,e){return"string"==typeof t&&(t=new RegExp(t)),t.test(e)},like:function(t,e){return null===t||void 0===t?e===t:void 0!==e&&null!==e&&String(e).toLowerCase().indexOf(t.toLowerCase())>-1},in:function(t,e){return Array.isArray(t)?t.indexOf(e)>-1:(console.warn("Filter Error - filter value is not an array:",t),!1)}},c.prototype.registerModule("filter",E);var C=function(t){this.table=t};C.prototype.initializeColumn=function(t){var e=this,o={params:t.definition.formatterParams||{}};switch(_typeof(t.definition.formatter)){case"string":"tick"===t.definition.formatter&&(t.definition.formatter="tickCross",void 0===o.params.crossElement&&(o.params.crossElement=!1),console.warn("DEPRECATION WANRING - the tick formatter has been depricated, please use the tickCross formatter with the crossElement param set to false")),e.formatters[t.definition.formatter]?o.formatter=e.formatters[t.definition.formatter]:(console.warn("Formatter Error - No such formatter found: ",t.definition.formatter),o.formatter=e.formatters.plaintext);break;case"function":o.formatter=t.definition.formatter;break;default:o.formatter=e.formatters.plaintext}t.modules.format=o},C.prototype.cellRendered=function(t){t.column.modules.format.renderedCallback&&t.column.modules.format.renderedCallback()},C.prototype.formatValue=function(t){function e(e){t.column.modules.format.renderedCallback=e}var o=t.getComponent(),i="function"==typeof t.column.modules.format.params?t.column.modules.format.params(o):t.column.modules.format.params;return t.column.modules.format.formatter.call(this,o,i,e)},C.prototype.sanitizeHTML=function(t){if(t){var e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(t).replace(/[&<>"'`=\/]/g,function(t){return e[t]})}return t},C.prototype.emptyToSpace=function(t){return null===t||void 0===t?" ":t},C.prototype.getFormatter=function(t){var t;switch(void 0===t?"undefined":_typeof(t)){case"string":this.formatters[t]?t=this.formatters[t]:(console.warn("Formatter Error - No such formatter found: ",t),t=this.formatters.plaintext);break;case"function":t=t;break;default:t=this.formatters.plaintext}return t},C.prototype.formatters={plaintext:function(t,e,o){return this.emptyToSpace(this.sanitizeHTML(t.getValue()))},html:function(t,e,o){return t.getValue()},textarea:function(t,e,o){return t.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(t.getValue()))},money:function(t,e,o){var i,n,s,r,a=parseFloat(t.getValue()),l=e.decimal||".",u=e.thousand||",",c=e.symbol||"",d=!!e.symbolAfter,h=void 0!==e.precision?e.precision:2;if(isNaN(a))return this.emptyToSpace(this.sanitizeHTML(t.getValue()));for(i=!1!==h?a.toFixed(h):a,i=String(i).split("."),n=i[0],s=i.length>1?l+i[1]:"",r=/(\d+)(\d{3})/;r.test(n);)n=n.replace(r,"$1"+u+"$2");return d?n+s+c:c+n+s},link:function(t,e,o){var i,n=this.sanitizeHTML(t.getValue()),s=e.urlPrefix||"",r=this.emptyToSpace(n),a=document.createElement("a");if(e.labelField&&(i=t.getData(),r=i[e.labelField]),e.label)switch(_typeof(e.label)){case"string":r=e.label;break;case"function":r=e.label(t)}if(e.urlField&&(i=t.getData(),n=i[e.urlField]),e.url)switch(_typeof(e.url)){case"string":n=e.url;break;case"function":n=e.url(t)}return a.setAttribute("href",s+n),e.target&&a.setAttribute("target",e.target),a.innerHTML=this.emptyToSpace(r),a},image:function(t,e,o){var i=document.createElement("img");switch(i.setAttribute("src",t.getValue()),_typeof(e.height)){case"number":element.style.height=e.height+"px";break;case"string":element.style.height=e.height}switch(_typeof(e.width)){case"number":element.style.width=e.width+"px";break;case"string":element.style.width=e.width}return i.addEventListener("load",function(){t.getRow().normalizeHeight()}),i},tickCross:function(t,e,o){var i=t.getValue(),n=t.getElement(),s=e.allowEmpty,r=e.allowTruthy,a=void 0!==e.tickElement?e.tickElement:'',l=void 0!==e.crossElement?e.crossElement:'';return r&&i||!0===i||"true"===i||"True"===i||1===i||"1"===i?(n.setAttribute("aria-checked",!0),a||""):!s||"null"!==i&&""!==i&&null!==i&&void 0!==i?(n.setAttribute("aria-checked",!1),l||""):(n.setAttribute("aria-checked","mixed"),"")},datetime:function(t,e,o){var i=e.inputFormat||"YYYY-MM-DD hh:mm:ss",n=e.outputFormat||"DD/MM/YYYY hh:mm:ss",s=void 0!==e.invalidPlaceholder?e.invalidPlaceholder:"",r=t.getValue(),a=moment(r,i);return a.isValid()?a.format(n):!0===s?r:"function"==typeof s?s(r):s},datetimediff:function(t,e,o){var i=e.inputFormat||"YYYY-MM-DD hh:mm:ss",n=void 0!==e.invalidPlaceholder?e.invalidPlaceholder:"",s=void 0!==e.suffix&&e.suffix,r=void 0!==e.unit?e.unit:void 0,a=void 0!==e.humanize&&e.humanize,l=void 0!==e.date?e.date:moment(),u=t.getValue(),c=moment(u,i);return c.isValid()?a?moment.duration(c.diff(l)).humanize(s):c.diff(l,r)+(s?" "+s:""):!0===n?u:"function"==typeof n?n(u):n},lookup:function(t,e,o){var i=t.getValue();return void 0===e[i]?(console.warn("Missing display value for "+i),i):e[i]},star:function(t,e,o){var i=t.getValue(),n=t.getElement(),s=e&&e.stars?e.stars:5,r=document.createElement("span"),a=document.createElementNS("http://www.w3.org/2000/svg","svg");r.style.verticalAlign="middle",a.setAttribute("width","14"),a.setAttribute("height","14"),a.setAttribute("viewBox","0 0 512 512"),a.setAttribute("xml:space","preserve"),a.style.padding="0 1px",i=parseInt(i)':'',r.appendChild(u)}return n.style.whiteSpace="nowrap",n.style.overflow="hidden",n.style.textOverflow="ellipsis",n.setAttribute("aria-label",i),r},progress:function(t,e,o){var i,n,s,r,a,l=this.sanitizeHTML(t.getValue())||0,u=t.getElement(),c=e&&e.max?e.max:100,d=e&&e.min?e.min:0,h=e&&e.legendAlign?e.legendAlign:"center";switch(n=parseFloat(l)<=c?parseFloat(l):c,n=parseFloat(n)>=d?parseFloat(n):d,i=(c-d)/100,n=Math.round((n-d)/i),_typeof(e.color)){case"string":s=e.color;break;case"function":s=e.color(l);break;case"object":if(Array.isArray(e.color)){var p=100/e.color.length,m=Math.floor(n/p);m=Math.min(m,e.color.length-1),m=Math.max(m,0),s=e.color[m];break}default:s="#2DC214"}switch(_typeof(e.legend)){case"string":r=e.legend;break;case"function":r=e.legend(l);break;case"boolean":r=l;break;default:r=!1}switch(_typeof(e.legendColor)){case"string":a=e.legendColor;break;case"function":a=e.legendColor(l);break;case"object":if(Array.isArray(e.legendColor)){var p=100/e.legendColor.length,m=Math.floor(n/p);m=Math.min(m,e.legendColor.length-1),m=Math.max(m,0),a=e.legendColor[m]}break;default:a="#000"}return u.style.minWidth="30px",u.style.position="relative",u.setAttribute("aria-label",n),"
"+(r?"
"+r+"
":"")},color:function(t,e,o){return t.getElement().style.backgroundColor=this.sanitizeHTML(t.getValue()),""},buttonTick:function(t,e,o){return''},buttonCross:function(t,e,o){return''},rownum:function(t,e,o){return this.table.rowManager.activeRows.indexOf(t.getRow()._getSelf())+1},handle:function(t,e,o){return t.getElement().classList.add("tabulator-row-handle"),"
"},responsiveCollapse:function(t,e,o){function i(e){var o=t.getRow().getElement().getElementsByClassName("tabulator-responsive-collapse")[0];s=e,s?(r.classList.add("open"),o&&(o.style.display="")):(r.classList.remove("open"),o&&(o.style.display="none"))}var n=this,s=!1,r=document.createElement("div");return r.classList.add("tabulator-responsive-collapse-toggle"),r.innerHTML="+-",t.getElement().classList.add("tabulator-row-handle"),n.table.options.responsiveLayoutCollapseStartOpen&&(s=!0),r.addEventListener("click",function(){i(!s)}),i(s),r}},c.prototype.registerModule("format",C);var x=function(t){this.table=t,this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.initializationMode="left",this.active=!1};x.prototype.reset=function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.active=!1},x.prototype.initializeColumn=function(t){var e={margin:0,edge:!1};t.definition.frozen?t.parent.isGroup?console.warn("Frozen Column Error - Grouped columns cannot be frozen"):t.isGroup?console.warn("Frozen Column Error - Column Groups cannot be frozen"):(e.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(t):this.rightColumns.unshift(t),this.active=!0,t.modules.frozen=e):this.initializationMode="right"},x.prototype.layout=function(){var t=this,e=(this.table.rowManager.element,0);t.active&&(t.leftMargin=t._calcSpace(t.leftColumns,t.leftColumns.length),t.table.columnManager.headersElement.style.marginLeft=t.leftMargin+"px",t.rightMargin=t._calcSpace(t.rightColumns,t.rightColumns.length),t.table.columnManager.element.style.paddingRight=t.rightMargin+"px",t.table.rowManager.activeRows.forEach(function(e){t.layoutRow(e)}),t.table.modExists("columnCalcs")&&(t.table.modules.columnCalcs.topInitialized&&t.table.modules.columnCalcs.topRow&&t.layoutRow(t.table.modules.columnCalcs.topRow),t.table.modules.columnCalcs.botInitialized&&t.table.modules.columnCalcs.botRow&&t.layoutRow(t.table.modules.columnCalcs.botRow)),t.leftColumns.forEach(function(e,o){e.modules.frozen.margin=t._calcSpace(t.leftColumns,o)+t.table.columnManager.scrollLeft,o==t.leftColumns.length-1?e.modules.frozen.edge=!0:e.modules.frozen.edge=!1,t.layoutColumn(e)}),e=t.table.rowManager.element.clientWidth+t.table.columnManager.scrollLeft,t.rightColumns.forEach(function(o,i){o.modules.frozen.margin=e-t._calcSpace(t.rightColumns,i+1),i==t.rightColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,t.layoutColumn(o)}),this.table.rowManager.tableElement.style.marginRight=this.rightMargin+"px")},x.prototype.layoutColumn=function(t){var e=this;e.layoutElement(t.getElement(),t),t.cells.forEach(function(o){e.layoutElement(o.getElement(),t)})},x.prototype.layoutRow=function(t){t.getElement().style.paddingLeft=this.leftMargin+"px"},x.prototype.layoutElement=function(t,e){e.modules.frozen&&(t.style.position="absolute",t.style.left=e.modules.frozen.margin+"px",t.classList.add("tabulator-frozen"),e.modules.frozen.edge&&t.classList.add("tabulator-frozen-"+e.modules.frozen.position))},x.prototype._calcSpace=function(t,e){for(var o=0,i=0;i-1&&e.splice(o,1)}),e},R.prototype.freezeRow=function(t){t.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(t.modules.frozen=!0,this.topElement.appendChild(t.getElement()),t.initialize(),t.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(t),this.table.rowManager.refreshActiveData("display"),this.styleRows())},R.prototype.unfreezeRow=function(t){var e=this.rows.indexOf(t);if(t.modules.frozen){t.modules.frozen=!1;var o=t.getElement();o.parentNode.removeChild(o),this.table.rowManager.adjustTableSize(),this.rows.splice(e,1),this.table.rowManager.refreshActiveData("display"),this.rows.length&&this.styleRows()}else console.warn("Freeze Error - Row is already unfrozen")},R.prototype.styleRows=function(t){var e=this;this.rows.forEach(function(t,o){e.table.rowManager.styleRow(t,o)})},c.prototype.registerModule("frozenRows",R);var D=function(t){this._group=t,this.type="GroupComponent"};D.prototype.getKey=function(){return this._group.key},D.prototype.getElement=function(){return this._group.element},D.prototype.getRows=function(){return this._group.getRows(!0)},D.prototype.getSubGroups=function(){return this._group.getSubGroups(!0)},D.prototype.getParentGroup=function(){return!!this._group.parent&&this._group.parent.getComponent()},D.prototype.getVisibility=function(){return this._group.visible},D.prototype.show=function(){this._group.show()},D.prototype.hide=function(){this._group.hide()},D.prototype.toggle=function(){this._group.toggleVisibility()},D.prototype._getSelf=function(){return this._group},D.prototype.getTable=function(){return this._group.table};var M=function(t,e,o,i,n,s,r){this.groupManager=t,this.parent=e,this.key=i,this.level=o,this.field=n,this.hasSubGroups=o-1?o?this.rows.splice(n+1,0,t):this.rows.splice(n,0,t):o?this.rows.push(t):this.rows.unshift(t),t.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)},M.prototype.getRowIndex=function(t){},M.prototype.conformRowData=function(t){return this.field?t[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(t=this.parent.conformRowData(t)),t},M.prototype.removeRow=function(t){var e=this.rows.indexOf(t);e>-1&&this.rows.splice(e,1),this.rows.length?(this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))},M.prototype.removeGroup=function(t){var e,o=t.level+"_"+t.key;this.groups[o]&&(delete this.groups[o],e=this.groupList.indexOf(t),e>-1&&this.groupList.splice(e,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))},M.prototype.getHeadersAndRows=function(){var t=[];return t.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach(function(e){t=t.concat(e.getHeadersAndRows())}):("table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),t=t.concat(this.rows),"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))):!this.groupList.length&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.options.groupClosedShowCalcs&&this.groupManager.table.modExists("columnCalcs")&&(this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))),t},M.prototype.getData=function(t,e){var o=[];return this._visSet(),(!t||t&&this.visible)&&this.rows.forEach(function(t){o.push(t.getData(e||"data"))}),o},M.prototype.getRowCount=function(){var t=0;return this.groupList.length?this.groupList.forEach(function(e){t+=e.getRowCount()}):t=this.rows.length,t},M.prototype.toggleVisibility=function(){this.visible?this.hide():this.show()},M.prototype.hide=function(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach(function(t){var e;t.calcs.top&&(e=t.calcs.top.getElement(),e.parentNode.removeChild(e)),t.calcs.bottom&&(e=t.calcs.bottom.getElement(),e.parentNode.removeChild(e)),t.getHeadersAndRows().forEach(function(t){var e=t.getElement();e.parentNode.removeChild(e)})}):this.rows.forEach(function(t){var e=t.getElement();e.parentNode.removeChild(e)}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex())),this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!1)},M.prototype.show=function(){var t=this;if(t.visible=!0, -"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var e=t.getElement();this.groupList.length?this.groupList.forEach(function(t){t.getHeadersAndRows().forEach(function(t){var o=t.getElement();e.parentNode.insertBefore(o,e.nextSibling),t.initialize(),e=o})}):t.rows.forEach(function(t){var o=t.getElement();e.parentNode.insertBefore(o,e.nextSibling),t.initialize(),e=o}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex())}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!0)},M.prototype._visSet=function(){var t=[];"function"==typeof this.visible&&(this.rows.forEach(function(e){t.push(e.getData())}),this.visible=this.visible(this.key,this.getRowCount(),t,this.getComponent()))},M.prototype.getRowGroup=function(t){var e=!1;return this.groupList.length?this.groupList.forEach(function(o){var i=o.getRowGroup(t);i&&(e=i)}):this.rows.find(function(e){return e===t})&&(e=this),e},M.prototype.getSubGroups=function(t){var e=[];return this.groupList.forEach(function(o){e.push(t?o.getComponent():o)}),e},M.prototype.getRows=function(t){var e=[];return this.rows.forEach(function(o){e.push(t?o.getComponent():o)}),e},M.prototype.generateGroupHeaderContents=function(){var t=[];for(this.rows.forEach(function(e){t.push(e.getData())}),this.elementContents=this.generator(this.key,this.getRowCount(),t,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)},M.prototype.getElement=function(){return this.addBindingsd=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible"),this.element.childNodes.forEach(function(t){t.parentNode.removeChild(t)}),this.generateGroupHeaderContents(),this.element},M.prototype.normalizeHeight=function(){this.setHeight(this.element.clientHeight)},M.prototype.initialize=function(t){this.initialized&&!t||(this.normalizeHeight(),this.initialized=!0)},M.prototype.reinitialize=function(){this.initialized=!1,this.height=0,c.prototype.helpers.elVisible(this.element)&&this.initialize(!0)},M.prototype.setHeight=function(t){this.height!=t&&(this.height=t,this.outerHeight=this.element.offsetHeight)},M.prototype.getHeight=function(){return this.outerHeight},M.prototype.getGroup=function(){return this},M.prototype.reinitializeHeight=function(){},M.prototype.calcHeight=function(){},M.prototype.setCellHeight=function(){},M.prototype.clearCellHeight=function(){},M.prototype.getComponent=function(){return new D(this)};var L=function(t){this.table=t,this.groupIDLookups=!1,this.startOpen=[function(){return!1}],this.headerGenerator=[function(){return""}],this.groupList=[],this.allowedValues=!1,this.groups={},this.displayIndex=0};L.prototype.initialize=function(){var t=this,e=t.table.options.groupBy,o=t.table.options.groupStartOpen,i=t.table.options.groupHeader;if(this.allowedValues=t.table.options.groupValues,t.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],t.table.modules.localize.bind("groups|item",function(e,o){t.headerGenerator[0]=function(t,i,n){return(void 0===t?"":t)+"("+i+" "+(1===i?e:o.groups.items)+")"}}),this.groupIDLookups=[],Array.isArray(e)||e)this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs){var n=this.table.columnManager.getRealColumns();n.forEach(function(e){e.definition.topCalc&&t.table.modules.columnCalcs.initializeTopRow(),e.definition.bottomCalc&&t.table.modules.columnCalcs.initializeBottomRow()})}Array.isArray(e)||(e=[e]),e.forEach(function(e,o){var i,n;"function"==typeof e?i=e:(n=t.table.columnManager.getColumnByField(e),i=n?function(t){return n.getFieldValue(t)}:function(t){return t[e]}),t.groupIDLookups.push({field:"function"!=typeof e&&e,func:i,values:!!t.allowedValues&&t.allowedValues[o]})}),o&&(Array.isArray(o)||(o=[o]),o.forEach(function(t){t="function"==typeof t?t:function(){return!0}}),t.startOpen=o),i&&(t.headerGenerator=Array.isArray(i)?i:[i]),this.initialized=!0},L.prototype.setDisplayIndex=function(t){this.displayIndex=t},L.prototype.getDisplayIndex=function(){return this.displayIndex},L.prototype.getRows=function(t){return this.groupIDLookups.length?(this.table.options.dataGrouping.call(this.table),this.generateGroups(t),this.table.options.dataGrouped&&this.table.options.dataGrouped.call(this.table,this.getGroups(!0)),this.updateGroupRows()):t.slice(0)},L.prototype.getGroups=function(t){var e=[];return this.groupList.forEach(function(o){e.push(t?o.getComponent():o)}),e},L.prototype.pullGroupListData=function(t){var e=this,o=[];return t.forEach(function(t){var i={};i.level=0,i.rowCount=0,i.headerContent="";var n=[];t.hasSubGroups?(n=e.pullGroupListData(t.groupList),i.level=t.level,i.rowCount=n.length-t.groupList.length,i.headerContent=t.generator(t.key,i.rowCount,t.rows,t),o.push(i),o=o.concat(n)):(i.level=t.level,i.headerContent=t.generator(t.key,t.rows.length,t.rows,t),i.rowCount=t.getRows().length,o.push(i),t.getRows().forEach(function(t){o.push(t.getData("data"))}))}),o},L.prototype.getGroupedData=function(){return this.pullGroupListData(this.groupList)},L.prototype.getRowGroup=function(t){var e=!1;return this.groupList.forEach(function(o){var i=o.getRowGroup(t);i&&(e=i)}),e},L.prototype.countGroups=function(){return this.groupList.length},L.prototype.generateGroups=function(t){var e=this,o=e.groups;e.groups={},e.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach(function(t){e.createGroup(t,0,o)}),t.forEach(function(t){e.assignRowToExistingGroup(t,o)})):t.forEach(function(t){e.assignRowToGroup(t,o)})},L.prototype.createGroup=function(t,e,o){var i,n=e+"_"+t;o=o||[],i=new M(this,!1,e,t,this.groupIDLookups[0].field,this.headerGenerator[0],o[n]),this.groups[n]=i,this.groupList.push(i)},L.prototype.assignRowToGroup=function(t,e){var o=this.groupIDLookups[0].func(t.getData()),i="0_"+o;this.groups[i]||this.createGroup(o,0,e),this.groups[i].addRow(t)},L.prototype.assignRowToExistingGroup=function(t,e){var o=this.groupIDLookups[0].func(t.getData()),i="0_"+o;this.groups[i]&&this.groups[i].addRow(t)},L.prototype.assignRowToGroup=function(t,e){var o=this.groupIDLookups[0].func(t.getData()),i=!this.groups["0_"+o];return i&&this.createGroup(o,0,e),this.groups["0_"+o].addRow(t),!i},L.prototype.updateGroupRows=function(t){var e=this,o=[];if(e.groupList.forEach(function(t){o=o.concat(t.getHeadersAndRows())}),t){var i=e.table.rowManager.setDisplayRows(o,this.getDisplayIndex());!0!==i&&this.setDisplayIndex(i),e.table.rowManager.refreshActiveData("group",!0,!0)}return o},L.prototype.scrollHeaders=function(t){this.groupList.forEach(function(e){e.arrowElement.style.marginLeft=t+"px"})},L.prototype.removeGroup=function(t){var e,o=t.level+"_"+t.key;this.groups[o]&&(delete this.groups[o],(e=this.groupList.indexOf(t))>-1&&this.groupList.splice(e,1))},c.prototype.registerModule("groupRows",L);var T=function(t){this.table=t,this.history=[],this.index=-1};T.prototype.clear=function(){this.history=[],this.index=-1},T.prototype.action=function(t,e,o){this.history=this.history.slice(0,this.index+1),this.history.push({type:t,component:e,data:o}),this.index++},T.prototype.getHistoryUndoSize=function(){return this.index+1},T.prototype.getHistoryRedoSize=function(){return this.history.length-(this.index+1)},T.prototype.undo=function(){if(this.index>-1){var t=this.history[this.index];return this.undoers[t.type].call(this,t),this.index--,this.table.options.historyUndo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Undo Error - No more history to undo"),!1},T.prototype.redo=function(){if(this.history.length-1>this.index){this.index++;var t=this.history[this.index];return this.redoers[t.type].call(this,t),this.table.options.historyRedo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Redo Error - No more history to redo"),!1},T.prototype.undoers={cellEdit:function(t){t.component.setValueProcessData(t.data.oldValue)},rowAdd:function(t){t.component.deleteActual()},rowDelete:function(t){var e=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this._rebindRow(t.component,e)},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.pos],!1),this.table.rowManager.redraw()}},T.prototype.redoers={cellEdit:function(t){t.component.setValueProcessData(t.data.newValue)},rowAdd:function(t){var e=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this._rebindRow(t.component,e)},rowDelete:function(t){t.component.deleteActual()},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.pos],!1),this.table.rowManager.redraw()}},T.prototype._rebindRow=function(t,e){this.history.forEach(function(o){if(o.component instanceof r)o.component===t&&(o.component=e);else if(o.component instanceof l&&o.component.row===t){var i=o.component.column.getField();i&&(o.component=e.getCell(i))}})},c.prototype.registerModule("history",T);var k=function(t){this.table=t,this.fieldIndex=[],this.hasIndex=!1};k.prototype.parseTable=function(){var t=this,e=t.table.element,o=t.table.options,i=(o.columns,e.getElementsByTagName("th")),n=e.getElementsByTagName("tbody")[0],s=[];t.hasIndex=!1,t.table.options.htmlImporting.call(this.table),n=n?n.getElementsByTagName("tr"):[],t._extractOptions(e,o),i.length?t._extractHeaders(i,n):t._generateBlankHeaders(i,n);for(var r=0;r-1&&t.pressedKeys.splice(i,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)},z.prototype.clearBindings=function(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)},z.prototype.checkBinding=function(t,e){var o=this,i=!0;return t.ctrlKey==e.ctrl&&t.shiftKey==e.shift&&(e.keys.forEach(function(t){-1==o.pressedKeys.indexOf(t)&&(i=!1)}),i&&e.action.call(o,t),!0)},z.prototype.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:"ctrl + 90",redo:"ctrl + 89",copyToClipboard:"ctrl + 67"},z.prototype.actions={keyBlock:function(t){t.stopPropagation(),t.preventDefault()},scrollPageUp:function(t){var e=this.table.rowManager,o=e.scrollTop-e.height;e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(o>=0?e.element.scrollTop=o:e.scrollToRow(e.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(t){var e=this.table.rowManager,o=e.scrollTop+e.height,i=e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(o<=i?e.element.scrollTop=o:e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1]),this.table.element.focus()},navPrev:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().prev())},navNext:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().next())},navLeft:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().left())},navRight:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().right())},navUp:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().up())},navDown:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().down())},undo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.undo()))},redo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(t){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(this.table.options.selectable&&"highlight"!=this.table.options.selectable?"selected":"active",null,null,null,!0)}},c.prototype.registerModule("keybindings",z);var S=function(t){this.table=t,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};S.prototype.createPlaceholderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.classList.add("tabulator-col-placeholder"),t},S.prototype.initializeColumn=function(t){var e,o=this,i={};t.modules.frozen||(e=t.getElement(),i.mousemove=function(i){t.parent===o.moving.parent&&(i.pageX-c.prototype.helpers.elOffset(e).left+o.table.columnManager.element.scrollLeft>t.getWidth()/2?o.toCol===t&&o.toColAfter||(e.parentNode.insertBefore(o.placeholderElement,e.nextSibling),o.moveColumn(t,!0)):(o.toCol!==t||o.toColAfter)&&(e.parentNode.insertBefore(o.placeholderElement,e),o.moveColumn(t,!1)))}.bind(o),e.addEventListener("mousedown",function(e){1===e.which&&(o.checkTimeout=setTimeout(function(){o.startMove(e,t)},o.checkPeriod))}),e.addEventListener("mouseup",function(t){1===t.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)})),t.modules.moveColumn=i},S.prototype.startMove=function(t,e){var o=e.getElement();this.moving=e,this.startX=t.pageX-c.prototype.helpers.elOffset(o).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=e.getWidth()+"px",this.placeholderElement.style.height=e.getHeight()+"px",o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom="0",this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(t)},S.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(t){t.modules.moveColumn.mousemove&&t.getElement().addEventListener("mousemove",t.modules.moveColumn.mousemove)})},S.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(t){t.modules.moveColumn.mousemove&&t.getElement().removeEventListener("mousemove",t.modules.moveColumn.mousemove)})},S.prototype.moveColumn=function(t,e){var o=this.moving.getCells();this.toCol=t,this.toColAfter=e,e?t.getCells().forEach(function(t,e){var i=t.getElement();i.parentNode.insertBefore(o[e].getElement(),i.nextSibling)}):t.getCells().forEach(function(t,e){var i=t.getElement();i.parentNode.insertBefore(o[e].getElement(),i)})},S.prototype.endMove=function(t){1===t.which&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumn(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove))},S.prototype.moveHover=function(t){var e,o=this,i=o.table.columnManager.getElement(),n=i.scrollLeft,s=t.pageX-c.prototype.helpers.elOffset(i).left+n;o.hoverElement.style.left=s-o.startX+"px",s-nt.getHeight()/2){if(o.toRow!==t||!o.toRowAfter){var i=t.getElement();i.parentNode.insertBefore(o.placeholderElement,i.nextSibling),o.moveRow(t,!0)}}else if(o.toRow!==t||o.toRowAfter){var i=t.getElement();i.parentNode.insertBefore(o.placeholderElement,i),o.moveRow(t,!1)}}.bind(o),this.hasHandle||(e=t.getElement(),e.addEventListener("mousedown",function(e){1===e.which&&(o.checkTimeout=setTimeout(function(){o.startMove(e,t)},o.checkPeriod))}),e.addEventListener("mouseup",function(t){1===t.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)})),t.modules.moveRow=i},_.prototype.initializeCell=function(t){var e=this,o=t.getElement();o.addEventListener("mousedown",function(o){1===o.which&&(e.checkTimeout=setTimeout(function(){e.startMove(o,t.row)},e.checkPeriod))}),o.addEventListener("mouseup",function(t){1===t.which&&e.checkTimeout&&clearTimeout(e.checkTimeout)})},_.prototype._bindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(t){"row"===t.type&&t.modules.moveRow.mousemove&&t.getElement().addEventListener("mousemove",t.modules.moveRow.mousemove)})},_.prototype._unbindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(t){"row"===t.type&&t.modules.moveRow.mousemove&&t.getElement().removeEventListener("mousemove",t.modules.moveRow.mousemove)})},_.prototype.startMove=function(t,e){var o=e.getElement();this.setStartPosition(t,e),this.moving=e,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=e.getWidth()+"px",this.placeholderElement.style.height=e.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(e)):(o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o)),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(t)},_.prototype.setStartPosition=function(t,e){var o,i;o=e.getElement(),this.connection?(i=o.getBoundingClientRect(),this.startX=i.left-t.pageX+window.scrollX,this.startY=i.top-t.pageY+window.scrollY):this.startY=t.pageY-o.getBoundingClientRect().top},_.prototype.endMove=function(t){t&&1!==t.which||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow&&this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))},_.prototype.moveRow=function(t,e){this.toRow=t,this.toRowAfter=e},_.prototype.moveHover=function(t){this.connection?this.moveHoverConnections.call(this,t):this.moveHoverTable.call(this,t)},_.prototype.moveHoverTable=function(t){var e=this.table.rowManager.getElement(),o=e.scrollTop,i=t.pageY-e.getBoundingClientRect().top+o;this.hoverElement.style.top=i-this.startY+"px"},_.prototype.moveHoverConnections=function(t){this.hoverElement.style.left=this.startX+t.pageX+"px",this.hoverElement.style.top=this.startY+t.pageY+"px"},_.prototype.connectToTables=function(t){var e=this.table.modules.comms.getConnections(this.connection);this.table.options.movableRowsSendingStart.call(this.table,e),this.table.modules.comms.send(this.connection,"moveRow","connect",{row:t})},_.prototype.disconnectFromTables=function(){var t=this.table.modules.comms.getConnections(this.connection);this.table.options.movableRowsSendingStop.call(this.table,t),this.table.modules.comms.send(this.connection,"moveRow","disconnect")},_.prototype.connect=function(t,e){var o=this;return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=t,this.connectedRow=e,this.table.element.classList.add("tabulator-movingrow-receiving"),o.table.rowManager.getDisplayRows().forEach(function(t){"row"===t.type&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().addEventListener("mouseup",t.modules.moveRow.mouseup)}),o.tableRowDropEvent=o.tableRowDrop.bind(o),o.table.element.addEventListener("mouseup",o.tableRowDropEvent),this.table.options.movableRowsReceivingStart.call(this.table,e,t),!0)},_.prototype.disconnect=function(t){var e=this;t===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),e.table.rowManager.getDisplayRows().forEach(function(t){"row"===t.type&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().removeEventListener("mouseup",t.modules.moveRow.mouseup)}),e.table.element.removeEventListener("mouseup",e.tableRowDropEvent),this.table.options.movableRowsReceivingStop.call(this.table,t)):console.warn("Move Row Error - trying to disconnect from non connected table")},_.prototype.dropComplete=function(t,e,o){var i=!1;if(o){switch(_typeof(this.table.options.movableRowsSender)){case"string":i=this.senders[this.table.options.movableRowsSender];break;case"function":i=this.table.options.movableRowsSender}i?i.call(this,this.moving.getComponent(),e?e.getComponent():void 0,t):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.table.options.movableRowsSent.call(this.table,this.moving.getComponent(),e?e.getComponent():void 0,t)}else this.table.options.movableRowsSentFailed.call(this.table,this.moving.getComponent(),e?e.getComponent():void 0,t);this.endMove()},_.prototype.tableRowDrop=function(t,e){var o=!1,i=!1;switch(t.stopImmediatePropagation(),_typeof(this.table.options.movableRowsReceiver)){case"string":o=this.receivers[this.table.options.movableRowsReceiver];break;case"function":o=this.table.options.movableRowsReceiver}o?i=o.call(this,this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),i?this.table.options.movableRowsReceived.call(this.table,this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable):this.table.options.movableRowsReceivedFailed.call(this.table,this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable),this.table.modules.comms.send(this.connectedTable,"moveRow","dropcomplete",{row:e,success:i})},_.prototype.receivers={insert:function(t,e,o){return this.table.addRow(t.getData(),void 0,e),!0},add:function(t,e,o){return this.table.addRow(t.getData()),!0},update:function(t,e,o){return!!e&&(e.update(t.getData()),!0)},replace:function(t,e,o){return!!e&&(this.table.addRow(t.getData(),void 0,e),e.delete(),!0)}},_.prototype.senders={delete:function(t,e,o){t.delete()}},_.prototype.commsReceived=function(t,e,o){switch(e){case"connect":return this.connect(t,o.row);case"disconnect":return this.disconnect(t);case"dropcomplete":return this.dropComplete(t,o.row,o.success)}},c.prototype.registerModule("moveRow",_);var F=function(t){this.table=t,this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0};F.prototype.initializeColumn=function(t){var e=this,o=!1,i={};this.allowedTypes.forEach(function(n){var s,r="mutator"+(n.charAt(0).toUpperCase()+n.slice(1));t.definition[r]&&(s=e.lookupMutator(t.definition[r]))&&(o=!0,i[r]={mutator:s,params:t.definition[r+"Params"]||{}})}),o&&(t.modules.mutate=i)},F.prototype.lookupMutator=function(t){var e=!1;switch(void 0===t?"undefined":_typeof(t)){case"string":this.mutators[t]?e=this.mutators[t]:console.warn("Mutator Error - No such mutator found, ignoring: ",t);break;case"function":e=t}return e},F.prototype.transformRow=function(t,e,o){var i,n=this,s="mutator"+(e.charAt(0).toUpperCase()+e.slice(1));return this.enabled&&n.table.columnManager.traverse(function(n){var r,a,l;n.modules.mutate&&(r=n.modules.mutate[s]||n.modules.mutate.mutator||!1)&&(i=n.getFieldValue(t),(!o||o&&void 0!==i)&&(l=n.getComponent(),a="function"==typeof r.params?r.params(i,t,e,l):r.params,n.setFieldValue(t,r.mutator(i,t,e,a,l))))}),t},F.prototype.transformCell=function(t,e){var o=t.column.modules.mutate.mutatorEdit||t.column.modules.mutate.mutator||!1;return o?o.mutator(e,t.row.getData(),"edit",o.params,t.getComponent()):e},F.prototype.enable=function(){this.enabled=!0},F.prototype.disable=function(){this.enabled=!1},F.prototype.mutators={},c.prototype.registerModule("mutator",F);var H=function(t){this.table=t,this.mode="local",this.progressiveLoad=!1,this.size=0,this.page=1,this.count=5,this.max=1,this.displayIndex=0,this.createElements()};H.prototype.createElements=function(){var t;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),t=document.createElement("button"),t.classList.add("tabulator-page"),t.setAttribute("type","button"),t.setAttribute("role","button"),t.setAttribute("aria-label",""),t.setAttribute("title",""),this.firstBut=t.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=t.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=t.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=t.cloneNode(!0),this.lastBut.setAttribute("data-page","last")},H.prototype.initialize=function(t){var e=this;for(var o in e.table.options.paginationDataSent)e.paginationDataSentNames[o]=e.table.options.paginationDataSent[o];for(var i in e.table.options.paginationDataReceived)e.paginationDataReceivedNames[i]=e.table.options.paginationDataReceived[i];e.table.modules.localize.bind("pagination|first",function(t){e.firstBut.innerHTML=t}),e.table.modules.localize.bind("pagination|first_title",function(t){e.firstBut.setAttribute("aria-label",t),e.firstBut.setAttribute("title",t) -}),e.table.modules.localize.bind("pagination|prev",function(t){e.prevBut.innerHTML=t}),e.table.modules.localize.bind("pagination|prev_title",function(t){e.prevBut.setAttribute("aria-label",t),e.prevBut.setAttribute("title",t)}),e.table.modules.localize.bind("pagination|next",function(t){e.nextBut.innerHTML=t}),e.table.modules.localize.bind("pagination|next_title",function(t){e.nextBut.setAttribute("aria-label",t),e.nextBut.setAttribute("title",t)}),e.table.modules.localize.bind("pagination|last",function(t){e.lastBut.innerHTML=t}),e.table.modules.localize.bind("pagination|last_title",function(t){e.lastBut.setAttribute("aria-label",t),e.lastBut.setAttribute("title",t)}),e.firstBut.addEventListener("click",function(){e.setPage(1)}),e.prevBut.addEventListener("click",function(){e.previousPage()}),e.nextBut.addEventListener("click",function(){e.nextPage().then(function(){}).catch(function(){})}),e.lastBut.addEventListener("click",function(){e.setPage(e.max)}),e.table.options.paginationElement&&(e.element=e.table.options.paginationElement),e.element.appendChild(e.firstBut),e.element.appendChild(e.prevBut),e.element.appendChild(e.pagesElement),e.element.appendChild(e.nextBut),e.element.appendChild(e.lastBut),e.table.options.paginationElement||t||e.table.footerManager.append(e.element,e),e.mode=e.table.options.pagination,e.size=e.table.options.paginationSize||Math.floor(e.table.rowManager.getElement().clientHeight/24),e.count=e.table.options.paginationButtonCount},H.prototype.initializeProgressive=function(t){this.initialize(!0),this.mode="progressive_"+t,this.progressiveLoad=!0},H.prototype.setDisplayIndex=function(t){this.displayIndex=t},H.prototype.getDisplayIndex=function(){return this.displayIndex},H.prototype.setMaxRows=function(t){this.max=t?Math.ceil(t/this.size):1,this.page>this.max&&(this.page=this.max)},H.prototype.reset=function(t){return("local"==this.mode||t)&&(this.page=1),!0},H.prototype.setMaxPage=function(t){this.max=t||1,this.page>this.max&&(this.page=this.max,this.trigger())},H.prototype.setPage=function(t){var e=this;return new Promise(function(o,i){t>0&&t<=e.max?(e.page=t,e.trigger().then(function(){o()}).catch(function(){i()})):(console.warn("Pagination Error - Requested page is out of range of 1 - "+e.max+":",t),i())})},H.prototype.setPageSize=function(t){t>0&&(this.size=t)},H.prototype._setPageButtons=function(){for(var t=this,e=Math.floor((this.count-1)/2),o=Math.ceil((this.count-1)/2),i=this.max-this.page+e+10&&s<=t.max&&t.pagesElement.appendChild(t._generatePageButton(s));this.footerRedraw()},H.prototype._generatePageButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("tabulator-page"),t==e.page&&o.classList.add("active"),o.setAttribute("type","button"),o.setAttribute("role","button"),o.setAttribute("aria-label","Show Page "+t),o.setAttribute("title","Show Page "+t),o.setAttribute("data-page",t),o.textContent=t,o.addEventListener("click",function(o){e.setPage(t)}),o},H.prototype.previousPage=function(){var t=this;return new Promise(function(e,o){t.page>1?(t.page--,t.trigger().then(function(){e()}).catch(function(){o()})):(console.warn("Pagination Error - Previous page would be less than page 1:",0),o())})},H.prototype.nextPage=function(){var t=this;return new Promise(function(e,o){t.page-1&&(i=i.substr(n),s=i.indexOf(";"),s>-1&&(i=i.substr(0,s)),e=i.replace(o+"=",""));break;default:console.warn("Persistance Load Error - invalid mode selected",this.mode)}return!!e&&JSON.parse(e)},P.prototype.mergeDefinition=function(t,e){var o=this,i=[];return e=e||[],e.forEach(function(e,n){var s=o._findColumn(t,e);s&&(s.width=e.width,s.visible=e.visible,s.columns&&(s.columns=o.mergeDefinition(s.columns,e.columns)),i.push(s))}),t.forEach(function(t,n){o._findColumn(e,t)||(i.length>n?i.splice(n,0,t):i.push(t))}),i},P.prototype._findColumn=function(t,e){var o=e.columns?"group":e.field?"field":"object";return t.find(function(t){switch(o){case"group":return t.title===e.title&&t.columns.length===e.columns.length;case"field":return t.field===e.field;case"object":return t===e}})},P.prototype.save=function(t){var e={};switch(t){case"columns":e=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":e=this.table.modules.filter.getFilters();break;case"sort":e=this.validateSorters(this.table.modules.sort.getSort())}var o=this.id+("columns"===t?"":"-"+t);this.saveData(o,e)},P.prototype.validateSorters=function(t){return t.forEach(function(t){t.column=t.field,delete t.field}),t},P.prototype.saveData=function(t,e){switch(e=JSON.stringify(e),this.mode){case"local":localStorage.setItem(t,e);break;case"cookie":var o=new Date;o.setDate(o.getDate()+1e4),document.cookie=t+"="+e+"; expires="+o.toUTCString();break;default:console.warn("Persistance Save Error - invalid mode selected",this.mode)}},P.prototype.parseColumns=function(t){var e=this,o=[];return t.forEach(function(t){var i={};t.isGroup?(i.title=t.getDefinition().title,i.columns=e.parseColumns(t.getColumns())):(i.title=t.getDefinition().title,i.field=t.getField(),i.width=t.getWidth(),i.visible=t.visible),o.push(i)}),o},c.prototype.registerModule("persistence",P);var A=function(t){this.table=t,this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null};A.prototype.initializeColumn=function(t,e,o){var i=this,n=!1,s=this.table.options.resizableColumns;if("header"===t&&(n="textarea"==e.definition.formatter||e.definition.variableHeight,e.modules.resize={variableHeight:n}),!0===s||s==t){var r=document.createElement("div");r.className="tabulator-col-resize-handle";var a=document.createElement("div");a.className="tabulator-col-resize-handle prev",r.addEventListener("click",function(t){t.stopPropagation()}),r.addEventListener("mousedown",function(t){var o=e.getLastColumn();o&&i._checkResizability(o)&&(i.startColumn=e,i._mouseDown(t,o))}),r.addEventListener("dblclick",function(t){i._checkResizability(e)&&e.reinitializeWidth(!0)}),a.addEventListener("click",function(t){t.stopPropagation()}),a.addEventListener("mousedown",function(t){var o,n,s;(o=e.getFirstColumn())&&(n=i.table.columnManager.findColumnIndex(o),(s=n>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&(i.startColumn=e,i._mouseDown(t,s)))}),a.addEventListener("dblclick",function(t){var o,n,s;(o=e.getFirstColumn())&&(n=i.table.columnManager.findColumnIndex(o),(s=n>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&s.reinitializeWidth(!0))}),o.appendChild(r),o.appendChild(a)}},A.prototype._checkResizability=function(t){return void 0!==t.definition.resizable?t.definition.resizable:this.table.options.resizableColumns},A.prototype._mouseDown=function(t,e){function o(t){e.setWidth(n.startWidth+(t.screenX-n.startX)),!n.table.browserSlow&&e.modules.resize&&e.modules.resize.variableHeight&&e.checkCellHeights()}function i(t){n.startColumn.modules.edit&&(n.startColumn.modules.edit.blocked=!1),n.table.browserSlow&&e.modules.resize&&e.modules.resize.variableHeight&&e.checkCellHeights(),document.body.removeEventListener("mouseup",i),document.body.removeEventListener("mousemove",o),n.table.element.classList.remove("tabulator-block-select"),n.table.options.persistentLayout&&n.table.modExists("persistence",!0)&&n.table.modules.persistence.save("columns"),n.table.options.columnResized.call(n.table,n.startColumn.getComponent())}var n=this;n.table.element.classList.add("tabulator-block-select"),t.stopPropagation(),n.startColumn.modules.edit&&(n.startColumn.modules.edit.blocked=!0),n.startX=t.screenX,n.startWidth=e.getWidth(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",i)},c.prototype.registerModule("resizeColumns",A);var B=function(t){this.table=t,this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null};B.prototype.initializeRow=function(t){var e=this,o=t.getElement(),i=document.createElement("div");i.className="tabulator-row-resize-handle";var n=document.createElement("div");n.className="tabulator-row-resize-handle prev",i.addEventListener("click",function(t){t.stopPropagation()}),i.addEventListener("mousedown",function(o){e.startRow=t,e._mouseDown(o,t)}),n.addEventListener("click",function(t){t.stopPropagation()}),n.addEventListener("mousedown",function(o){var i=e.table.rowManager.prevDisplayRow(t);i&&(e.startRow=i,e._mouseDown(o,i))}),o.appendChild(i),o.appendChild(n)},B.prototype._mouseDown=function(t,e){function o(t){e.setHeight(n.startHeight+(t.screenY-n.startY))}function i(t){document.body.removeEventListener("mouseup",o),document.body.removeEventListener("mousemove",o),n.table.element.classList.remove("tabulator-block-select"),n.table.options.rowResized.call(this.table,e.getComponent())}var n=this;n.table.element.classList.add("tabulator-block-select"),t.stopPropagation(),n.startY=t.screenY,n.startHeight=e.getHeight(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",i)},c.prototype.registerModule("resizeRows",B);var N=function(t){this.table=t,this.binding=!1,this.observer=!1};N.prototype.initialize=function(t){var e=this.table;"undefined"!=typeof ResizeObserver&&"virtual"===e.rowManager.getRenderMode()?(this.observer=new ResizeObserver(function(t){e.redraw()}),this.observer.observe(e.element)):(this.binding=function(){e.redraw()},window.addEventListener("resize",this.binding))},N.prototype.clearBindings=function(t){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element)},c.prototype.registerModule("resizeTable",N);var I=function(t){this.table=t,this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0};I.prototype.initialize=function(){var t=this,e=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach(function(o,i){o.modules.responsive&&o.modules.responsive.order&&o.modules.responsive.visible&&(o.modules.responsive.index=i,e.push(o),o.visible||"collapse"!==t.mode||t.hiddenColumns.push(o))}),e=e.reverse(),e=e.sort(function(t,e){return e.modules.responsive.order-t.modules.responsive.order||e.modules.responsive.index-t.modules.responsive.index}),this.columns=e,"collapse"===this.mode&&this.generateCollapsedContent()},I.prototype.initializeColumn=function(t){var e=t.getDefinition();t.modules.responsive={order:void 0===e.responsive?1:e.responsive,visible:!1!==e.visible}},I.prototype.layoutRow=function(t){var e=t.getElement(),o=document.createElement("div");o.classList.add("tabulator-responsive-collapse"),e.classList.contains("tabulator-calcs")||(t.modules.responsiveLayout={element:o},this.collapseStartOpen||(o.style.display="none"),e.appendChild(o),this.generateCollapsedRowContent(t))},I.prototype.updateColumnVisibility=function(t,e){t.modules.responsive&&(t.modules.responsive.visible=e,this.initialize())},I.prototype.hideColumn=function(t){t.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(t),this.generateCollapsedContent())},I.prototype.showColumn=function(t){var e;t.show(!1,!0),t.setWidth(t.getWidth()),"collapse"===this.mode&&(e=this.hiddenColumns.indexOf(t),e>-1&&this.hiddenColumns.splice(e,1),this.generateCollapsedContent())},I.prototype.update=function(){for(var t=this,e=!0;e;){var o="fitColumns"==t.table.modules.layout.getMode()?t.table.columnManager.getFlexBaseWidth():t.table.columnManager.getWidth(),i=t.table.columnManager.element.clientWidth-o;if(i<0){var n=t.columns[t.index];n?(t.hideColumn(n),t.index++):e=!1}else{var s=t.columns[t.index-1];s&&i>0&&i>=s.getWidth()?(t.showColumn(s),t.index--):e=!1}t.table.rowManager.activeRowsCount||t.table.rowManager.renderEmptyScroll()}},I.prototype.generateCollapsedContent=function(){var t=this;this.table.rowManager.getDisplayRows().forEach(function(e){t.generateCollapsedRowContent(e)})},I.prototype.generateCollapsedRowContent=function(t){var e,o;if(t.modules.responsiveLayout){for(e=t.modules.responsiveLayout.element;e.firstChild;)e.removeChild(e.firstChild);o=this.collapseFormatter(this.generateCollapsedRowData(t)),o&&e.appendChild(o)}},I.prototype.generateCollapsedRowData=function(t){var e,o=this,i=t.getData(),n={};return this.hiddenColumns.forEach(function(s){var r=s.getFieldValue(i);s.definition.title&&s.field&&(s.modules.format&&o.table.options.responsiveLayoutCollapseUseFormatters?(e={value:!1,data:{},getValue:function(){return r},getData:function(){return i},getElement:function(){return document.createElement("div")},getRow:function(){return t.getComponent()},getColumn:function(){return s.getComponent()}},n[s.definition.title]=s.modules.format.formatter.call(o.table.modules.format,e,s.modules.format.params)):n[s.definition.title]=r)}),n},I.prototype.formatCollapsedData=function(t){var e=document.createElement("table"),o="";for(var i in t)o+=""+i+""+t[i]+"";return e.innerHTML=o,Object.keys(t).length?e:""},c.prototype.registerModule("responsiveLayout",I);var G=function(t){this.table=t,this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[]};G.prototype.clearSelectionData=function(t){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],t||this._rowSelectionChanged()},G.prototype.initializeRow=function(t){var e=this,o=t.getElement(),i=function t(){setTimeout(function(){e.selecting=!1},50),document.body.removeEventListener("mouseup",t)};t.modules.select={selected:!1},e.table.options.selectableCheck.call(this.table,t.getComponent())?(o.classList.add("tabulator-selectable"),o.classList.remove("tabulator-unselectable"),e.table.options.selectable&&"highlight"!=e.table.options.selectable&&(e.table.options.selectableRangeMode&&"click"===e.table.options.selectableRangeMode?o.addEventListener("click",function(o){if(o.shiftKey){e.lastClickedRow=e.lastClickedRow||t;var i=e.table.rowManager.getDisplayRowIndex(e.lastClickedRow),n=e.table.rowManager.getDisplayRowIndex(t),s=i<=n?i:n,r=i>=n?i:n,a=e.table.rowManager.getDisplayRows().slice(0),l=a.splice(s,r-s+1);o.ctrlKey?(l.forEach(function(t){t!==e.lastClickedRow&&e.toggleRow(t)}),e.lastClickedRow=t):(e.deselectRows(),e.selectRows(l))}else o.ctrlKey?(e.toggleRow(t),e.lastClickedRow=t):(e.deselectRows(),e.selectRows(t),e.lastClickedRow=t)}):(o.addEventListener("click",function(o){e.selecting||e.toggleRow(t)}),o.addEventListener("mousedown",function(o){if(o.shiftKey)return e.selecting=!0,e.selectPrev=[],document.body.addEventListener("mouseup",i),document.body.addEventListener("keyup",i),e.toggleRow(t),!1}),o.addEventListener("mouseenter",function(o){e.selecting&&(e.toggleRow(t),e.selectPrev[1]==t&&e.toggleRow(e.selectPrev[0]))}),o.addEventListener("mouseout",function(o){e.selecting&&e.selectPrev.unshift(t)})))):(o.classList.add("tabulator-unselectable"),o.classList.remove("tabulator-selectable"))},G.prototype.toggleRow=function(t){this.table.options.selectableCheck.call(this.table,t.getComponent())&&(t.modules.select.selected?this._deselectRow(t):this._selectRow(t))},G.prototype.selectRows=function(t){var e=this;switch(void 0===t?"undefined":_typeof(t)){case"undefined":e.table.rowManager.rows.forEach(function(t){e._selectRow(t,!1,!0)}),e._rowSelectionChanged();break;case"boolean":!0===t&&(e.table.rowManager.activeRows.forEach(function(t){e._selectRow(t,!1,!0)}),e._rowSelectionChanged());break;default:Array.isArray(t)?(t.forEach(function(t){e._selectRow(t)}),e._rowSelectionChanged()):e._selectRow(t)}},G.prototype._selectRow=function(t,e,o){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!o&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var i=this.table.rowManager.findRow(t);i?-1==this.selectedRows.indexOf(i)&&(i.modules.select.selected=!0,i.getElement().classList.add("tabulator-selected"),this.selectedRows.push(i),e||(this.table.options.rowSelected.call(this.table,i.getComponent()),this._rowSelectionChanged())):e||console.warn("Selection Error - No such row found, ignoring selection:"+t)},G.prototype.isRowSelected=function(t){return-1!==this.selectedRows.indexOf(t)},G.prototype.deselectRows=function(t){var e,o=this;if(void 0===t){e=o.selectedRows.length;for(var i=0;i-1&&(n.modules.select.selected=!1,n.getElement().classList.remove("tabulator-selected"),i.selectedRows.splice(o,1),e||(i.table.options.rowDeselected.call(this.table,n.getComponent()),i._rowSelectionChanged())):e||console.warn("Deselection Error - No such row found, ignoring selection:"+t)},G.prototype.getSelectedData=function(){var t=[];return this.selectedRows.forEach(function(e){t.push(e.getData())}),t},G.prototype.getSelectedRows=function(){var t=[];return this.selectedRows.forEach(function(e){t.push(e.getComponent())}),t},G.prototype._rowSelectionChanged=function(){this.table.options.rowSelectionChanged.call(this.table,this.getSelectedData(),this.getSelectedRows())},c.prototype.registerModule("selectRow",G);var j=function(t){this.table=t,this.sortList=[],this.changed=!1};j.prototype.initializeColumn=function(t,e){var o,i,n=this,s=!1;switch(_typeof(t.definition.sorter)){case"string":n.sorters[t.definition.sorter]?s=n.sorters[t.definition.sorter]:console.warn("Sort Error - No such sorter found: ",t.definition.sorter);break;case"function":s=t.definition.sorter}t.modules.sort={sorter:s,dir:"none",params:t.definition.sorterParams||{},startingDir:t.definition.headerSortStartingDir||"asc"},!1!==t.definition.headerSort&&(o=t.getElement(),o.classList.add("tabulator-sortable"),i=document.createElement("div"),i.classList.add("tabulator-arrow"),e.appendChild(i),o.addEventListener("click",function(e){var o="",i=[],s=!1;t.modules.sort&&(o="asc"==t.modules.sort.dir?"desc":"desc"==t.modules.sort.dir?"asc":t.modules.sort.startingDir,n.table.options.columnHeaderSortMulti&&(e.shiftKey||e.ctrlKey)?(i=n.getSort(),s=i.findIndex(function(e){return e.field===t.getField()}),s>-1?(i[s].dir="asc"==i[s].dir?"desc":"asc",s!=i.length-1&&i.push(i.splice(s,1)[0])):i.push({column:t,dir:o}),n.setSort(i)):n.setSort(t,o),n.table.rowManager.sorterRefresh())}))},j.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},j.prototype.getSort=function(){var t=this,e=[];return t.sortList.forEach(function(t){t.column&&e.push({column:t.column.getComponent(),field:t.column.getField(),dir:t.dir})}),e},j.prototype.setSort=function(t,e){var o=this,i=[];Array.isArray(t)||(t=[{column:t,dir:e}]),t.forEach(function(t){var e;e=o.table.columnManager.findColumn(t.column),e?(t.column=e,i.push(t),o.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",t.column)}),o.sortList=i,this.table.options.persistentSort&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("sort")},j.prototype.clear=function(){this.setSort([])},j.prototype.findSorter=function(t){var e,o=this.table.rowManager.activeRows[0],i="string";if(o&&(o=o.getData(),t.getField()))switch(e=t.getFieldValue(o),void 0===e?"undefined":_typeof(e)){case"undefined":i="string";break;case"boolean":i="boolean";break;default:isNaN(e)||""===e?e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(i="alphanum"):i="number"}return this.sorters[i]},j.prototype.sort=function(){var t,e=this;t=this.table.options.sortOrderReverse?e.sortList.slice().reverse():e.sortList,e.table.options.dataSorting&&e.table.options.dataSorting.call(e.table,e.getSort()),e.clearColumnHeaders(),e.table.options.ajaxSorting?t.forEach(function(t,o){e.setColumnHeader(t.column,t.dir)}):t.forEach(function(o,i){o.column&&o.column.modules.sort&&(o.column.modules.sort.sorter||(o.column.modules.sort.sorter=e.findSorter(o.column)),e._sortItem(o.column,o.dir,t,i)),e.setColumnHeader(o.column,o.dir)}),e.table.options.dataSorted&&e.table.options.dataSorted.call(e.table,e.getSort(),e.table.rowManager.getComponents(!0))},j.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach(function(t){t.modules.sort&&(t.modules.sort.dir="none",t.getElement().setAttribute("aria-sort","none"))})},j.prototype.setColumnHeader=function(t,e){t.modules.sort.dir=e,t.getElement().setAttribute("aria-sort",e)},j.prototype._sortItem=function(t,e,o,i){var n=this,s=n.table.rowManager.activeRows,r="function"==typeof t.modules.sort.params?t.modules.sort.params(t.getComponent(),e):t.modules.sort.params;s.sort(function(s,a){var l=n._sortRow(s,a,t,e,r);if(0===l&&i)for(var u=i-1;u>=0&&0===(l=n._sortRow(s,a,o[u].column,o[u].dir,r));u--);return l})},j.prototype._sortRow=function(t,e,o,i,n){var s,r,a="asc"==i?t:e,l="asc"==i?e:t;return t=o.getFieldValue(a.getData()),e=o.getFieldValue(l.getData()),t=void 0!==t?t:"",e=void 0!==e?e:"",s=a.getComponent(),r=l.getComponent(),o.modules.sort.sorter.call(this,t,e,s,r,o.getComponent(),i,n)},j.prototype.sorters={number:function(t,e,o,i,n,s,r){var a=r.alignEmptyValues,l=0;if(t=parseFloat(String(t).replace(",","")),e=parseFloat(String(e).replace(",","")),isNaN(t))l=isNaN(e)?0:-1;else{if(!isNaN(e))return t-e;l=1}return("top"===a&&"desc"===s||"bottom"===a&&"asc"===s)&&(l*=-1),l},string:function(t,e,o,i,n,s,r){var a,l=r.alignEmptyValues,u=0;if(t){if(e){switch(_typeof(r.locale)){case"boolean":r.locale&&(a=this.table.modules.localize.getLocale());break;case"string":a=r.locale}return String(t).toLowerCase().localeCompare(String(e).toLowerCase(),a)}u=1}else u=e?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(u*=-1),u},date:function(t,e,o,i,n,s,r){return r.format||(r.format="DD/MM/YYYY"),this.sorters.datetime.call(this,t,e,o,i,n,s,r)},time:function(t,e,o,i,n,s,r){return r.format||(r.format="hh:mm"),this.sorters.datetime.call(this,t,e,o,i,n,s,r)},datetime:function(t,e,o,i,n,s,r){var a=r.format||"DD/MM/YYYY hh:mm:ss",l=r.alignEmptyValues,u=0;if("undefined"!=typeof moment){if(t=moment(t,a),e=moment(e,a),t.isValid()){if(e.isValid())return t-e;u=1}else u=e.isValid()?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(u*=-1),u}console.error("Sort Error - 'datetime' sorter is dependant on moment.js")},boolean:function(t,e,o,i,n,s,r){return(!0===t||"true"===t||"True"===t||1===t?1:0)-(!0===e||"true"===e||"True"===e||1===e?1:0)},array:function(t,e,o,i,n,s,r){function a(t){switch(c){case"length":return t.length;case"sum":return t.reduce(function(t,e){return t+e});case"max":return Math.max.apply(null,t);case"min":return Math.min.apply(null,t);case"avg":return t.reduce(function(t,e){return t+e})/t.length}}var l=0,u=0,c=r.type||"length",d=r.alignEmptyValues,h=0;if(Array.isArray(t)){if(Array.isArray(e))return l=t?a(t):0,u=e?a(e):0,l-u;d=1}else d=Array.isArray(e)?-1:0;return("top"===d&&"desc"===s||"bottom"===d&&"asc"===s)&&(h*=-1),h},exists:function(t,e,o,i,n,s,r){return(void 0===t?0:1)-(void 0===e?0:1)},alphanum:function(t,e,o,i,n,s,r){var a,l,u,c,d,h=0,p=/(\d+)|(\D+)/g,m=/\d/,f=r.alignEmptyValues,g=0;if(t||0===t){if(e||0===e){if(isFinite(t)&&isFinite(e))return t-e;if(a=String(t).toLowerCase(),l=String(e).toLowerCase(),a===l)return 0;if(!m.test(a)||!m.test(l))return a>l?1:-1;for(a=a.match(p),l=l.match(p),d=a.length>l.length?l.length:a.length;hc?1:-1;return a.length>l.length}g=1}else g=e||0===e?-1:0;return("top"===f&&"desc"===s||"bottom"===f&&"asc"===s)&&(g*=-1),g}},c.prototype.registerModule("sort",j);var V=function(t){this.table=t};return V.prototype.initializeColumn=function(t){var e,o=this,i=[];t.definition.validator&&(Array.isArray(t.definition.validator)?t.definition.validator.forEach(function(t){(e=o._extractValidator(t))&&i.push(e)}):(e=this._extractValidator(t.definition.validator))&&i.push(e),t.modules.validate=!!i.length&&i)},V.prototype._extractValidator=function(t){var e,o,i;switch(void 0===t?"undefined":_typeof(t)){case"string":return e=t.split(":",2),o=e.shift(),i=e[0],this._buildValidator(o,i);case"function":return this._buildValidator(t);case"object":return this._buildValidator(t.type,t.parameters)}},V.prototype._buildValidator=function(t,e){var o="function"==typeof t?t:this.validators[t];return o?{type:"function"==typeof t?"function":t,func:o,params:e}:(console.warn("Validator Setup Error - No matching validator found:",t),!1)},V.prototype.validate=function(t,e,o){var i=this,n=[];return t&&t.forEach(function(t){t.func.call(i,e,o,t.params)||n.push({type:t.type,parameters:t.params})}),!n.length||n},V.prototype.validators={integer:function(t,e,o){return""===e||null===e||void 0===e||"number"==typeof(e=Number(e))&&isFinite(e)&&Math.floor(e)===e},float:function(t,e,o){return""===e||null===e||void 0===e||"number"==typeof(e=Number(e))&&isFinite(e)&&e%1!=0},numeric:function(t,e,o){return""===e||null===e||void 0===e||!isNaN(e)},string:function(t,e,o){return""===e||null===e||void 0===e||isNaN(e)},max:function(t,e,o){return""===e||null===e||void 0===e||parseFloat(e)<=o},min:function(t,e,o){return""===e||null===e||void 0===e||parseFloat(e)>=o},minLength:function(t,e,o){return""===e||null===e||void 0===e||String(e).length>=o},maxLength:function(t,e,o){return""===e||null===e||void 0===e||String(e).length<=o},in:function(t,e,o){return""===e||null===e||void 0===e||("string"==typeof o&&(o=o.split("|")),""===e||o.indexOf(e)>-1)},regex:function(t,e,o){return""===e||null===e||void 0===e||new RegExp(o).test(e)},unique:function(t,e,o){if(""===e||null===e||void 0===e)return!0;var i=!0,n=t.getData(),s=t.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(t){var o=t.getData();o!==n&&e==s.getFieldValue(o)&&(i=!1)}),i},required:function(t,e,o){return""!==e&null!==e&&void 0!==e}},c.prototype.registerModule("validate",V),c}); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator_core.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator_core.js deleted file mode 100644 index 9df66af27c..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator_core.js +++ /dev/null @@ -1,7057 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -'use strict'; - -// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -if (!Array.prototype.findIndex) { - - Object.defineProperty(Array.prototype, 'findIndex', { - - value: function value(predicate) { - - // 1. Let O be ? ToObject(this value). - - if (this == null) { - - throw new TypeError('"this" is null or not defined'); - } - - var o = Object(this); - - // 2. Let len be ? ToLength(? Get(O, "length")). - - var len = o.length >>> 0; - - // 3. If IsCallable(predicate) is false, throw a TypeError exception. - - if (typeof predicate !== 'function') { - - throw new TypeError('predicate must be a function'); - } - - // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. - - var thisArg = arguments[1]; - - // 5. Let k be 0. - - var k = 0; - - // 6. Repeat, while k < len - - while (k < len) { - - // a. Let Pk be ! ToString(k). - - // b. Let kValue be ? Get(O, Pk). - - // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). - - // d. If testResult is true, return k. - - var kValue = o[k]; - - if (predicate.call(thisArg, kValue, k, o)) { - - return k; - } - - // e. Increase k by 1. - - k++; - } - - // 7. Return -1. - - return -1; - } - - }); -} - -// https://tc39.github.io/ecma262/#sec-array.prototype.find - -if (!Array.prototype.find) { - - Object.defineProperty(Array.prototype, 'find', { - - value: function value(predicate) { - - // 1. Let O be ? ToObject(this value). - - if (this == null) { - - throw new TypeError('"this" is null or not defined'); - } - - var o = Object(this); - - // 2. Let len be ? ToLength(? Get(O, "length")). - - var len = o.length >>> 0; - - // 3. If IsCallable(predicate) is false, throw a TypeError exception. - - if (typeof predicate !== 'function') { - - throw new TypeError('predicate must be a function'); - } - - // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. - - var thisArg = arguments[1]; - - // 5. Let k be 0. - - var k = 0; - - // 6. Repeat, while k < len - - while (k < len) { - - // a. Let Pk be ! ToString(k). - - // b. Let kValue be ? Get(O, Pk). - - // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). - - // d. If testResult is true, return kValue. - - var kValue = o[k]; - - if (predicate.call(thisArg, kValue, k, o)) { - - return kValue; - } - - // e. Increase k by 1. - - k++; - } - - // 7. Return undefined. - - return undefined; - } - - }); -} - -var ColumnManager = function ColumnManager(table) { - - this.table = table; //hold parent table - - this.headersElement = this.createHeadersElement(); - - this.element = this.createHeaderElement(); //containing element - - this.rowManager = null; //hold row manager object - - this.columns = []; // column definition object - - this.columnsByIndex = []; //columns by index - - this.columnsByField = []; //columns by field - - this.scrollLeft = 0; - - this.element.insertBefore(this.headersElement, this.element.firstChild); -}; - -////////////// Setup Functions ///////////////// - - -ColumnManager.prototype.createHeadersElement = function () { - - var el = document.createElement("div"); - - el.classList.add("tabulator-headers"); - - return el; -}; - -ColumnManager.prototype.createHeaderElement = function () { - - var el = document.createElement("div"); - - el.classList.add("tabulator-header"); - - return el; -}; - -//link to row manager - -ColumnManager.prototype.setRowManager = function (manager) { - - this.rowManager = manager; -}; - -//return containing element - -ColumnManager.prototype.getElement = function () { - - return this.element; -}; - -//return header containing element - -ColumnManager.prototype.getHeadersElement = function () { - - return this.headersElement; -}; - -//scroll horizontally to match table body - -ColumnManager.prototype.scrollHorizontal = function (left) { - - var hozAdjust = 0, - scrollWidth = this.element.scrollWidth - this.table.element.clientWidth; - - this.element.scrollLeft = left; - - //adjust for vertical scrollbar moving table when present - - if (left > scrollWidth) { - - hozAdjust = left - scrollWidth; - - this.element.style.marginLeft = -hozAdjust + "px"; - } else { - - this.element.style.marginLeft = 0; - } - - //keep frozen columns fixed in position - - //this._calcFrozenColumnsPos(hozAdjust + 3); - - - this.scrollLeft = left; - - if (this.table.modExists("frozenColumns")) { - - this.table.modules.frozenColumns.layout(); - } -}; - -///////////// Column Setup Functions ///////////// - - -ColumnManager.prototype.setColumns = function (cols, row) { - - var self = this; - - while (self.headersElement.firstChild) { - self.headersElement.removeChild(self.headersElement.firstChild); - }self.columns = []; - - self.columnsByIndex = []; - - self.columnsByField = []; - - //reset frozen columns - - if (self.table.modExists("frozenColumns")) { - - self.table.modules.frozenColumns.reset(); - } - - cols.forEach(function (def, i) { - - self._addColumn(def); - }); - - self._reIndexColumns(); - - if (self.table.options.responsiveLayout && self.table.modExists("responsiveLayout", true)) { - - self.table.modules.responsiveLayout.initialize(); - } - - self.redraw(true); -}; - -ColumnManager.prototype._addColumn = function (definition, before, nextToColumn) { - - var column = new Column(definition, this), - colEl = column.getElement(), - index = nextToColumn ? this.findColumnIndex(nextToColumn) : nextToColumn; - - if (nextToColumn && index > -1) { - - var parentIndex = this.columns.indexOf(nextToColumn.getTopColumn()); - - var nextEl = nextToColumn.getElement(); - - if (before) { - - this.columns.splice(parentIndex, 0, column); - - nextEl.parentNode.insertBefore(colEl, nextEl); - } else { - - this.columns.splice(parentIndex + 1, 0, column); - - nextEl.parentNode.insertBefore(colEl, nextEl.nextSibling); - } - } else { - - if (before) { - - this.columns.unshift(column); - - this.headersElement.insertBefore(column.getElement(), this.headersElement.firstChild); - } else { - - this.columns.push(column); - - this.headersElement.appendChild(column.getElement()); - } - } - - return column; -}; - -ColumnManager.prototype.registerColumnField = function (col) { - - if (col.definition.field) { - - this.columnsByField[col.definition.field] = col; - } -}; - -ColumnManager.prototype.registerColumnPosition = function (col) { - - this.columnsByIndex.push(col); -}; - -ColumnManager.prototype._reIndexColumns = function () { - - this.columnsByIndex = []; - - this.columns.forEach(function (column) { - - column.reRegisterPosition(); - }); -}; - -//ensure column headers take up the correct amount of space in column groups - -ColumnManager.prototype._verticalAlignHeaders = function () { - - var self = this, - minHeight = 0; - - self.columns.forEach(function (column) { - - var height; - - column.clearVerticalAlign(); - - height = column.getHeight(); - - if (height > minHeight) { - - minHeight = height; - } - }); - - self.columns.forEach(function (column) { - - column.verticalAlign(self.table.options.columnVertAlign, minHeight); - }); - - self.rowManager.adjustTableSize(); -}; - -//////////////// Column Details ///////////////// - - -ColumnManager.prototype.findColumn = function (subject) { - - var self = this; - - if ((typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) == "object") { - - if (subject instanceof Column) { - - //subject is column element - - return subject; - } else if (subject instanceof ColumnComponent) { - - //subject is public column component - - return subject._getSelf() || false; - } else if (subject instanceof HTMLElement) { - - //subject is a HTML element of the column header - - var match = self.columns.find(function (column) { - - return column.element === subject; - }); - - return match || false; - } - } else { - - //subject should be treated as the field name of the column - - return this.columnsByField[subject] || false; - } - - //catch all for any other type of input - - - return false; -}; - -ColumnManager.prototype.getColumnByField = function (field) { - - return this.columnsByField[field]; -}; - -ColumnManager.prototype.getColumnByIndex = function (index) { - - return this.columnsByIndex[index]; -}; - -ColumnManager.prototype.getColumns = function () { - - return this.columns; -}; - -ColumnManager.prototype.findColumnIndex = function (column) { - - return this.columnsByIndex.findIndex(function (col) { - - return column === col; - }); -}; - -//return all columns that are not groups - -ColumnManager.prototype.getRealColumns = function () { - - return this.columnsByIndex; -}; - -//travers across columns and call action - -ColumnManager.prototype.traverse = function (callback) { - - var self = this; - - self.columnsByIndex.forEach(function (column, i) { - - callback(column, i); - }); -}; - -//get defintions of actual columns - -ColumnManager.prototype.getDefinitions = function (active) { - - var self = this, - output = []; - - self.columnsByIndex.forEach(function (column) { - - if (!active || active && column.visible) { - - output.push(column.getDefinition()); - } - }); - - return output; -}; - -//get full nested definition tree - -ColumnManager.prototype.getDefinitionTree = function () { - - var self = this, - output = []; - - self.columns.forEach(function (column) { - - output.push(column.getDefinition(true)); - }); - - return output; -}; - -ColumnManager.prototype.getComponents = function (structured) { - - var self = this, - output = [], - columns = structured ? self.columns : self.columnsByIndex; - - columns.forEach(function (column) { - - output.push(column.getComponent()); - }); - - return output; -}; - -ColumnManager.prototype.getWidth = function () { - - var width = 0; - - this.columnsByIndex.forEach(function (column) { - - if (column.visible) { - - width += column.getWidth(); - } - }); - - return width; -}; - -ColumnManager.prototype.moveColumn = function (from, to, after) { - - this._moveColumnInArray(this.columns, from, to, after); - - this._moveColumnInArray(this.columnsByIndex, from, to, after, true); - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.initialize(); - } - - if (this.table.options.columnMoved) { - - this.table.options.columnMoved.call(this.table, from.getComponent(), this.table.columnManager.getComponents()); - } - - if (this.table.options.persistentLayout && this.table.modExists("persistence", true)) { - - this.table.modules.persistence.save("columns"); - } -}; - -ColumnManager.prototype._moveColumnInArray = function (columns, from, to, after, updateRows) { - - var fromIndex = columns.indexOf(from), - toIndex; - - if (fromIndex > -1) { - - columns.splice(fromIndex, 1); - - toIndex = columns.indexOf(to); - - if (toIndex > -1) { - - if (after) { - - toIndex = toIndex + 1; - } - } else { - - toIndex = fromIndex; - } - - columns.splice(toIndex, 0, from); - - if (updateRows) { - - this.table.rowManager.rows.forEach(function (row) { - - if (row.cells.length) { - - var cell = row.cells.splice(fromIndex, 1)[0]; - - row.cells.splice(toIndex, 0, cell); - } - }); - } - } -}; - -ColumnManager.prototype.scrollToColumn = function (column, position, ifVisible) { - var _this = this; - - var left = 0, - offset = 0, - adjust = 0, - colEl = column.getElement(); - - return new Promise(function (resolve, reject) { - - if (typeof position === "undefined") { - - position = _this.table.options.scrollToColumnPosition; - } - - if (typeof ifVisible === "undefined") { - - ifVisible = _this.table.options.scrollToColumnIfVisible; - } - - if (column.visible) { - - //align to correct position - - switch (position) { - - case "middle": - - case "center": - - adjust = -_this.element.clientWidth / 2; - - break; - - case "right": - - adjust = colEl.clientWidth - _this.headersElement.clientWidth; - - break; - - } - - //check column visibility - - if (!ifVisible) { - - offset = colEl.offsetLeft; - - if (offset > 0 && offset + colEl.offsetWidth < _this.element.clientWidth) { - - return false; - } - } - - //calculate scroll position - - left = colEl.offsetLeft + _this.element.scrollLeft + adjust; - - left = Math.max(Math.min(left, _this.table.rowManager.element.scrollWidth - _this.table.rowManager.element.clientWidth), 0); - - _this.table.rowManager.scrollHorizontal(left); - - _this.scrollHorizontal(left); - - resolve(); - } else { - - console.warn("Scroll Error - Column not visible"); - - reject("Scroll Error - Column not visible"); - } - }); -}; - -//////////////// Cell Management ///////////////// - - -ColumnManager.prototype.generateCells = function (row) { - - var self = this; - - var cells = []; - - self.columnsByIndex.forEach(function (column) { - - cells.push(column.generateCell(row)); - }); - - return cells; -}; - -//////////////// Column Management ///////////////// - - -ColumnManager.prototype.getFlexBaseWidth = function () { - - var self = this, - totalWidth = self.table.element.clientWidth, - //table element width - - fixedWidth = 0; - - //adjust for vertical scrollbar if present - - if (self.rowManager.element.scrollHeight > self.rowManager.element.clientHeight) { - - totalWidth -= self.rowManager.element.offsetWidth - self.rowManager.element.clientWidth; - } - - this.columnsByIndex.forEach(function (column) { - - var width, minWidth, colWidth; - - if (column.visible) { - - width = column.definition.width || 0; - - minWidth = typeof column.minWidth == "undefined" ? self.table.options.columnMinWidth : parseInt(column.minWidth); - - if (typeof width == "string") { - - if (width.indexOf("%") > -1) { - - colWidth = totalWidth / 100 * parseInt(width); - } else { - - colWidth = parseInt(width); - } - } else { - - colWidth = width; - } - - fixedWidth += colWidth > minWidth ? colWidth : minWidth; - } - }); - - return fixedWidth; -}; - -ColumnManager.prototype.addColumn = function (definition, before, nextToColumn) { - - var column = this._addColumn(definition, before, nextToColumn); - - this._reIndexColumns(); - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.initialize(); - } - - if (this.table.modExists("columnCalcs")) { - - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - - this.redraw(); - - if (this.table.modules.layout.getMode() != "fitColumns") { - - column.reinitializeWidth(); - } - - this._verticalAlignHeaders(); - - this.table.rowManager.reinitialize(); -}; - -//remove column from system - -ColumnManager.prototype.deregisterColumn = function (column) { - - var field = column.getField(), - index; - - //remove from field list - - if (field) { - - delete this.columnsByField[field]; - } - - //remove from index list - - index = this.columnsByIndex.indexOf(column); - - if (index > -1) { - - this.columnsByIndex.splice(index, 1); - } - - //remove from column list - - index = this.columns.indexOf(column); - - if (index > -1) { - - this.columns.splice(index, 1); - } - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.initialize(); - } - - this.redraw(); -}; - -//redraw columns - -ColumnManager.prototype.redraw = function (force) { - - if (force) { - - if (Tabulator.prototype.helpers.elVisible(this.element)) { - - this._verticalAlignHeaders(); - } - - this.table.rowManager.resetScroll(); - - this.table.rowManager.reinitialize(); - } - - if (this.table.modules.layout.getMode() == "fitColumns") { - - this.table.modules.layout.layout(); - } else { - - if (force) { - - this.table.modules.layout.layout(); - } else { - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.update(); - } - } - } - - if (this.table.modExists("frozenColumns")) { - - this.table.modules.frozenColumns.layout(); - } - - if (this.table.modExists("columnCalcs")) { - - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - - if (force) { - - if (this.table.options.persistentLayout && this.table.modExists("persistence", true)) { - - this.table.modules.persistence.save("columns"); - } - - if (this.table.modExists("columnCalcs")) { - - this.table.modules.columnCalcs.redraw(); - } - } - - this.table.footerManager.redraw(); -}; - -//public column object -var ColumnComponent = function ColumnComponent(column) { - this._column = column; - this.type = "ColumnComponent"; -}; - -ColumnComponent.prototype.getElement = function () { - return this._column.getElement(); -}; - -ColumnComponent.prototype.getDefinition = function () { - return this._column.getDefinition(); -}; - -ColumnComponent.prototype.getField = function () { - return this._column.getField(); -}; - -ColumnComponent.prototype.getCells = function () { - var cells = []; - - this._column.cells.forEach(function (cell) { - cells.push(cell.getComponent()); - }); - - return cells; -}; - -ColumnComponent.prototype.getVisibility = function () { - return this._column.visible; -}; - -ColumnComponent.prototype.show = function () { - if (this._column.isGroup) { - this._column.columns.forEach(function (column) { - column.show(); - }); - } else { - this._column.show(); - } -}; - -ColumnComponent.prototype.hide = function () { - if (this._column.isGroup) { - this._column.columns.forEach(function (column) { - column.hide(); - }); - } else { - this._column.hide(); - } -}; - -ColumnComponent.prototype.toggle = function () { - if (this._column.visible) { - this.hide(); - } else { - this.show(); - } -}; - -ColumnComponent.prototype.delete = function () { - this._column.delete(); -}; - -ColumnComponent.prototype.getSubColumns = function () { - var output = []; - - if (this._column.columns.length) { - this._column.columns.forEach(function (column) { - output.push(column.getComponent()); - }); - } - - return output; -}; - -ColumnComponent.prototype.getParentColumn = function () { - return this._column.parent instanceof Column ? this._column.parent.getComponent() : false; -}; - -ColumnComponent.prototype._getSelf = function () { - return this._column; -}; - -ColumnComponent.prototype.scrollTo = function () { - return this._column.table.columnManager.scrollToColumn(this._column); -}; - -ColumnComponent.prototype.getTable = function () { - return this._column.table; -}; - -ColumnComponent.prototype.headerFilterFocus = function () { - if (this._column.table.modExists("filter", true)) { - this._column.table.modules.filter.setHeaderFilterFocus(this._column); - } -}; - -ColumnComponent.prototype.reloadHeaderFilter = function () { - if (this._column.table.modExists("filter", true)) { - this._column.table.modules.filter.reloadHeaderFilter(this._column); - } -}; - -ColumnComponent.prototype.setHeaderFilterValue = function (value) { - if (this._column.table.modExists("filter", true)) { - this._column.table.modules.filter.setHeaderFilterValue(this._column, value); - } -}; - -var Column = function Column(def, parent) { - var self = this; - - this.table = parent.table; - this.definition = def; //column definition - this.parent = parent; //hold parent object - this.type = "column"; //type of element - this.columns = []; //child columns - this.cells = []; //cells bound to this column - this.element = this.createElement(); //column header element - this.contentElement = false; - this.groupElement = this.createGroupElement(); //column group holder element - this.isGroup = false; - this.tooltip = false; //hold column tooltip - this.hozAlign = ""; //horizontal text alignment - - //multi dimentional filed handling - this.field = ""; - this.fieldStructure = ""; - this.getFieldValue = ""; - this.setFieldValue = ""; - - this.setField(this.definition.field); - - this.modules = {}; //hold module variables; - - this.cellEvents = { - cellClick: false, - cellDblClick: false, - cellContext: false, - cellTap: false, - cellDblTap: false, - cellTapHold: false - }; - - this.width = null; //column width - this.minWidth = null; //column minimum width - this.widthFixed = false; //user has specified a width for this column - - this.visible = true; //default visible state - - //initialize column - if (def.columns) { - - this.isGroup = true; - - def.columns.forEach(function (def, i) { - var newCol = new Column(def, self); - self.attachColumn(newCol); - }); - - self.checkColumnVisibility(); - } else { - parent.registerColumnField(this); - } - - if (def.rowHandle && this.table.options.movableRows !== false && this.table.modExists("moveRow")) { - this.table.modules.moveRow.setHandle(true); - } - - this._buildHeader(); -}; - -Column.prototype.createElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-col"); - el.setAttribute("role", "columnheader"); - el.setAttribute("aria-sort", "none"); - - return el; -}; - -Column.prototype.createGroupElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-col-group-cols"); - - return el; -}; - -Column.prototype.setField = function (field) { - this.field = field; - this.fieldStructure = field ? this.table.options.nestedFieldSeparator ? field.split(this.table.options.nestedFieldSeparator) : [field] : []; - this.getFieldValue = this.fieldStructure.length > 1 ? this._getNestedData : this._getFlatData; - this.setFieldValue = this.fieldStructure.length > 1 ? this._setNesteData : this._setFlatData; -}; - -//register column position with column manager -Column.prototype.registerColumnPosition = function (column) { - this.parent.registerColumnPosition(column); -}; - -//register column position with column manager -Column.prototype.registerColumnField = function (column) { - this.parent.registerColumnField(column); -}; - -//trigger position registration -Column.prototype.reRegisterPosition = function () { - if (this.isGroup) { - this.columns.forEach(function (column) { - column.reRegisterPosition(); - }); - } else { - this.registerColumnPosition(this); - } -}; - -Column.prototype.setTooltip = function () { - var self = this, - def = self.definition; - - //set header tooltips - var tooltip = def.headerTooltip || def.tooltip === false ? def.headerTooltip : self.table.options.tooltipsHeader; - - if (tooltip) { - if (tooltip === true) { - if (def.field) { - self.table.modules.localize.bind("columns|" + def.field, function (value) { - self.element.setAttribute("title", value || def.title); - }); - } else { - self.element.setAttribute("title", def.title); - } - } else { - if (typeof tooltip == "function") { - tooltip = tooltip(self.getComponent()); - - if (tooltip === false) { - tooltip = ""; - } - } - - self.element.setAttribute("title", tooltip); - } - } else { - self.element.setAttribute("title", ""); - } -}; - -//build header element -Column.prototype._buildHeader = function () { - var self = this, - def = self.definition; - - while (self.element.firstChild) { - self.element.removeChild(self.element.firstChild); - }if (def.headerVertical) { - self.element.classList.add("tabulator-col-vertical"); - - if (def.headerVertical === "flip") { - self.element.classList.add("tabulator-col-vertical-flip"); - } - } - - self.contentElement = self._bindEvents(); - - self.contentElement = self._buildColumnHeaderContent(); - - self.element.appendChild(self.contentElement); - - if (self.isGroup) { - self._buildGroupHeader(); - } else { - self._buildColumnHeader(); - } - - self.setTooltip(); - - //set resizable handles - if (self.table.options.resizableColumns && self.table.modExists("resizeColumns")) { - self.table.modules.resizeColumns.initializeColumn("header", self, self.element); - } - - //set resizable handles - if (def.headerFilter && self.table.modExists("filter") && self.table.modExists("edit")) { - if (typeof def.headerFilterPlaceholder !== "undefined" && def.field) { - self.table.modules.localize.setHeaderFilterColumnPlaceholder(def.field, def.headerFilterPlaceholder); - } - - self.table.modules.filter.initializeColumn(self); - } - - //set resizable handles - if (self.table.modExists("frozenColumns")) { - self.table.modules.frozenColumns.initializeColumn(self); - } - - //set movable column - if (self.table.options.movableColumns && !self.isGroup && self.table.modExists("moveColumn")) { - self.table.modules.moveColumn.initializeColumn(self); - } - - //set calcs column - if ((def.topCalc || def.bottomCalc) && self.table.modExists("columnCalcs")) { - self.table.modules.columnCalcs.initializeColumn(self); - } - - //update header tooltip on mouse enter - self.element.addEventListener("mouseenter", function (e) { - self.setTooltip(); - }); -}; - -Column.prototype._bindEvents = function () { - - var self = this, - def = self.definition, - dblTap, - tapHold, - tap; - - //setup header click event bindings - if (typeof def.headerClick == "function") { - self.element.addEventListener("click", function (e) { - def.headerClick(e, self.getComponent()); - }); - } - - if (typeof def.headerDblClick == "function") { - self.element.addEventListener("dblclick", function (e) { - def.headerDblClick(e, self.getComponent()); - }); - } - - if (typeof def.headerContext == "function") { - self.element.addEventListener("contextmenu", function (e) { - def.headerContext(e, self.getComponent()); - }); - } - - //setup header tap event bindings - if (typeof def.headerTap == "function") { - tap = false; - - self.element.addEventListener("touchstart", function (e) { - tap = true; - }); - - self.element.addEventListener("touchend", function (e) { - if (tap) { - def.headerTap(e, self.getComponent()); - } - - tap = false; - }); - } - - if (typeof def.headerDblTap == "function") { - dblTap = null; - - self.element.addEventListener("touchend", function (e) { - - if (dblTap) { - clearTimeout(dblTap); - dblTap = null; - - def.headerDblTap(e, self.getComponent()); - } else { - - dblTap = setTimeout(function () { - clearTimeout(dblTap); - dblTap = null; - }, 300); - } - }); - } - - if (typeof def.headerTapHold == "function") { - tapHold = null; - - self.element.addEventListener("touchstart", function (e) { - clearTimeout(tapHold); - - tapHold = setTimeout(function () { - clearTimeout(tapHold); - tapHold = null; - tap = false; - def.headerTapHold(e, self.getComponent()); - }, 1000); - }); - - self.element.addEventListener("touchend", function (e) { - clearTimeout(tapHold); - tapHold = null; - }); - } - - //store column cell click event bindings - if (typeof def.cellClick == "function") { - self.cellEvents.cellClick = def.cellClick; - } - - if (typeof def.cellDblClick == "function") { - self.cellEvents.cellDblClick = def.cellDblClick; - } - - if (typeof def.cellContext == "function") { - self.cellEvents.cellContext = def.cellContext; - } - - //setup column cell tap event bindings - if (typeof def.cellTap == "function") { - self.cellEvents.cellTap = def.cellTap; - } - - if (typeof def.cellDblTap == "function") { - self.cellEvents.cellDblTap = def.cellDblTap; - } - - if (typeof def.cellTapHold == "function") { - self.cellEvents.cellTapHold = def.cellTapHold; - } - - //setup column cell edit callbacks - if (typeof def.cellEdited == "function") { - self.cellEvents.cellEdited = def.cellEdited; - } - - if (typeof def.cellEditing == "function") { - self.cellEvents.cellEditing = def.cellEditing; - } - - if (typeof def.cellEditCancelled == "function") { - self.cellEvents.cellEditCancelled = def.cellEditCancelled; - } -}; - -//build header element for header -Column.prototype._buildColumnHeader = function () { - var self = this, - def = self.definition, - table = self.table, - sortable; - - //set column sorter - if (table.modExists("sort")) { - table.modules.sort.initializeColumn(self, self.contentElement); - } - - //set column formatter - if (table.modExists("format")) { - table.modules.format.initializeColumn(self); - } - - //set column editor - if (typeof def.editor != "undefined" && table.modExists("edit")) { - table.modules.edit.initializeColumn(self); - } - - //set colum validator - if (typeof def.validator != "undefined" && table.modExists("validate")) { - table.modules.validate.initializeColumn(self); - } - - //set column mutator - if (table.modExists("mutator")) { - table.modules.mutator.initializeColumn(self); - } - - //set column accessor - if (table.modExists("accessor")) { - table.modules.accessor.initializeColumn(self); - } - - //set respoviveLayout - if (_typeof(table.options.responsiveLayout) && table.modExists("responsiveLayout")) { - table.modules.responsiveLayout.initializeColumn(self); - } - - //set column visibility - if (typeof def.visible != "undefined") { - if (def.visible) { - self.show(true); - } else { - self.hide(true); - } - } - - //asign additional css classes to column header - if (def.cssClass) { - self.element.classList.add(def.cssClass); - } - - if (def.field) { - this.element.setAttribute("tabulator-field", def.field); - } - - //set min width if present - self.setMinWidth(typeof def.minWidth == "undefined" ? self.table.options.columnMinWidth : def.minWidth); - - self.reinitializeWidth(); - - //set tooltip if present - self.tooltip = self.definition.tooltip || self.definition.tooltip === false ? self.definition.tooltip : self.table.options.tooltips; - - //set orizontal text alignment - self.hozAlign = typeof self.definition.align == "undefined" ? "" : self.definition.align; -}; - -Column.prototype._buildColumnHeaderContent = function () { - var self = this, - def = self.definition, - table = self.table; - - var contentElement = document.createElement("div"); - contentElement.classList.add("tabulator-col-content"); - - contentElement.appendChild(self._buildColumnHeaderTitle()); - - return contentElement; -}; - -//build title element of column -Column.prototype._buildColumnHeaderTitle = function () { - var self = this, - def = self.definition, - table = self.table, - title; - - var titleHolderElement = document.createElement("div"); - titleHolderElement.classList.add("tabulator-col-title"); - - if (def.editableTitle) { - var titleElement = document.createElement("input"); - titleElement.classList.add("tabulator-title-editor"); - - titleElement.addEventListener("click", function (e) { - e.stopPropagation(); - titleElement.focus(); - }); - - titleElement.addEventListener("change", function () { - def.title = titleElement.value; - table.options.columnTitleChanged.call(self.table, self.getComponent()); - }); - - titleHolderElement.appendChild(titleElement); - - if (def.field) { - table.modules.localize.bind("columns|" + def.field, function (text) { - titleElement.value = text || def.title || " "; - }); - } else { - titleElement.value = def.title || " "; - } - } else { - if (def.field) { - table.modules.localize.bind("columns|" + def.field, function (text) { - self._formatColumnHeaderTitle(titleHolderElement, text || def.title || " "); - }); - } else { - self._formatColumnHeaderTitle(titleHolderElement, def.title || " "); - } - } - - return titleHolderElement; -}; - -Column.prototype._formatColumnHeaderTitle = function (el, title) { - var formatter, contents, params, mockCell; - - if (this.definition.titleFormatter && this.table.modExists("format")) { - - formatter = this.table.modules.format.getFormatter(this.definition.titleFormatter); - - mockCell = { - getValue: function getValue() { - return title; - }, - getElement: function getElement() { - return el; - } - }; - - params = this.definition.titleFormatterParams || {}; - - params = typeof params === "function" ? params() : params; - - contents = formatter.call(this.table.modules.format, mockCell, params); - - switch (typeof contents === 'undefined' ? 'undefined' : _typeof(contents)) { - case "object": - if (contents instanceof Node) { - this.element.appendChild(contents); - } else { - this.element.innerHTML = ""; - console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:", contents); - } - break; - case "undefined": - case "null": - this.element.innerHTML = ""; - break; - default: - this.element.innerHTML = contents; - } - } else { - el.innerHTML = title; - } -}; - -//build header element for column group -Column.prototype._buildGroupHeader = function () { - this.element.classList.add("tabulator-col-group"); - this.element.setAttribute("role", "columngroup"); - this.element.setAttribute("aria-title", this.definition.title); - - this.element.appendChild(this.groupElement); -}; - -//flat field lookup -Column.prototype._getFlatData = function (data) { - return data[this.field]; -}; - -//nested field lookup -Column.prototype._getNestedData = function (data) { - var dataObj = data, - structure = this.fieldStructure, - length = structure.length, - output; - - for (var i = 0; i < length; i++) { - - dataObj = dataObj[structure[i]]; - - output = dataObj; - - if (!dataObj) { - break; - } - } - - return output; -}; - -//flat field set -Column.prototype._setFlatData = function (data, value) { - data[this.field] = value; -}; - -//nested field set -Column.prototype._setNesteData = function (data, value) { - var dataObj = data, - structure = this.fieldStructure, - length = structure.length; - - for (var i = 0; i < length; i++) { - - if (i == length - 1) { - dataObj[structure[i]] = value; - } else { - if (!dataObj[structure[i]]) { - dataObj[structure[i]] = {}; - } - - dataObj = dataObj[structure[i]]; - } - } -}; - -//attach column to this group -Column.prototype.attachColumn = function (column) { - var self = this; - - if (self.groupElement) { - self.columns.push(column); - self.groupElement.appendChild(column.getElement()); - } else { - console.warn("Column Warning - Column being attached to another column instead of column group"); - } -}; - -//vertically align header in column -Column.prototype.verticalAlign = function (alignment, height) { - - //calculate height of column header and group holder element - var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : height || this.parent.getHeadersElement().clientHeight; - // var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : this.parent.getHeadersElement().clientHeight; - - this.element.style.height = parentHeight + "px"; - - if (this.isGroup) { - this.groupElement.style.minHeight = parentHeight - this.contentElement.offsetHeight + "px"; - } - - //vertically align cell contents - if (!this.isGroup && alignment !== "top") { - if (alignment === "bottom") { - this.element.style.paddingTop = this.element.clientHeight - this.contentElement.offsetHeight + "px"; - } else { - this.element.style.paddingTop = (this.element.clientHeight - this.contentElement.offsetHeight) / 2 + "px"; - } - } - - this.columns.forEach(function (column) { - column.verticalAlign(alignment); - }); -}; - -//clear vertical alignmenet -Column.prototype.clearVerticalAlign = function () { - this.element.style.paddingTop = ""; - this.element.style.height = ""; - this.element.style.minHeight = ""; - - this.columns.forEach(function (column) { - column.clearVerticalAlign(); - }); -}; - -//// Retreive Column Information //// - -//return column header element -Column.prototype.getElement = function () { - return this.element; -}; - -//return colunm group element -Column.prototype.getGroupElement = function () { - return this.groupElement; -}; - -//return field name -Column.prototype.getField = function () { - return this.field; -}; - -//return the first column in a group -Column.prototype.getFirstColumn = function () { - if (!this.isGroup) { - return this; - } else { - if (this.columns.length) { - return this.columns[0].getFirstColumn(); - } else { - return false; - } - } -}; - -//return the last column in a group -Column.prototype.getLastColumn = function () { - if (!this.isGroup) { - return this; - } else { - if (this.columns.length) { - return this.columns[this.columns.length - 1].getLastColumn(); - } else { - return false; - } - } -}; - -//return all columns in a group -Column.prototype.getColumns = function () { - return this.columns; -}; - -//return all columns in a group -Column.prototype.getCells = function () { - return this.cells; -}; - -//retreive the top column in a group of columns -Column.prototype.getTopColumn = function () { - if (this.parent.isGroup) { - return this.parent.getTopColumn(); - } else { - return this; - } -}; - -//return column definition object -Column.prototype.getDefinition = function (updateBranches) { - var colDefs = []; - - if (this.isGroup && updateBranches) { - this.columns.forEach(function (column) { - colDefs.push(column.getDefinition(true)); - }); - - this.definition.columns = colDefs; - } - - return this.definition; -}; - -//////////////////// Actions //////////////////// - -Column.prototype.checkColumnVisibility = function () { - var visible = false; - - this.columns.forEach(function (column) { - if (column.visible) { - visible = true; - } - }); - - if (visible) { - this.show(); - this.parent.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), false); - } else { - this.hide(); - } -}; - -//show column -Column.prototype.show = function (silent, responsiveToggle) { - if (!this.visible) { - this.visible = true; - - this.element.style.display = ""; - - this.table.columnManager._verticalAlignHeaders(); - - if (this.parent.isGroup) { - this.parent.checkColumnVisibility(); - } - - this.cells.forEach(function (cell) { - cell.show(); - }); - - if (this.table.options.persistentLayout && this.table.modExists("responsiveLayout", true)) { - this.table.modules.persistence.save("columns"); - } - - if (!responsiveToggle && this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - this.table.modules.responsiveLayout.updateColumnVisibility(this, this.visible); - } - - if (!silent) { - this.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), true); - } - } -}; - -//hide column -Column.prototype.hide = function (silent, responsiveToggle) { - if (this.visible) { - this.visible = false; - - this.element.style.display = "none"; - - this.table.columnManager._verticalAlignHeaders(); - - if (this.parent.isGroup) { - this.parent.checkColumnVisibility(); - } - - this.cells.forEach(function (cell) { - cell.hide(); - }); - - if (this.table.options.persistentLayout && this.table.modExists("persistence", true)) { - this.table.modules.persistence.save("columns"); - } - - if (!responsiveToggle && this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - this.table.modules.responsiveLayout.updateColumnVisibility(this, this.visible); - } - - if (!silent) { - this.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), false); - } - } -}; - -Column.prototype.matchChildWidths = function () { - var childWidth = 0; - - if (this.contentElement && this.columns.length) { - this.columns.forEach(function (column) { - childWidth += column.getWidth(); - }); - - this.contentElement.style.maxWidth = childWidth - 1 + "px"; - } -}; - -Column.prototype.setWidth = function (width) { - this.widthFixed = true; - this.setWidthActual(width); -}; - -Column.prototype.setWidthActual = function (width) { - - if (isNaN(width)) { - width = Math.floor(this.table.element.clientWidth / 100 * parseInt(width)); - } - - width = Math.max(this.minWidth, width); - - this.width = width; - - this.element.style.width = width ? width + "px" : ""; - - if (!this.isGroup) { - this.cells.forEach(function (cell) { - cell.setWidth(width); - }); - } - - if (this.parent.isGroup) { - this.parent.matchChildWidths(); - } - - //set resizable handles - if (this.table.modExists("frozenColumns")) { - this.table.modules.frozenColumns.layout(); - } -}; - -Column.prototype.checkCellHeights = function () { - var rows = []; - - this.cells.forEach(function (cell) { - if (cell.row.heightInitialized) { - if (cell.row.getElement().offsetParent !== null) { - rows.push(cell.row); - cell.row.clearCellHeight(); - } else { - cell.row.heightInitialized = false; - } - } - }); - - rows.forEach(function (row) { - row.calcHeight(); - }); - - rows.forEach(function (row) { - row.setCellHeight(); - }); -}; - -Column.prototype.getWidth = function () { - // return this.element.offsetWidth; - return this.width; -}; - -Column.prototype.getHeight = function () { - return this.element.offsetHeight; -}; - -Column.prototype.setMinWidth = function (minWidth) { - this.minWidth = minWidth; - - this.element.style.minWidth = minWidth ? minWidth + "px" : ""; - - this.cells.forEach(function (cell) { - cell.setMinWidth(minWidth); - }); -}; - -Column.prototype.delete = function () { - if (this.isGroup) { - this.columns.forEach(function (column) { - column.delete(); - }); - } - - var cellCount = this.cells.length; - - for (var i = 0; i < cellCount; i++) { - this.cells[0].delete(); - } - - this.element.parentNode.removeChild(this.element); - - this.table.columnManager.deregisterColumn(this); -}; - -//////////////// Cell Management ///////////////// - -//generate cell for this column -Column.prototype.generateCell = function (row) { - var self = this; - - var cell = new Cell(self, row); - - this.cells.push(cell); - - return cell; -}; - -Column.prototype.reinitializeWidth = function (force) { - - this.widthFixed = false; - - //set width if present - if (typeof this.definition.width !== "undefined" && !force) { - this.setWidth(this.definition.width); - } - - //hide header filters to prevent them altering column width - if (this.table.modExists("filter")) { - this.table.modules.filter.hideHeaderFilterElements(); - } - - this.fitToData(); - - //show header filters again after layout is complete - if (this.table.modExists("filter")) { - this.table.modules.filter.showHeaderFilterElements(); - } -}; - -//set column width to maximum cell width -Column.prototype.fitToData = function () { - var self = this; - - if (!this.widthFixed) { - this.element.width = ""; - - self.cells.forEach(function (cell) { - cell.setWidth(""); - }); - } - - var maxWidth = this.element.offsetWidth; - - if (!self.width || !this.widthFixed) { - self.cells.forEach(function (cell) { - var width = cell.getWidth(); - - if (width > maxWidth) { - maxWidth = width; - } - }); - - if (maxWidth) { - self.setWidthActual(maxWidth + 1); - } - } -}; - -Column.prototype.deleteCell = function (cell) { - var index = this.cells.indexOf(cell); - - if (index > -1) { - this.cells.splice(index, 1); - } -}; - -//////////////// Event Bindings ///////////////// - -//////////////// Object Generation ///////////////// -Column.prototype.getComponent = function () { - return new ColumnComponent(this); -}; -var RowManager = function RowManager(table) { - - this.table = table; - this.element = this.createHolderElement(); //containing element - this.tableElement = this.createTableElement(); //table element - this.columnManager = null; //hold column manager object - this.height = 0; //hold height of table element - - this.firstRender = false; //handle first render - this.renderMode = "classic"; //current rendering mode - - this.rows = []; //hold row data objects - this.activeRows = []; //rows currently available to on display in the table - this.activeRowsCount = 0; //count of active rows - - this.displayRows = []; //rows currently on display in the table - this.displayRowsCount = 0; //count of display rows - - this.scrollTop = 0; - this.scrollLeft = 0; - - this.vDomRowHeight = 20; //approximation of row heights for padding - - this.vDomTop = 0; //hold position for first rendered row in the virtual DOM - this.vDomBottom = 0; //hold possition for last rendered row in the virtual DOM - - this.vDomScrollPosTop = 0; //last scroll position of the vDom top; - this.vDomScrollPosBottom = 0; //last scroll position of the vDom bottom; - - this.vDomTopPad = 0; //hold value of padding for top of virtual DOM - this.vDomBottomPad = 0; //hold value of padding for bottom of virtual DOM - - this.vDomMaxRenderChain = 90; //the maximum number of dom elements that can be rendered in 1 go - - this.vDomWindowBuffer = 0; //window row buffer before removing elements, to smooth scrolling - - this.vDomWindowMinTotalRows = 20; //minimum number of rows to be generated in virtual dom (prevent buffering issues on tables with tall rows) - this.vDomWindowMinMarginRows = 5; //minimum number of rows to be generated in virtual dom margin - - this.vDomTopNewRows = []; //rows to normalize after appending to optimize render speed - this.vDomBottomNewRows = []; //rows to normalize after appending to optimize render speed -}; - -//////////////// Setup Functions ///////////////// - -RowManager.prototype.createHolderElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-tableHolder"); - el.setAttribute("tabindex", 0); - - return el; -}; - -RowManager.prototype.createTableElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-table"); - - return el; -}; - -//return containing element -RowManager.prototype.getElement = function () { - return this.element; -}; - -//return table element -RowManager.prototype.getTableElement = function () { - return this.tableElement; -}; - -//return position of row in table -RowManager.prototype.getRowPosition = function (row, active) { - if (active) { - return this.activeRows.indexOf(row); - } else { - return this.rows.indexOf(row); - } -}; - -//link to column manager -RowManager.prototype.setColumnManager = function (manager) { - this.columnManager = manager; -}; - -RowManager.prototype.initialize = function () { - var self = this; - - self.setRenderMode(); - - //initialize manager - self.element.appendChild(self.tableElement); - - self.firstRender = true; - - //scroll header along with table body - self.element.addEventListener("scroll", function () { - var left = self.element.scrollLeft; - - //handle horizontal scrolling - if (self.scrollLeft != left) { - self.columnManager.scrollHorizontal(left); - - if (self.table.options.groupBy) { - self.table.modules.groupRows.scrollHeaders(left); - } - - if (self.table.modExists("columnCalcs")) { - self.table.modules.columnCalcs.scrollHorizontal(left); - } - } - - self.scrollLeft = left; - }); - - //handle virtual dom scrolling - if (this.renderMode === "virtual") { - - self.element.addEventListener("scroll", function () { - var top = self.element.scrollTop; - var dir = self.scrollTop > top; - - //handle verical scrolling - if (self.scrollTop != top) { - self.scrollTop = top; - self.scrollVertical(dir); - - if (self.table.options.ajaxProgressiveLoad == "scroll") { - self.table.modules.ajax.nextPage(self.element.scrollHeight - self.element.clientHeight - top); - } - } else { - self.scrollTop = top; - } - }); - } -}; - -////////////////// Row Manipulation ////////////////// - -RowManager.prototype.findRow = function (subject) { - var self = this; - - if ((typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) == "object") { - - if (subject instanceof Row) { - //subject is row element - return subject; - } else if (subject instanceof RowComponent) { - //subject is public row component - return subject._getSelf() || false; - } else if (subject instanceof HTMLElement) { - //subject is a HTML element of the row - var match = self.rows.find(function (row) { - return row.element === subject; - }); - - return match || false; - } - } else if (typeof subject == "undefined" || subject === null) { - return false; - } else { - //subject should be treated as the index of the row - var _match = self.rows.find(function (row) { - return row.data[self.table.options.index] == subject; - }); - - return _match || false; - } - - //catch all for any other type of input - - return false; -}; - -RowManager.prototype.getRowFromPosition = function (position, active) { - if (active) { - return this.activeRows[position]; - } else { - return this.rows[position]; - } -}; - -RowManager.prototype.scrollToRow = function (row, position, ifVisible) { - var _this2 = this; - - var rowIndex = this.getDisplayRows().indexOf(row), - rowEl = row.getElement(), - rowTop, - offset = 0; - - return new Promise(function (resolve, reject) { - if (rowIndex > -1) { - - if (typeof position === "undefined") { - position = _this2.table.options.scrollToRowPosition; - } - - if (typeof ifVisible === "undefined") { - ifVisible = _this2.table.options.scrollToRowIfVisible; - } - - if (position === "nearest") { - switch (_this2.renderMode) { - case "classic": - rowTop = Tabulator.prototype.helpers.elOffset(rowEl).top; - position = Math.abs(_this2.element.scrollTop - rowTop) > Math.abs(_this2.element.scrollTop + _this2.element.clientHeight - rowTop) ? "bottom" : "top"; - break; - case "virtual": - position = Math.abs(_this2.vDomTop - rowIndex) > Math.abs(_this2.vDomBottom - rowIndex) ? "bottom" : "top"; - break; - } - } - - //check row visibility - if (!ifVisible) { - if (Tabulator.prototype.helpers.elVisible(rowEl)) { - offset = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this2.element).top; - - if (offset > 0 && offset < _this2.element.clientHeight - rowEl.offsetHeight) { - return false; - } - } - } - - //scroll to row - switch (_this2.renderMode) { - case "classic": - _this2.element.scrollTop = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this2.element).top + _this2.element.scrollTop; - break; - case "virtual": - _this2._virtualRenderFill(rowIndex, true); - break; - } - - //align to correct position - switch (position) { - case "middle": - case "center": - _this2.element.scrollTop = _this2.element.scrollTop - _this2.element.clientHeight / 2; - break; - - case "bottom": - _this2.element.scrollTop = _this2.element.scrollTop - _this2.element.clientHeight + rowEl.offsetHeight; - break; - } - - resolve(); - } else { - console.warn("Scroll Error - Row not visible"); - reject("Scroll Error - Row not visible"); - } - }); -}; - -////////////////// Data Handling ////////////////// - -RowManager.prototype.setData = function (data, renderInPosition) { - var _this3 = this; - - var self = this; - - return new Promise(function (resolve, reject) { - if (renderInPosition && _this3.getDisplayRows().length) { - if (self.table.options.pagination) { - self._setDataActual(data, true); - } else { - _this3.reRenderInPosition(function () { - self._setDataActual(data); - }); - } - } else { - _this3.resetScroll(); - _this3._setDataActual(data); - } - - resolve(); - }); -}; - -RowManager.prototype._setDataActual = function (data, renderInPosition) { - var self = this; - - self.table.options.dataLoading.call(this.table, data); - - self.rows.forEach(function (row) { - row.wipe(); - }); - - self.rows = []; - - if (this.table.options.history && this.table.modExists("history")) { - this.table.modules.history.clear(); - } - - if (Array.isArray(data)) { - - if (this.table.modExists("selectRow")) { - this.table.modules.selectRow.clearSelectionData(); - } - - data.forEach(function (def, i) { - if (def && (typeof def === 'undefined' ? 'undefined' : _typeof(def)) === "object") { - var row = new Row(def, self); - self.rows.push(row); - } else { - console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:", def); - } - }); - - self.table.options.dataLoaded.call(this.table, data); - - self.refreshActiveData(false, false, renderInPosition); - } else { - console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ", typeof data === 'undefined' ? 'undefined' : _typeof(data), "\nData: ", data); - } -}; - -RowManager.prototype.deleteRow = function (row) { - var allIndex = this.rows.indexOf(row), - activeIndex = this.activeRows.indexOf(row); - - if (activeIndex > -1) { - this.activeRows.splice(activeIndex, 1); - } - - if (allIndex > -1) { - this.rows.splice(allIndex, 1); - } - - this.setActiveRows(this.activeRows); - - this.displayRowIterator(function (rows) { - var displayIndex = rows.indexOf(row); - - if (displayIndex > -1) { - rows.splice(displayIndex, 1); - } - }); - - this.reRenderInPosition(); - - this.table.options.rowDeleted.call(this.table, row.getComponent()); - - this.table.options.dataEdited.call(this.table, this.getData()); - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - this.table.modules.groupRows.updateGroupRows(true); - } else if (this.table.options.pagination && this.table.modExists("page")) { - this.refreshActiveData(false, false, true); - } else { - if (this.table.options.pagination && this.table.modExists("page")) { - this.refreshActiveData("page"); - } - } -}; - -RowManager.prototype.addRow = function (data, pos, index, blockRedraw) { - - var row = this.addRowActual(data, pos, index, blockRedraw); - - if (this.table.options.history && this.table.modExists("history")) { - this.table.modules.history.action("rowAdd", row, { data: data, pos: pos, index: index }); - } - - return row; -}; - -//add multiple rows -RowManager.prototype.addRows = function (data, pos, index) { - var _this4 = this; - - var self = this, - length = 0, - rows = []; - - return new Promise(function (resolve, reject) { - pos = _this4.findAddRowPos(pos); - - if (!Array.isArray(data)) { - data = [data]; - } - - length = data.length - 1; - - if (typeof index == "undefined" && pos || typeof index !== "undefined" && !pos) { - data.reverse(); - } - - data.forEach(function (item, i) { - var row = self.addRow(item, pos, index, true); - rows.push(row); - }); - - if (_this4.table.options.groupBy && _this4.table.modExists("groupRows")) { - _this4.table.modules.groupRows.updateGroupRows(true); - } else if (_this4.table.options.pagination && _this4.table.modExists("page")) { - _this4.refreshActiveData(false, false, true); - } else { - _this4.reRenderInPosition(); - } - - //recalc column calculations if present - if (_this4.table.modExists("columnCalcs")) { - _this4.table.modules.columnCalcs.recalc(_this4.table.rowManager.activeRows); - } - - resolve(rows); - }); -}; - -RowManager.prototype.findAddRowPos = function (pos) { - if (typeof pos === "undefined") { - pos = this.table.options.addRowPos; - } - - if (pos === "pos") { - pos = true; - } - - if (pos === "bottom") { - pos = false; - } - - return pos; -}; - -RowManager.prototype.addRowActual = function (data, pos, index, blockRedraw) { - var row = data instanceof Row ? data : new Row(data || {}, this), - top = this.findAddRowPos(pos), - dispRows; - - if (!index && this.table.options.pagination && this.table.options.paginationAddRow == "page") { - dispRows = this.getDisplayRows(); - - if (top) { - if (dispRows.length) { - index = dispRows[0]; - } else { - if (this.activeRows.length) { - index = this.activeRows[this.activeRows.length - 1]; - top = false; - } - } - } else { - if (dispRows.length) { - index = dispRows[dispRows.length - 1]; - top = dispRows.length < this.table.modules.page.getPageSize() ? false : true; - } - } - } - - if (index) { - index = this.findRow(index); - } - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - this.table.modules.groupRows.assignRowToGroup(row); - - var groupRows = row.getGroup().rows; - - if (groupRows.length > 1) { - - if (!index || index && groupRows.indexOf(index) == -1) { - if (top) { - if (groupRows[0] !== row) { - index = groupRows[0]; - this._moveRowInArray(row.getGroup().rows, row, index, top); - } - } else { - if (groupRows[groupRows.length - 1] !== row) { - index = groupRows[groupRows.length - 1]; - this._moveRowInArray(row.getGroup().rows, row, index, top); - } - } - } else { - this._moveRowInArray(row.getGroup().rows, row, index, top); - } - } - } - - if (index) { - var allIndex = this.rows.indexOf(index), - activeIndex = this.activeRows.indexOf(index); - - this.displayRowIterator(function (rows) { - var displayIndex = rows.indexOf(index); - - if (displayIndex > -1) { - rows.splice(top ? displayIndex : displayIndex + 1, 0, row); - } - }); - - if (activeIndex > -1) { - this.activeRows.splice(top ? activeIndex : activeIndex + 1, 0, row); - } - - if (allIndex > -1) { - this.rows.splice(top ? allIndex : allIndex + 1, 0, row); - } - } else { - - if (top) { - - this.displayRowIterator(function (rows) { - rows.unshift(row); - }); - - this.activeRows.unshift(row); - this.rows.unshift(row); - } else { - this.displayRowIterator(function (rows) { - rows.push(row); - }); - - this.activeRows.push(row); - this.rows.push(row); - } - } - - this.setActiveRows(this.activeRows); - - this.table.options.rowAdded.call(this.table, row.getComponent()); - - this.table.options.dataEdited.call(this.table, this.getData()); - - if (!blockRedraw) { - this.reRenderInPosition(); - } - - return row; -}; - -RowManager.prototype.moveRow = function (from, to, after) { - if (this.table.options.history && this.table.modExists("history")) { - this.table.modules.history.action("rowMove", from, { pos: this.getRowPosition(from), to: to, after: after }); - } - - this.moveRowActual(from, to, after); - - this.table.options.rowMoved.call(this.table, from.getComponent()); -}; - -RowManager.prototype.moveRowActual = function (from, to, after) { - var self = this; - this._moveRowInArray(this.rows, from, to, after); - this._moveRowInArray(this.activeRows, from, to, after); - - this.displayRowIterator(function (rows) { - self._moveRowInArray(rows, from, to, after); - }); - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - var toGroup = to.getGroup(); - var fromGroup = from.getGroup(); - - if (toGroup === fromGroup) { - this._moveRowInArray(toGroup.rows, from, to, after); - } else { - if (fromGroup) { - fromGroup.removeRow(from); - } - - toGroup.insertRow(from, to, after); - } - } -}; - -RowManager.prototype._moveRowInArray = function (rows, from, to, after) { - var fromIndex, toIndex, start, end; - - if (from !== to) { - - fromIndex = rows.indexOf(from); - - if (fromIndex > -1) { - - rows.splice(fromIndex, 1); - - toIndex = rows.indexOf(to); - - if (toIndex > -1) { - - if (after) { - rows.splice(toIndex + 1, 0, from); - } else { - rows.splice(toIndex, 0, from); - } - } else { - rows.splice(fromIndex, 0, from); - } - } - - //restyle rows - if (rows === this.getDisplayRows()) { - - start = fromIndex < toIndex ? fromIndex : toIndex; - end = toIndex > fromIndex ? toIndex : fromIndex + 1; - - for (var i = start; i <= end; i++) { - if (rows[i]) { - this.styleRow(rows[i], i); - } - } - } - } -}; - -RowManager.prototype.clearData = function () { - this.setData([]); -}; - -RowManager.prototype.getRowIndex = function (row) { - return this.findRowIndex(row, this.rows); -}; - -RowManager.prototype.getDisplayRowIndex = function (row) { - var index = this.getDisplayRows().indexOf(row); - return index > -1 ? index : false; -}; - -RowManager.prototype.nextDisplayRow = function (row, rowOnly) { - var index = this.getDisplayRowIndex(row), - nextRow = false; - - if (index !== false && index < this.displayRowsCount - 1) { - nextRow = this.getDisplayRows()[index + 1]; - } - - if (nextRow && (!(nextRow instanceof Row) || nextRow.type != "row")) { - return this.nextDisplayRow(nextRow, rowOnly); - } - - return nextRow; -}; - -RowManager.prototype.prevDisplayRow = function (row, rowOnly) { - var index = this.getDisplayRowIndex(row), - prevRow = false; - - if (index) { - prevRow = this.getDisplayRows()[index - 1]; - } - - if (prevRow && (!(prevRow instanceof Row) || prevRow.type != "row")) { - return this.prevDisplayRow(prevRow, rowOnly); - } - - return prevRow; -}; - -RowManager.prototype.findRowIndex = function (row, list) { - var rowIndex; - - row = this.findRow(row); - - if (row) { - rowIndex = list.indexOf(row); - - if (rowIndex > -1) { - return rowIndex; - } - } - - return false; -}; - -RowManager.prototype.getData = function (active, transform) { - var self = this, - output = []; - - var rows = active ? self.activeRows : self.rows; - - rows.forEach(function (row) { - output.push(row.getData(transform || "data")); - }); - - return output; -}; - -RowManager.prototype.getHtml = function (active) { - var data = this.getData(active), - columns = [], - header = "", - body = "", - table = ""; - - //build header row - this.table.columnManager.getColumns().forEach(function (column) { - var def = column.getDefinition(); - - if (column.visible && !def.hideInHtml) { - header += '' + (def.title || "") + ''; - columns.push(column); - } - }); - - //build body rows - data.forEach(function (rowData) { - var row = ""; - - columns.forEach(function (column) { - var value = column.getFieldValue(rowData); - - if (typeof value === "undefined" || value === null) { - value = ":"; - } - - row += '' + value + ''; - }); - - body += '' + row + ''; - }); - - //build table - table = '\n\t\t\n\t\t' + header + '\n\t\t\n\t\t' + body + '\n\t\t
'; - - return table; -}; - -RowManager.prototype.getComponents = function (active) { - var self = this, - output = []; - - var rows = active ? self.activeRows : self.rows; - - rows.forEach(function (row) { - output.push(row.getComponent()); - }); - - return output; -}; - -RowManager.prototype.getDataCount = function (active) { - return active ? this.rows.length : this.activeRows.length; -}; - -RowManager.prototype._genRemoteRequest = function () { - var self = this, - table = self.table, - options = table.options, - params = {}; - - if (table.modExists("page")) { - //set sort data if defined - if (options.ajaxSorting) { - var sorters = self.table.modules.sort.getSort(); - - sorters.forEach(function (item) { - delete item.column; - }); - - params[self.table.modules.page.paginationDataSentNames.sorters] = sorters; - } - - //set filter data if defined - if (options.ajaxFiltering) { - var filters = self.table.modules.filter.getFilters(true, true); - - params[self.table.modules.page.paginationDataSentNames.filters] = filters; - } - - self.table.modules.ajax.setParams(params, true); - } - - table.modules.ajax.sendRequest().then(function (data) { - self.setData(data); - }).catch(function (e) {}); -}; - -//choose the path to refresh data after a filter update -RowManager.prototype.filterRefresh = function () { - var table = this.table, - options = table.options, - left = this.scrollLeft; - - if (options.ajaxFiltering) { - if (options.pagination == "remote" && table.modExists("page")) { - table.modules.page.reset(true); - table.modules.page.setPage(1); - } else if (options.ajaxProgressiveLoad) { - table.modules.ajax.loadData(); - } else { - //assume data is url, make ajax call to url to get data - this._genRemoteRequest(); - } - } else { - this.refreshActiveData("filter"); - } - - this.scrollHorizontal(left); -}; - -//choose the path to refresh data after a sorter update -RowManager.prototype.sorterRefresh = function () { - var table = this.table, - options = this.table.options, - left = this.scrollLeft; - - if (options.ajaxSorting) { - if ((options.pagination == "remote" || options.progressiveLoad) && table.modExists("page")) { - table.modules.page.reset(true); - table.modules.page.setPage(1); - } else if (options.ajaxProgressiveLoad) { - table.modules.ajax.loadData(); - } else { - //assume data is url, make ajax call to url to get data - this._genRemoteRequest(); - } - } else { - this.refreshActiveData("sort"); - } - - this.scrollHorizontal(left); -}; - -RowManager.prototype.scrollHorizontal = function (left) { - this.scrollLeft = left; - this.element.scrollLeft = left; - - if (this.table.options.groupBy) { - this.table.modules.groupRows.scrollHeaders(left); - } - - if (this.table.modExists("columnCalcs")) { - this.table.modules.columnCalcs.scrollHorizontal(left); - } -}; - -//set active data set -RowManager.prototype.refreshActiveData = function (stage, skipStage, renderInPosition) { - var self = this, - table = this.table, - displayIndex; - - if (!stage) { - stage = "all"; - } - - if (table.options.selectable && !table.options.selectablePersistence && table.modExists("selectRow")) { - table.modules.selectRow.deselectRows(); - } - - //cascade through data refresh stages - switch (stage) { - case "all": - - case "filter": - if (!skipStage) { - if (table.modExists("filter")) { - self.setActiveRows(table.modules.filter.filter(self.rows)); - } else { - self.setActiveRows(self.rows.slice(0)); - } - } else { - skipStage = false; - } - - case "sort": - if (!skipStage) { - if (table.modExists("sort")) { - table.modules.sort.sort(); - } - } else { - skipStage = false; - } - - //generic stage to allow for pipeline trigger after the data manipulation stage - case "display": - this.resetDisplayRows(); - - case "freeze": - if (!skipStage) { - if (this.table.modExists("frozenRows")) { - if (table.modules.frozenRows.isFrozen()) { - if (!table.modules.frozenRows.getDisplayIndex()) { - table.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.frozenRows.getDisplayIndex(); - - displayIndex = self.setDisplayRows(table.modules.frozenRows.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if (displayIndex !== true) { - table.modules.frozenRows.setDisplayIndex(displayIndex); - } - } - } - } else { - skipStage = false; - } - - case "group": - if (!skipStage) { - if (table.options.groupBy && table.modExists("groupRows")) { - - if (!table.modules.groupRows.getDisplayIndex()) { - table.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.groupRows.getDisplayIndex(); - - displayIndex = self.setDisplayRows(table.modules.groupRows.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if (displayIndex !== true) { - table.modules.groupRows.setDisplayIndex(displayIndex); - } - } - } else { - skipStage = false; - } - - case "tree": - - if (!skipStage) { - if (table.options.dataTree && table.modExists("dataTree")) { - if (!table.modules.dataTree.getDisplayIndex()) { - table.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.dataTree.getDisplayIndex(); - - displayIndex = self.setDisplayRows(table.modules.dataTree.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if (displayIndex !== true) { - table.modules.dataTree.setDisplayIndex(displayIndex); - } - } - } else { - skipStage = false; - } - - if (table.options.pagination && table.modExists("page") && !renderInPosition) { - if (table.modules.page.getMode() == "local") { - table.modules.page.reset(); - } - } - - case "page": - if (!skipStage) { - if (table.options.pagination && table.modExists("page")) { - - if (!table.modules.page.getDisplayIndex()) { - table.modules.page.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.page.getDisplayIndex(); - - if (table.modules.page.getMode() == "local") { - table.modules.page.setMaxRows(this.getDisplayRows(displayIndex - 1).length); - } - - displayIndex = self.setDisplayRows(table.modules.page.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if (displayIndex !== true) { - table.modules.page.setDisplayIndex(displayIndex); - } - } - } else { - skipStage = false; - } - } - - if (Tabulator.prototype.helpers.elVisible(self.element)) { - if (renderInPosition) { - self.reRenderInPosition(); - } else { - self.renderTable(); - if (table.options.layoutColumnsOnNewData) { - self.table.columnManager.redraw(true); - } - } - } - - if (table.modExists("columnCalcs")) { - table.modules.columnCalcs.recalc(this.activeRows); - } -}; - -RowManager.prototype.setActiveRows = function (activeRows) { - this.activeRows = activeRows; - this.activeRowsCount = this.activeRows.length; -}; - -//reset display rows array -RowManager.prototype.resetDisplayRows = function () { - this.displayRows = []; - - this.displayRows.push(this.activeRows.slice(0)); - - this.displayRowsCount = this.displayRows[0].length; - - if (this.table.modExists("frozenRows")) { - this.table.modules.frozenRows.setDisplayIndex(0); - } - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - this.table.modules.groupRows.setDisplayIndex(0); - } - - if (this.table.options.pagination && this.table.modExists("page")) { - this.table.modules.page.setDisplayIndex(0); - } -}; - -RowManager.prototype.getNextDisplayIndex = function () { - return this.displayRows.length; -}; - -//set display row pipeline data -RowManager.prototype.setDisplayRows = function (displayRows, index) { - - var output = true; - - if (index && typeof this.displayRows[index] != "undefined") { - this.displayRows[index] = displayRows; - output = true; - } else { - this.displayRows.push(displayRows); - output = index = this.displayRows.length - 1; - } - - if (index == this.displayRows.length - 1) { - this.displayRowsCount = this.displayRows[this.displayRows.length - 1].length; - } - - return output; -}; - -RowManager.prototype.getDisplayRows = function (index) { - if (typeof index == "undefined") { - return this.displayRows.length ? this.displayRows[this.displayRows.length - 1] : []; - } else { - return this.displayRows[index] || []; - } -}; - -//repeat action accross display rows -RowManager.prototype.displayRowIterator = function (callback) { - this.displayRows.forEach(callback); - - this.displayRowsCount = this.displayRows[this.displayRows.length - 1].length; -}; - -//return only actual rows (not group headers etc) -RowManager.prototype.getRows = function () { - return this.rows; -}; - -///////////////// Table Rendering ///////////////// - -//trigger rerender of table in current position -RowManager.prototype.reRenderInPosition = function (callback) { - if (this.getRenderMode() == "virtual") { - - var scrollTop = this.element.scrollTop; - var topRow = false; - var topOffset = false; - - var left = this.scrollLeft; - - var rows = this.getDisplayRows(); - - for (var i = this.vDomTop; i <= this.vDomBottom; i++) { - - if (rows[i]) { - var diff = scrollTop - rows[i].getElement().offsetTop; - - if (topOffset === false || Math.abs(diff) < topOffset) { - topOffset = diff; - topRow = i; - } else { - break; - } - } - } - - if (callback) { - callback(); - } - - this._virtualRenderFill(topRow === false ? this.displayRowsCount - 1 : topRow, true, topOffset || 0); - - this.scrollHorizontal(left); - } else { - this.renderTable(); - } -}; - -RowManager.prototype.setRenderMode = function () { - if ((this.table.element.clientHeight || this.table.options.height) && this.table.options.virtualDom) { - this.renderMode = "virtual"; - } else { - this.renderMode = "classic"; - } -}; - -RowManager.prototype.getRenderMode = function () { - return this.renderMode; -}; - -RowManager.prototype.renderTable = function () { - var self = this; - - self.table.options.renderStarted.call(this.table); - - self.element.scrollTop = 0; - - switch (self.renderMode) { - case "classic": - self._simpleRender(); - break; - - case "virtual": - self._virtualRenderFill(); - break; - } - - if (self.firstRender) { - if (self.displayRowsCount) { - self.firstRender = false; - self.table.modules.layout.layout(); - } else { - self.renderEmptyScroll(); - } - } - - if (self.table.modExists("frozenColumns")) { - self.table.modules.frozenColumns.layout(); - } - - if (!self.displayRowsCount) { - if (self.table.options.placeholder) { - - if (this.renderMode) { - self.table.options.placeholder.setAttribute("tabulator-render-mode", this.renderMode); - } - - self.getElement().appendChild(self.table.options.placeholder); - } - } - - self.table.options.renderComplete.call(this.table); -}; - -//simple render on heightless table -RowManager.prototype._simpleRender = function () { - var self = this, - element = this.tableElement; - - self._clearVirtualDom(); - - if (self.displayRowsCount) { - - var onlyGroupHeaders = true; - - self.getDisplayRows().forEach(function (row, index) { - self.styleRow(row, index); - element.appendChild(row.getElement()); - row.initialize(true); - - if (row.type !== "group") { - onlyGroupHeaders = false; - } - }); - - if (onlyGroupHeaders) { - element.style.minWidth = self.table.columnManager.getWidth() + "px"; - } - } else { - self.renderEmptyScroll(); - } -}; - -//show scrollbars on empty table div -RowManager.prototype.renderEmptyScroll = function () { - this.tableElement.style.minWidth = this.table.columnManager.getWidth(); - this.tableElement.style.minHeight = "1px"; - // this.tableElement.style.visibility = "hidden"; -}; - -RowManager.prototype._clearVirtualDom = function () { - var element = this.tableElement; - - if (this.table.options.placeholder && this.table.options.placeholder.parentNode) { - this.table.options.placeholder.parentNode.removeChild(this.table.options.placeholder); - } - - // element.children.detach(); - while (element.firstChild) { - element.removeChild(element.firstChild); - }element.style.paddingTop = ""; - element.style.paddingBottom = ""; - element.style.minWidth = ""; - element.style.minHeight = ""; - element.style.visibility = ""; - - this.scrollTop = 0; - this.scrollLeft = 0; - this.vDomTop = 0; - this.vDomBottom = 0; - this.vDomTopPad = 0; - this.vDomBottomPad = 0; -}; - -RowManager.prototype.styleRow = function (row, index) { - var rowEl = row.getElement(); - - if (index % 2) { - rowEl.classList.add("tabulator-row-even"); - rowEl.classList.remove("tabulator-row-odd"); - } else { - rowEl.classList.add("tabulator-row-odd"); - rowEl.classList.remove("tabulator-row-even"); - } -}; - -//full virtual render -RowManager.prototype._virtualRenderFill = function (position, forceMove, offset) { - var self = this, - element = self.tableElement, - holder = self.element, - topPad = 0, - rowsHeight = 0, - topPadHeight = 0, - i = 0, - onlyGroupHeaders = true, - rows = self.getDisplayRows(); - - position = position || 0; - - offset = offset || 0; - - if (!position) { - self._clearVirtualDom(); - } else { - // element.children().detach(); - while (element.firstChild) { - element.removeChild(element.firstChild); - } //check if position is too close to bottom of table - var heightOccpied = (self.displayRowsCount - position + 1) * self.vDomRowHeight; - - if (heightOccpied < self.height) { - position -= Math.ceil((self.height - heightOccpied) / self.vDomRowHeight); - - if (position < 0) { - position = 0; - } - } - - //calculate initial pad - topPad = Math.min(Math.max(Math.floor(self.vDomWindowBuffer / self.vDomRowHeight), self.vDomWindowMinMarginRows), position); - position -= topPad; - } - - if (self.displayRowsCount && Tabulator.prototype.helpers.elVisible(self.element)) { - - self.vDomTop = position; - - self.vDomBottom = position - 1; - - while ((rowsHeight <= self.height + self.vDomWindowBuffer || i < self.vDomWindowMinTotalRows) && self.vDomBottom < self.displayRowsCount - 1) { - var index = self.vDomBottom + 1, - row = rows[index]; - - self.styleRow(row, index); - - element.appendChild(row.getElement()); - if (!row.initialized) { - row.initialize(true); - } else { - if (!row.heightInitialized) { - row.normalizeHeight(true); - } - } - - if (i < topPad) { - topPadHeight += row.getHeight(); - } else { - rowsHeight += row.getHeight(); - } - - if (row.type !== "group") { - onlyGroupHeaders = false; - } - - self.vDomBottom++; - i++; - } - - if (!position) { - this.vDomTopPad = 0; - //adjust rowheight to match average of rendered elements - self.vDomRowHeight = Math.floor((rowsHeight + topPadHeight) / i); - self.vDomBottomPad = self.vDomRowHeight * (self.displayRowsCount - self.vDomBottom - 1); - - self.vDomScrollHeight = topPadHeight + rowsHeight + self.vDomBottomPad - self.height; - } else { - self.vDomTopPad = !forceMove ? self.scrollTop - topPadHeight : self.vDomRowHeight * this.vDomTop + offset; - self.vDomBottomPad = self.vDomBottom == self.displayRowsCount - 1 ? 0 : Math.max(self.vDomScrollHeight - self.vDomTopPad - rowsHeight - topPadHeight, 0); - } - - element.style.paddingTop = self.vDomTopPad + "px"; - element.style.paddingBottom = self.vDomBottomPad + "px"; - - if (forceMove) { - this.scrollTop = self.vDomTopPad + topPadHeight + offset - (this.element.scrollWidth > this.element.clientWidth ? this.element.offsetHeight - this.element.clientHeight : 0); - } - - this.scrollTop = Math.min(this.scrollTop, this.element.scrollHeight - this.height); - - //adjust for horizontal scrollbar if present - if (this.element.scrollWidth > this.element.offsetWidth) { - this.scrollTop += this.element.offsetHeight - this.element.clientHeight; - } - - this.vDomScrollPosTop = this.scrollTop; - this.vDomScrollPosBottom = this.scrollTop; - - holder.scrollTop = this.scrollTop; - - element.style.minWidth = onlyGroupHeaders ? self.table.columnManager.getWidth() + "px" : ""; - - if (self.table.options.groupBy) { - if (self.table.modules.layout.getMode() != "fitDataFill" && self.displayRowsCount == self.table.modules.groupRows.countGroups()) { - self.tableElement.style.minWidth = self.table.columnManager.getWidth(); - } - } - } else { - this.renderEmptyScroll(); - } -}; - -//handle vertical scrolling -RowManager.prototype.scrollVertical = function (dir) { - var topDiff = this.scrollTop - this.vDomScrollPosTop; - var bottomDiff = this.scrollTop - this.vDomScrollPosBottom; - var margin = this.vDomWindowBuffer * 2; - - if (-topDiff > margin || bottomDiff > margin) { - //if big scroll redraw table; - var left = this.scrollLeft; - this._virtualRenderFill(Math.floor(this.element.scrollTop / this.element.scrollHeight * this.displayRowsCount)); - this.scrollHorizontal(left); - } else { - - if (dir) { - //scrolling up - if (topDiff < 0) { - this._addTopRow(-topDiff); - } - - if (topDiff < 0) { - - //hide bottom row if needed - if (this.vDomScrollHeight - this.scrollTop > this.vDomWindowBuffer) { - this._removeBottomRow(-bottomDiff); - } - } - } else { - //scrolling down - if (topDiff >= 0) { - - //hide top row if needed - if (this.scrollTop > this.vDomWindowBuffer) { - this._removeTopRow(topDiff); - } - } - - if (bottomDiff >= 0) { - this._addBottomRow(bottomDiff); - } - } - } -}; - -RowManager.prototype._addTopRow = function (topDiff) { - var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - - var table = this.tableElement, - rows = this.getDisplayRows(); - - if (this.vDomTop) { - var index = this.vDomTop - 1, - topRow = rows[index], - topRowHeight = topRow.getHeight() || this.vDomRowHeight; - - //hide top row if needed - if (topDiff >= topRowHeight) { - this.styleRow(topRow, index); - table.insertBefore(topRow.getElement(), table.firstChild); - if (!topRow.initialized || !topRow.heightInitialized) { - this.vDomTopNewRows.push(topRow); - - if (!topRow.heightInitialized) { - topRow.clearCellHeight(); - } - } - topRow.initialize(); - - this.vDomTopPad -= topRowHeight; - - if (this.vDomTopPad < 0) { - this.vDomTopPad = index * this.vDomRowHeight; - } - - if (!index) { - this.vDomTopPad = 0; - } - - table.style.paddingTop = this.vDomTopPad + "px"; - this.vDomScrollPosTop -= topRowHeight; - this.vDomTop--; - } - - topDiff = -(this.scrollTop - this.vDomScrollPosTop); - - if (i < this.vDomMaxRenderChain && this.vDomTop && topDiff >= (rows[this.vDomTop - 1].getHeight() || this.vDomRowHeight)) { - this._addTopRow(topDiff, i + 1); - } else { - this._quickNormalizeRowHeight(this.vDomTopNewRows); - } - } -}; - -RowManager.prototype._removeTopRow = function (topDiff) { - var table = this.tableElement, - topRow = this.getDisplayRows()[this.vDomTop], - topRowHeight = topRow.getHeight() || this.vDomRowHeight; - - if (topDiff >= topRowHeight) { - - var rowEl = topRow.getElement(); - rowEl.parentNode.removeChild(rowEl); - - this.vDomTopPad += topRowHeight; - table.style.paddingTop = this.vDomTopPad + "px"; - this.vDomScrollPosTop += this.vDomTop ? topRowHeight : topRowHeight + this.vDomWindowBuffer; - this.vDomTop++; - - topDiff = this.scrollTop - this.vDomScrollPosTop; - - this._removeTopRow(topDiff); - } -}; - -RowManager.prototype._addBottomRow = function (bottomDiff) { - var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - - var table = this.tableElement, - rows = this.getDisplayRows(); - - if (this.vDomBottom < this.displayRowsCount - 1) { - var index = this.vDomBottom + 1, - bottomRow = rows[index], - bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; - - //hide bottom row if needed - if (bottomDiff >= bottomRowHeight) { - this.styleRow(bottomRow, index); - table.appendChild(bottomRow.getElement()); - - if (!bottomRow.initialized || !bottomRow.heightInitialized) { - this.vDomBottomNewRows.push(bottomRow); - - if (!bottomRow.heightInitialized) { - bottomRow.clearCellHeight(); - } - } - - bottomRow.initialize(); - - this.vDomBottomPad -= bottomRowHeight; - - if (this.vDomBottomPad < 0 || index == this.displayRowsCount - 1) { - this.vDomBottomPad = 0; - } - - table.style.paddingBottom = this.vDomBottomPad + "px"; - this.vDomScrollPosBottom += bottomRowHeight; - this.vDomBottom++; - } - - bottomDiff = this.scrollTop - this.vDomScrollPosBottom; - - if (i < this.vDomMaxRenderChain && this.vDomBottom < this.displayRowsCount - 1 && bottomDiff >= (rows[this.vDomBottom + 1].getHeight() || this.vDomRowHeight)) { - this._addBottomRow(bottomDiff, i + 1); - } else { - this._quickNormalizeRowHeight(this.vDomBottomNewRows); - } - } -}; - -RowManager.prototype._removeBottomRow = function (bottomDiff) { - var table = this.tableElement, - bottomRow = this.getDisplayRows()[this.vDomBottom], - bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; - - if (bottomDiff >= bottomRowHeight) { - - var rowEl = bottomRow.getElement(); - - if (rowEl.parentNode) { - rowEl.parentNode.removeChild(rowEl); - } - - this.vDomBottomPad += bottomRowHeight; - - if (this.vDomBottomPad < 0) { - this.vDomBottomPad = 0; - } - - table.style.paddingBottom = this.vDomBottomPad + "px"; - this.vDomScrollPosBottom -= bottomRowHeight; - this.vDomBottom--; - - bottomDiff = -(this.scrollTop - this.vDomScrollPosBottom); - - this._removeBottomRow(bottomDiff); - } -}; - -RowManager.prototype._quickNormalizeRowHeight = function (rows) { - rows.forEach(function (row) { - row.calcHeight(); - }); - - rows.forEach(function (row) { - row.setCellHeight(); - }); - - rows.length = 0; -}; - -//normalize height of active rows -RowManager.prototype.normalizeHeight = function () { - this.activeRows.forEach(function (row) { - row.normalizeHeight(); - }); -}; - -//adjust the height of the table holder to fit in the Tabulator element -RowManager.prototype.adjustTableSize = function () { - - if (this.renderMode === "virtual") { - this.height = this.element.clientHeight; - this.vDomWindowBuffer = this.table.options.virtualDomBuffer || this.height; - - var otherHeight = this.columnManager.getElement().offsetHeight + (this.table.footerManager && !this.table.footerManager.external ? this.table.footerManager.getElement().offsetHeight : 0); - - this.element.style.minHeight = "calc(100% - " + otherHeight + "px)"; - this.element.style.height = "calc(100% - " + otherHeight + "px)"; - this.element.style.maxHeight = "calc(100% - " + otherHeight + "px)"; - } -}; - -//renitialize all rows -RowManager.prototype.reinitialize = function () { - this.rows.forEach(function (row) { - row.reinitialize(); - }); -}; - -//redraw table -RowManager.prototype.redraw = function (force) { - var pos = 0, - left = this.scrollLeft; - - this.adjustTableSize(); - - if (!force) { - - if (self.renderMode == "classic") { - - if (self.table.options.groupBy) { - self.refreshActiveData("group", false, false); - } else { - this._simpleRender(); - } - } else { - this.reRenderInPosition(); - this.scrollHorizontal(left); - } - - if (!this.displayRowsCount) { - if (this.table.options.placeholder) { - this.getElement().appendChild(this.table.options.placeholder); - } - } - } else { - this.renderTable(); - } -}; - -RowManager.prototype.resetScroll = function () { - this.element.scrollLeft = 0; - this.element.scrollTop = 0; - - if (this.table.browser === "ie") { - var event = document.createEvent("Event"); - event.initEvent("scroll", false, true); - this.element.dispatchEvent(event); - } else { - this.element.dispatchEvent(new Event('scroll')); - } -}; - -//public row object -var RowComponent = function RowComponent(row) { - this._row = row; -}; - -RowComponent.prototype.getData = function (transform) { - return this._row.getData(transform); -}; - -RowComponent.prototype.getElement = function () { - return this._row.getElement(); -}; - -RowComponent.prototype.getCells = function () { - var cells = []; - - this._row.getCells().forEach(function (cell) { - cells.push(cell.getComponent()); - }); - - return cells; -}; - -RowComponent.prototype.getCell = function (column) { - var cell = this._row.getCell(column); - return cell ? cell.getComponent() : false; -}; - -RowComponent.prototype.getIndex = function () { - return this._row.getData("data")[this._row.table.options.index]; -}; - -RowComponent.prototype.getPosition = function (active) { - return this._row.table.rowManager.getRowPosition(this._row, active); -}; - -RowComponent.prototype.delete = function () { - return this._row.delete(); -}; - -RowComponent.prototype.scrollTo = function () { - return this._row.table.rowManager.scrollToRow(this._row); -}; - -RowComponent.prototype.update = function (data) { - return this._row.updateData(data); -}; - -RowComponent.prototype.normalizeHeight = function () { - this._row.normalizeHeight(true); -}; - -RowComponent.prototype.select = function () { - this._row.table.modules.selectRow.selectRows(this._row); -}; - -RowComponent.prototype.deselect = function () { - this._row.table.modules.selectRow.deselectRows(this._row); -}; - -RowComponent.prototype.toggleSelect = function () { - this._row.table.modules.selectRow.toggleRow(this._row); -}; - -RowComponent.prototype.isSelected = function () { - return this._row.table.modules.selectRow.isRowSelected(this._row); -}; - -RowComponent.prototype._getSelf = function () { - return this._row; -}; - -RowComponent.prototype.freeze = function () { - if (this._row.table.modExists("frozenRows", true)) { - this._row.table.modules.frozenRows.freezeRow(this._row); - } -}; - -RowComponent.prototype.unfreeze = function () { - if (this._row.table.modExists("frozenRows", true)) { - this._row.table.modules.frozenRows.unfreezeRow(this._row); - } -}; - -RowComponent.prototype.treeCollapse = function () { - if (this._row.table.modExists("dataTree", true)) { - this._row.table.modules.dataTree.collapseRow(this._row); - } -}; - -RowComponent.prototype.treeExpand = function () { - if (this._row.table.modExists("dataTree", true)) { - this._row.table.modules.dataTree.expandRow(this._row); - } -}; - -RowComponent.prototype.treeToggle = function () { - if (this._row.table.modExists("dataTree", true)) { - this._row.table.modules.dataTree.toggleRow(this._row); - } -}; - -RowComponent.prototype.getTreeParent = function () { - if (this._row.table.modExists("dataTree", true)) { - return this._row.table.modules.dataTree.getTreeParent(this._row); - } - - return false; -}; - -RowComponent.prototype.getTreeChildren = function () { - if (this._row.table.modExists("dataTree", true)) { - return this._row.table.modules.dataTree.getTreeChildren(this._row); - } - - return false; -}; - -RowComponent.prototype.reformat = function () { - return this._row.reinitialize(); -}; - -RowComponent.prototype.getGroup = function () { - return this._row.getGroup().getComponent(); -}; - -RowComponent.prototype.getTable = function () { - return this._row.table; -}; - -RowComponent.prototype.getNextRow = function () { - return this._row.nextRow(); -}; - -RowComponent.prototype.getPrevRow = function () { - return this._row.prevRow(); -}; - -var Row = function Row(data, parent) { - this.table = parent.table; - this.parent = parent; - this.data = {}; - this.type = "row"; //type of element - this.element = this.createElement(); - this.modules = {}; //hold module variables; - this.cells = []; - this.height = 0; //hold element height - this.outerHeight = 0; //holde lements outer height - this.initialized = false; //element has been rendered - this.heightInitialized = false; //element has resized cells to fit - - this.setData(data); - this.generateElement(); -}; - -Row.prototype.createElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-row"); - el.setAttribute("role", "row"); - - return el; -}; - -Row.prototype.getElement = function () { - return this.element; -}; - -Row.prototype.generateElement = function () { - var self = this, - dblTap, - tapHold, - tap; - - //set row selection characteristics - if (self.table.options.selectable !== false && self.table.modExists("selectRow")) { - self.table.modules.selectRow.initializeRow(this); - } - - //setup movable rows - if (self.table.options.movableRows !== false && self.table.modExists("moveRow")) { - self.table.modules.moveRow.initializeRow(this); - } - - //setup data tree - if (self.table.options.dataTree !== false && self.table.modExists("dataTree")) { - self.table.modules.dataTree.initializeRow(this); - } - - //handle row click events - if (self.table.options.rowClick) { - self.element.addEventListener("click", function (e) { - self.table.options.rowClick(e, self.getComponent()); - }); - } - - if (self.table.options.rowDblClick) { - self.element.addEventListener("dblclick", function (e) { - self.table.options.rowDblClick(e, self.getComponent()); - }); - } - - if (self.table.options.rowContext) { - self.element.addEventListener("contextmenu", function (e) { - self.table.options.rowContext(e, self.getComponent()); - }); - } - - if (self.table.options.rowTap) { - - tap = false; - - self.element.addEventListener("touchstart", function (e) { - tap = true; - }); - - self.element.addEventListener("touchend", function (e) { - if (tap) { - self.table.options.rowTap(e, self.getComponent()); - } - - tap = false; - }); - } - - if (self.table.options.rowDblTap) { - - dblTap = null; - - self.element.addEventListener("touchend", function (e) { - - if (dblTap) { - clearTimeout(dblTap); - dblTap = null; - - self.table.options.rowDblTap(e, self.getComponent()); - } else { - - dblTap = setTimeout(function () { - clearTimeout(dblTap); - dblTap = null; - }, 300); - } - }); - } - - if (self.table.options.rowTapHold) { - - tapHold = null; - - self.element.addEventListener("touchstart", function (e) { - clearTimeout(tapHold); - - tapHold = setTimeout(function () { - clearTimeout(tapHold); - tapHold = null; - tap = false; - self.table.options.rowTapHold(e, self.getComponent()); - }, 1000); - }); - - self.element.addEventListener("touchend", function (e) { - clearTimeout(tapHold); - tapHold = null; - }); - } -}; - -Row.prototype.generateCells = function () { - this.cells = this.table.columnManager.generateCells(this); -}; - -//functions to setup on first render -Row.prototype.initialize = function (force) { - var self = this; - - if (!self.initialized || force) { - - self.deleteCells(); - - while (self.element.firstChild) { - self.element.removeChild(self.element.firstChild); - } //handle frozen cells - if (this.table.modExists("frozenColumns")) { - this.table.modules.frozenColumns.layoutRow(this); - } - - this.generateCells(); - - self.cells.forEach(function (cell) { - self.element.appendChild(cell.getElement()); - cell.cellRendered(); - }); - - if (force) { - self.normalizeHeight(); - } - - //setup movable rows - if (self.table.options.dataTree && self.table.modExists("dataTree")) { - self.table.modules.dataTree.layoutRow(this); - } - - //setup movable rows - if (self.table.options.responsiveLayout === "collapse" && self.table.modExists("responsiveLayout")) { - self.table.modules.responsiveLayout.layoutRow(this); - } - - if (self.table.options.rowFormatter) { - self.table.options.rowFormatter(self.getComponent()); - } - - //set resizable handles - if (self.table.options.resizableRows && self.table.modExists("resizeRows")) { - self.table.modules.resizeRows.initializeRow(self); - } - - self.initialized = true; - } -}; - -Row.prototype.reinitializeHeight = function () { - this.heightInitialized = false; - - if (this.element.offsetParent !== null) { - this.normalizeHeight(true); - } -}; - -Row.prototype.reinitialize = function () { - this.initialized = false; - this.heightInitialized = false; - this.height = 0; - - if (this.element.offsetParent !== null) { - this.initialize(true); - } -}; - -//get heights when doing bulk row style calcs in virtual DOM -Row.prototype.calcHeight = function () { - - var maxHeight = 0, - minHeight = this.table.options.resizableRows ? this.element.clientHeight : 0; - - this.cells.forEach(function (cell) { - var height = cell.getHeight(); - if (height > maxHeight) { - maxHeight = height; - } - }); - - this.height = Math.max(maxHeight, minHeight); - this.outerHeight = this.element.offsetHeight; -}; - -//set of cells -Row.prototype.setCellHeight = function () { - var height = this.height; - - this.cells.forEach(function (cell) { - cell.setHeight(height); - }); - - this.heightInitialized = true; -}; - -Row.prototype.clearCellHeight = function () { - this.cells.forEach(function (cell) { - - cell.clearHeight(); - }); -}; - -//normalize the height of elements in the row -Row.prototype.normalizeHeight = function (force) { - - if (force) { - this.clearCellHeight(); - } - - this.calcHeight(); - - this.setCellHeight(); -}; - -Row.prototype.setHeight = function (height) { - this.height = height; - - this.setCellHeight(); -}; - -//set height of rows -Row.prototype.setHeight = function (height, force) { - if (this.height != height || force) { - - this.height = height; - - this.setCellHeight(); - - // this.outerHeight = this.element.outerHeight(); - this.outerHeight = this.element.offsetHeight; - } -}; - -//return rows outer height -Row.prototype.getHeight = function () { - return this.outerHeight; -}; - -//return rows outer Width -Row.prototype.getWidth = function () { - return this.element.offsetWidth; -}; - -//////////////// Cell Management ///////////////// - -Row.prototype.deleteCell = function (cell) { - var index = this.cells.indexOf(cell); - - if (index > -1) { - this.cells.splice(index, 1); - } -}; - -//////////////// Data Management ///////////////// - -Row.prototype.setData = function (data) { - var self = this; - - if (self.table.modExists("mutator")) { - self.data = self.table.modules.mutator.transformRow(data, "data"); - } else { - self.data = data; - } -}; - -//update the rows data -Row.prototype.updateData = function (data) { - var _this5 = this; - - var self = this; - - return new Promise(function (resolve, reject) { - - if (typeof data === "string") { - data = JSON.parse(data); - } - - //mutate incomming data if needed - if (self.table.modExists("mutator")) { - data = self.table.modules.mutator.transformRow(data, "data", true); - } - - //set data - for (var attrname in data) { - self.data[attrname] = data[attrname]; - } - - //update affected cells only - for (var attrname in data) { - var cell = _this5.getCell(attrname); - - if (cell) { - if (cell.getValue() != data[attrname]) { - cell.setValueProcessData(data[attrname]); - } - } - } - - //Partial reinitialization if visible - if (Tabulator.prototype.helpers.elVisible(_this5.element)) { - self.normalizeHeight(); - - if (self.table.options.rowFormatter) { - self.table.options.rowFormatter(self.getComponent()); - } - } else { - _this5.initialized = false; - _this5.height = 0; - } - - //self.reinitialize(); - - self.table.options.rowUpdated.call(_this5.table, self.getComponent()); - - resolve(); - }); -}; - -Row.prototype.getData = function (transform) { - var self = this; - - if (transform) { - if (self.table.modExists("accessor")) { - return self.table.modules.accessor.transformRow(self.data, transform); - } - } else { - return this.data; - } -}; - -Row.prototype.getCell = function (column) { - var match = false; - - column = this.table.columnManager.findColumn(column); - - match = this.cells.find(function (cell) { - return cell.column === column; - }); - - return match; -}; - -Row.prototype.getCellIndex = function (findCell) { - return this.cells.findIndex(function (cell) { - return cell === findCell; - }); -}; - -Row.prototype.findNextEditableCell = function (index) { - var nextCell = false; - - if (index < this.cells.length - 1) { - for (var i = index + 1; i < this.cells.length; i++) { - var cell = this.cells[i]; - - if (cell.column.modules.edit && Tabulator.prototype.helpers.elVisible(cell.getElement())) { - var allowEdit = true; - - if (typeof cell.column.modules.edit.check == "function") { - allowEdit = cell.column.modules.edit.check(cell.getComponent()); - } - - if (allowEdit) { - nextCell = cell; - break; - } - } - } - } - - return nextCell; -}; - -Row.prototype.findPrevEditableCell = function (index) { - var prevCell = false; - - if (index > 0) { - for (var i = index - 1; i >= 0; i--) { - var cell = this.cells[i], - allowEdit = true; - - if (cell.column.modules.edit && Tabulator.prototype.helpers.elVisible(cell.getElement())) { - if (typeof cell.column.modules.edit.check == "function") { - allowEdit = cell.column.modules.edit.check(cell.getComponent()); - } - - if (allowEdit) { - prevCell = cell; - break; - } - } - } - } - - return prevCell; -}; - -Row.prototype.getCells = function () { - return this.cells; -}; - -Row.prototype.nextRow = function () { - var row = this.table.rowManager.nextDisplayRow(this, true); - return row ? row.getComponent() : false; -}; - -Row.prototype.prevRow = function () { - var row = this.table.rowManager.prevDisplayRow(this, true); - return row ? row.getComponent() : false; -}; - -///////////////////// Actions ///////////////////// - -Row.prototype.delete = function () { - var _this6 = this; - - return new Promise(function (resolve, reject) { - var index = _this6.table.rowManager.getRowIndex(_this6); - - _this6.deleteActual(); - - if (_this6.table.options.history && _this6.table.modExists("history")) { - - if (index) { - index = _this6.table.rowManager.rows[index - 1]; - } - - _this6.table.modules.history.action("rowDelete", _this6, { data: _this6.getData(), pos: !index, index: index }); - } - - resolve(); - }); -}; - -Row.prototype.deleteActual = function () { - - var index = this.table.rowManager.getRowIndex(this); - - //deselect row if it is selected - if (this.table.modExists("selectRow")) { - this.table.modules.selectRow._deselectRow(this, true); - } - - // if(this.table.options.dataTree && this.table.modExists("dataTree")){ - // this.table.modules.dataTree.collapseRow(this, true); - // } - - this.table.rowManager.deleteRow(this); - - this.deleteCells(); - - this.initialized = false; - this.heightInitialized = false; - - //remove from group - if (this.modules.group) { - this.modules.group.removeRow(this); - } - - //recalc column calculations if present - if (this.table.modExists("columnCalcs")) { - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - this.table.modules.columnCalcs.recalcRowGroup(this); - } else { - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - } -}; - -Row.prototype.deleteCells = function () { - var cellCount = this.cells.length; - - for (var i = 0; i < cellCount; i++) { - this.cells[0].delete(); - } -}; - -Row.prototype.wipe = function () { - this.deleteCells(); - - // this.element.children().each(function(){ - // $(this).remove(); - // }) - // this.element.empty(); - - while (this.element.firstChild) { - this.element.removeChild(this.element.firstChild); - } // this.element.remove(); - if (this.element.parentNode) { - this.element.parentNode.removeChild(this.element); - } -}; - -Row.prototype.getGroup = function () { - return this.modules.group || false; -}; - -//////////////// Object Generation ///////////////// -Row.prototype.getComponent = function () { - return new RowComponent(this); -}; - -//public row object -var CellComponent = function CellComponent(cell) { - this._cell = cell; -}; - -CellComponent.prototype.getValue = function () { - return this._cell.getValue(); -}; - -CellComponent.prototype.getOldValue = function () { - return this._cell.getOldValue(); -}; - -CellComponent.prototype.getElement = function () { - return this._cell.getElement(); -}; - -CellComponent.prototype.getRow = function () { - return this._cell.row.getComponent(); -}; - -CellComponent.prototype.getData = function () { - return this._cell.row.getData(); -}; - -CellComponent.prototype.getField = function () { - return this._cell.column.getField(); -}; - -CellComponent.prototype.getColumn = function () { - return this._cell.column.getComponent(); -}; - -CellComponent.prototype.setValue = function (value, mutate) { - if (typeof mutate == "undefined") { - mutate = true; - } - - this._cell.setValue(value, mutate); -}; - -CellComponent.prototype.restoreOldValue = function () { - this._cell.setValueActual(this._cell.getOldValue()); -}; - -CellComponent.prototype.edit = function (force) { - return this._cell.edit(force); -}; - -CellComponent.prototype.cancelEdit = function () { - this._cell.cancelEdit(); -}; - -CellComponent.prototype.nav = function () { - return this._cell.nav(); -}; - -CellComponent.prototype.checkHeight = function () { - this._cell.checkHeight(); -}; - -CellComponent.prototype.getTable = function () { - return this._cell.table; -}; - -CellComponent.prototype._getSelf = function () { - return this._cell; -}; - -var Cell = function Cell(column, row) { - - this.table = column.table; - this.column = column; - this.row = row; - this.element = null; - this.value = null; - this.oldValue = null; - - this.height = null; - this.width = null; - this.minWidth = null; - - this.build(); -}; - -//////////////// Setup Functions ///////////////// - -//generate element -Cell.prototype.build = function () { - this.generateElement(); - - this.setWidth(this.column.width); - - this._configureCell(); - - this.setValueActual(this.column.getFieldValue(this.row.data)); -}; - -Cell.prototype.generateElement = function () { - this.element = document.createElement('div'); - this.element.className = "tabulator-cell"; - this.element.setAttribute("role", "gridcell"); - this.element = this.element; -}; - -Cell.prototype._configureCell = function () { - var self = this, - cellEvents = self.column.cellEvents, - element = self.element, - field = this.column.getField(), - dblTap, - tapHold, - tap; - - //set text alignment - element.style.textAlign = self.column.hozAlign; - - if (field) { - element.setAttribute("tabulator-field", field); - } - - if (self.column.definition.cssClass) { - element.classList.add(self.column.definition.cssClass); - } - - //set event bindings - if (cellEvents.cellClick || self.table.options.cellClick) { - self.element.addEventListener("click", function (e) { - var component = self.getComponent(); - - if (cellEvents.cellClick) { - cellEvents.cellClick.call(self.table, e, component); - } - - if (self.table.options.cellClick) { - self.table.options.cellClick.call(self.table, e, component); - } - }); - } - - if (cellEvents.cellDblClick || this.table.options.cellDblClick) { - element.addEventListener("dblclick", function (e) { - var component = self.getComponent(); - - if (cellEvents.cellDblClick) { - cellEvents.cellDblClick.call(self.table, e, component); - } - - if (self.table.options.cellDblClick) { - self.table.options.cellDblClick.call(self.table, e, component); - } - }); - } - - if (cellEvents.cellContext || this.table.options.cellContext) { - element.addEventListener("contextmenu", function (e) { - var component = self.getComponent(); - - if (cellEvents.cellContext) { - cellEvents.cellContext.call(self.table, e, component); - } - - if (self.table.options.cellContext) { - self.table.options.cellContext.call(self.table, e, component); - } - }); - } - - if (this.table.options.tooltipGenerationMode === "hover") { - //update tooltip on mouse enter - element.addEventListener("mouseenter", function (e) { - self._generateTooltip(); - }); - } - - if (cellEvents.cellTap || this.table.options.cellTap) { - tap = false; - - element.addEventListener("touchstart", function (e) { - tap = true; - }); - - element.addEventListener("touchend", function (e) { - if (tap) { - var component = self.getComponent(); - - if (cellEvents.cellTap) { - cellEvents.cellTap.call(self.table, e, component); - } - - if (self.table.options.cellTap) { - self.table.options.cellTap.call(self.table, e, component); - } - } - - tap = false; - }); - } - - if (cellEvents.cellDblTap || this.table.options.cellDblTap) { - dblTap = null; - - element.addEventListener("touchend", function (e) { - - if (dblTap) { - clearTimeout(dblTap); - dblTap = null; - - var component = self.getComponent(); - - if (cellEvents.cellDblTap) { - cellEvents.cellDblTap.call(self.table, e, component); - } - - if (self.table.options.cellDblTap) { - self.table.options.cellDblTap.call(self.table, e, component); - } - } else { - - dblTap = setTimeout(function () { - clearTimeout(dblTap); - dblTap = null; - }, 300); - } - }); - } - - if (cellEvents.cellTapHold || this.table.options.cellTapHold) { - tapHold = null; - - element.addEventListener("touchstart", function (e) { - clearTimeout(tapHold); - - tapHold = setTimeout(function () { - clearTimeout(tapHold); - tapHold = null; - tap = false; - var component = self.getComponent(); - - if (cellEvents.cellTapHold) { - cellEvents.cellTapHold.call(self.table, e, component); - } - - if (self.table.options.cellTapHold) { - self.table.options.cellTapHold.call(self.table, e, component); - } - }, 1000); - }); - - element.addEventListener("touchend", function (e) { - clearTimeout(tapHold); - tapHold = null; - }); - } - - if (self.column.modules.edit) { - self.table.modules.edit.bindEditor(self); - } - - if (self.column.definition.rowHandle && self.table.options.movableRows !== false && self.table.modExists("moveRow")) { - self.table.modules.moveRow.initializeCell(self); - } - - //hide cell if not visible - if (!self.column.visible) { - self.hide(); - } -}; - -//generate cell contents -Cell.prototype._generateContents = function () { - var val; - - if (this.table.modExists("format")) { - val = this.table.modules.format.formatValue(this); - } else { - val = this.element.innerHTML = this.value; - } - - switch (typeof val === 'undefined' ? 'undefined' : _typeof(val)) { - case "object": - if (val instanceof Node) { - this.element.appendChild(val); - } else { - this.element.innerHTML = ""; - console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:", val); - } - break; - case "undefined": - case "null": - this.element.innerHTML = ""; - break; - default: - this.element.innerHTML = val; - } -}; - -Cell.prototype.cellRendered = function () { - if (this.table.modExists("format") && this.table.modules.format.cellRendered) { - this.table.modules.format.cellRendered(this); - } -}; - -//generate tooltip text -Cell.prototype._generateTooltip = function () { - var tooltip = this.column.tooltip; - - if (tooltip) { - if (tooltip === true) { - tooltip = this.value; - } else if (typeof tooltip == "function") { - tooltip = tooltip(this.getComponent()); - - if (tooltip === false) { - tooltip = ""; - } - } - - if (typeof tooltip === "undefined") { - tooltip = ""; - } - - this.element.setAttribute("title", tooltip); - } else { - this.element.setAttribute("title", ""); - } -}; - -//////////////////// Getters //////////////////// -Cell.prototype.getElement = function () { - return this.element; -}; - -Cell.prototype.getValue = function () { - return this.value; -}; - -Cell.prototype.getOldValue = function () { - return this.oldValue; -}; - -//////////////////// Actions //////////////////// - -Cell.prototype.setValue = function (value, mutate) { - - var changed = this.setValueProcessData(value, mutate), - component; - - if (changed) { - if (this.table.options.history && this.table.modExists("history")) { - this.table.modules.history.action("cellEdit", this, { oldValue: this.oldValue, newValue: this.value }); - } - - component = this.getComponent(); - - if (this.column.cellEvents.cellEdited) { - this.column.cellEvents.cellEdited.call(this.table, component); - } - - this.table.options.cellEdited.call(this.table, component); - - this.table.options.dataEdited.call(this.table, this.table.rowManager.getData()); - } - - if (this.table.modExists("columnCalcs")) { - if (this.column.definition.topCalc || this.column.definition.bottomCalc) { - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - this.table.modules.columnCalcs.recalcRowGroup(this.row); - } else { - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - } - } -}; - -Cell.prototype.setValueProcessData = function (value, mutate) { - var changed = false; - - if (this.value != value) { - - changed = true; - - if (mutate) { - if (this.column.modules.mutate) { - value = this.table.modules.mutator.transformCell(this, value); - } - } - } - - this.setValueActual(value); - - return changed; -}; - -Cell.prototype.setValueActual = function (value) { - this.oldValue = this.value; - - this.value = value; - - this.column.setFieldValue(this.row.data, value); - - this._generateContents(); - this._generateTooltip(); - - //set resizable handles - if (this.table.options.resizableColumns && this.table.modExists("resizeColumns")) { - this.table.modules.resizeColumns.initializeColumn("cell", this.column, this.element); - } - - //handle frozen cells - if (this.table.modExists("frozenColumns")) { - this.table.modules.frozenColumns.layoutElement(this.element, this.column); - } -}; - -Cell.prototype.setWidth = function (width) { - this.width = width; - // this.element.css("width", width || ""); - this.element.style.width = width ? width + "px" : ""; -}; - -Cell.prototype.getWidth = function () { - return this.width || this.element.offsetWidth; -}; - -Cell.prototype.setMinWidth = function (minWidth) { - this.minWidth = minWidth; - this.element.style.minWidth = minWidth ? minWidth + "px" : ""; -}; - -Cell.prototype.checkHeight = function () { - // var height = this.element.css("height"); - - this.row.reinitializeHeight(); -}; - -Cell.prototype.clearHeight = function () { - this.element.style.height = ""; - this.height = null; -}; - -Cell.prototype.setHeight = function (height) { - this.height = height; - this.element.style.height = height ? height + "px" : ""; -}; - -Cell.prototype.getHeight = function () { - return this.height || this.element.offsetHeight; -}; - -Cell.prototype.show = function () { - this.element.style.display = ""; -}; - -Cell.prototype.hide = function () { - this.element.style.display = "none"; -}; - -Cell.prototype.edit = function (force) { - if (this.table.modExists("edit", true)) { - return this.table.modules.edit.editCell(this, force); - } -}; - -Cell.prototype.cancelEdit = function () { - if (this.table.modExists("edit", true)) { - var editing = this.table.modules.edit.getCurrentCell(); - - if (editing && editing._getSelf() === this) { - this.table.modules.edit.cancelEdit(); - } else { - console.warn("Cancel Editor Error - This cell is not currently being edited "); - } - } -}; - -Cell.prototype.delete = function () { - this.element.parentNode.removeChild(this.element); - this.column.deleteCell(this); - this.row.deleteCell(this); -}; - -//////////////// Navigation ///////////////// - -Cell.prototype.nav = function () { - - var self = this, - nextCell = false, - index = this.row.getCellIndex(this); - - return { - next: function next() { - var nextCell = this.right(), - nextRow; - - if (!nextCell) { - nextRow = self.table.rowManager.nextDisplayRow(self.row, true); - - if (nextRow) { - nextCell = nextRow.findNextEditableCell(-1); - - if (nextCell) { - nextCell.edit(); - return true; - } - } - } else { - return true; - } - - return false; - }, - prev: function prev() { - var nextCell = this.left(), - prevRow; - - if (!nextCell) { - prevRow = self.table.rowManager.prevDisplayRow(self.row, true); - - if (prevRow) { - nextCell = prevRow.findPrevEditableCell(prevRow.cells.length); - - if (nextCell) { - nextCell.edit(); - return true; - } - } - } else { - return true; - } - - return false; - }, - left: function left() { - - nextCell = self.row.findPrevEditableCell(index); - - if (nextCell) { - nextCell.edit(); - return true; - } else { - return false; - } - }, - right: function right() { - nextCell = self.row.findNextEditableCell(index); - - if (nextCell) { - nextCell.edit(); - return true; - } else { - return false; - } - }, - up: function up() { - var nextRow = self.table.rowManager.prevDisplayRow(self.row, true); - - if (nextRow) { - nextRow.cells[index].edit(); - } - }, - down: function down() { - var nextRow = self.table.rowManager.nextDisplayRow(self.row, true); - - if (nextRow) { - nextRow.cells[index].edit(); - } - } - - }; -}; - -Cell.prototype.getIndex = function () { - this.row.getCellIndex(this); -}; - -//////////////// Object Generation ///////////////// -Cell.prototype.getComponent = function () { - return new CellComponent(this); -}; -var FooterManager = function FooterManager(table) { - this.table = table; - this.active = false; - this.element = this.createElement(); //containing element - this.external = false; - this.links = []; - - this._initialize(); -}; - -FooterManager.prototype.createElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-footer"); - - return el; -}; - -FooterManager.prototype._initialize = function (element) { - if (this.table.options.footerElement) { - - switch (_typeof(this.table.options.footerElement)) { - case "string": - - if (this.table.options.footerElement[0] === "<") { - this.element.innerHTML = this.table.options.footerElement; - } else { - this.external = true; - this.element = document.querySelector(this.table.options.footerElement); - } - break; - default: - this.element = this.table.options.footerElement; - break; - } - } -}; - -FooterManager.prototype.getElement = function () { - return this.element; -}; - -FooterManager.prototype.append = function (element, parent) { - this.activate(parent); - - this.element.appendChild(element); - this.table.rowManager.adjustTableSize(); -}; - -FooterManager.prototype.prepend = function (element, parent) { - this.activate(parent); - - this.element.insertBefore(element, this.element.firstChild); - this.table.rowManager.adjustTableSize(); -}; - -FooterManager.prototype.remove = function (element) { - element.parentNode.removeChild(element); - this.deactivate(); -}; - -FooterManager.prototype.deactivate = function (force) { - if (!this.element.firstChild || force) { - if (!this.external) { - this.element.parentNode.removeChild(this.element); - } - this.active = false; - } - - // this.table.rowManager.adjustTableSize(); -}; - -FooterManager.prototype.activate = function (parent) { - if (!this.active) { - this.active = true; - if (!this.external) { - this.table.element.appendChild(this.getElement()); - this.table.element.style.display = ''; - } - } - - if (parent) { - this.links.push(parent); - } -}; - -FooterManager.prototype.redraw = function () { - this.links.forEach(function (link) { - link.footerRedraw(); - }); -}; - -var Tabulator = function Tabulator(element, options) { - - this.options = {}; - - this.columnManager = null; // hold Column Manager - this.rowManager = null; //hold Row Manager - this.footerManager = null; //holder Footer Manager - this.browser = ""; //hold current browser type - this.browserSlow = false; //handle reduced functionality for slower browsers - - this.modules = {}; //hold all modules bound to this table - - this.initializeElement(element); - this.initializeOptions(options || {}); - this._create(); - - Tabulator.prototype.comms.register(this); //register table for inderdevice communication -}; - -//default setup options -Tabulator.prototype.defaultOptions = { - - height: false, //height of tabulator - - layout: "fitData", ///layout type "fitColumns" | "fitData" - layoutColumnsOnNewData: false, //update column widths on setData - - columnMinWidth: 40, //minimum global width for a column - columnVertAlign: "top", //vertical alignment of column headers - - resizableColumns: true, //resizable columns - resizableRows: false, //resizable rows - autoResize: true, //auto resize table - - columns: [], //store for colum header info - - data: [], //default starting data - - nestedFieldSeparator: ".", //seperatpr for nested data - - tooltips: false, //Tool tip value - tooltipsHeader: false, //Tool tip for headers - tooltipGenerationMode: "load", //when to generate tooltips - - initialSort: false, //initial sorting criteria - initialFilter: false, //initial filtering criteria - - columnHeaderSortMulti: true, //multiple or single column sorting - - sortOrderReverse: false, //reverse internal sort ordering - - footerElement: false, //hold footer element - - index: "id", //filed for row index - - keybindings: [], //array for keybindings - - clipboard: false, //enable clipboard - clipboardCopyStyled: true, //formatted table data - clipboardCopySelector: "active", //method of chosing which data is coppied to the clipboard - clipboardCopyFormatter: "table", //convert data to a clipboard string - clipboardPasteParser: "table", //convert pasted clipboard data to rows - clipboardPasteAction: "insert", //how to insert pasted data into the table - clipboardCopyConfig: false, //clipboard config - - clipboardCopied: function clipboardCopied() {}, //data has been copied to the clipboard - clipboardPasted: function clipboardPasted() {}, //data has been pasted into the table - clipboardPasteError: function clipboardPasteError() {}, //data has not successfully been pasted into the table - - downloadDataFormatter: false, //function to manipulate table data before it is downloaded - downloadReady: function downloadReady(data, blob) { - return blob; - }, //function to manipulate download data - downloadComplete: false, //function to manipulate download data - downloadConfig: false, //download config - - dataTree: false, //enable data tree - dataTreeBranchElement: true, //show data tree branch element - dataTreeChildIndent: 9, //data tree child indent in px - dataTreeChildField: "_children", //data tre column field to look for child rows - dataTreeCollapseElement: false, //data tree row collapse element - dataTreeExpandElement: false, //data tree row expand element - dataTreeStartExpanded: false, - dataTreeRowExpanded: function dataTreeRowExpanded() {}, //row has been expanded - dataTreeRowCollapsed: function dataTreeRowCollapsed() {}, //row has been collapsed - - - addRowPos: "bottom", //position to insert blank rows, top|bottom - - selectable: "highlight", //highlight rows on hover - selectableRangeMode: "drag", //highlight rows on hover - selectableRollingSelection: true, //roll selection once maximum number of selectable rows is reached - selectablePersistence: true, // maintain selection when table view is updated - selectableCheck: function selectableCheck(data, row) { - return true; - }, //check wheather row is selectable - - headerFilterPlaceholder: false, //placeholder text to display in header filters - - history: false, //enable edit history - - locale: false, //current system language - langs: {}, - - virtualDom: true, //enable DOM virtualization - - persistentLayout: false, //store column layout in memory - persistentSort: false, //store sorting in memory - persistentFilter: false, //store filters in memory - persistenceID: "", //key for persistent storage - persistenceMode: true, //mode for storing persistence information - - responsiveLayout: false, //responsive layout flags - responsiveLayoutCollapseStartOpen: true, //start showing collapsed data - responsiveLayoutCollapseUseFormatters: true, //responsive layout collapse formatter - responsiveLayoutCollapseFormatter: false, //responsive layout collapse formatter - - pagination: false, //set pagination type - paginationSize: false, //set number of rows to a page - paginationButtonCount: 5, // set count of page button - paginationElement: false, //element to hold pagination numbers - paginationDataSent: {}, //pagination data sent to the server - paginationDataReceived: {}, //pagination data received from the server - paginationAddRow: "page", //add rows on table or page - - ajaxURL: false, //url for ajax loading - ajaxURLGenerator: false, - ajaxParams: {}, //params for ajax loading - ajaxConfig: "get", //ajax request type - ajaxContentType: "form", //ajax request type - ajaxRequestFunc: false, //promise function - ajaxLoader: true, //show loader - ajaxLoaderLoading: false, //loader element - ajaxLoaderError: false, //loader element - ajaxFiltering: false, - ajaxSorting: false, - ajaxProgressiveLoad: false, //progressive loading - ajaxProgressiveLoadDelay: 0, //delay between requests - ajaxProgressiveLoadScrollMargin: 0, //margin before scroll begins - - groupBy: false, //enable table grouping and set field to group by - groupStartOpen: true, //starting state of group - groupValues: false, - - groupHeader: false, //header generation function - - movableColumns: false, //enable movable columns - - movableRows: false, //enable movable rows - movableRowsConnectedTables: false, //tables for movable rows to be connected to - movableRowsSender: false, - movableRowsReceiver: "insert", - movableRowsSendingStart: function movableRowsSendingStart() {}, - movableRowsSent: function movableRowsSent() {}, - movableRowsSentFailed: function movableRowsSentFailed() {}, - movableRowsSendingStop: function movableRowsSendingStop() {}, - movableRowsReceivingStart: function movableRowsReceivingStart() {}, - movableRowsReceived: function movableRowsReceived() {}, - movableRowsReceivedFailed: function movableRowsReceivedFailed() {}, - movableRowsReceivingStop: function movableRowsReceivingStop() {}, - - scrollToRowPosition: "top", - scrollToRowIfVisible: true, - - scrollToColumnPosition: "left", - scrollToColumnIfVisible: true, - - rowFormatter: false, - - placeholder: false, - - //table building callbacks - tableBuilding: function tableBuilding() {}, - tableBuilt: function tableBuilt() {}, - - //render callbacks - renderStarted: function renderStarted() {}, - renderComplete: function renderComplete() {}, - - //row callbacks - rowClick: false, - rowDblClick: false, - rowContext: false, - rowTap: false, - rowDblTap: false, - rowTapHold: false, - rowAdded: function rowAdded() {}, - rowDeleted: function rowDeleted() {}, - rowMoved: function rowMoved() {}, - rowUpdated: function rowUpdated() {}, - rowSelectionChanged: function rowSelectionChanged() {}, - rowSelected: function rowSelected() {}, - rowDeselected: function rowDeselected() {}, - rowResized: function rowResized() {}, - - //cell callbacks - //row callbacks - cellClick: false, - cellDblClick: false, - cellContext: false, - cellTap: false, - cellDblTap: false, - cellTapHold: false, - cellEditing: function cellEditing() {}, - cellEdited: function cellEdited() {}, - cellEditCancelled: function cellEditCancelled() {}, - - //column callbacks - columnMoved: false, - columnResized: function columnResized() {}, - columnTitleChanged: function columnTitleChanged() {}, - columnVisibilityChanged: function columnVisibilityChanged() {}, - - //HTML iport callbacks - htmlImporting: function htmlImporting() {}, - htmlImported: function htmlImported() {}, - - //data callbacks - dataLoading: function dataLoading() {}, - dataLoaded: function dataLoaded() {}, - dataEdited: function dataEdited() {}, - - //ajax callbacks - ajaxRequesting: function ajaxRequesting() {}, - ajaxResponse: false, - ajaxError: function ajaxError() {}, - - //filtering callbacks - dataFiltering: false, - dataFiltered: false, - - //sorting callbacks - dataSorting: function dataSorting() {}, - dataSorted: function dataSorted() {}, - - //grouping callbacks - groupToggleElement: "arrow", - groupClosedShowCalcs: false, - dataGrouping: function dataGrouping() {}, - dataGrouped: false, - groupVisibilityChanged: function groupVisibilityChanged() {}, - groupClick: false, - groupDblClick: false, - groupContext: false, - groupTap: false, - groupDblTap: false, - groupTapHold: false, - - columnCalcs: true, - - //pagination callbacks - pageLoaded: function pageLoaded() {}, - - //localization callbacks - localized: function localized() {}, - - //validation has failed - validationFailed: function validationFailed() {}, - - //history callbacks - historyUndo: function historyUndo() {}, - historyRedo: function historyRedo() {} - -}; - -Tabulator.prototype.initializeOptions = function (options) { - for (var key in this.defaultOptions) { - if (key in options) { - this.options[key] = options[key]; - } else { - if (Array.isArray(this.defaultOptions[key])) { - this.options[key] = []; - } else if (_typeof(this.defaultOptions[key]) === "object") { - this.options[key] = {}; - } else { - this.options[key] = this.defaultOptions[key]; - } - } - } -}; - -Tabulator.prototype.initializeElement = function (element) { - - if (element instanceof HTMLElement) { - this.element = element; - return true; - } else if (typeof element === "string") { - this.element = document.querySelector(element); - - if (this.element) { - return true; - } else { - console.error("Tabulator Creation Error - no element found matching selector: ", element); - return false; - } - } else { - console.error("Tabulator Creation Error - Invalid element provided:", element); - return false; - } -}; - -//convert depricated functionality to new functions -Tabulator.prototype._mapDepricatedFunctionality = function () {}; - -//concreate table -Tabulator.prototype._create = function () { - this._clearObjectPointers(); - - this._mapDepricatedFunctionality(); - - this.bindModules(); - - if (this.element.tagName === "TABLE") { - if (this.modExists("htmlTableImport", true)) { - this.modules.htmlTableImport.parseTable(); - } - } - - this.columnManager = new ColumnManager(this); - this.rowManager = new RowManager(this); - this.footerManager = new FooterManager(this); - - this.columnManager.setRowManager(this.rowManager); - this.rowManager.setColumnManager(this.columnManager); - - this._buildElement(); - - this._loadInitialData(); -}; - -//clear pointers to objects in default config object -Tabulator.prototype._clearObjectPointers = function () { - this.options.columns = this.options.columns.slice(0); - this.options.data = this.options.data.slice(0); -}; - -//build tabulator element -Tabulator.prototype._buildElement = function () { - var element = this.element, - mod = this.modules, - options = this.options; - - options.tableBuilding.call(this); - - element.classList.add("tabulator"); - element.setAttribute("role", "grid"); - - //empty element - while (element.firstChild) { - element.removeChild(element.firstChild); - } //set table height - if (options.height) { - options.height = isNaN(options.height) ? options.height : options.height + "px"; - element.style.height = options.height; - } - - this.rowManager.initialize(); - - this._detectBrowser(); - - if (this.modExists("layout", true)) { - mod.layout.initialize(options.layout); - } - - //set localization - if (options.headerFilterPlaceholder !== false) { - mod.localize.setHeaderFilterPlaceholder(options.headerFilterPlaceholder); - } - - for (var locale in options.langs) { - mod.localize.installLang(locale, options.langs[locale]); - } - - mod.localize.setLocale(options.locale); - - //configure placeholder element - if (typeof options.placeholder == "string") { - - var el = document.createElement("div"); - el.classList.add("tabulator-placeholder"); - - var span = document.createElement("span"); - span.innerHTML = options.placeholder; - - el.appendChild(span); - - options.placeholder = el; - } - - //build table elements - element.appendChild(this.columnManager.getElement()); - element.appendChild(this.rowManager.getElement()); - - if (options.footerElement) { - this.footerManager.activate(); - } - - if (options.dataTree && this.modExists("dataTree", true)) { - mod.dataTree.initialize(); - } - - if ((options.persistentLayout || options.persistentSort || options.persistentFilter) && this.modExists("persistence", true)) { - mod.persistence.initialize(options.persistenceMode, options.persistenceID); - } - - if (options.persistentLayout && this.modExists("persistence", true)) { - options.columns = mod.persistence.load("columns", options.columns); - } - - if (options.movableRows && this.modExists("moveRow")) { - mod.moveRow.initialize(); - } - - if (this.modExists("columnCalcs")) { - mod.columnCalcs.initialize(); - } - - this.columnManager.setColumns(options.columns); - - if (this.modExists("frozenRows")) { - this.modules.frozenRows.initialize(); - } - - if ((options.persistentSort || options.initialSort) && this.modExists("sort", true)) { - var sorters = []; - - if (options.persistentSort && this.modExists("persistence", true)) { - sorters = mod.persistence.load("sort"); - - if (sorters === false && options.initialSort) { - sorters = options.initialSort; - } - } else if (options.initialSort) { - sorters = options.initialSort; - } - - mod.sort.setSort(sorters); - } - - if ((options.persistentFilter || options.initialFilter) && this.modExists("filter", true)) { - var filters = []; - - if (options.persistentFilter && this.modExists("persistence", true)) { - filters = mod.persistence.load("filter"); - - if (filters === false && options.initialFilter) { - filters = options.initialFilter; - } - } else if (options.initialFilter) { - filters = options.initialFilter; - } - - mod.filter.setFilter(filters); - // this.setFilter(filters); - } - - if (this.modExists("ajax")) { - mod.ajax.initialize(); - } - - if (options.pagination && this.modExists("page", true)) { - mod.page.initialize(); - } - - if (options.groupBy && this.modExists("groupRows", true)) { - mod.groupRows.initialize(); - } - - if (this.modExists("keybindings")) { - mod.keybindings.initialize(); - } - - if (this.modExists("selectRow")) { - mod.selectRow.clearSelectionData(true); - } - - if (options.autoResize && this.modExists("resizeTable")) { - mod.resizeTable.initialize(); - } - - if (this.modExists("clipboard")) { - mod.clipboard.initialize(); - } - - options.tableBuilt.call(this); -}; - -Tabulator.prototype._loadInitialData = function () { - var self = this; - - if (self.options.pagination && self.modExists("page")) { - self.modules.page.reset(true); - - if (self.options.pagination == "local") { - if (self.options.data.length) { - self.rowManager.setData(self.options.data); - } else { - if ((self.options.ajaxURL || self.options.ajaxURLGenerator) && self.modExists("ajax")) { - self.modules.ajax.loadData(); - } else { - self.rowManager.setData(self.options.data); - } - } - } else { - self.modules.page.setPage(1); - } - } else { - if (self.options.data.length) { - self.rowManager.setData(self.options.data); - } else { - if ((self.options.ajaxURL || self.options.ajaxURLGenerator) && self.modExists("ajax")) { - self.modules.ajax.loadData(); - } else { - self.rowManager.setData(self.options.data); - } - } - } -}; - -//deconstructor -Tabulator.prototype.destroy = function () { - var element = this.element; - - Tabulator.prototype.comms.deregister(this); //deregister table from inderdevice communication - - //clear row data - this.rowManager.rows.forEach(function (row) { - row.wipe(); - }); - - this.rowManager.rows = []; - this.rowManager.activeRows = []; - this.rowManager.displayRows = []; - - //clear event bindings - if (this.options.autoResize && this.modExists("resizeTable")) { - this.modules.resizeTable.clearBindings(); - } - - if (this.modExists("keybindings")) { - this.modules.keybindings.clearBindings(); - } - - //clear DOM - while (element.firstChild) { - element.removeChild(element.firstChild); - }element.classList.remove("tabulator"); -}; - -Tabulator.prototype._detectBrowser = function () { - var ua = navigator.userAgent; - - if (ua.indexOf("Trident") > -1) { - this.browser = "ie"; - this.browserSlow = true; - } else if (ua.indexOf("Edge") > -1) { - this.browser = "edge"; - this.browserSlow = true; - } else if (ua.indexOf("Firefox") > -1) { - this.browser = "firefox"; - this.browserSlow = false; - } else { - this.browser = "other"; - this.browserSlow = false; - } -}; - -////////////////// Data Handling ////////////////// - - -//load data -Tabulator.prototype.setData = function (data, params, config) { - if (this.modExists("ajax")) { - this.modules.ajax.blockActiveRequest(); - } - - return this._setData(data, params, config); -}; - -Tabulator.prototype._setData = function (data, params, config, inPosition) { - var self = this; - - if (typeof data === "string") { - if (data.indexOf("{") == 0 || data.indexOf("[") == 0) { - //data is a json encoded string - return self.rowManager.setData(JSON.parse(data), inPosition); - } else { - - if (self.modExists("ajax", true)) { - if (params) { - self.modules.ajax.setParams(params); - } - - if (config) { - self.modules.ajax.setConfig(config); - } - - self.modules.ajax.setUrl(data); - - if (self.options.pagination == "remote" && self.modExists("page", true)) { - self.modules.page.reset(true); - return self.modules.page.setPage(1); - } else { - //assume data is url, make ajax call to url to get data - return self.modules.ajax.loadData(inPosition); - } - } - } - } else { - if (data) { - //asume data is already an object - return self.rowManager.setData(data, inPosition); - } else { - - //no data provided, check if ajaxURL is present; - if (self.modExists("ajax") && (self.modules.ajax.getUrl || self.options.ajaxURLGenerator)) { - - if (self.options.pagination == "remote" && self.modExists("page", true)) { - self.modules.page.reset(true); - return self.modules.page.setPage(1); - } else { - return self.modules.ajax.loadData(inPosition); - } - } else { - //empty data - return self.rowManager.setData([], inPosition); - } - } - } -}; - -//clear data -Tabulator.prototype.clearData = function () { - if (this.modExists("ajax")) { - this.modules.ajax.blockActiveRequest(); - } - - this.rowManager.clearData(); -}; - -//get table data array -Tabulator.prototype.getData = function (active) { - return this.rowManager.getData(active); -}; - -//get table data array count -Tabulator.prototype.getDataCount = function (active) { - return this.rowManager.getDataCount(active); -}; - -//search for specific row components -Tabulator.prototype.searchRows = function (field, type, value) { - if (this.modExists("filter", true)) { - return this.modules.filter.search("rows", field, type, value); - } -}; - -//search for specific data -Tabulator.prototype.searchData = function (field, type, value) { - if (this.modExists("filter", true)) { - return this.modules.filter.search("data", field, type, value); - } -}; - -//get table html -Tabulator.prototype.getHtml = function (active) { - return this.rowManager.getHtml(active); -}; - -//retrieve Ajax URL -Tabulator.prototype.getAjaxUrl = function () { - if (this.modExists("ajax", true)) { - return this.modules.ajax.getUrl(); - } -}; - -//replace data, keeping table in position with same sort -Tabulator.prototype.replaceData = function (data, params, config) { - if (this.modExists("ajax")) { - this.modules.ajax.blockActiveRequest(); - } - - return this._setData(data, params, config, true); -}; - -//update table data -Tabulator.prototype.updateData = function (data) { - var _this7 = this; - - var self = this; - var responses = 0; - - return new Promise(function (resolve, reject) { - if (_this7.modExists("ajax")) { - _this7.modules.ajax.blockActiveRequest(); - } - - if (typeof data === "string") { - data = JSON.parse(data); - } - - if (data) { - data.forEach(function (item) { - var row = self.rowManager.findRow(item[self.options.index]); - - if (row) { - responses++; - - row.updateData(item).then(function () { - responses--; - - if (!responses) { - resolve(); - } - }); - } - }); - } else { - console.warn("Update Error - No data provided"); - reject("Update Error - No data provided"); - } - }); -}; - -Tabulator.prototype.addData = function (data, pos, index) { - var _this8 = this; - - return new Promise(function (resolve, reject) { - if (_this8.modExists("ajax")) { - _this8.modules.ajax.blockActiveRequest(); - } - - if (typeof data === "string") { - data = JSON.parse(data); - } - - if (data) { - _this8.rowManager.addRows(data, pos, index).then(function (rows) { - var output = []; - - rows.forEach(function (row) { - output.push(row.getComponent()); - }); - - resolve(output); - }); - } else { - console.warn("Update Error - No data provided"); - reject("Update Error - No data provided"); - } - }); -}; - -//update table data -Tabulator.prototype.updateOrAddData = function (data) { - var _this9 = this; - - var self = this, - rows = [], - responses = 0; - - return new Promise(function (resolve, reject) { - if (_this9.modExists("ajax")) { - _this9.modules.ajax.blockActiveRequest(); - } - - if (typeof data === "string") { - data = JSON.parse(data); - } - - if (data) { - data.forEach(function (item) { - var row = self.rowManager.findRow(item[self.options.index]); - - responses++; - - if (row) { - row.updateData(item).then(function () { - responses--; - rows.push(row.getComponent()); - - if (!responses) { - resolve(rows); - } - }); - } else { - self.rowManager.addRows(item).then(function (newRows) { - responses--; - rows.push(newRows[0].getComponent()); - - if (!responses) { - resolve(rows); - } - }); - } - }); - } else { - console.warn("Update Error - No data provided"); - reject("Update Error - No data provided"); - } - }); -}; - -//get row object -Tabulator.prototype.getRow = function (index) { - var row = this.rowManager.findRow(index); - - if (row) { - return row.getComponent(); - } else { - console.warn("Find Error - No matching row found:", index); - return false; - } -}; - -//get row object -Tabulator.prototype.getRowFromPosition = function (position, active) { - var row = this.rowManager.getRowFromPosition(position, active); - - if (row) { - return row.getComponent(); - } else { - console.warn("Find Error - No matching row found:", position); - return false; - } -}; - -//delete row from table -Tabulator.prototype.deleteRow = function (index) { - var _this10 = this; - - return new Promise(function (resolve, reject) { - var row = _this10.rowManager.findRow(index); - - if (row) { - row.delete().then(function () { - resolve(); - }).catch(function (err) { - reject(err); - }); - } else { - console.warn("Delete Error - No matching row found:", index); - reject("Delete Error - No matching row found"); - } - }); -}; - -//add row to table -Tabulator.prototype.addRow = function (data, pos, index) { - var _this11 = this; - - return new Promise(function (resolve, reject) { - if (typeof data === "string") { - data = JSON.parse(data); - } - - _this11.rowManager.addRows(data, pos, index).then(function (rows) { - //recalc column calculations if present - if (_this11.modExists("columnCalcs")) { - _this11.modules.columnCalcs.recalc(_this11.rowManager.activeRows); - } - - resolve(rows[0].getComponent()); - }); - }); -}; - -//update a row if it exitsts otherwise create it -Tabulator.prototype.updateOrAddRow = function (index, data) { - var _this12 = this; - - return new Promise(function (resolve, reject) { - var row = _this12.rowManager.findRow(index); - - if (typeof data === "string") { - data = JSON.parse(data); - } - - if (row) { - row.updateData(data).then(function () { - //recalc column calculations if present - if (_this12.modExists("columnCalcs")) { - _this12.modules.columnCalcs.recalc(_this12.rowManager.activeRows); - } - - resolve(row.getComponent()); - }).catch(function (err) { - reject(err); - }); - } else { - row = _this12.rowManager.addRows(data).then(function (rows) { - //recalc column calculations if present - if (_this12.modExists("columnCalcs")) { - _this12.modules.columnCalcs.recalc(_this12.rowManager.activeRows); - } - - resolve(rows[0].getComponent()); - }).catch(function (err) { - reject(err); - }); - } - }); -}; - -//update row data -Tabulator.prototype.updateRow = function (index, data) { - var _this13 = this; - - return new Promise(function (resolve, reject) { - var row = _this13.rowManager.findRow(index); - - if (typeof data === "string") { - data = JSON.parse(data); - } - - if (row) { - row.updateData(data).then(function () { - resolve(row.getComponent()); - }).catch(function (err) { - reject(err); - }); - } else { - console.warn("Update Error - No matching row found:", index); - reject("Update Error - No matching row found"); - } - }); -}; - -//scroll to row in DOM -Tabulator.prototype.scrollToRow = function (index, position, ifVisible) { - var _this14 = this; - - return new Promise(function (resolve, reject) { - var row = _this14.rowManager.findRow(index); - - if (row) { - _this14.rowManager.scrollToRow(row, position, ifVisible).then(function () { - resolve(); - }).catch(function (err) { - reject(err); - }); - } else { - console.warn("Scroll Error - No matching row found:", index); - reject("Scroll Error - No matching row found"); - } - }); -}; - -Tabulator.prototype.getRows = function (active) { - return this.rowManager.getComponents(active); -}; - -//get position of row in table -Tabulator.prototype.getRowPosition = function (index, active) { - var row = this.rowManager.findRow(index); - - if (row) { - return this.rowManager.getRowPosition(row, active); - } else { - console.warn("Position Error - No matching row found:", index); - return false; - } -}; - -//copy table data to clipboard -Tabulator.prototype.copyToClipboard = function (selector, selectorParams, formatter, formatterParams) { - if (this.modExists("clipboard", true)) { - this.modules.clipboard.copy(selector, selectorParams, formatter, formatterParams); - } -}; - -/////////////// Column Functions /////////////// - -Tabulator.prototype.setColumns = function (definition) { - this.columnManager.setColumns(definition); -}; - -Tabulator.prototype.getColumns = function (structured) { - return this.columnManager.getComponents(structured); -}; - -Tabulator.prototype.getColumn = function (field) { - var col = this.columnManager.findColumn(field); - - if (col) { - return col.getComponent(); - } else { - console.warn("Find Error - No matching column found:", field); - return false; - } -}; - -Tabulator.prototype.getColumnDefinitions = function () { - return this.columnManager.getDefinitionTree(); -}; - -Tabulator.prototype.getColumnLayout = function () { - if (this.modExists("persistence", true)) { - return this.modules.persistence.parseColumns(this.columnManager.getColumns()); - } -}; - -Tabulator.prototype.setColumnLayout = function (layout) { - if (this.modExists("persistence", true)) { - this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns, layout)); - return true; - } - return false; -}; - -Tabulator.prototype.showColumn = function (field) { - var column = this.columnManager.findColumn(field); - - if (column) { - column.show(); - - if (this.options.responsiveLayout && this.modExists("responsiveLayout", true)) { - this.modules.responsiveLayout.update(); - } - } else { - console.warn("Column Show Error - No matching column found:", field); - return false; - } -}; - -Tabulator.prototype.hideColumn = function (field) { - var column = this.columnManager.findColumn(field); - - if (column) { - column.hide(); - - if (this.options.responsiveLayout && this.modExists("responsiveLayout", true)) { - this.modules.responsiveLayout.update(); - } - } else { - console.warn("Column Hide Error - No matching column found:", field); - return false; - } -}; - -Tabulator.prototype.toggleColumn = function (field) { - var column = this.columnManager.findColumn(field); - - if (column) { - if (column.visible) { - column.hide(); - } else { - column.show(); - } - } else { - console.warn("Column Visibility Toggle Error - No matching column found:", field); - return false; - } -}; - -Tabulator.prototype.addColumn = function (definition, before, field) { - var column = this.columnManager.findColumn(field); - - this.columnManager.addColumn(definition, before, column); -}; - -Tabulator.prototype.deleteColumn = function (field) { - var column = this.columnManager.findColumn(field); - - if (column) { - column.delete(); - } else { - console.warn("Column Delete Error - No matching column found:", field); - return false; - } -}; - -//scroll to column in DOM -Tabulator.prototype.scrollToColumn = function (field, position, ifVisible) { - var _this15 = this; - - return new Promise(function (resolve, reject) { - var column = _this15.columnManager.findColumn(field); - - if (column) { - _this15.columnManager.scrollToColumn(column, position, ifVisible).then(function () { - resolve(); - }).catch(function (err) { - reject(err); - }); - } else { - console.warn("Scroll Error - No matching column found:", field); - reject("Scroll Error - No matching column found"); - } - }); -}; - -//////////// Localization Functions //////////// -Tabulator.prototype.setLocale = function (locale) { - this.modules.localize.setLocale(locale); -}; - -Tabulator.prototype.getLocale = function () { - return this.modules.localize.getLocale(); -}; - -Tabulator.prototype.getLang = function (locale) { - return this.modules.localize.getLang(locale); -}; - -//////////// General Public Functions //////////// - -//redraw list without updating data -Tabulator.prototype.redraw = function (force) { - this.columnManager.redraw(force); - this.rowManager.redraw(force); -}; - -Tabulator.prototype.setHeight = function (height) { - this.options.height = isNaN(height) ? height : height + "px"; - this.element.style.height = this.options.height; - this.rowManager.redraw(); -}; - -///////////////////// Sorting //////////////////// - -//trigger sort -Tabulator.prototype.setSort = function (sortList, dir) { - if (this.modExists("sort", true)) { - this.modules.sort.setSort(sortList, dir); - this.rowManager.sorterRefresh(); - } -}; - -Tabulator.prototype.getSorters = function () { - if (this.modExists("sort", true)) { - return this.modules.sort.getSort(); - } -}; - -Tabulator.prototype.clearSort = function () { - if (this.modExists("sort", true)) { - this.modules.sort.clear(); - this.rowManager.sorterRefresh(); - } -}; - -///////////////////// Filtering //////////////////// - -//set standard filters -Tabulator.prototype.setFilter = function (field, type, value) { - if (this.modExists("filter", true)) { - this.modules.filter.setFilter(field, type, value); - this.rowManager.filterRefresh(); - } -}; - -//add filter to array -Tabulator.prototype.addFilter = function (field, type, value) { - if (this.modExists("filter", true)) { - this.modules.filter.addFilter(field, type, value); - this.rowManager.filterRefresh(); - } -}; - -//get all filters -Tabulator.prototype.getFilters = function (all) { - if (this.modExists("filter", true)) { - return this.modules.filter.getFilters(all); - } -}; - -Tabulator.prototype.setHeaderFilterFocus = function (field) { - if (this.modExists("filter", true)) { - var column = this.columnManager.findColumn(field); - - if (column) { - this.modules.filter.setHeaderFilterFocus(column); - } else { - console.warn("Column Filter Focus Error - No matching column found:", field); - return false; - } - } -}; - -Tabulator.prototype.setHeaderFilterValue = function (field, value) { - if (this.modExists("filter", true)) { - var column = this.columnManager.findColumn(field); - - if (column) { - this.modules.filter.setHeaderFilterValue(column, value); - } else { - console.warn("Column Filter Error - No matching column found:", field); - return false; - } - } -}; - -Tabulator.prototype.getHeaderFilters = function () { - if (this.modExists("filter", true)) { - return this.modules.filter.getHeaderFilters(); - } -}; - -//remove filter from array -Tabulator.prototype.removeFilter = function (field, type, value) { - if (this.modExists("filter", true)) { - this.modules.filter.removeFilter(field, type, value); - this.rowManager.filterRefresh(); - } -}; - -//clear filters -Tabulator.prototype.clearFilter = function (all) { - if (this.modExists("filter", true)) { - this.modules.filter.clearFilter(all); - this.rowManager.filterRefresh(); - } -}; - -//clear header filters -Tabulator.prototype.clearHeaderFilter = function () { - if (this.modExists("filter", true)) { - this.modules.filter.clearHeaderFilter(); - this.rowManager.filterRefresh(); - } -}; - -///////////////////// Filtering //////////////////// -Tabulator.prototype.selectRow = function (rows) { - if (this.modExists("selectRow", true)) { - this.modules.selectRow.selectRows(rows); - } -}; - -Tabulator.prototype.deselectRow = function (rows) { - if (this.modExists("selectRow", true)) { - this.modules.selectRow.deselectRows(rows); - } -}; - -Tabulator.prototype.toggleSelectRow = function (row) { - if (this.modExists("selectRow", true)) { - this.modules.selectRow.toggleRow(row); - } -}; - -Tabulator.prototype.getSelectedRows = function () { - if (this.modExists("selectRow", true)) { - return this.modules.selectRow.getSelectedRows(); - } -}; - -Tabulator.prototype.getSelectedData = function () { - if (this.modExists("selectRow", true)) { - return this.modules.selectRow.getSelectedData(); - } -}; - -//////////// Pagination Functions //////////// - -Tabulator.prototype.setMaxPage = function (max) { - if (this.options.pagination && this.modExists("page")) { - this.modules.page.setMaxPage(max); - } else { - return false; - } -}; - -Tabulator.prototype.setPage = function (page) { - if (this.options.pagination && this.modExists("page")) { - this.modules.page.setPage(page); - } else { - return false; - } -}; - -Tabulator.prototype.setPageSize = function (size) { - if (this.options.pagination && this.modExists("page")) { - this.modules.page.setPageSize(size); - this.modules.page.setPage(1); - } else { - return false; - } -}; - -Tabulator.prototype.getPageSize = function () { - if (this.options.pagination && this.modExists("page", true)) { - return this.modules.page.getPageSize(); - } -}; - -Tabulator.prototype.previousPage = function () { - if (this.options.pagination && this.modExists("page")) { - this.modules.page.previousPage(); - } else { - return false; - } -}; - -Tabulator.prototype.nextPage = function () { - if (this.options.pagination && this.modExists("page")) { - this.modules.page.nextPage(); - } else { - return false; - } -}; - -Tabulator.prototype.getPage = function () { - if (this.options.pagination && this.modExists("page")) { - return this.modules.page.getPage(); - } else { - return false; - } -}; - -Tabulator.prototype.getPageMax = function () { - if (this.options.pagination && this.modExists("page")) { - return this.modules.page.getPageMax(); - } else { - return false; - } -}; - -///////////////// Grouping Functions /////////////// - -Tabulator.prototype.setGroupBy = function (groups) { - if (this.modExists("groupRows", true)) { - this.options.groupBy = groups; - this.modules.groupRows.initialize(); - this.rowManager.refreshActiveData("display"); - } else { - return false; - } -}; - -Tabulator.prototype.setGroupStartOpen = function (values) { - if (this.modExists("groupRows", true)) { - this.options.groupStartOpen = values; - this.modules.groupRows.initialize(); - if (this.options.groupBy) { - this.rowManager.refreshActiveData("group"); - } else { - console.warn("Grouping Update - cant refresh view, no groups have been set"); - } - } else { - return false; - } -}; - -Tabulator.prototype.setGroupHeader = function (values) { - if (this.modExists("groupRows", true)) { - this.options.groupHeader = values; - this.modules.groupRows.initialize(); - if (this.options.groupBy) { - this.rowManager.refreshActiveData("group"); - } else { - console.warn("Grouping Update - cant refresh view, no groups have been set"); - } - } else { - return false; - } -}; - -Tabulator.prototype.getGroups = function (values) { - if (this.modExists("groupRows", true)) { - return this.modules.groupRows.getGroups(true); - } else { - return false; - } -}; - -// get grouped table data in the same format as getData() -Tabulator.prototype.getGroupedData = function () { - if (this.modExists("groupRows", true)) { - return this.options.groupBy ? this.modules.groupRows.getGroupedData() : this.getData(); - } -}; - -///////////////// Column Calculation Functions /////////////// -Tabulator.prototype.getCalcResults = function () { - if (this.modExists("columnCalcs", true)) { - return this.modules.columnCalcs.getResults(); - } else { - return false; - } -}; - -/////////////// Navigation Management ////////////// - -Tabulator.prototype.navigatePrev = function () { - var cell = false; - - if (this.modExists("edit", true)) { - cell = this.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - return cell.nav().prev(); - } - } - - return false; -}; - -Tabulator.prototype.navigateNext = function () { - var cell = false; - - if (this.modExists("edit", true)) { - cell = this.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - return cell.nav().next(); - } - } - - return false; -}; - -Tabulator.prototype.navigateLeft = function () { - var cell = false; - - if (this.modExists("edit", true)) { - cell = this.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - return cell.nav().left(); - } - } - - return false; -}; - -Tabulator.prototype.navigateRight = function () { - var cell = false; - - if (this.modExists("edit", true)) { - cell = this.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - return cell.nav().right(); - } - } - - return false; -}; - -Tabulator.prototype.navigateUp = function () { - var cell = false; - - if (this.modExists("edit", true)) { - cell = this.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - return cell.nav().up(); - } - } - - return false; -}; - -Tabulator.prototype.navigateDown = function () { - var cell = false; - - if (this.modExists("edit", true)) { - cell = this.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - return cell.nav().dpwn(); - } - } - - return false; -}; - -/////////////// History Management ////////////// -Tabulator.prototype.undo = function () { - if (this.options.history && this.modExists("history", true)) { - return this.modules.history.undo(); - } else { - return false; - } -}; - -Tabulator.prototype.redo = function () { - if (this.options.history && this.modExists("history", true)) { - return this.modules.history.redo(); - } else { - return false; - } -}; - -Tabulator.prototype.getHistoryUndoSize = function () { - if (this.options.history && this.modExists("history", true)) { - return this.modules.history.getHistoryUndoSize(); - } else { - return false; - } -}; - -Tabulator.prototype.getHistoryRedoSize = function () { - if (this.options.history && this.modExists("history", true)) { - return this.modules.history.getHistoryRedoSize(); - } else { - return false; - } -}; - -/////////////// Download Management ////////////// - -Tabulator.prototype.download = function (type, filename, options) { - if (this.modExists("download", true)) { - this.modules.download.download(type, filename, options); - } -}; - -/////////// Inter Table Communications /////////// - -Tabulator.prototype.tableComms = function (table, module, action, data) { - this.modules.comms.receive(table, module, action, data); -}; - -////////////// Extension Management ////////////// - -//object to hold module -Tabulator.prototype.moduleBindings = {}; - -//extend module -Tabulator.prototype.extendModule = function (name, property, values) { - - if (Tabulator.prototype.moduleBindings[name]) { - var source = Tabulator.prototype.moduleBindings[name].prototype[property]; - - if (source) { - if ((typeof values === 'undefined' ? 'undefined' : _typeof(values)) == "object") { - for (var key in values) { - source[key] = values[key]; - } - } else { - console.warn("Module Error - Invalid value type, it must be an object"); - } - } else { - console.warn("Module Error - property does not exist:", property); - } - } else { - console.warn("Module Error - module does not exist:", name); - } -}; - -//add module to tabulator -Tabulator.prototype.registerModule = function (name, module) { - var self = this; - Tabulator.prototype.moduleBindings[name] = module; -}; - -//ensure that module are bound to instantiated function -Tabulator.prototype.bindModules = function () { - this.modules = {}; - - for (var name in Tabulator.prototype.moduleBindings) { - this.modules[name] = new Tabulator.prototype.moduleBindings[name](this); - } -}; - -//Check for module -Tabulator.prototype.modExists = function (plugin, required) { - if (this.modules[plugin]) { - return true; - } else { - if (required) { - console.error("Tabulator Module Not Installed: " + plugin); - } - return false; - } -}; - -Tabulator.prototype.helpers = { - - elVisible: function elVisible(el) { - return !(el.offsetWidth <= 0 && el.offsetHeight <= 0); - }, - - elOffset: function elOffset(el) { - var box = el.getBoundingClientRect(); - - return { - top: box.top + window.pageYOffset - document.documentElement.clientTop, - left: box.left + window.pageXOffset - document.documentElement.clientLeft - }; - }, - - deepClone: function deepClone(obj) { - var clone = Array.isArray(obj) ? [] : {}; - - for (var i in obj) { - if (obj[i] != null && _typeof(obj[i]) === "object") { - if (obj[i] instanceof Date) { - clone[i] = new Date(obj[i]); - } else { - clone[i] = this.deepClone(obj[i]); - } - } else { - clone[i] = obj[i]; - } - } - return clone; - } -}; - -Tabulator.prototype.comms = { - tables: [], - register: function register(table) { - Tabulator.prototype.comms.tables.push(table); - }, - deregister: function deregister(table) { - var index = Tabulator.prototype.comms.tables.indexOf(table); - - if (index > -1) { - Tabulator.prototype.comms.tables.splice(index, 1); - } - }, - lookupTable: function lookupTable(query) { - var results = [], - matches, - match; - - if (typeof query === "string") { - matches = document.querySelectorAll(query); - - if (matches.length) { - for (var i = 0; i < matches.length; i++) { - match = Tabulator.prototype.comms.matchElement(matches[i]); - - if (match) { - results.push(match); - } - } - } - } else if (query instanceof HTMLElement || query instanceof Tabulator) { - match = Tabulator.prototype.comms.matchElement(query); - - if (match) { - results.push(match); - } - } else if (Array.isArray(query)) { - query.forEach(function (item) { - results = results.concat(Tabulator.prototype.comms.lookupTable(item)); - }); - } else { - console.warn("Table Connection Error - Invalid Selector", query); - } - - return results; - }, - matchElement: function matchElement(element) { - return Tabulator.prototype.comms.tables.find(function (table) { - return element instanceof Tabulator ? table === element : table.element === element; - }); - } -}; - -var Layout = function Layout(table) { - - this.table = table; - - this.mode = null; -}; - -//initialize layout system - -Layout.prototype.initialize = function (layout) { - - if (this.modes[layout]) { - - this.mode = layout; - } else { - - console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : " + layout); - - this.mode = 'fitData'; - } - - this.table.element.setAttribute("tabulator-layout", this.mode); -}; - -Layout.prototype.getMode = function () { - - return this.mode; -}; - -//trigger table layout - -Layout.prototype.layout = function () { - - this.modes[this.mode].call(this, this.table.columnManager.columnsByIndex); -}; - -//layout render functions - -Layout.prototype.modes = { - - //resize columns to fit data the contain - - "fitData": function fitData(columns) { - - columns.forEach(function (column) { - - column.reinitializeWidth(); - }); - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.update(); - } - }, - - //resize columns to fit data the contain - - "fitDataFill": function fitDataFill(columns) { - - columns.forEach(function (column) { - - column.reinitializeWidth(); - }); - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.update(); - } - }, - - //resize columns to fit - - "fitColumns": function fitColumns(columns) { - - var self = this; - - var totalWidth = self.table.element.clientWidth; //table element width - - var fixedWidth = 0; //total width of columns with a defined width - - var flexWidth = 0; //total width available to flexible columns - - var flexGrowUnits = 0; //total number of widthGrow blocks accross all columns - - var flexColWidth = 0; //desired width of flexible columns - - var flexColumns = []; //array of flexible width columns - - var fixedShrinkColumns = []; //array of fixed width columns that can shrink - - var flexShrinkUnits = 0; //total number of widthShrink blocks accross all columns - - var overflowWidth = 0; //horizontal overflow width - - var gapFill = 0; //number of pixels to be added to final column to close and half pixel gaps - - - function calcWidth(width) { - - var colWidth; - - if (typeof width == "string") { - - if (width.indexOf("%") > -1) { - - colWidth = totalWidth / 100 * parseInt(width); - } else { - - colWidth = parseInt(width); - } - } else { - - colWidth = width; - } - - return colWidth; - } - - //ensure columns resize to take up the correct amount of space - - function scaleColumns(columns, freeSpace, colWidth, shrinkCols) { - - var oversizeCols = [], - oversizeSpace = 0, - remainingSpace = 0, - nextColWidth = 0, - gap = 0, - changeUnits = 0, - undersizeCols = []; - - function calcGrow(col) { - - return colWidth * (col.column.definition.widthGrow || 1); - } - - function calcShrink(col) { - - return calcWidth(col.width) - colWidth * (col.column.definition.widthShrink || 0); - } - - columns.forEach(function (col, i) { - - var width = shrinkCols ? calcShrink(col) : calcGrow(col); - - if (col.column.minWidth >= width) { - - oversizeCols.push(col); - } else { - - undersizeCols.push(col); - - changeUnits += shrinkCols ? col.column.definition.widthShrink || 1 : col.column.definition.widthGrow || 1; - } - }); - - if (oversizeCols.length) { - - oversizeCols.forEach(function (col) { - - oversizeSpace += shrinkCols ? col.width - col.column.minWidth : col.column.minWidth; - - col.width = col.column.minWidth; - }); - - remainingSpace = freeSpace - oversizeSpace; - - nextColWidth = changeUnits ? Math.floor(remainingSpace / changeUnits) : remainingSpace; - - gap = remainingSpace - nextColWidth * changeUnits; - - gap += scaleColumns(undersizeCols, remainingSpace, nextColWidth, shrinkCols); - } else { - - gap = changeUnits ? freeSpace - Math.floor(freeSpace / changeUnits) * changeUnits : freeSpace; - - undersizeCols.forEach(function (column) { - - column.width = shrinkCols ? calcShrink(column) : calcGrow(column); - }); - } - - return gap; - } - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.update(); - } - - //adjust for vertical scrollbar if present - - if (this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight) { - - totalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth; - } - - columns.forEach(function (column) { - - var width, minWidth, colWidth; - - if (column.visible) { - - width = column.definition.width; - - minWidth = parseInt(column.minWidth); - - if (width) { - - colWidth = calcWidth(width); - - fixedWidth += colWidth > minWidth ? colWidth : minWidth; - - if (column.definition.widthShrink) { - - fixedShrinkColumns.push({ - - column: column, - - width: colWidth > minWidth ? colWidth : minWidth - - }); - - flexShrinkUnits += column.definition.widthShrink; - } - } else { - - flexColumns.push({ - - column: column, - - width: 0 - - }); - - flexGrowUnits += column.definition.widthGrow || 1; - } - } - }); - - //calculate available space - - flexWidth = totalWidth - fixedWidth; - - //calculate correct column size - - flexColWidth = Math.floor(flexWidth / flexGrowUnits); - - //generate column widths - - var gapFill = scaleColumns(flexColumns, flexWidth, flexColWidth, false); - - //increase width of last column to account for rounding errors - - if (flexColumns.length && gapFill > 0) { - - flexColumns[flexColumns.length - 1].width += +gapFill; - } - - //caculate space for columns to be shrunk into - - flexColumns.forEach(function (col) { - - flexWidth -= col.width; - }); - - overflowWidth = Math.abs(gapFill) + flexWidth; - - //shrink oversize columns if there is no available space - - if (overflowWidth > 0 && flexShrinkUnits) { - - gapFill = scaleColumns(fixedShrinkColumns, overflowWidth, Math.floor(overflowWidth / flexShrinkUnits), true); - } - - //decrease width of last column to account for rounding errors - - if (fixedShrinkColumns.length) { - - fixedShrinkColumns[fixedShrinkColumns.length - 1].width -= gapFill; - } - - flexColumns.forEach(function (col) { - - col.column.setWidth(col.width); - }); - - fixedShrinkColumns.forEach(function (col) { - - col.column.setWidth(col.width); - }); - } - -}; - -Tabulator.prototype.registerModule("layout", Layout); -var Localize = function Localize(table) { - this.table = table; //hold Tabulator object - this.locale = "default"; //current locale - this.lang = false; //current language - this.bindings = {}; //update events to call when locale is changed -}; - -//set header placehoder -Localize.prototype.setHeaderFilterPlaceholder = function (placeholder) { - this.langs.default.headerFilters.default = placeholder; -}; - -//set header filter placeholder by column -Localize.prototype.setHeaderFilterColumnPlaceholder = function (column, placeholder) { - this.langs.default.headerFilters.columns[column] = placeholder; - - if (this.lang && !this.lang.headerFilters.columns[column]) { - this.lang.headerFilters.columns[column] = placeholder; - } -}; - -//setup a lang description object -Localize.prototype.installLang = function (locale, lang) { - if (this.langs[locale]) { - this._setLangProp(this.langs[locale], lang); - } else { - this.langs[locale] = lang; - } -}; - -Localize.prototype._setLangProp = function (lang, values) { - for (var key in values) { - if (lang[key] && _typeof(lang[key]) == "object") { - this._setLangProp(lang[key], values[key]); - } else { - lang[key] = values[key]; - } - } -}; - -//set current locale -Localize.prototype.setLocale = function (desiredLocale) { - var self = this; - - desiredLocale = desiredLocale || "default"; - - //fill in any matching languge values - function traverseLang(trans, path) { - for (var prop in trans) { - - if (_typeof(trans[prop]) == "object") { - if (!path[prop]) { - path[prop] = {}; - } - traverseLang(trans[prop], path[prop]); - } else { - path[prop] = trans[prop]; - } - } - } - - //determing correct locale to load - if (desiredLocale === true && navigator.language) { - //get local from system - desiredLocale = navigator.language.toLowerCase(); - } - - if (desiredLocale) { - - //if locale is not set, check for matching top level locale else use default - if (!self.langs[desiredLocale]) { - var prefix = desiredLocale.split("-")[0]; - - if (self.langs[prefix]) { - console.warn("Localization Error - Exact matching locale not found, using closest match: ", desiredLocale, prefix); - desiredLocale = prefix; - } else { - console.warn("Localization Error - Matching locale not found, using default: ", desiredLocale); - desiredLocale = "default"; - } - } - } - - self.locale = desiredLocale; - - //load default lang template - self.lang = Tabulator.prototype.helpers.deepClone(self.langs.default || {}); - - if (desiredLocale != "default") { - traverseLang(self.langs[desiredLocale], self.lang); - } - - self.table.options.localized.call(self.table, self.locale, self.lang); - - self._executeBindings(); -}; - -//get current locale -Localize.prototype.getLocale = function (locale) { - return self.locale; -}; - -//get lang object for given local or current if none provided -Localize.prototype.getLang = function (locale) { - return locale ? this.langs[locale] : this.lang; -}; - -//get text for current locale -Localize.prototype.getText = function (path, value) { - var path = value ? path + "|" + value : path, - pathArray = path.split("|"), - text = this._getLangElement(pathArray, this.locale); - - // if(text === false){ - // console.warn("Localization Error - Matching localized text not found for given path: ", path); - // } - - return text || ""; -}; - -//traverse langs object and find localized copy -Localize.prototype._getLangElement = function (path, locale) { - var self = this; - var root = self.lang; - - path.forEach(function (level) { - var rootPath; - - if (root) { - rootPath = root[level]; - - if (typeof rootPath != "undefined") { - root = rootPath; - } else { - root = false; - } - } - }); - - return root; -}; - -//set update binding -Localize.prototype.bind = function (path, callback) { - if (!this.bindings[path]) { - this.bindings[path] = []; - } - - this.bindings[path].push(callback); - - callback(this.getText(path), this.lang); -}; - -//itterate through bindings and trigger updates -Localize.prototype._executeBindings = function () { - var self = this; - - var _loop = function _loop(path) { - self.bindings[path].forEach(function (binding) { - binding(self.getText(path), self.lang); - }); - }; - - for (var path in self.bindings) { - _loop(path); - } -}; - -//Localized text listings -Localize.prototype.langs = { - "default": { //hold default locale text - "groups": { - "item": "item", - "items": "items" - }, - "columns": {}, - "ajax": { - "loading": "Loading", - "error": "Error" - }, - "pagination": { - "first": "First", - "first_title": "First Page", - "last": "Last", - "last_title": "Last Page", - "prev": "Prev", - "prev_title": "Prev Page", - "next": "Next", - "next_title": "Next Page" - }, - "headerFilters": { - "default": "filter column...", - "columns": {} - } - } -}; - -Tabulator.prototype.registerModule("localize", Localize); -var Comms = function Comms(table) { - this.table = table; -}; - -Comms.prototype.getConnections = function (selectors) { - var self = this, - connections = [], - connection; - - connection = Tabulator.prototype.comms.lookupTable(selectors); - - connection.forEach(function (con) { - if (self.table !== con) { - connections.push(con); - } - }); - - return connections; -}; - -Comms.prototype.send = function (selectors, module, action, data) { - var self = this, - connections = this.getConnections(selectors); - - connections.forEach(function (connection) { - connection.tableComms(self.table.element, module, action, data); - }); - - if (!connections.length && selectors) { - console.warn("Table Connection Error - No tables matching selector found", selectors); - } -}; - -Comms.prototype.receive = function (table, module, action, data) { - if (this.table.modExists(module)) { - return this.table.modules[module].commsReceived(table, action, data); - } else { - console.warn("Inter-table Comms Error - no such module:", module); - } -}; - -Tabulator.prototype.registerModule("comms", Comms); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator_core.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator_core.min.js deleted file mode 100644 index 53ff575991..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator_core.min.js +++ /dev/null @@ -1,5 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),o=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;no?(e=t-o,this.element.style.marginLeft=-e+"px"):this.element.style.marginLeft=0,this.scrollLeft=t,this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()},ColumnManager.prototype.setColumns=function(t,e){for(var o=this;o.headersElement.firstChild;)o.headersElement.removeChild(o.headersElement.firstChild);o.columns=[],o.columnsByIndex=[],o.columnsByField=[],o.table.modExists("frozenColumns")&&o.table.modules.frozenColumns.reset(),t.forEach(function(t,e){o._addColumn(t)}),o._reIndexColumns(),o.table.options.responsiveLayout&&o.table.modExists("responsiveLayout",!0)&&o.table.modules.responsiveLayout.initialize(),o.redraw(!0)},ColumnManager.prototype._addColumn=function(t,e,o){var i=new Column(t,this),n=i.getElement(),l=o?this.findColumnIndex(o):o;if(o&&l>-1){var s=this.columns.indexOf(o.getTopColumn()),a=o.getElement();e?(this.columns.splice(s,0,i),a.parentNode.insertBefore(n,a)):(this.columns.splice(s+1,0,i),a.parentNode.insertBefore(n,a.nextSibling))}else e?(this.columns.unshift(i),this.headersElement.insertBefore(i.getElement(),this.headersElement.firstChild)):(this.columns.push(i),this.headersElement.appendChild(i.getElement()));return i},ColumnManager.prototype.registerColumnField=function(t){t.definition.field&&(this.columnsByField[t.definition.field]=t)},ColumnManager.prototype.registerColumnPosition=function(t){this.columnsByIndex.push(t)},ColumnManager.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach(function(t){t.reRegisterPosition()})},ColumnManager.prototype._verticalAlignHeaders=function(){var t=this,e=0;t.columns.forEach(function(t){var o;t.clearVerticalAlign(),(o=t.getHeight())>e&&(e=o)}),t.columns.forEach(function(o){o.verticalAlign(t.table.options.columnVertAlign,e)}),t.rowManager.adjustTableSize()},ColumnManager.prototype.findColumn=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t)))return this.columnsByField[t]||!1;if(t instanceof Column)return t;if(t instanceof ColumnComponent)return t._getSelf()||!1;if(t instanceof HTMLElement){return e.columns.find(function(e){return e.element===t})||!1}return!1},ColumnManager.prototype.getColumnByField=function(t){return this.columnsByField[t]},ColumnManager.prototype.getColumnByIndex=function(t){return this.columnsByIndex[t]},ColumnManager.prototype.getColumns=function(){return this.columns},ColumnManager.prototype.findColumnIndex=function(t){return this.columnsByIndex.findIndex(function(e){return t===e})},ColumnManager.prototype.getRealColumns=function(){return this.columnsByIndex},ColumnManager.prototype.traverse=function(t){this.columnsByIndex.forEach(function(e,o){t(e,o)})},ColumnManager.prototype.getDefinitions=function(t){var e=this,o=[];return e.columnsByIndex.forEach(function(e){(!t||t&&e.visible)&&o.push(e.getDefinition())}),o},ColumnManager.prototype.getDefinitionTree=function(){var t=this,e=[];return t.columns.forEach(function(t){e.push(t.getDefinition(!0))}),e},ColumnManager.prototype.getComponents=function(t){var e=this,o=[];return(t?e.columns:e.columnsByIndex).forEach(function(t){o.push(t.getComponent())}),o},ColumnManager.prototype.getWidth=function(){var t=0;return this.columnsByIndex.forEach(function(e){e.visible&&(t+=e.getWidth())}),t},ColumnManager.prototype.moveColumn=function(t,e,o){this._moveColumnInArray(this.columns,t,e,o),this._moveColumnInArray(this.columnsByIndex,t,e,o,!0),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.options.columnMoved&&this.table.options.columnMoved.call(this.table,t.getComponent(),this.table.columnManager.getComponents()),this.table.options.persistentLayout&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("columns")},ColumnManager.prototype._moveColumnInArray=function(t,e,o,i,n){var l,s=t.indexOf(e);s>-1&&(t.splice(s,1),l=t.indexOf(o),l>-1?i&&(l+=1):l=s,t.splice(l,0,e),n&&this.table.rowManager.rows.forEach(function(t){if(t.cells.length){var e=t.cells.splice(s,1)[0];t.cells.splice(l,0,e)}}))},ColumnManager.prototype.scrollToColumn=function(t,e,o){var i=this,n=0,l=0,s=0,a=t.getElement();return new Promise(function(r,u){if(void 0===e&&(e=i.table.options.scrollToColumnPosition),void 0===o&&(o=i.table.options.scrollToColumnIfVisible),t.visible){switch(e){case"middle":case"center":s=-i.element.clientWidth/2;break;case"right":s=a.clientWidth-i.headersElement.clientWidth}if(!o&&(l=a.offsetLeft)>0&&l+a.offsetWidtht.rowManager.element.clientHeight&&(e-=t.rowManager.element.offsetWidth-t.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var n,l,s;i.visible&&(n=i.definition.width||0,l=void 0===i.minWidth?t.table.options.columnMinWidth:parseInt(i.minWidth),s="string"==typeof n?n.indexOf("%")>-1?e/100*parseInt(n):parseInt(n):n,o+=s>l?s:l)}),o},ColumnManager.prototype.addColumn=function(t,e,o){var i=this._addColumn(t,e,o);this._reIndexColumns(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),this.redraw(),"fitColumns"!=this.table.modules.layout.getMode()&&i.reinitializeWidth(),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},ColumnManager.prototype.deregisterColumn=function(t){var e,o=t.getField();o&&delete this.columnsByField[o],e=this.columnsByIndex.indexOf(t),e>-1&&this.columnsByIndex.splice(e,1),e=this.columns.indexOf(t),e>-1&&this.columns.splice(e,1),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.redraw()},ColumnManager.prototype.redraw=function(t){t&&(Tabulator.prototype.helpers.elVisible(this.element)&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),"fitColumns"==this.table.modules.layout.getMode()?this.table.modules.layout.layout():t?this.table.modules.layout.layout():this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),t&&(this.table.options.persistentLayout&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("columns"),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.redraw()),this.table.footerManager.redraw()};var ColumnComponent=function(t){this._column=t,this.type="ColumnComponent"};ColumnComponent.prototype.getElement=function(){return this._column.getElement()},ColumnComponent.prototype.getDefinition=function(){return this._column.getDefinition()},ColumnComponent.prototype.getField=function(){return this._column.getField()},ColumnComponent.prototype.getCells=function(){var t=[];return this._column.cells.forEach(function(e){t.push(e.getComponent())}),t},ColumnComponent.prototype.getVisibility=function(){return this._column.visible},ColumnComponent.prototype.show=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.show()}):this._column.show()},ColumnComponent.prototype.hide=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.hide()}):this._column.hide()},ColumnComponent.prototype.toggle=function(){this._column.visible?this.hide():this.show()},ColumnComponent.prototype.delete=function(){this._column.delete()},ColumnComponent.prototype.getSubColumns=function(){var t=[];return this._column.columns.length&&this._column.columns.forEach(function(e){t.push(e.getComponent())}),t},ColumnComponent.prototype.getParentColumn=function(){return this._column.parent instanceof Column&&this._column.parent.getComponent()},ColumnComponent.prototype._getSelf=function(){return this._column},ColumnComponent.prototype.scrollTo=function(){return this._column.table.columnManager.scrollToColumn(this._column)},ColumnComponent.prototype.getTable=function(){return this._column.table},ColumnComponent.prototype.headerFilterFocus=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterFocus(this._column)},ColumnComponent.prototype.reloadHeaderFilter=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.reloadHeaderFilter(this._column)},ColumnComponent.prototype.setHeaderFilterValue=function(t){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterValue(this._column,t)};var Column=function t(e,o){var i=this;this.table=o.table,this.definition=e,this.parent=o,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.setField(this.definition.field),this.modules={},this.cellEvents={cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1},this.width=null,this.minWidth=null,this.widthFixed=!1,this.visible=!0,e.columns?(this.isGroup=!0,e.columns.forEach(function(e,o){var n=new t(e,i);i.attachColumn(n)}),i.checkColumnVisibility()):o.registerColumnField(this),e.rowHandle&&!1!==this.table.options.movableRows&&this.table.modExists("moveRow")&&this.table.modules.moveRow.setHandle(!0),this._buildHeader()};Column.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.setAttribute("role","columnheader"),t.setAttribute("aria-sort","none"),t},Column.prototype.createGroupElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col-group-cols"),t},Column.prototype.setField=function(t){this.field=t,this.fieldStructure=t?this.table.options.nestedFieldSeparator?t.split(this.table.options.nestedFieldSeparator):[t]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNesteData:this._setFlatData},Column.prototype.registerColumnPosition=function(t){this.parent.registerColumnPosition(t)},Column.prototype.registerColumnField=function(t){this.parent.registerColumnField(t)},Column.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach(function(t){t.reRegisterPosition()}):this.registerColumnPosition(this)},Column.prototype.setTooltip=function(){var t=this,e=t.definition,o=e.headerTooltip||!1===e.tooltip?e.headerTooltip:t.table.options.tooltipsHeader;o?!0===o?e.field?t.table.modules.localize.bind("columns|"+e.field,function(o){t.element.setAttribute("title",o||e.title)}):t.element.setAttribute("title",e.title):("function"==typeof o&&!1===(o=o(t.getComponent()))&&(o=""),t.element.setAttribute("title",o)):t.element.setAttribute("title","")},Column.prototype._buildHeader=function(){for(var t=this,e=t.definition;t.element.firstChild;)t.element.removeChild(t.element.firstChild);e.headerVertical&&(t.element.classList.add("tabulator-col-vertical"),"flip"===e.headerVertical&&t.element.classList.add("tabulator-col-vertical-flip")),t.contentElement=t._bindEvents(),t.contentElement=t._buildColumnHeaderContent(),t.element.appendChild(t.contentElement),t.isGroup?t._buildGroupHeader():t._buildColumnHeader(),t.setTooltip(),t.table.options.resizableColumns&&t.table.modExists("resizeColumns")&&t.table.modules.resizeColumns.initializeColumn("header",t,t.element),e.headerFilter&&t.table.modExists("filter")&&t.table.modExists("edit")&&(void 0!==e.headerFilterPlaceholder&&e.field&&t.table.modules.localize.setHeaderFilterColumnPlaceholder(e.field,e.headerFilterPlaceholder),t.table.modules.filter.initializeColumn(t)),t.table.modExists("frozenColumns")&&t.table.modules.frozenColumns.initializeColumn(t),t.table.options.movableColumns&&!t.isGroup&&t.table.modExists("moveColumn")&&t.table.modules.moveColumn.initializeColumn(t),(e.topCalc||e.bottomCalc)&&t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.initializeColumn(t),t.element.addEventListener("mouseenter",function(e){t.setTooltip()})},Column.prototype._bindEvents=function(){var t,e,o,i=this,n=i.definition;"function"==typeof n.headerClick&&i.element.addEventListener("click",function(t){n.headerClick(t,i.getComponent())}),"function"==typeof n.headerDblClick&&i.element.addEventListener("dblclick",function(t){n.headerDblClick(t,i.getComponent())}),"function"==typeof n.headerContext&&i.element.addEventListener("contextmenu",function(t){n.headerContext(t,i.getComponent())}),"function"==typeof n.headerTap&&(o=!1,i.element.addEventListener("touchstart",function(t){o=!0}),i.element.addEventListener("touchend",function(t){o&&n.headerTap(t,i.getComponent()),o=!1})),"function"==typeof n.headerDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null,n.headerDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),"function"==typeof n.headerTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,n.headerTapHold(t,i.getComponent())},1e3)}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null})),"function"==typeof n.cellClick&&(i.cellEvents.cellClick=n.cellClick),"function"==typeof n.cellDblClick&&(i.cellEvents.cellDblClick=n.cellDblClick),"function"==typeof n.cellContext&&(i.cellEvents.cellContext=n.cellContext),"function"==typeof n.cellTap&&(i.cellEvents.cellTap=n.cellTap),"function"==typeof n.cellDblTap&&(i.cellEvents.cellDblTap=n.cellDblTap),"function"==typeof n.cellTapHold&&(i.cellEvents.cellTapHold=n.cellTapHold),"function"==typeof n.cellEdited&&(i.cellEvents.cellEdited=n.cellEdited),"function"==typeof n.cellEditing&&(i.cellEvents.cellEditing=n.cellEditing),"function"==typeof n.cellEditCancelled&&(i.cellEvents.cellEditCancelled=n.cellEditCancelled)},Column.prototype._buildColumnHeader=function(){var t=this,e=t.definition,o=t.table;o.modExists("sort")&&o.modules.sort.initializeColumn(t,t.contentElement),o.modExists("format")&&o.modules.format.initializeColumn(t),void 0!==e.editor&&o.modExists("edit")&&o.modules.edit.initializeColumn(t),void 0!==e.validator&&o.modExists("validate")&&o.modules.validate.initializeColumn(t),o.modExists("mutator")&&o.modules.mutator.initializeColumn(t),o.modExists("accessor")&&o.modules.accessor.initializeColumn(t),_typeof(o.options.responsiveLayout)&&o.modExists("responsiveLayout")&&o.modules.responsiveLayout.initializeColumn(t),void 0!==e.visible&&(e.visible?t.show(!0):t.hide(!0)),e.cssClass&&t.element.classList.add(e.cssClass),e.field&&this.element.setAttribute("tabulator-field",e.field),t.setMinWidth(void 0===e.minWidth?t.table.options.columnMinWidth:e.minWidth),t.reinitializeWidth(),t.tooltip=t.definition.tooltip||!1===t.definition.tooltip?t.definition.tooltip:t.table.options.tooltips,t.hozAlign=void 0===t.definition.align?"":t.definition.align},Column.prototype._buildColumnHeaderContent=function(){var t=this,e=(t.definition,t.table,document.createElement("div"));return e.classList.add("tabulator-col-content"),e.appendChild(t._buildColumnHeaderTitle()),e},Column.prototype._buildColumnHeaderTitle=function(){var t=this,e=t.definition,o=t.table,i=document.createElement("div");if(i.classList.add("tabulator-col-title"),e.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor"),n.addEventListener("click",function(t){t.stopPropagation(),n.focus()}),n.addEventListener("change",function(){e.title=n.value,o.options.columnTitleChanged.call(t.table,t.getComponent())}),i.appendChild(n),e.field?o.modules.localize.bind("columns|"+e.field,function(t){n.value=t||e.title||" "}):n.value=e.title||" "}else e.field?o.modules.localize.bind("columns|"+e.field,function(o){t._formatColumnHeaderTitle(i,o||e.title||" ")}):t._formatColumnHeaderTitle(i,e.title||" ");return i},Column.prototype._formatColumnHeaderTitle=function(t,e){var o,i,n,l;if(this.definition.titleFormatter&&this.table.modExists("format"))switch(o=this.table.modules.format.getFormatter(this.definition.titleFormatter),l={getValue:function(){return e},getElement:function(){return t}},n=this.definition.titleFormatterParams||{},n="function"==typeof n?n():n,i=o.call(this.table.modules.format,l,n),void 0===i?"undefined":_typeof(i)){case"object":i instanceof Node?this.element.appendChild(i):(this.element.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":case"null":this.element.innerHTML="";break;default:this.element.innerHTML=i}else t.innerHTML=e},Column.prototype._buildGroupHeader=function(){this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.element.appendChild(this.groupElement)},Column.prototype._getFlatData=function(t){return t[this.field]},Column.prototype._getNestedData=function(t){for(var e,o=t,i=this.fieldStructure,n=i.length,l=0;le&&(e=o)}),e&&t.setWidthActual(e+1))},Column.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},Column.prototype.getComponent=function(){return new ColumnComponent(this)};var RowManager=function(t){this.table=t,this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="classic",this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[]};RowManager.prototype.createHolderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-tableHolder"),t.setAttribute("tabindex",0),t},RowManager.prototype.createTableElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-table"),t},RowManager.prototype.getElement=function(){return this.element},RowManager.prototype.getTableElement=function(){return this.tableElement},RowManager.prototype.getRowPosition=function(t,e){return e?this.activeRows.indexOf(t):this.rows.indexOf(t)},RowManager.prototype.setColumnManager=function(t){this.columnManager=t},RowManager.prototype.initialize=function(){var t=this;t.setRenderMode(),t.element.appendChild(t.tableElement),t.firstRender=!0,t.element.addEventListener("scroll",function(){var e=t.element.scrollLeft;t.scrollLeft!=e&&(t.columnManager.scrollHorizontal(e),t.table.options.groupBy&&t.table.modules.groupRows.scrollHeaders(e),t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.scrollHorizontal(e)),t.scrollLeft=e}),"virtual"===this.renderMode&&t.element.addEventListener("scroll",function(){var e=t.element.scrollTop,o=t.scrollTop>e;t.scrollTop!=e?(t.scrollTop=e,t.scrollVertical(o),"scroll"==t.table.options.ajaxProgressiveLoad&&t.table.modules.ajax.nextPage(t.element.scrollHeight-t.element.clientHeight-e)):t.scrollTop=e})},RowManager.prototype.findRow=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t))){if(void 0===t||null===t)return!1;return e.rows.find(function(o){return o.data[e.table.options.index]==t})||!1}if(t instanceof Row)return t;if(t instanceof RowComponent)return t._getSelf()||!1;if(t instanceof HTMLElement){return e.rows.find(function(e){return e.element===t})||!1}return!1},RowManager.prototype.getRowFromPosition=function(t,e){return e?this.activeRows[t]:this.rows[t]},RowManager.prototype.scrollToRow=function(t,e,o){var i,n=this,l=this.getDisplayRows().indexOf(t),s=t.getElement(),a=0;return new Promise(function(t,r){if(l>-1){if(void 0===e&&(e=n.table.options.scrollToRowPosition),void 0===o&&(o=n.table.options.scrollToRowIfVisible),"nearest"===e)switch(n.renderMode){case"classic":i=Tabulator.prototype.helpers.elOffset(s).top,e=Math.abs(n.element.scrollTop-i)>Math.abs(n.element.scrollTop+n.element.clientHeight-i)?"bottom":"top";break;case"virtual":e=Math.abs(n.vDomTop-l)>Math.abs(n.vDomBottom-l)?"bottom":"top"}if(!o&&Tabulator.prototype.helpers.elVisible(s)&&(a=Tabulator.prototype.helpers.elOffset(s).top-Tabulator.prototype.helpers.elOffset(n.element).top)>0&&a-1&&this.activeRows.splice(o,1),e>-1&&this.rows.splice(e,1),this.setActiveRows(this.activeRows),this.displayRowIterator(function(e){var o=e.indexOf(t);o>-1&&e.splice(o,1)}),this.reRenderInPosition(),this.table.options.rowDeleted.call(this.table,t.getComponent()),this.table.options.dataEdited.call(this.table,this.getData()),this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.updateGroupRows(!0):this.table.options.pagination&&this.table.modExists("page")?this.refreshActiveData(!1,!1,!0):this.table.options.pagination&&this.table.modExists("page")&&this.refreshActiveData("page")},RowManager.prototype.addRow=function(t,e,o,i){var n=this.addRowActual(t,e,o,i);return this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowAdd",n,{data:t,pos:e,index:o}),n},RowManager.prototype.addRows=function(t,e,o){var i=this,n=this,l=0,s=[];return new Promise(function(a,r){e=i.findAddRowPos(e),Array.isArray(t)||(t=[t]),l=t.length-1,(void 0===o&&e||void 0!==o&&!e)&&t.reverse(),t.forEach(function(t,i){var l=n.addRow(t,e,o,!0);s.push(l)}),i.table.options.groupBy&&i.table.modExists("groupRows")?i.table.modules.groupRows.updateGroupRows(!0):i.table.options.pagination&&i.table.modExists("page")?i.refreshActiveData(!1,!1,!0):i.reRenderInPosition(), -i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),a(s)})},RowManager.prototype.findAddRowPos=function(t){return void 0===t&&(t=this.table.options.addRowPos),"pos"===t&&(t=!0),"bottom"===t&&(t=!1),t},RowManager.prototype.addRowActual=function(t,e,o,i){var n,l=t instanceof Row?t:new Row(t||{},this),s=this.findAddRowPos(e);if(!o&&this.table.options.pagination&&"page"==this.table.options.paginationAddRow&&(n=this.getDisplayRows(),s?n.length?o=n[0]:this.activeRows.length&&(o=this.activeRows[this.activeRows.length-1],s=!1):n.length&&(o=n[n.length-1],s=!(n.length1&&(!o||o&&-1==a.indexOf(o)?s?a[0]!==l&&(o=a[0],this._moveRowInArray(l.getGroup().rows,l,o,s)):a[a.length-1]!==l&&(o=a[a.length-1],this._moveRowInArray(l.getGroup().rows,l,o,s)):this._moveRowInArray(l.getGroup().rows,l,o,s))}if(o){var r=this.rows.indexOf(o),u=this.activeRows.indexOf(o);this.displayRowIterator(function(t){var e=t.indexOf(o);e>-1&&t.splice(s?e:e+1,0,l)}),u>-1&&this.activeRows.splice(s?u:u+1,0,l),r>-1&&this.rows.splice(s?r:r+1,0,l)}else s?(this.displayRowIterator(function(t){t.unshift(l)}),this.activeRows.unshift(l),this.rows.unshift(l)):(this.displayRowIterator(function(t){t.push(l)}),this.activeRows.push(l),this.rows.push(l));return this.setActiveRows(this.activeRows),this.table.options.rowAdded.call(this.table,l.getComponent()),this.table.options.dataEdited.call(this.table,this.getData()),i||this.reRenderInPosition(),l},RowManager.prototype.moveRow=function(t,e,o){this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowMove",t,{pos:this.getRowPosition(t),to:e,after:o}),this.moveRowActual(t,e,o),this.table.options.rowMoved.call(this.table,t.getComponent())},RowManager.prototype.moveRowActual=function(t,e,o){var i=this;if(this._moveRowInArray(this.rows,t,e,o),this._moveRowInArray(this.activeRows,t,e,o),this.displayRowIterator(function(n){i._moveRowInArray(n,t,e,o)}),this.table.options.groupBy&&this.table.modExists("groupRows")){var n=e.getGroup(),l=t.getGroup();n===l?this._moveRowInArray(n.rows,t,e,o):(l&&l.removeRow(t),n.insertRow(t,e,o))}},RowManager.prototype._moveRowInArray=function(t,e,o,i){var n,l,s,a;if(e!==o&&(n=t.indexOf(e),n>-1&&(t.splice(n,1),l=t.indexOf(o),l>-1?i?t.splice(l+1,0,e):t.splice(l,0,e):t.splice(n,0,e)),t===this.getDisplayRows())){s=nn?l:n+1;for(var r=s;r<=a;r++)t[r]&&this.styleRow(t[r],r)}},RowManager.prototype.clearData=function(){this.setData([])},RowManager.prototype.getRowIndex=function(t){return this.findRowIndex(t,this.rows)},RowManager.prototype.getDisplayRowIndex=function(t){var e=this.getDisplayRows().indexOf(t);return e>-1&&e},RowManager.prototype.nextDisplayRow=function(t,e){var o=this.getDisplayRowIndex(t),i=!1;return!1!==o&&o-1)&&o},RowManager.prototype.getData=function(t,e){var o=this,i=[];return(t?o.activeRows:o.rows).forEach(function(t){i.push(t.getData(e||"data"))}),i},RowManager.prototype.getHtml=function(t){var e=this.getData(t),o=[],i="",n="";return this.table.columnManager.getColumns().forEach(function(t){var e=t.getDefinition();t.visible&&!e.hideInHtml&&(i+=""+(e.title||"")+"",o.push(t))}),e.forEach(function(t){var e="";o.forEach(function(o){var i=o.getFieldValue(t);void 0!==i&&null!==i||(i=":"),e+=""+i+""}),n+=""+e+""}),"\n\t\t\n\t\t"+i+"\n\t\t\n\t\t"+n+"\n\t\t
"},RowManager.prototype.getComponents=function(t){var e=this,o=[];return(t?e.activeRows:e.rows).forEach(function(t){o.push(t.getComponent())}),o},RowManager.prototype.getDataCount=function(t){return t?this.rows.length:this.activeRows.length},RowManager.prototype._genRemoteRequest=function(){var t=this,e=t.table,o=e.options,i={};if(e.modExists("page")){if(o.ajaxSorting){var n=t.table.modules.sort.getSort();n.forEach(function(t){delete t.column}),i[t.table.modules.page.paginationDataSentNames.sorters]=n}if(o.ajaxFiltering){var l=t.table.modules.filter.getFilters(!0,!0);i[t.table.modules.page.paginationDataSentNames.filters]=l}t.table.modules.ajax.setParams(i,!0)}e.modules.ajax.sendRequest().then(function(e){t.setData(e)}).catch(function(t){})},RowManager.prototype.filterRefresh=function(){var t=this.table,e=t.options,o=this.scrollLeft;e.ajaxFiltering?"remote"==e.pagination&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1)):e.ajaxProgressiveLoad?t.modules.ajax.loadData():this._genRemoteRequest():this.refreshActiveData("filter"),this.scrollHorizontal(o)},RowManager.prototype.sorterRefresh=function(){var t=this.table,e=this.table.options,o=this.scrollLeft;e.ajaxSorting?("remote"==e.pagination||e.progressiveLoad)&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1)):e.ajaxProgressiveLoad?t.modules.ajax.loadData():this._genRemoteRequest():this.refreshActiveData("sort"),this.scrollHorizontal(o)},RowManager.prototype.scrollHorizontal=function(t){this.scrollLeft=t,this.element.scrollLeft=t,this.table.options.groupBy&&this.table.modules.groupRows.scrollHeaders(t),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.scrollHorizontal(t)},RowManager.prototype.refreshActiveData=function(t,e,o){var i,n=this,l=this.table;switch(t||(t="all"),l.options.selectable&&!l.options.selectablePersistence&&l.modExists("selectRow")&&l.modules.selectRow.deselectRows(),t){case"all":case"filter":e?e=!1:l.modExists("filter")?n.setActiveRows(l.modules.filter.filter(n.rows)):n.setActiveRows(n.rows.slice(0));case"sort":e?e=!1:l.modExists("sort")&&l.modules.sort.sort();case"display":this.resetDisplayRows();case"freeze":e?e=!1:this.table.modExists("frozenRows")&&l.modules.frozenRows.isFrozen()&&(l.modules.frozenRows.getDisplayIndex()||l.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()),i=l.modules.frozenRows.getDisplayIndex(),!0!==(i=n.setDisplayRows(l.modules.frozenRows.getRows(this.getDisplayRows(i-1)),i))&&l.modules.frozenRows.setDisplayIndex(i));case"group":e?e=!1:l.options.groupBy&&l.modExists("groupRows")&&(l.modules.groupRows.getDisplayIndex()||l.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()),i=l.modules.groupRows.getDisplayIndex(),!0!==(i=n.setDisplayRows(l.modules.groupRows.getRows(this.getDisplayRows(i-1)),i))&&l.modules.groupRows.setDisplayIndex(i));case"tree":e?e=!1:l.options.dataTree&&l.modExists("dataTree")&&(l.modules.dataTree.getDisplayIndex()||l.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()),i=l.modules.dataTree.getDisplayIndex(),!0!==(i=n.setDisplayRows(l.modules.dataTree.getRows(this.getDisplayRows(i-1)),i))&&l.modules.dataTree.setDisplayIndex(i)),l.options.pagination&&l.modExists("page")&&!o&&"local"==l.modules.page.getMode()&&l.modules.page.reset();case"page":e?e=!1:l.options.pagination&&l.modExists("page")&&(l.modules.page.getDisplayIndex()||l.modules.page.setDisplayIndex(this.getNextDisplayIndex()),i=l.modules.page.getDisplayIndex(),"local"==l.modules.page.getMode()&&l.modules.page.setMaxRows(this.getDisplayRows(i-1).length),!0!==(i=n.setDisplayRows(l.modules.page.getRows(this.getDisplayRows(i-1)),i))&&l.modules.page.setDisplayIndex(i))}Tabulator.prototype.helpers.elVisible(n.element)&&(o?n.reRenderInPosition():(n.renderTable(),l.options.layoutColumnsOnNewData&&n.table.columnManager.redraw(!0))),l.modExists("columnCalcs")&&l.modules.columnCalcs.recalc(this.activeRows)},RowManager.prototype.setActiveRows=function(t){this.activeRows=t,this.activeRowsCount=this.activeRows.length},RowManager.prototype.resetDisplayRows=function(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length,this.table.modExists("frozenRows")&&this.table.modules.frozenRows.setDisplayIndex(0),this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.setDisplayIndex(0),this.table.options.pagination&&this.table.modExists("page")&&this.table.modules.page.setDisplayIndex(0)},RowManager.prototype.getNextDisplayIndex=function(){return this.displayRows.length},RowManager.prototype.setDisplayRows=function(t,e){var o=!0;return e&&void 0!==this.displayRows[e]?(this.displayRows[e]=t,o=!0):(this.displayRows.push(t),o=e=this.displayRows.length-1),e==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length),o},RowManager.prototype.getDisplayRows=function(t){return void 0===t?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[t]||[]},RowManager.prototype.displayRowIterator=function(t){this.displayRows.forEach(t),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length},RowManager.prototype.getRows=function(){return this.rows},RowManager.prototype.reRenderInPosition=function(t){if("virtual"==this.getRenderMode()){for(var e=this.element.scrollTop,o=!1,i=!1,n=this.scrollLeft,l=this.getDisplayRows(),s=this.vDomTop;s<=this.vDomBottom;s++)if(l[s]){var a=e-l[s].getElement().offsetTop;if(!(!1===i||Math.abs(a)this.element.clientWidth?this.element.offsetHeight-this.element.clientHeight:0)),this.scrollTop=Math.min(this.scrollTop,this.element.scrollHeight-this.height),this.element.scrollWidth>this.element.offsetWidth&&(this.scrollTop+=this.element.offsetHeight-this.element.clientHeight),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,l.scrollTop=this.scrollTop,n.style.minWidth=h?i.table.columnManager.getWidth()+"px":"",i.table.options.groupBy&&"fitDataFill"!=i.table.modules.layout.getMode()&&i.displayRowsCount==i.table.modules.groupRows.countGroups()&&(i.tableElement.style.minWidth=i.table.columnManager.getWidth())}else this.renderEmptyScroll()},RowManager.prototype.scrollVertical=function(t){var e=this.scrollTop-this.vDomScrollPosTop,o=this.scrollTop-this.vDomScrollPosBottom,i=2*this.vDomWindowBuffer;if(-e>i||o>i){var n=this.scrollLeft;this._virtualRenderFill(Math.floor(this.element.scrollTop/this.element.scrollHeight*this.displayRowsCount)),this.scrollHorizontal(n)}else t?(e<0&&this._addTopRow(-e),e<0&&this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer&&this._removeBottomRow(-o)):(e>=0&&this.scrollTop>this.vDomWindowBuffer&&this._removeTopRow(e),o>=0&&this._addBottomRow(o))},RowManager.prototype._addTopRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomTop){var n=this.vDomTop-1,l=i[n],s=l.getHeight()||this.vDomRowHeight;t>=s&&(this.styleRow(l,n),o.insertBefore(l.getElement(),o.firstChild),l.initialized&&l.heightInitialized||(this.vDomTopNewRows.push(l),l.heightInitialized||l.clearCellHeight()),l.initialize(),this.vDomTopPad-=s,this.vDomTopPad<0&&(this.vDomTopPad=n*this.vDomRowHeight),n||(this.vDomTopPad=0),o.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=s,this.vDomTop--),t=-(this.scrollTop-this.vDomScrollPosTop),e=(i[this.vDomTop-1].getHeight()||this.vDomRowHeight)?this._addTopRow(t,e+1):this._quickNormalizeRowHeight(this.vDomTopNewRows)}},RowManager.prototype._removeTopRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomTop],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode.removeChild(n),this.vDomTopPad+=i,e.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?i:i+this.vDomWindowBuffer,this.vDomTop++,t=this.scrollTop-this.vDomScrollPosTop,this._removeTopRow(t)}},RowManager.prototype._addBottomRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomBottom=s&&(this.styleRow(l,n),o.appendChild(l.getElement()),l.initialized&&l.heightInitialized||(this.vDomBottomNewRows.push(l),l.heightInitialized||l.clearCellHeight()),l.initialize(),this.vDomBottomPad-=s,(this.vDomBottomPad<0||n==this.displayRowsCount-1)&&(this.vDomBottomPad=0),o.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=s,this.vDomBottom++),t=this.scrollTop-this.vDomScrollPosBottom,e=(i[this.vDomBottom+1].getHeight()||this.vDomRowHeight)?this._addBottomRow(t,e+1):this._quickNormalizeRowHeight(this.vDomBottomNewRows)}},RowManager.prototype._removeBottomRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomBottom],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode&&n.parentNode.removeChild(n),this.vDomBottomPad+=i,this.vDomBottomPad<0&&(this.vDomBottomPad=0),e.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=i,this.vDomBottom--,t=-(this.scrollTop-this.vDomScrollPosBottom),this._removeBottomRow(t)}},RowManager.prototype._quickNormalizeRowHeight=function(t){t.forEach(function(t){t.calcHeight()}),t.forEach(function(t){t.setCellHeight()}),t.length=0},RowManager.prototype.normalizeHeight=function(){this.activeRows.forEach(function(t){t.normalizeHeight()})},RowManager.prototype.adjustTableSize=function(){if("virtual"===this.renderMode){this.height=this.element.clientHeight,this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height;var t=this.columnManager.getElement().offsetHeight+(this.table.footerManager&&!this.table.footerManager.external?this.table.footerManager.getElement().offsetHeight:0);this.element.style.minHeight="calc(100% - "+t+"px)",this.element.style.height="calc(100% - "+t+"px)",this.element.style.maxHeight="calc(100% - "+t+"px)"}},RowManager.prototype.reinitialize=function(){this.rows.forEach(function(t){t.reinitialize()})},RowManager.prototype.redraw=function(t){var e=this.scrollLeft;this.adjustTableSize(),t?this.renderTable():("classic"==self.renderMode?self.table.options.groupBy?self.refreshActiveData("group",!1,!1):this._simpleRender():(this.reRenderInPosition(),this.scrollHorizontal(e)),this.displayRowsCount||this.table.options.placeholder&&this.getElement().appendChild(this.table.options.placeholder))},RowManager.prototype.resetScroll=function(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var t=document.createEvent("Event");t.initEvent("scroll",!1,!0),this.element.dispatchEvent(t)}else this.element.dispatchEvent(new Event("scroll"))};var RowComponent=function(t){this._row=t};RowComponent.prototype.getData=function(t){return this._row.getData(t)},RowComponent.prototype.getElement=function(){return this._row.getElement()},RowComponent.prototype.getCells=function(){var t=[];return this._row.getCells().forEach(function(e){t.push(e.getComponent())}),t},RowComponent.prototype.getCell=function(t){var e=this._row.getCell(t);return!!e&&e.getComponent()},RowComponent.prototype.getIndex=function(){return this._row.getData("data")[this._row.table.options.index]},RowComponent.prototype.getPosition=function(t){return this._row.table.rowManager.getRowPosition(this._row,t)},RowComponent.prototype.delete=function(){return this._row.delete()},RowComponent.prototype.scrollTo=function(){return this._row.table.rowManager.scrollToRow(this._row)},RowComponent.prototype.update=function(t){return this._row.updateData(t)},RowComponent.prototype.normalizeHeight=function(){this._row.normalizeHeight(!0)},RowComponent.prototype.select=function(){this._row.table.modules.selectRow.selectRows(this._row)},RowComponent.prototype.deselect=function(){this._row.table.modules.selectRow.deselectRows(this._row)},RowComponent.prototype.toggleSelect=function(){this._row.table.modules.selectRow.toggleRow(this._row)},RowComponent.prototype.isSelected=function(){return this._row.table.modules.selectRow.isRowSelected(this._row)},RowComponent.prototype._getSelf=function(){return this._row},RowComponent.prototype.freeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.freezeRow(this._row)},RowComponent.prototype.unfreeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.unfreezeRow(this._row)},RowComponent.prototype.treeCollapse=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.collapseRow(this._row)},RowComponent.prototype.treeExpand=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.expandRow(this._row)},RowComponent.prototype.treeToggle=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.toggleRow(this._row)},RowComponent.prototype.getTreeParent=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeParent(this._row)},RowComponent.prototype.getTreeChildren=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeChildren(this._row)},RowComponent.prototype.reformat=function(){return this._row.reinitialize()},RowComponent.prototype.getGroup=function(){return this._row.getGroup().getComponent()},RowComponent.prototype.getTable=function(){return this._row.table},RowComponent.prototype.getNextRow=function(){return this._row.nextRow()},RowComponent.prototype.getPrevRow=function(){return this._row.prevRow()};var Row=function(t,e){this.table=e.table,this.parent=e,this.data={},this.type="row",this.element=this.createElement(),this.modules={},this.cells=[],this.height=0,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.setData(t),this.generateElement()};Row.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-row"),t.setAttribute("role","row"),t},Row.prototype.getElement=function(){return this.element},Row.prototype.generateElement=function(){var t,e,o,i=this;!1!==i.table.options.selectable&&i.table.modExists("selectRow")&&i.table.modules.selectRow.initializeRow(this),!1!==i.table.options.movableRows&&i.table.modExists("moveRow")&&i.table.modules.moveRow.initializeRow(this),!1!==i.table.options.dataTree&&i.table.modExists("dataTree")&&i.table.modules.dataTree.initializeRow(this),i.table.options.rowClick&&i.element.addEventListener("click",function(t){i.table.options.rowClick(t,i.getComponent())}),i.table.options.rowDblClick&&i.element.addEventListener("dblclick",function(t){i.table.options.rowDblClick(t,i.getComponent())}),i.table.options.rowContext&&i.element.addEventListener("contextmenu",function(t){i.table.options.rowContext(t,i.getComponent())}),i.table.options.rowTap&&(o=!1,i.element.addEventListener("touchstart",function(t){o=!0}),i.element.addEventListener("touchend",function(t){o&&i.table.options.rowTap(t,i.getComponent()),o=!1})),i.table.options.rowDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null,i.table.options.rowDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),i.table.options.rowTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,i.table.options.rowTapHold(t,i.getComponent())},1e3)}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null}))},Row.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},Row.prototype.initialize=function(t){var e=this;if(!e.initialized||t){for(e.deleteCells();e.element.firstChild;)e.element.removeChild(e.element.firstChild);this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutRow(this),this.generateCells(),e.cells.forEach(function(t){e.element.appendChild(t.getElement()),t.cellRendered()}),t&&e.normalizeHeight(),e.table.options.dataTree&&e.table.modExists("dataTree")&&e.table.modules.dataTree.layoutRow(this),"collapse"===e.table.options.responsiveLayout&&e.table.modExists("responsiveLayout")&&e.table.modules.responsiveLayout.layoutRow(this),e.table.options.rowFormatter&&e.table.options.rowFormatter(e.getComponent()),e.table.options.resizableRows&&e.table.modExists("resizeRows")&&e.table.modules.resizeRows.initializeRow(e),e.initialized=!0}},Row.prototype.reinitializeHeight=function(){this.heightInitialized=!1,null!==this.element.offsetParent&&this.normalizeHeight(!0)},Row.prototype.reinitialize=function(){this.initialized=!1,this.heightInitialized=!1,this.height=0,null!==this.element.offsetParent&&this.initialize(!0)},Row.prototype.calcHeight=function(){var t=0,e=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach(function(e){var o=e.getHeight();o>t&&(t=o)}),this.height=Math.max(t,e),this.outerHeight=this.element.offsetHeight},Row.prototype.setCellHeight=function(){var t=this.height;this.cells.forEach(function(e){e.setHeight(t)}),this.heightInitialized=!0},Row.prototype.clearCellHeight=function(){this.cells.forEach(function(t){t.clearHeight()})},Row.prototype.normalizeHeight=function(t){t&&this.clearCellHeight(),this.calcHeight(),this.setCellHeight()},Row.prototype.setHeight=function(t){this.height=t,this.setCellHeight()},Row.prototype.setHeight=function(t,e){(this.height!=t||e)&&(this.height=t,this.setCellHeight(),this.outerHeight=this.element.offsetHeight)},Row.prototype.getHeight=function(){return this.outerHeight},Row.prototype.getWidth=function(){return this.element.offsetWidth},Row.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},Row.prototype.setData=function(t){var e=this;e.table.modExists("mutator")?e.data=e.table.modules.mutator.transformRow(t,"data"):e.data=t},Row.prototype.updateData=function(t){var e=this,o=this;return new Promise(function(i,n){"string"==typeof t&&(t=JSON.parse(t)),o.table.modExists("mutator")&&(t=o.table.modules.mutator.transformRow(t,"data",!0));for(var l in t)o.data[l]=t[l];for(var l in t){var s=e.getCell(l);s&&s.getValue()!=t[l]&&s.setValueProcessData(t[l])}Tabulator.prototype.helpers.elVisible(e.element)?(o.normalizeHeight(),o.table.options.rowFormatter&&o.table.options.rowFormatter(o.getComponent())):(e.initialized=!1,e.height=0),o.table.options.rowUpdated.call(e.table,o.getComponent()),i()})},Row.prototype.getData=function(t){var e=this;return t?e.table.modExists("accessor")?e.table.modules.accessor.transformRow(e.data,t):void 0:this.data},Row.prototype.getCell=function(t){return t=this.table.columnManager.findColumn(t),this.cells.find(function(e){return e.column===t})},Row.prototype.getCellIndex=function(t){return this.cells.findIndex(function(e){return e===t})},Row.prototype.findNextEditableCell=function(t){var e=!1;if(t0)for(var o=t-1;o>=0;o--){var i=this.cells[o],n=!0;if(i.column.modules.edit&&Tabulator.prototype.helpers.elVisible(i.getElement())&&("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n)){e=i;break}}return e},Row.prototype.getCells=function(){return this.cells},Row.prototype.nextRow=function(){var t=this.table.rowManager.nextDisplayRow(this,!0);return!!t&&t.getComponent()},Row.prototype.prevRow=function(){var t=this.table.rowManager.prevDisplayRow(this,!0);return!!t&&t.getComponent()},Row.prototype.delete=function(){var t=this;return new Promise(function(e,o){var i=t.table.rowManager.getRowIndex(t);t.deleteActual(),t.table.options.history&&t.table.modExists("history")&&(i&&(i=t.table.rowManager.rows[i-1]),t.table.modules.history.action("rowDelete",t,{data:t.getData(),pos:!i,index:i})),e()})},Row.prototype.deleteActual=function(){this.table.rowManager.getRowIndex(this);this.table.modExists("selectRow")&&this.table.modules.selectRow._deselectRow(this,!0),this.table.rowManager.deleteRow(this),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.modules.group&&this.modules.group.removeRow(this),this.table.modExists("columnCalcs")&&(this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.columnCalcs.recalcRowGroup(this):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows))},Row.prototype.deleteCells=function(){for(var t=this.cells.length,e=0;e-1?(this.browser="ie",this.browserSlow=!0):t.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):t.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1)},Tabulator.prototype.setData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o)},Tabulator.prototype._setData=function(t,e,o,i){var n=this;return"string"!=typeof t?t?n.rowManager.setData(t,i):n.modExists("ajax")&&(n.modules.ajax.getUrl||n.options.ajaxURLGenerator)?"remote"==n.options.pagination&&n.modExists("page",!0)?(n.modules.page.reset(!0),n.modules.page.setPage(1)):n.modules.ajax.loadData(i):n.rowManager.setData([],i):0==t.indexOf("{")||0==t.indexOf("[")?n.rowManager.setData(JSON.parse(t),i):n.modExists("ajax",!0)?(e&&n.modules.ajax.setParams(e),o&&n.modules.ajax.setConfig(o),n.modules.ajax.setUrl(t),"remote"==n.options.pagination&&n.modExists("page",!0)?(n.modules.page.reset(!0),n.modules.page.setPage(1)):n.modules.ajax.loadData(i)):void 0},Tabulator.prototype.clearData=function(){this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this.rowManager.clearData()},Tabulator.prototype.getData=function(t){return this.rowManager.getData(t)},Tabulator.prototype.getDataCount=function(t){return this.rowManager.getDataCount(t)},Tabulator.prototype.searchRows=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("rows",t,e,o)},Tabulator.prototype.searchData=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("data",t,e,o)},Tabulator.prototype.getHtml=function(t){return this.rowManager.getHtml(t)},Tabulator.prototype.getAjaxUrl=function(){if(this.modExists("ajax",!0))return this.modules.ajax.getUrl()},Tabulator.prototype.replaceData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o,!0)},Tabulator.prototype.updateData=function(t){var e=this,o=this,i=0;return new Promise(function(n,l){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach(function(t){var e=o.rowManager.findRow(t[o.options.index]);e&&(i++,e.updateData(t).then(function(){--i||n()}))}):(console.warn("Update Error - No data provided"),l("Update Error - No data provided"))})},Tabulator.prototype.addData=function(t,e,o){var i=this;return new Promise(function(n,l){i.modExists("ajax")&&i.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?i.rowManager.addRows(t,e,o).then(function(t){var e=[];t.forEach(function(t){e.push(t.getComponent())}),n(e)}):(console.warn("Update Error - No data provided"),l("Update Error - No data provided"))})},Tabulator.prototype.updateOrAddData=function(t){var e=this,o=this,i=[],n=0;return new Promise(function(l,s){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach(function(t){var e=o.rowManager.findRow(t[o.options.index]);n++,e?e.updateData(t).then(function(){n--,i.push(e.getComponent()),n||l(i)}):o.rowManager.addRows(t).then(function(t){n--,i.push(t[0].getComponent()),n||l(i)})}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},Tabulator.prototype.getRow=function(t){var e=this.rowManager.findRow(t);return e?e.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},Tabulator.prototype.getRowFromPosition=function(t,e){var o=this.rowManager.getRowFromPosition(t,e);return o?o.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},Tabulator.prototype.deleteRow=function(t){var e=this;return new Promise(function(o,i){var n=e.rowManager.findRow(t);n?n.delete().then(function(){o()}).catch(function(t){i(t)}):(console.warn("Delete Error - No matching row found:",t),i("Delete Error - No matching row found"))})},Tabulator.prototype.addRow=function(t,e,o){var i=this;return new Promise(function(n,l){"string"==typeof t&&(t=JSON.parse(t)),i.rowManager.addRows(t,e,o).then(function(t){i.modExists("columnCalcs")&&i.modules.columnCalcs.recalc(i.rowManager.activeRows),n(t[0].getComponent())})})},Tabulator.prototype.updateOrAddRow=function(t,e){var o=this;return new Promise(function(i,n){var l=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),l?l.updateData(e).then(function(){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(l.getComponent())}).catch(function(t){n(t)}):l=o.rowManager.addRows(e).then(function(t){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(t[0].getComponent())}).catch(function(t){n(t)})})},Tabulator.prototype.updateRow=function(t,e){var o=this;return new Promise(function(i,n){var l=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),l?l.updateData(e).then(function(){i(l.getComponent())}).catch(function(t){n(t)}):(console.warn("Update Error - No matching row found:",t),n("Update Error - No matching row found"))})},Tabulator.prototype.scrollToRow=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i.rowManager.findRow(t);s?i.rowManager.scrollToRow(s,e,o).then(function(){n()}).catch(function(t){l(t)}):(console.warn("Scroll Error - No matching row found:",t),l("Scroll Error - No matching row found"))})},Tabulator.prototype.getRows=function(t){return this.rowManager.getComponents(t)},Tabulator.prototype.getRowPosition=function(t,e){var o=this.rowManager.findRow(t);return o?this.rowManager.getRowPosition(o,e):(console.warn("Position Error - No matching row found:",t),!1)},Tabulator.prototype.copyToClipboard=function(t,e,o,i){this.modExists("clipboard",!0)&&this.modules.clipboard.copy(t,e,o,i)},Tabulator.prototype.setColumns=function(t){this.columnManager.setColumns(t)},Tabulator.prototype.getColumns=function(t){return this.columnManager.getComponents(t)},Tabulator.prototype.getColumn=function(t){var e=this.columnManager.findColumn(t);return e?e.getComponent():(console.warn("Find Error - No matching column found:",t),!1)},Tabulator.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()},Tabulator.prototype.getColumnLayout=function(){if(this.modExists("persistence",!0))return this.modules.persistence.parseColumns(this.columnManager.getColumns())},Tabulator.prototype.setColumnLayout=function(t){return!!this.modExists("persistence",!0)&&(this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,t)),!0)},Tabulator.prototype.showColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Show Error - No matching column found:",t),!1;e.show(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},Tabulator.prototype.hideColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Hide Error - No matching column found:",t),!1;e.hide(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},Tabulator.prototype.toggleColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Visibility Toggle Error - No matching column found:",t),!1;e.visible?e.hide():e.show()},Tabulator.prototype.addColumn=function(t,e,o){var i=this.columnManager.findColumn(o);this.columnManager.addColumn(t,e,i)},Tabulator.prototype.deleteColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Delete Error - No matching column found:",t),!1;e.delete()},Tabulator.prototype.scrollToColumn=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i.columnManager.findColumn(t);s?i.columnManager.scrollToColumn(s,e,o).then(function(){n()}).catch(function(t){l(t)}):(console.warn("Scroll Error - No matching column found:",t),l("Scroll Error - No matching column found"))})},Tabulator.prototype.setLocale=function(t){this.modules.localize.setLocale(t)},Tabulator.prototype.getLocale=function(){return this.modules.localize.getLocale()},Tabulator.prototype.getLang=function(t){return this.modules.localize.getLang(t)},Tabulator.prototype.redraw=function(t){this.columnManager.redraw(t),this.rowManager.redraw(t)},Tabulator.prototype.setHeight=function(t){this.options.height=isNaN(t)?t:t+"px",this.element.style.height=this.options.height,this.rowManager.redraw()},Tabulator.prototype.setSort=function(t,e){this.modExists("sort",!0)&&(this.modules.sort.setSort(t,e),this.rowManager.sorterRefresh())},Tabulator.prototype.getSorters=function(){if(this.modExists("sort",!0))return this.modules.sort.getSort()},Tabulator.prototype.clearSort=function(){this.modExists("sort",!0)&&(this.modules.sort.clear(),this.rowManager.sorterRefresh())},Tabulator.prototype.setFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.setFilter(t,e,o),this.rowManager.filterRefresh())},Tabulator.prototype.addFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.addFilter(t,e,o),this.rowManager.filterRefresh())},Tabulator.prototype.getFilters=function(t){if(this.modExists("filter",!0))return this.modules.filter.getFilters(t)},Tabulator.prototype.setHeaderFilterFocus=function(t){if(this.modExists("filter",!0)){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Filter Focus Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterFocus(e)}},Tabulator.prototype.setHeaderFilterValue=function(t,e){if(this.modExists("filter",!0)){var o=this.columnManager.findColumn(t);if(!o)return console.warn("Column Filter Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterValue(o,e)}},Tabulator.prototype.getHeaderFilters=function(){if(this.modExists("filter",!0))return this.modules.filter.getHeaderFilters()},Tabulator.prototype.removeFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.removeFilter(t,e,o),this.rowManager.filterRefresh())},Tabulator.prototype.clearFilter=function(t){this.modExists("filter",!0)&&(this.modules.filter.clearFilter(t),this.rowManager.filterRefresh())},Tabulator.prototype.clearHeaderFilter=function(){this.modExists("filter",!0)&&(this.modules.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},Tabulator.prototype.selectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.selectRows(t)},Tabulator.prototype.deselectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.deselectRows(t)},Tabulator.prototype.toggleSelectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.toggleRow(t)},Tabulator.prototype.getSelectedRows=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedRows()},Tabulator.prototype.getSelectedData=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedData()},Tabulator.prototype.setMaxPage=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setMaxPage(t)},Tabulator.prototype.setPage=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPage(t)},Tabulator.prototype.setPageSize=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPageSize(t),this.modules.page.setPage(1)},Tabulator.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",!0))return this.modules.page.getPageSize()},Tabulator.prototype.previousPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.previousPage()},Tabulator.prototype.nextPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.nextPage()},Tabulator.prototype.getPage=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPage()},Tabulator.prototype.getPageMax=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPageMax()},Tabulator.prototype.setGroupBy=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupBy=t,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display")},Tabulator.prototype.setGroupStartOpen=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupStartOpen=t,this.modules.groupRows.initialize(),this.options.groupBy?this.rowManager.refreshActiveData("group"):console.warn("Grouping Update - cant refresh view, no groups have been set")},Tabulator.prototype.setGroupHeader=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupHeader=t,this.modules.groupRows.initialize(),this.options.groupBy?this.rowManager.refreshActiveData("group"):console.warn("Grouping Update - cant refresh view, no groups have been set")},Tabulator.prototype.getGroups=function(t){return!!this.modExists("groupRows",!0)&&this.modules.groupRows.getGroups(!0)},Tabulator.prototype.getGroupedData=function(){if(this.modExists("groupRows",!0))return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()},Tabulator.prototype.getCalcResults=function(){return!!this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.getResults()},Tabulator.prototype.navigatePrev=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().prev())},Tabulator.prototype.navigateNext=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().next())},Tabulator.prototype.navigateLeft=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().left())},Tabulator.prototype.navigateRight=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().right())},Tabulator.prototype.navigateUp=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().up())},Tabulator.prototype.navigateDown=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().dpwn())},Tabulator.prototype.undo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.undo()},Tabulator.prototype.redo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.redo()},Tabulator.prototype.getHistoryUndoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryUndoSize()},Tabulator.prototype.getHistoryRedoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryRedoSize()},Tabulator.prototype.download=function(t,e,o){this.modExists("download",!0)&&this.modules.download.download(t,e,o)},Tabulator.prototype.tableComms=function(t,e,o,i){this.modules.comms.receive(t,e,o,i)},Tabulator.prototype.moduleBindings={},Tabulator.prototype.extendModule=function(t,e,o){if(Tabulator.prototype.moduleBindings[t]){var i=Tabulator.prototype.moduleBindings[t].prototype[e];if(i)if("object"==(void 0===o?"undefined":_typeof(o)))for(var n in o)i[n]=o[n];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",e)}else console.warn("Module Error - module does not exist:",t)},Tabulator.prototype.registerModule=function(t,e){Tabulator.prototype.moduleBindings[t]=e},Tabulator.prototype.bindModules=function(){this.modules={};for(var t in Tabulator.prototype.moduleBindings)this.modules[t]=new Tabulator.prototype.moduleBindings[t](this)},Tabulator.prototype.modExists=function(t,e){return!!this.modules[t]||(e&&console.error("Tabulator Module Not Installed: "+t),!1)},Tabulator.prototype.helpers={elVisible:function(t){return!(t.offsetWidth<=0&&t.offsetHeight<=0)},elOffset:function(t){ -var e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset-document.documentElement.clientTop,left:e.left+window.pageXOffset-document.documentElement.clientLeft}},deepClone:function(t){var e=Array.isArray(t)?[]:{};for(var o in t)null!=t[o]&&"object"===_typeof(t[o])?t[o]instanceof Date?e[o]=new Date(t[o]):e[o]=this.deepClone(t[o]):e[o]=t[o];return e}},Tabulator.prototype.comms={tables:[],register:function(t){Tabulator.prototype.comms.tables.push(t)},deregister:function(t){var e=Tabulator.prototype.comms.tables.indexOf(t);e>-1&&Tabulator.prototype.comms.tables.splice(e,1)},lookupTable:function(t){var e,o,i=[];if("string"==typeof t){if(e=document.querySelectorAll(t),e.length)for(var n=0;n-1?n/100*parseInt(t):parseInt(t):t}function o(t,i,n,l){function s(t){return n*(t.column.definition.widthGrow||1)}function a(t){return e(t.width)-n*(t.column.definition.widthShrink||0)}var r=[],u=0,h=0,c=0,p=0,d=0,m=[];return t.forEach(function(t,e){var o=l?a(t):s(t);t.column.minWidth>=o?r.push(t):(m.push(t),d+=l?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1)}),r.length?(r.forEach(function(t){u+=l?t.width-t.column.minWidth:t.column.minWidth,t.width=t.column.minWidth}),h=i-u,c=d?Math.floor(h/d):h,p=h-c*d,p+=o(m,h,c,l)):(p=d?i-Math.floor(i/d)*d:i,m.forEach(function(t){t.width=l?a(t):s(t)})),p}var i=this,n=i.table.element.clientWidth,l=0,s=0,a=0,r=0,u=[],h=[],c=0,p=0,d=0;this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(n-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),t.forEach(function(t){var o,i,n;t.visible&&(o=t.definition.width,i=parseInt(t.minWidth),o?(n=e(o),l+=n>i?n:i,t.definition.widthShrink&&(h.push({column:t,width:n>i?n:i}),c+=t.definition.widthShrink)):(u.push({column:t,width:0}),a+=t.definition.widthGrow||1))}),s=n-l,r=Math.floor(s/a);var d=o(u,s,r,!1);u.length&&d>0&&(u[u.length-1].width+=+d),u.forEach(function(t){s-=t.width}),p=Math.abs(d)+s,p>0&&c&&(d=o(h,p,Math.floor(p/c),!0)),h.length&&(h[h.length-1].width-=d),u.forEach(function(t){t.column.setWidth(t.width)}),h.forEach(function(t){t.column.setWidth(t.width)})}},Tabulator.prototype.registerModule("layout",Layout);var Localize=function(t){this.table=t,this.locale="default",this.lang=!1,this.bindings={}};Localize.prototype.setHeaderFilterPlaceholder=function(t){this.langs.default.headerFilters.default=t},Localize.prototype.setHeaderFilterColumnPlaceholder=function(t,e){this.langs.default.headerFilters.columns[t]=e,this.lang&&!this.lang.headerFilters.columns[t]&&(this.lang.headerFilters.columns[t]=e)},Localize.prototype.installLang=function(t,e){this.langs[t]?this._setLangProp(this.langs[t],e):this.langs[t]=e},Localize.prototype._setLangProp=function(t,e){for(var o in e)t[o]&&"object"==_typeof(t[o])?this._setLangProp(t[o],e[o]):t[o]=e[o]},Localize.prototype.setLocale=function(t){function e(t,o){for(var i in t)"object"==_typeof(t[i])?(o[i]||(o[i]={}),e(t[i],o[i])):o[i]=t[i]}var o=this;if(t=t||"default",!0===t&&navigator.language&&(t=navigator.language.toLowerCase()),t&&!o.langs[t]){var i=t.split("-")[0];o.langs[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",t,i),t=i):(console.warn("Localization Error - Matching locale not found, using default: ",t),t="default")}o.locale=t,o.lang=Tabulator.prototype.helpers.deepClone(o.langs.default||{}),"default"!=t&&e(o.langs[t],o.lang),o.table.options.localized.call(o.table,o.locale,o.lang),o._executeBindings()},Localize.prototype.getLocale=function(t){return self.locale},Localize.prototype.getLang=function(t){return t?this.langs[t]:this.lang},Localize.prototype.getText=function(t,e){var t=e?t+"|"+e:t,o=t.split("|");return this._getLangElement(o,this.locale)||""},Localize.prototype._getLangElement=function(t,e){var o=this,i=o.lang;return t.forEach(function(t){var e;i&&(e=i[t],i=void 0!==e&&e)}),i},Localize.prototype.bind=function(t,e){this.bindings[t]||(this.bindings[t]=[]),this.bindings[t].push(e),e(this.getText(t),this.lang)},Localize.prototype._executeBindings=function(){var t=this;for(var e in t.bindings)!function(e){t.bindings[e].forEach(function(o){o(t.getText(e),t.lang)})}(e)},Localize.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page"},headerFilters:{default:"filter column...",columns:{}}}},Tabulator.prototype.registerModule("localize",Localize);var Comms=function(t){this.table=t};Comms.prototype.getConnections=function(t){var e,o=this,i=[];return e=Tabulator.prototype.comms.lookupTable(t),e.forEach(function(t){o.table!==t&&i.push(t)}),i},Comms.prototype.send=function(t,e,o,i){var n=this,l=this.getConnections(t);l.forEach(function(t){t.tableComms(n.table.element,e,o,i)}),!l.length&&t&&console.warn("Table Connection Error - No tables matching selector found",t)},Comms.prototype.receive=function(t,e,o,i){if(this.table.modExists(e))return this.table.modules[e].commsReceived(t,o,i);console.warn("Inter-table Comms Error - no such module:",e)},Tabulator.prototype.registerModule("comms",Comms); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/gulpfile.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/gulpfile.js deleted file mode 100644 index 0ae7810200..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/gulpfile.js +++ /dev/null @@ -1,200 +0,0 @@ -var gulp = require('gulp'), -sass = require('gulp-sass'), -autoprefixer = require('gulp-autoprefixer'), -cssnano = require('gulp-cssnano'), -jshint = require('gulp-jshint'), -uglify = require('gulp-uglify'), -imagemin = require('gulp-imagemin'), -rename = require('gulp-rename'), -concat = require('gulp-concat'), -notify = require('gulp-notify'), -cache = require('gulp-cache'), -livereload = require('gulp-livereload'), -del = require('del'); -include = require('gulp-include'), -sourcemaps = require('gulp-sourcemaps'), -babel = require('gulp-babel'), -plumber = require('gulp-plumber'), -gutil = require('gulp-util'), -insert = require('gulp-insert'), -fs = require('fs'); - -var version_no = "4.1.2", - -version = "/* Tabulator v" + version_no + " (c) Oliver Folkerd */\n"; - -var gulp_src = gulp.src; -gulp.src = function() { - return gulp_src.apply(gulp, arguments) - .pipe(plumber(function(error) { - // Output an error message - gutil.log(gutil.colors.red('Error (' + error.plugin + '): ' + error.message)); - // emit the end event, to properly end the task - this.emit('end'); - }) - ); -}; - -//build css -gulp.task('styles', function() { - return gulp.src('src/scss/**/tabulator*.scss') - .pipe(sourcemaps.init()) - .pipe(insert.prepend(version + "\n")) - .pipe(sass({outputStyle: 'expanded'}).on('error', sass.logError)) - .pipe(autoprefixer('last 4 version')) - .pipe(gulp.dest('dist/css')) - .pipe(rename({suffix: '.min'})) - .pipe(cssnano()) - .pipe(insert.prepend(version)) - .pipe(sourcemaps.write('.')) - .pipe(gulp.dest('dist/css')) - .on('end', function(){ gutil.log('Styles task complete'); }) - }); - - -//build tabulator -gulp.task('tabulator', function() { - //return gulp.src('src/js/**/*.js') - return gulp.src('src/js/core_modules.js') - .pipe(insert.prepend(version + "\n")) - //.pipe(sourcemaps.init()) - .pipe(include()) - //.pipe(jshint()) - // .pipe(jshint.reporter('default')) - .pipe(babel({ - //presets:['es2015'] - presets: [["env",{ - "targets": { - "browsers": ["last 4 versions"] - }, - loose: true, - modules: false, - }, ], { }] - })) - .pipe(concat('tabulator.js')) - .pipe(gulp.dest('dist/js')) - .pipe(rename({suffix: '.min'})) - .pipe(uglify()) - .pipe(insert.prepend(version)) - // .pipe(sourcemaps.write('.')) - .pipe(gulp.dest('dist/js')) - //.pipe(notify({ message: 'Scripts task complete' })); - .on('end', function(){ gutil.log('Tabulator Complete'); }) - //.on("error", console.log) - }); - - -//simplified core js -gulp.task('core', function() { - return gulp.src('src/js/core.js') - .pipe(insert.prepend(version + "\n")) - .pipe(include()) - .pipe(babel({ - presets: [["env", { - "targets": { - "browsers": ["last 4 versions"] - }, - loose: true, - modules: false, - }] - ] - })) - .pipe(concat('tabulator_core.js')) - .pipe(gulp.dest('dist/js')) - .pipe(rename({suffix: '.min'})) - .pipe(uglify()) - .pipe(insert.prepend(version)) - .pipe(gulp.dest('dist/js')) - .on('end', function(){ gutil.log('Core complete'); }) - }); - - - -//make jquery wrapper -gulp.task('modules', function(){ - - var path = __dirname + "/src/js/modules/"; - - var files = fs.readdirSync(path); - - var core = ["layout.js", "localize.js", "comms.js"]; - - files.forEach(function(file, index){ - - if(!core.includes(file)){ - return gulp.src('src/js/modules/' + file) - .pipe(insert.prepend(version + "\n")) - .pipe(include()) - .pipe(babel({ - presets: [["env", { - "targets": { - "browsers": ["last 4 versions"] - }, - loose: true, - modules: false, - }] - ] - })) - .pipe(concat(file)) - .pipe(gulp.dest('dist/js/modules/')) - .pipe(rename({suffix: '.min'})) - .pipe(uglify()) - .pipe(insert.prepend(version)) - .pipe(gulp.dest('dist/js/modules/')) - } - }); - - }); - -//make jquery wrapper -gulp.task('jquery', function(){ - return gulp.src('src/js/jquery_wrapper.js') - .pipe(insert.prepend(version + "\n")) - .pipe(include()) - .pipe(babel({ - presets: [["env", { - "targets": { - "browsers": ["last 4 versions"] - }, - loose: true, - modules: false, - }] - ] - })) - .pipe(concat('jquery_wrapper.js')) - .pipe(gulp.dest('dist/js')) - .pipe(rename({suffix: '.min'})) - .pipe(uglify()) - .pipe(insert.prepend(version)) - .pipe(gulp.dest('dist/js')) - .on('end', function(){ gutil.log('jQuery wrapper complete'); }) - - }); - - -gulp.task('scripts', function() { - gulp.start('tabulator'); - gulp.start('core'); - gulp.start('modules'); - gulp.start('jquery'); - }); - -gulp.task('clean', function() { - return del(['dist/css', 'dist/js']); - }); - - -gulp.task('default', ['clean'], function() { - gulp.start('styles', 'scripts'); - }); - - -gulp.task('watch', function() { - - // Watch .scss files - gulp.watch('src/scss/**/*.scss', ['styles']); - - // Watch .js files - gulp.watch('src/js/**/*.js', ['scripts']); - - }); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/package.json b/Gems/AssetMemoryAnalyzer/External/tabulator-master/package.json deleted file mode 100644 index 23a56135d1..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "tabulator-tables", - "version": "4.1.2", - "description": "Interactive table generation JavaScript library", - "main": "dist/js/tabulator.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "https://github.com/olifolkerd/tabulator.git" - }, - "keywords": [ - "table", - "grid", - "datagrid", - "tabulator", - "editable", - "cookie", - "sort", - "format", - "resizable", - "list", - "scrollable", - "ajax", - "json", - "widget", - "jquery", - "react", - "angular", - "vue" - ], - "author": "Oli Folkerd", - "license": "MIT", - "bugs": { - "url": "https://github.com/olifolkerd/tabulator/issues" - }, - "homepage": "http://tabulator.info/", - "devDependencies": { - "babel-preset-env": "^1.4.0", - "babel-preset-es2015": "^6.24.1", - "babel-preset-stage-2": "^6.24.1", - "del": "^2.2.2", - "gulp": "^3.9.1", - "gulp-autoprefixer": "^3.1.1", - "gulp-babel": "^6.1.2", - "gulp-cache": "^0.4.6", - "gulp-concat": "^2.6.1", - "gulp-cssnano": "^2.1.2", - "gulp-imagemin": "^3.2.0", - "gulp-include": "^2.3.1", - "gulp-insert": "^0.5.0", - "gulp-jshint": "^2.0.4", - "gulp-livereload": "^3.8.1", - "gulp-notify": "^3.0.0", - "gulp-plumber": "^1.1.0", - "gulp-rename": "^1.2.2", - "gulp-sass": "^3.1.0", - "gulp-sourcemaps": "^2.6.0", - "gulp-uglify": "^2.1.2", - "gulp-util": "^3.0.8", - "jshint": "^2.9.4" - } -} diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/cell.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/cell.js deleted file mode 100644 index 7b54f0cb84..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/cell.js +++ /dev/null @@ -1,593 +0,0 @@ - -//public row object -var CellComponent = function (cell){ - this._cell = cell; -}; - -CellComponent.prototype.getValue = function(){ - return this._cell.getValue(); -}; - -CellComponent.prototype.getOldValue = function(){ - return this._cell.getOldValue(); -}; - -CellComponent.prototype.getElement = function(){ - return this._cell.getElement(); -}; - -CellComponent.prototype.getRow = function(){ - return this._cell.row.getComponent(); -}; - -CellComponent.prototype.getData = function(){ - return this._cell.row.getData(); -}; - -CellComponent.prototype.getField = function(){ - return this._cell.column.getField(); -}; - -CellComponent.prototype.getColumn = function(){ - return this._cell.column.getComponent(); -}; - -CellComponent.prototype.setValue = function(value, mutate){ - if(typeof mutate == "undefined"){ - mutate = true; - } - - this._cell.setValue(value, mutate); -}; - -CellComponent.prototype.restoreOldValue = function(){ - this._cell.setValueActual(this._cell.getOldValue()); -}; - -CellComponent.prototype.edit = function(force){ - return this._cell.edit(force); -}; - -CellComponent.prototype.cancelEdit = function(){ - this._cell.cancelEdit(); -}; - - -CellComponent.prototype.nav = function(){ - return this._cell.nav(); -}; - -CellComponent.prototype.checkHeight = function(){ - this._cell.checkHeight(); -}; - -CellComponent.prototype.getTable = function(){ - return this._cell.table; -}; - -CellComponent.prototype._getSelf = function(){ - return this._cell; -}; - - - -var Cell = function(column, row){ - - this.table = column.table; - this.column = column; - this.row = row; - this.element = null; - this.value = null; - this.oldValue = null; - - this.height = null; - this.width = null; - this.minWidth = null; - - this.build(); -}; - -//////////////// Setup Functions ///////////////// - -//generate element -Cell.prototype.build = function(){ - this.generateElement(); - - this.setWidth(this.column.width); - - this._configureCell(); - - this.setValueActual(this.column.getFieldValue(this.row.data)); -}; - -Cell.prototype.generateElement = function(){ - this.element = document.createElement('div'); - this.element.className = "tabulator-cell"; - this.element.setAttribute("role", "gridcell"); - this.element = this.element; -}; - - -Cell.prototype._configureCell = function(){ - var self = this, - cellEvents = self.column.cellEvents, - element = self.element, - field = this.column.getField(), - dblTap, tapHold, tap; - - //set text alignment - element.style.textAlign = self.column.hozAlign; - - if(field){ - element.setAttribute("tabulator-field", field); - } - - if(self.column.definition.cssClass){ - element.classList.add(self.column.definition.cssClass); - } - - //set event bindings - if (cellEvents.cellClick || self.table.options.cellClick){ - self.element.addEventListener("click", function(e){ - var component = self.getComponent(); - - if(cellEvents.cellClick){ - cellEvents.cellClick.call(self.table, e, component); - } - - if(self.table.options.cellClick){ - self.table.options.cellClick.call(self.table, e, component); - } - }); - } - - if (cellEvents.cellDblClick || this.table.options.cellDblClick){ - element.addEventListener("dblclick", function(e){ - var component = self.getComponent(); - - if(cellEvents.cellDblClick){ - cellEvents.cellDblClick.call(self.table, e, component); - } - - if(self.table.options.cellDblClick){ - self.table.options.cellDblClick.call(self.table, e, component); - } - }); - } - - if (cellEvents.cellContext || this.table.options.cellContext){ - element.addEventListener("contextmenu", function(e){ - var component = self.getComponent(); - - if(cellEvents.cellContext){ - cellEvents.cellContext.call(self.table, e, component); - } - - if(self.table.options.cellContext){ - self.table.options.cellContext.call(self.table, e, component); - } - }); - } - - if (this.table.options.tooltipGenerationMode === "hover"){ - //update tooltip on mouse enter - element.addEventListener("mouseenter", function(e){ - self._generateTooltip(); - }); - } - - if (cellEvents.cellTap || this.table.options.cellTap){ - tap = false; - - element.addEventListener("touchstart", function(e){ - tap = true; - }); - - element.addEventListener("touchend", function(e){ - if(tap){ - var component = self.getComponent(); - - if(cellEvents.cellTap){ - cellEvents.cellTap.call(self.table, e, component); - } - - if(self.table.options.cellTap){ - self.table.options.cellTap.call(self.table, e, component); - } - } - - tap = false; - }); - } - - if (cellEvents.cellDblTap || this.table.options.cellDblTap){ - dblTap = null; - - element.addEventListener("touchend", function(e){ - - if(dblTap){ - clearTimeout(dblTap); - dblTap = null; - - var component = self.getComponent(); - - if(cellEvents.cellDblTap){ - cellEvents.cellDblTap.call(self.table, e, component); - } - - if(self.table.options.cellDblTap){ - self.table.options.cellDblTap.call(self.table, e, component); - } - }else{ - - dblTap = setTimeout(function(){ - clearTimeout(dblTap); - dblTap = null; - }, 300); - } - - }); - } - - if (cellEvents.cellTapHold || this.table.options.cellTapHold){ - tapHold = null; - - element.addEventListener("touchstart", function(e){ - clearTimeout(tapHold); - - tapHold = setTimeout(function(){ - clearTimeout(tapHold); - tapHold = null; - tap = false; - var component = self.getComponent(); - - if(cellEvents.cellTapHold){ - cellEvents.cellTapHold.call(self.table, e, component); - } - - if(self.table.options.cellTapHold){ - self.table.options.cellTapHold.call(self.table, e, component); - } - }, 1000); - - }); - - element.addEventListener("touchend", function(e){ - clearTimeout(tapHold); - tapHold = null; - }); - } - - if(self.column.modules.edit){ - self.table.modules.edit.bindEditor(self); - } - - if(self.column.definition.rowHandle && self.table.options.movableRows !== false && self.table.modExists("moveRow")){ - self.table.modules.moveRow.initializeCell(self); - } - - //hide cell if not visible - if(!self.column.visible){ - self.hide(); - } -}; - -//generate cell contents -Cell.prototype._generateContents = function(){ - var val; - - if(this.table.modExists("format")){ - val = this.table.modules.format.formatValue(this); - }else{ - val = this.element.innerHTML = this.value; - } - - switch(typeof val){ - case "object": - if(val instanceof Node){ - this.element.appendChild(val); - }else{ - this.element.innerHTML = ""; - console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:", val); - } - break; - case "undefined": - case "null": - this.element.innerHTML = ""; - break; - default: - this.element.innerHTML = val; - } -}; - -Cell.prototype.cellRendered = function(){ - if(this.table.modExists("format") && this.table.modules.format.cellRendered){ - this.table.modules.format.cellRendered(this); - } -}; - -//generate tooltip text -Cell.prototype._generateTooltip = function(){ - var tooltip = this.column.tooltip; - - if(tooltip){ - if(tooltip === true){ - tooltip = this.value; - }else if(typeof(tooltip) == "function"){ - tooltip = tooltip(this.getComponent()); - - if(tooltip === false){ - tooltip = ""; - } - } - - if(typeof tooltip === "undefined"){ - tooltip = ""; - } - - this.element.setAttribute("title", tooltip); - }else{ - this.element.setAttribute("title", ""); - } -}; - - -//////////////////// Getters //////////////////// -Cell.prototype.getElement = function(){ - return this.element; -}; - -Cell.prototype.getValue = function(){ - return this.value; -}; - -Cell.prototype.getOldValue = function(){ - return this.oldValue; -}; - -//////////////////// Actions //////////////////// - -Cell.prototype.setValue = function(value, mutate){ - - var changed = this.setValueProcessData(value, mutate), - component; - - if(changed){ - if(this.table.options.history && this.table.modExists("history")){ - this.table.modules.history.action("cellEdit", this, {oldValue:this.oldValue, newValue:this.value}); - } - - component = this.getComponent(); - - if(this.column.cellEvents.cellEdited){ - this.column.cellEvents.cellEdited.call(this.table, component); - } - - this.table.options.cellEdited.call(this.table, component); - - this.table.options.dataEdited.call(this.table, this.table.rowManager.getData()); - } - - if(this.table.modExists("columnCalcs")){ - if(this.column.definition.topCalc || this.column.definition.bottomCalc){ - if(this.table.options.groupBy && this.table.modExists("groupRows")){ - this.table.modules.columnCalcs.recalcRowGroup(this.row); - }else{ - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - } - } - -}; - -Cell.prototype.setValueProcessData = function(value, mutate){ - var changed = false; - - if(this.value != value){ - - changed = true; - - if(mutate){ - if(this.column.modules.mutate){ - value = this.table.modules.mutator.transformCell(this, value); - } - } - } - - this.setValueActual(value); - - return changed; -}; - -Cell.prototype.setValueActual = function(value){ - this.oldValue = this.value; - - this.value = value; - - this.column.setFieldValue(this.row.data, value); - - this._generateContents(); - this._generateTooltip(); - - //set resizable handles - if(this.table.options.resizableColumns && this.table.modExists("resizeColumns")){ - this.table.modules.resizeColumns.initializeColumn("cell", this.column, this.element); - } - - //handle frozen cells - if(this.table.modExists("frozenColumns")){ - this.table.modules.frozenColumns.layoutElement(this.element, this.column); - } -}; - -Cell.prototype.setWidth = function(width){ - this.width = width; - // this.element.css("width", width || ""); - this.element.style.width = (width ? width + "px" : ""); -}; - -Cell.prototype.getWidth = function(){ - return this.width || this.element.offsetWidth; -}; - -Cell.prototype.setMinWidth = function(minWidth){ - this.minWidth = minWidth; - this.element.style.minWidth = (minWidth ? minWidth + "px" : ""); -}; - -Cell.prototype.checkHeight = function(){ - // var height = this.element.css("height"); - - this.row.reinitializeHeight(); -}; - -Cell.prototype.clearHeight = function(){ - this.element.style.height = ""; - this.height = null; -}; - - -Cell.prototype.setHeight = function(height){ - this.height = height; - this.element.style.height = (height ? height + "px" : ""); -}; - -Cell.prototype.getHeight = function(){ - return this.height || this.element.offsetHeight; -}; - -Cell.prototype.show = function(){ - this.element.style.display = ""; -}; - -Cell.prototype.hide = function(){ - this.element.style.display = "none"; -}; - -Cell.prototype.edit = function(force){ - if(this.table.modExists("edit", true)){ - return this.table.modules.edit.editCell(this, force); - } -}; - -Cell.prototype.cancelEdit = function(){ - if(this.table.modExists("edit", true)){ - var editing = this.table.modules.edit.getCurrentCell(); - - if(editing && editing._getSelf() === this){ - this.table.modules.edit.cancelEdit(); - }else{ - console.warn("Cancel Editor Error - This cell is not currently being edited "); - } - } -}; - - - - -Cell.prototype.delete = function(){ - this.element.parentNode.removeChild(this.element); - this.column.deleteCell(this); - this.row.deleteCell(this); -}; - -//////////////// Navigation ///////////////// - -Cell.prototype.nav = function(){ - - var self = this, - nextCell = false, - index = this.row.getCellIndex(this); - - return { - next:function(){ - var nextCell = this.right(), - nextRow; - - if(!nextCell){ - nextRow = self.table.rowManager.nextDisplayRow(self.row, true); - - if(nextRow){ - nextCell = nextRow.findNextEditableCell(-1); - - if(nextCell){ - nextCell.edit(); - return true; - } - } - }else{ - return true; - } - - return false; - }, - prev:function(){ - var nextCell = this.left(), - prevRow; - - if(!nextCell){ - prevRow = self.table.rowManager.prevDisplayRow(self.row, true); - - if(prevRow){ - nextCell = prevRow.findPrevEditableCell(prevRow.cells.length); - - if(nextCell){ - nextCell.edit(); - return true; - } - } - - }else{ - return true; - } - - return false; - }, - left:function(){ - - nextCell = self.row.findPrevEditableCell(index); - - if(nextCell){ - nextCell.edit(); - return true; - }else{ - return false; - } - }, - right:function(){ - nextCell = self.row.findNextEditableCell(index); - - if(nextCell){ - nextCell.edit(); - return true; - }else{ - return false; - } - }, - up:function(){ - var nextRow = self.table.rowManager.prevDisplayRow(self.row, true); - - if(nextRow){ - nextRow.cells[index].edit(); - } - }, - down:function(){ - var nextRow = self.table.rowManager.nextDisplayRow(self.row, true); - - if(nextRow){ - nextRow.cells[index].edit(); - } - }, - - }; - -}; - -Cell.prototype.getIndex = function(){ - this.row.getCellIndex(this); -}; - -//////////////// Object Generation ///////////////// -Cell.prototype.getComponent = function(){ - return new CellComponent(this); -}; \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/column.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/column.js deleted file mode 100644 index 026cd59889..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/column.js +++ /dev/null @@ -1,1074 +0,0 @@ - -//public column object -var ColumnComponent = function (column){ - this._column = column; - this.type = "ColumnComponent"; -}; - -ColumnComponent.prototype.getElement = function(){ - return this._column.getElement(); -}; - -ColumnComponent.prototype.getDefinition = function(){ - return this._column.getDefinition(); -}; - -ColumnComponent.prototype.getField = function(){ - return this._column.getField(); -}; - -ColumnComponent.prototype.getCells = function(){ - var cells = []; - - this._column.cells.forEach(function(cell){ - cells.push(cell.getComponent()); - }); - - return cells; -}; - -ColumnComponent.prototype.getVisibility = function(){ - return this._column.visible; -}; - -ColumnComponent.prototype.show = function(){ - if(this._column.isGroup){ - this._column.columns.forEach(function(column){ - column.show(); - }); - }else{ - this._column.show(); - } -}; - -ColumnComponent.prototype.hide = function(){ - if(this._column.isGroup){ - this._column.columns.forEach(function(column){ - column.hide(); - }); - }else{ - this._column.hide(); - } -}; - -ColumnComponent.prototype.toggle = function(){ - if(this._column.visible){ - this.hide(); - }else{ - this.show(); - } -}; - -ColumnComponent.prototype.delete = function(){ - this._column.delete(); -}; - -ColumnComponent.prototype.getSubColumns = function(){ - var output = []; - - if(this._column.columns.length){ - this._column.columns.forEach(function(column){ - output.push(column.getComponent()); - }); - } - - return output; -}; - -ColumnComponent.prototype.getParentColumn = function(){ - return this._column.parent instanceof Column ? this._column.parent.getComponent() : false; -}; - - -ColumnComponent.prototype._getSelf = function(){ - return this._column; -}; - -ColumnComponent.prototype.scrollTo = function(){ - return this._column.table.columnManager.scrollToColumn(this._column); -}; - -ColumnComponent.prototype.getTable = function(){ - return this._column.table; -}; - -ColumnComponent.prototype.headerFilterFocus = function(){ - if(this._column.table.modExists("filter", true)){ - this._column.table.modules.filter.setHeaderFilterFocus(this._column); - } -}; - -ColumnComponent.prototype.reloadHeaderFilter = function(){ - if(this._column.table.modExists("filter", true)){ - this._column.table.modules.filter.reloadHeaderFilter(this._column); - } -}; - -ColumnComponent.prototype.setHeaderFilterValue = function(value){ - if(this._column.table.modExists("filter", true)){ - this._column.table.modules.filter.setHeaderFilterValue(this._column, value); - } -}; - - - -var Column = function(def, parent){ - var self = this; - - this.table = parent.table; - this.definition = def; //column definition - this.parent = parent; //hold parent object - this.type = "column"; //type of element - this.columns = []; //child columns - this.cells = []; //cells bound to this column - this.element = this.createElement(); //column header element - this.contentElement = false; - this.groupElement = this.createGroupElement(); //column group holder element - this.isGroup = false; - this.tooltip = false; //hold column tooltip - this.hozAlign = ""; //horizontal text alignment - - //multi dimentional filed handling - this.field =""; - this.fieldStructure = ""; - this.getFieldValue = ""; - this.setFieldValue = ""; - - this.setField(this.definition.field); - - - this.modules = {}; //hold module variables; - - this.cellEvents = { - cellClick:false, - cellDblClick:false, - cellContext:false, - cellTap:false, - cellDblTap:false, - cellTapHold:false - }; - - this.width = null; //column width - this.minWidth = null; //column minimum width - this.widthFixed = false; //user has specified a width for this column - - this.visible = true; //default visible state - - //initialize column - if(def.columns){ - - this.isGroup = true; - - def.columns.forEach(function(def, i){ - var newCol = new Column(def, self); - self.attachColumn(newCol); - }); - - self.checkColumnVisibility(); - }else{ - parent.registerColumnField(this); - } - - if(def.rowHandle && this.table.options.movableRows !== false && this.table.modExists("moveRow")){ - this.table.modules.moveRow.setHandle(true); - } - - this._buildHeader(); -}; - -Column.prototype.createElement = function (){ - var el = document.createElement("div"); - - el.classList.add("tabulator-col"); - el.setAttribute("role", "columnheader"); - el.setAttribute("aria-sort", "none"); - - return el; -}; - -Column.prototype.createGroupElement = function (){ - var el = document.createElement("div"); - - el.classList.add("tabulator-col-group-cols"); - - return el; -}; - -Column.prototype.setField = function(field){ - this.field = field; - this.fieldStructure = field ? (this.table.options.nestedFieldSeparator ? field.split(this.table.options.nestedFieldSeparator) : [field]) : []; - this.getFieldValue = this.fieldStructure.length > 1 ? this._getNestedData : this._getFlatData; - this.setFieldValue = this.fieldStructure.length > 1 ? this._setNesteData : this._setFlatData; -}; - -//register column position with column manager -Column.prototype.registerColumnPosition = function(column){ - this.parent.registerColumnPosition(column); -}; - -//register column position with column manager -Column.prototype.registerColumnField = function(column){ - this.parent.registerColumnField(column); -}; - -//trigger position registration -Column.prototype.reRegisterPosition = function(){ - if(this.isGroup){ - this.columns.forEach(function(column){ - column.reRegisterPosition(); - }); - }else{ - this.registerColumnPosition(this); - } -}; - -Column.prototype.setTooltip = function(){ - var self = this, - def = self.definition; - - //set header tooltips - var tooltip = def.headerTooltip || def.tooltip === false ? def.headerTooltip : self.table.options.tooltipsHeader; - - if(tooltip){ - if(tooltip === true){ - if(def.field){ - self.table.modules.localize.bind("columns|" + def.field, function(value){ - self.element.setAttribute("title", value || def.title); - }); - }else{ - self.element.setAttribute("title", def.title); - } - - }else{ - if(typeof(tooltip) == "function"){ - tooltip = tooltip(self.getComponent()); - - if(tooltip === false){ - tooltip = ""; - } - } - - self.element.setAttribute("title", tooltip); - } - - }else{ - self.element.setAttribute("title", ""); - } -}; - -//build header element -Column.prototype._buildHeader = function(){ - var self = this, - def = self.definition; - - while(self.element.firstChild) self.element.removeChild(self.element.firstChild); - - if(def.headerVertical){ - self.element.classList.add("tabulator-col-vertical"); - - if(def.headerVertical === "flip"){ - self.element.classList.add("tabulator-col-vertical-flip"); - } - } - - self.contentElement = self._bindEvents(); - - self.contentElement = self._buildColumnHeaderContent(); - - self.element.appendChild(self.contentElement); - - if(self.isGroup){ - self._buildGroupHeader(); - }else{ - self._buildColumnHeader(); - } - - self.setTooltip(); - - //set resizable handles - if(self.table.options.resizableColumns && self.table.modExists("resizeColumns")){ - self.table.modules.resizeColumns.initializeColumn("header", self, self.element); - } - - //set resizable handles - if(def.headerFilter && self.table.modExists("filter") && self.table.modExists("edit")){ - if(typeof def.headerFilterPlaceholder !== "undefined" && def.field){ - self.table.modules.localize.setHeaderFilterColumnPlaceholder(def.field, def.headerFilterPlaceholder); - } - - self.table.modules.filter.initializeColumn(self); - } - - - //set resizable handles - if(self.table.modExists("frozenColumns")){ - self.table.modules.frozenColumns.initializeColumn(self); - } - - //set movable column - if(self.table.options.movableColumns && !self.isGroup && self.table.modExists("moveColumn")){ - self.table.modules.moveColumn.initializeColumn(self); - } - - //set calcs column - if((def.topCalc || def.bottomCalc) && self.table.modExists("columnCalcs")){ - self.table.modules.columnCalcs.initializeColumn(self); - } - - - //update header tooltip on mouse enter - self.element.addEventListener("mouseenter", function(e){ - self.setTooltip(); - }); -}; - -Column.prototype._bindEvents = function(){ - - var self = this, - def = self.definition, - dblTap, tapHold, tap; - - //setup header click event bindings - if(typeof(def.headerClick) == "function"){ - self.element.addEventListener("click", function(e){def.headerClick(e, self.getComponent());}); - } - - if(typeof(def.headerDblClick) == "function"){ - self.element.addEventListener("dblclick", function(e){def.headerDblClick(e, self.getComponent());}); - } - - if(typeof(def.headerContext) == "function"){ - self.element.addEventListener("contextmenu", function(e){def.headerContext(e, self.getComponent());}); - } - - //setup header tap event bindings - if(typeof(def.headerTap) == "function"){ - tap = false; - - self.element.addEventListener("touchstart", function(e){ - tap = true; - }); - - self.element.addEventListener("touchend", function(e){ - if(tap){ - def.headerTap(e, self.getComponent()); - } - - tap = false; - }); - } - - if(typeof(def.headerDblTap) == "function"){ - dblTap = null; - - self.element.addEventListener("touchend", function(e){ - - if(dblTap){ - clearTimeout(dblTap); - dblTap = null; - - def.headerDblTap(e, self.getComponent()); - }else{ - - dblTap = setTimeout(function(){ - clearTimeout(dblTap); - dblTap = null; - }, 300); - } - - }); - } - - if(typeof(def.headerTapHold) == "function"){ - tapHold = null; - - self.element.addEventListener("touchstart", function(e){ - clearTimeout(tapHold); - - tapHold = setTimeout(function(){ - clearTimeout(tapHold); - tapHold = null; - tap = false; - def.headerTapHold(e, self.getComponent()); - }, 1000); - - }); - - self.element.addEventListener("touchend", function(e){ - clearTimeout(tapHold); - tapHold = null; - }); - } - - //store column cell click event bindings - if(typeof(def.cellClick) == "function"){ - self.cellEvents.cellClick = def.cellClick; - } - - if(typeof(def.cellDblClick) == "function"){ - self.cellEvents.cellDblClick = def.cellDblClick; - } - - if(typeof(def.cellContext) == "function"){ - self.cellEvents.cellContext = def.cellContext; - } - - //setup column cell tap event bindings - if(typeof(def.cellTap) == "function"){ - self.cellEvents.cellTap = def.cellTap; - } - - if(typeof(def.cellDblTap) == "function"){ - self.cellEvents.cellDblTap = def.cellDblTap; - } - - if(typeof(def.cellTapHold) == "function"){ - self.cellEvents.cellTapHold = def.cellTapHold; - } - - //setup column cell edit callbacks - if(typeof(def.cellEdited) == "function"){ - self.cellEvents.cellEdited = def.cellEdited; - } - - if(typeof(def.cellEditing) == "function"){ - self.cellEvents.cellEditing = def.cellEditing; - } - - if(typeof(def.cellEditCancelled) == "function"){ - self.cellEvents.cellEditCancelled = def.cellEditCancelled; - } -}; - -//build header element for header -Column.prototype._buildColumnHeader = function(){ - var self = this, - def = self.definition, - table = self.table, - sortable; - - //set column sorter - if(table.modExists("sort")){ - table.modules.sort.initializeColumn(self, self.contentElement); - } - - //set column formatter - if(table.modExists("format")){ - table.modules.format.initializeColumn(self); - } - - //set column editor - if(typeof def.editor != "undefined" && table.modExists("edit")){ - table.modules.edit.initializeColumn(self); - } - - //set colum validator - if(typeof def.validator != "undefined" && table.modExists("validate")){ - table.modules.validate.initializeColumn(self); - } - - - //set column mutator - if(table.modExists("mutator")){ - table.modules.mutator.initializeColumn(self); - } - - //set column accessor - if(table.modExists("accessor")){ - table.modules.accessor.initializeColumn(self); - } - - //set respoviveLayout - if(typeof table.options.responsiveLayout && table.modExists("responsiveLayout")){ - table.modules.responsiveLayout.initializeColumn(self); - } - - //set column visibility - if(typeof def.visible != "undefined"){ - if(def.visible){ - self.show(true); - }else{ - self.hide(true); - } - } - - //asign additional css classes to column header - if(def.cssClass){ - self.element.classList.add(def.cssClass); - } - - if(def.field){ - this.element.setAttribute("tabulator-field", def.field); - } - - //set min width if present - self.setMinWidth(typeof def.minWidth == "undefined" ? self.table.options.columnMinWidth : def.minWidth); - - self.reinitializeWidth(); - - //set tooltip if present - self.tooltip = self.definition.tooltip || self.definition.tooltip === false ? self.definition.tooltip : self.table.options.tooltips; - - //set orizontal text alignment - self.hozAlign = typeof(self.definition.align) == "undefined" ? "" : self.definition.align; -}; - -Column.prototype._buildColumnHeaderContent = function(){ - var self = this, - def = self.definition, - table = self.table; - - var contentElement = document.createElement("div"); - contentElement.classList.add("tabulator-col-content"); - - contentElement.appendChild(self._buildColumnHeaderTitle()); - - return contentElement; -}; - -//build title element of column -Column.prototype._buildColumnHeaderTitle = function(){ - var self = this, - def = self.definition, - table = self.table, - title; - - var titleHolderElement = document.createElement("div"); - titleHolderElement.classList.add("tabulator-col-title"); - - if(def.editableTitle){ - var titleElement = document.createElement("input"); - titleElement.classList.add("tabulator-title-editor"); - - titleElement.addEventListener("click", function(e){ - e.stopPropagation(); - titleElement.focus(); - }); - - titleElement.addEventListener("change", function(){ - def.title = titleElement.value; - table.options.columnTitleChanged.call(self.table, self.getComponent()); - }); - - titleHolderElement.appendChild(titleElement); - - if(def.field){ - table.modules.localize.bind("columns|" + def.field, function(text){ - titleElement.value = text || (def.title || " "); - }); - }else{ - titleElement.value = def.title || " "; - } - - }else{ - if(def.field){ - table.modules.localize.bind("columns|" + def.field, function(text){ - self._formatColumnHeaderTitle(titleHolderElement, text || (def.title || " ")); - }); - }else{ - self._formatColumnHeaderTitle(titleHolderElement, def.title || " "); - } - } - - return titleHolderElement; -}; - -Column.prototype._formatColumnHeaderTitle = function(el, title){ - var formatter, contents, params, mockCell; - - if(this.definition.titleFormatter && this.table.modExists("format")){ - - formatter = this.table.modules.format.getFormatter(this.definition.titleFormatter); - - mockCell = { - getValue:function(){ - return title; - }, - getElement:function(){ - return el; - } - }; - - params = this.definition.titleFormatterParams || {}; - - params = typeof params === "function" ? params() : params; - - contents = formatter.call(this.table.modules.format, mockCell, params); - - switch(typeof contents){ - case "object": - if(contents instanceof Node){ - this.element.appendChild(contents); - }else{ - this.element.innerHTML = ""; - console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:", contents); - } - break; - case "undefined": - case "null": - this.element.innerHTML = ""; - break; - default: - this.element.innerHTML = contents; - } - }else{ - el.innerHTML = title; - } -}; - - -//build header element for column group -Column.prototype._buildGroupHeader = function(){ - this.element.classList.add("tabulator-col-group"); - this.element.setAttribute("role", "columngroup"); - this.element.setAttribute("aria-title", this.definition.title); - - this.element.appendChild(this.groupElement); -}; - -//flat field lookup -Column.prototype._getFlatData = function(data){ - return data[this.field]; -}; - -//nested field lookup -Column.prototype._getNestedData = function(data){ - var dataObj = data, - structure = this.fieldStructure, - length = structure.length, - output; - - for(let i = 0; i < length; i++){ - - dataObj = dataObj[structure[i]]; - - output = dataObj; - - if(!dataObj){ - break; - } - } - - return output; -}; - -//flat field set -Column.prototype._setFlatData = function(data, value){ - data[this.field] = value; -}; - -//nested field set -Column.prototype._setNesteData = function(data, value){ - var dataObj = data, - structure = this.fieldStructure, - length = structure.length; - - for(let i = 0; i < length; i++){ - - if(i == length -1){ - dataObj[structure[i]] = value; - }else{ - if(!dataObj[structure[i]]){ - dataObj[structure[i]] = {}; - } - - dataObj = dataObj[structure[i]]; - } - } -}; - - -//attach column to this group -Column.prototype.attachColumn = function(column){ - var self = this; - - if(self.groupElement){ - self.columns.push(column); - self.groupElement.appendChild(column.getElement()); - }else{ - console.warn("Column Warning - Column being attached to another column instead of column group"); - } -}; - -//vertically align header in column -Column.prototype.verticalAlign = function(alignment, height){ - - //calculate height of column header and group holder element - var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : (height || this.parent.getHeadersElement().clientHeight); - // var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : this.parent.getHeadersElement().clientHeight; - - this.element.style.height = parentHeight + "px"; - - if(this.isGroup){ - this.groupElement.style.minHeight = (parentHeight - this.contentElement.offsetHeight) + "px"; - } - - //vertically align cell contents - if(!this.isGroup && alignment !== "top"){ - if(alignment === "bottom"){ - this.element.style.paddingTop = (this.element.clientHeight - this.contentElement.offsetHeight) + "px"; - }else{ - this.element.style.paddingTop = ((this.element.clientHeight - this.contentElement.offsetHeight) / 2) + "px"; - } - } - - this.columns.forEach(function(column){ - column.verticalAlign(alignment); - }); -}; - -//clear vertical alignmenet -Column.prototype.clearVerticalAlign = function(){ - this.element.style.paddingTop = ""; - this.element.style.height = ""; - this.element.style.minHeight = ""; - - this.columns.forEach(function(column){ - column.clearVerticalAlign(); - }); -}; - -//// Retreive Column Information //// - -//return column header element -Column.prototype.getElement = function(){ - return this.element; -}; - -//return colunm group element -Column.prototype.getGroupElement = function(){ - return this.groupElement; -}; - -//return field name -Column.prototype.getField = function(){ - return this.field; -}; - -//return the first column in a group -Column.prototype.getFirstColumn = function(){ - if(!this.isGroup){ - return this; - }else{ - if(this.columns.length){ - return this.columns[0].getFirstColumn(); - }else{ - return false; - } - } -}; - -//return the last column in a group -Column.prototype.getLastColumn = function(){ - if(!this.isGroup){ - return this; - }else{ - if(this.columns.length){ - return this.columns[this.columns.length -1].getLastColumn(); - }else{ - return false; - } - } -}; - -//return all columns in a group -Column.prototype.getColumns = function(){ - return this.columns; -}; - -//return all columns in a group -Column.prototype.getCells = function(){ - return this.cells; -}; - -//retreive the top column in a group of columns -Column.prototype.getTopColumn = function(){ - if(this.parent.isGroup){ - return this.parent.getTopColumn(); - }else{ - return this; - } -}; - -//return column definition object -Column.prototype.getDefinition = function(updateBranches){ - var colDefs = []; - - if(this.isGroup && updateBranches){ - this.columns.forEach(function(column){ - colDefs.push(column.getDefinition(true)); - }); - - this.definition.columns = colDefs; - } - - return this.definition; -}; - -//////////////////// Actions //////////////////// - -Column.prototype.checkColumnVisibility = function(){ - var visible = false; - - this.columns.forEach(function(column){ - if(column.visible){ - visible = true; - } - }); - - if(visible){ - this.show(); - this.parent.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), false); - }else{ - this.hide(); - } - -}; - -//show column -Column.prototype.show = function(silent, responsiveToggle){ - if(!this.visible){ - this.visible = true; - - this.element.style.display = ""; - - this.table.columnManager._verticalAlignHeaders(); - - if(this.parent.isGroup){ - this.parent.checkColumnVisibility(); - } - - this.cells.forEach(function(cell){ - cell.show(); - }); - - if(this.table.options.persistentLayout && this.table.modExists("responsiveLayout", true)){ - this.table.modules.persistence.save("columns"); - } - - if(!responsiveToggle && this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)){ - this.table.modules.responsiveLayout.updateColumnVisibility(this, this.visible); - } - - if(!silent){ - this.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), true); - } - } -}; - -//hide column -Column.prototype.hide = function(silent, responsiveToggle){ - if(this.visible){ - this.visible = false; - - this.element.style.display = "none"; - - this.table.columnManager._verticalAlignHeaders(); - - if(this.parent.isGroup){ - this.parent.checkColumnVisibility(); - } - - this.cells.forEach(function(cell){ - cell.hide(); - }); - - if(this.table.options.persistentLayout && this.table.modExists("persistence", true)){ - this.table.modules.persistence.save("columns"); - } - - if(!responsiveToggle && this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)){ - this.table.modules.responsiveLayout.updateColumnVisibility(this, this.visible); - } - - if(!silent){ - this.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), false); - } - } -}; - -Column.prototype.matchChildWidths = function(){ - var childWidth = 0; - - if(this.contentElement && this.columns.length){ - this.columns.forEach(function(column){ - childWidth += column.getWidth(); - }); - - this.contentElement.style.maxWidth = (childWidth - 1) + "px"; - } -}; - -Column.prototype.setWidth = function(width){ - this.widthFixed = true; - this.setWidthActual(width); -}; - -Column.prototype.setWidthActual = function(width){ - - if(isNaN(width)){ - width = Math.floor((this.table.element.clientWidth/100) * parseInt(width)); - } - - width = Math.max(this.minWidth, width); - - this.width = width; - - this.element.style.width = width ? width + "px" : ""; - - if(!this.isGroup){ - this.cells.forEach(function(cell){ - cell.setWidth(width); - }); - } - - if(this.parent.isGroup){ - this.parent.matchChildWidths(); - } - - //set resizable handles - if(this.table.modExists("frozenColumns")){ - this.table.modules.frozenColumns.layout(); - } -}; - - -Column.prototype.checkCellHeights = function(){ - var rows = []; - - this.cells.forEach(function(cell){ - if(cell.row.heightInitialized){ - if(cell.row.getElement().offsetParent !== null){ - rows.push(cell.row); - cell.row.clearCellHeight(); - }else{ - cell.row.heightInitialized = false; - } - } - }); - - rows.forEach(function(row){ - row.calcHeight(); - }); - - rows.forEach(function(row){ - row.setCellHeight(); - }); -}; - -Column.prototype.getWidth = function(){ - // return this.element.offsetWidth; - return this.width; -}; - -Column.prototype.getHeight = function(){ - return this.element.offsetHeight; -}; - -Column.prototype.setMinWidth = function(minWidth){ - this.minWidth = minWidth; - - this.element.style.minWidth = minWidth ? minWidth + "px" : ""; - - this.cells.forEach(function(cell){ - cell.setMinWidth(minWidth); - }); -}; - -Column.prototype.delete = function(){ - if(this.isGroup){ - this.columns.forEach(function(column){ - column.delete(); - }); - } - - var cellCount = this.cells.length; - - for(let i = 0; i < cellCount; i++){ - this.cells[0].delete(); - } - - this.element.parentNode.removeChild(this.element); - - this.table.columnManager.deregisterColumn(this); -}; - -//////////////// Cell Management ///////////////// - -//generate cell for this column -Column.prototype.generateCell = function(row){ - var self = this; - - var cell = new Cell(self, row); - - this.cells.push(cell); - - return cell; -}; - -Column.prototype.reinitializeWidth = function(force){ - - this.widthFixed = false; - - //set width if present - if(typeof this.definition.width !== "undefined" && !force){ - this.setWidth(this.definition.width); - } - - //hide header filters to prevent them altering column width - if(this.table.modExists("filter")){ - this.table.modules.filter.hideHeaderFilterElements(); - } - - this.fitToData(); - - //show header filters again after layout is complete - if(this.table.modExists("filter")){ - this.table.modules.filter.showHeaderFilterElements(); - } -}; - -//set column width to maximum cell width -Column.prototype.fitToData = function(){ - var self = this; - - if(!this.widthFixed){ - this.element.width = ""; - - self.cells.forEach(function(cell){ - cell.setWidth(""); - }); - } - - var maxWidth = this.element.offsetWidth; - - if(!self.width || !this.widthFixed){ - self.cells.forEach(function(cell){ - var width = cell.getWidth(); - - if(width > maxWidth){ - maxWidth = width; - } - }); - - if(maxWidth){ - self.setWidthActual(maxWidth + 1); - } - - } -}; - -Column.prototype.deleteCell = function(cell){ - var index = this.cells.indexOf(cell); - - if(index > -1){ - this.cells.splice(index, 1); - } -}; - -//////////////// Event Bindings ///////////////// - -//////////////// Object Generation ///////////////// -Column.prototype.getComponent = function(){ - return new ColumnComponent(this); -}; \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/column_manager.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/column_manager.js deleted file mode 100644 index 9dc1056977..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/column_manager.js +++ /dev/null @@ -1,553 +0,0 @@ -var ColumnManager = function(table){ - this.table = table; //hold parent table - this.headersElement = this.createHeadersElement(); - this.element = this.createHeaderElement(); //containing element - this.rowManager = null; //hold row manager object - this.columns = []; // column definition object - this.columnsByIndex = []; //columns by index - this.columnsByField = []; //columns by field - this.scrollLeft = 0; - - this.element.insertBefore(this.headersElement, this.element.firstChild); -}; - -////////////// Setup Functions ///////////////// - -ColumnManager.prototype.createHeadersElement = function (){ - var el = document.createElement("div"); - - el.classList.add("tabulator-headers"); - - return el; -}; - -ColumnManager.prototype.createHeaderElement = function (){ - var el = document.createElement("div"); - - el.classList.add("tabulator-header"); - - return el; -}; - -//link to row manager -ColumnManager.prototype.setRowManager = function(manager){ - this.rowManager = manager; -}; - -//return containing element -ColumnManager.prototype.getElement = function(){ - return this.element; -}; - -//return header containing element -ColumnManager.prototype.getHeadersElement = function(){ - return this.headersElement; -}; - -//scroll horizontally to match table body -ColumnManager.prototype.scrollHorizontal = function(left){ - var hozAdjust = 0, - scrollWidth = this.element.scrollWidth - this.table.element.clientWidth; - - this.element.scrollLeft = left; - - //adjust for vertical scrollbar moving table when present - if(left > scrollWidth){ - hozAdjust = left - scrollWidth; - this.element.style.marginLeft = (-(hozAdjust)) + "px"; - }else{ - this.element.style.marginLeft = 0; - } - - //keep frozen columns fixed in position - //this._calcFrozenColumnsPos(hozAdjust + 3); - - this.scrollLeft = left; - - if(this.table.modExists("frozenColumns")){ - this.table.modules.frozenColumns.layout(); - } -}; - - -///////////// Column Setup Functions ///////////// - -ColumnManager.prototype.setColumns = function(cols, row){ - var self = this; - - while(self.headersElement.firstChild) self.headersElement.removeChild(self.headersElement.firstChild); - - self.columns = []; - self.columnsByIndex = []; - self.columnsByField = []; - - - //reset frozen columns - if(self.table.modExists("frozenColumns")){ - self.table.modules.frozenColumns.reset(); - } - - cols.forEach(function(def, i){ - self._addColumn(def); - }); - - self._reIndexColumns(); - - if(self.table.options.responsiveLayout && self.table.modExists("responsiveLayout", true)){ - self.table.modules.responsiveLayout.initialize(); - } - - self.redraw(true); -}; - -ColumnManager.prototype._addColumn = function(definition, before, nextToColumn){ - var column = new Column(definition, this), - colEl = column.getElement(), - index = nextToColumn ? this.findColumnIndex(nextToColumn) : nextToColumn; - - if(nextToColumn && index > -1){ - - var parentIndex = this.columns.indexOf(nextToColumn.getTopColumn()); - var nextEl = nextToColumn.getElement(); - - if(before){ - this.columns.splice(parentIndex, 0, column); - nextEl.parentNode.insertBefore(colEl, nextEl); - }else{ - this.columns.splice(parentIndex + 1, 0, column); - nextEl.parentNode.insertBefore(colEl, nextEl.nextSibling); - } - - }else{ - if(before){ - this.columns.unshift(column); - this.headersElement.insertBefore(column.getElement(), this.headersElement.firstChild); - }else{ - this.columns.push(column); - this.headersElement.appendChild(column.getElement()); - } - } - - return column; -}; - -ColumnManager.prototype.registerColumnField = function(col){ - if(col.definition.field){ - this.columnsByField[col.definition.field] = col; - } -}; - -ColumnManager.prototype.registerColumnPosition = function(col){ - this.columnsByIndex.push(col); -}; - -ColumnManager.prototype._reIndexColumns = function(){ - this.columnsByIndex = []; - - this.columns.forEach(function(column){ - column.reRegisterPosition(); - }); -}; - -//ensure column headers take up the correct amount of space in column groups -ColumnManager.prototype._verticalAlignHeaders = function(){ - var self = this, minHeight = 0; - - self.columns.forEach(function(column){ - var height; - - column.clearVerticalAlign(); - - height = column.getHeight(); - - if(height > minHeight){ - minHeight = height; - } - }); - - self.columns.forEach(function(column){ - column.verticalAlign(self.table.options.columnVertAlign, minHeight); - }); - - self.rowManager.adjustTableSize(); -}; - -//////////////// Column Details ///////////////// - -ColumnManager.prototype.findColumn = function(subject){ - var self = this; - - if(typeof subject == "object"){ - - if(subject instanceof Column){ - //subject is column element - return subject; - }else if(subject instanceof ColumnComponent){ - //subject is public column component - return subject._getSelf() || false; - }else if(subject instanceof HTMLElement){ - //subject is a HTML element of the column header - let match = self.columns.find(function(column){ - return column.element === subject; - }); - - return match || false; - } - - }else{ - //subject should be treated as the field name of the column - return this.columnsByField[subject] || false; - } - - //catch all for any other type of input - - return false; -}; - -ColumnManager.prototype.getColumnByField = function(field){ - return this.columnsByField[field]; -}; - -ColumnManager.prototype.getColumnByIndex = function(index){ - return this.columnsByIndex[index]; -}; - -ColumnManager.prototype.getColumns = function(){ - return this.columns; -}; - -ColumnManager.prototype.findColumnIndex = function(column){ - return this.columnsByIndex.findIndex(function(col){ - return column === col; - }); -}; - -//return all columns that are not groups -ColumnManager.prototype.getRealColumns = function(){ - return this.columnsByIndex; -}; - -//travers across columns and call action -ColumnManager.prototype.traverse = function(callback){ - var self = this; - - self.columnsByIndex.forEach(function(column,i){ - callback(column, i); - }); -}; - -//get defintions of actual columns -ColumnManager.prototype.getDefinitions = function(active){ - var self = this, - output = []; - - self.columnsByIndex.forEach(function(column){ - if(!active || (active && column.visible)){ - output.push(column.getDefinition()); - } - }); - - return output; -}; - -//get full nested definition tree -ColumnManager.prototype.getDefinitionTree = function(){ - var self = this, - output = []; - - self.columns.forEach(function(column){ - output.push(column.getDefinition(true)); - }); - - return output; -}; - -ColumnManager.prototype.getComponents = function(structured){ - var self = this, - output = [], - columns = structured ? self.columns : self.columnsByIndex; - - columns.forEach(function(column){ - output.push(column.getComponent()); - }); - - return output; -}; - -ColumnManager.prototype.getWidth = function(){ - var width = 0; - - this.columnsByIndex.forEach(function(column){ - if(column.visible){ - width += column.getWidth(); - } - }); - - return width; -}; - -ColumnManager.prototype.moveColumn = function(from, to, after){ - - this._moveColumnInArray(this.columns, from, to, after); - this._moveColumnInArray(this.columnsByIndex, from, to, after, true); - - if(this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)){ - this.table.modules.responsiveLayout.initialize(); - } - - if(this.table.options.columnMoved){ - this.table.options.columnMoved.call(this.table, from.getComponent(), this.table.columnManager.getComponents()); - } - - if(this.table.options.persistentLayout && this.table.modExists("persistence", true)){ - this.table.modules.persistence.save("columns"); - } -}; - -ColumnManager.prototype._moveColumnInArray = function(columns, from, to, after, updateRows){ - var fromIndex = columns.indexOf(from), - toIndex; - - if (fromIndex > -1) { - - columns.splice(fromIndex, 1); - - toIndex = columns.indexOf(to); - - if (toIndex > -1) { - - if(after){ - toIndex = toIndex+1; - } - - }else{ - toIndex = fromIndex; - } - - columns.splice(toIndex, 0, from); - - if(updateRows){ - - this.table.rowManager.rows.forEach(function(row){ - if(row.cells.length){ - var cell = row.cells.splice(fromIndex, 1)[0]; - row.cells.splice(toIndex, 0, cell); - } - }); - } - } -}; - -ColumnManager.prototype.scrollToColumn = function(column, position, ifVisible){ - var left = 0, - offset = 0, - adjust = 0, - colEl = column.getElement(); - - return new Promise((resolve, reject) => { - - if(typeof position === "undefined"){ - position = this.table.options.scrollToColumnPosition; - } - - if(typeof ifVisible === "undefined"){ - ifVisible = this.table.options.scrollToColumnIfVisible; - } - - if(column.visible){ - - //align to correct position - switch(position){ - case "middle": - case "center": - adjust = -this.element.clientWidth / 2; - break; - - case "right": - adjust = colEl.clientWidth - this.headersElement.clientWidth; - break; - } - - //check column visibility - if(!ifVisible){ - - offset = colEl.offsetLeft; - - if(offset > 0 && offset + colEl.offsetWidth < this.element.clientWidth){ - return false; - } - } - - //calculate scroll position - left = colEl.offsetLeft + this.element.scrollLeft + adjust; - - left = Math.max(Math.min(left, this.table.rowManager.element.scrollWidth - this.table.rowManager.element.clientWidth),0); - - this.table.rowManager.scrollHorizontal(left); - this.scrollHorizontal(left); - - resolve(); - }else{ - console.warn("Scroll Error - Column not visible"); - reject("Scroll Error - Column not visible"); - } - - }); -}; - -//////////////// Cell Management ///////////////// - -ColumnManager.prototype.generateCells = function(row){ - var self = this; - - var cells = []; - - self.columnsByIndex.forEach(function(column){ - cells.push(column.generateCell(row)); - }); - - return cells; -}; - -//////////////// Column Management ///////////////// - - -ColumnManager.prototype.getFlexBaseWidth = function(){ - var self = this, - totalWidth = self.table.element.clientWidth, //table element width - fixedWidth = 0; - - //adjust for vertical scrollbar if present - if(self.rowManager.element.scrollHeight > self.rowManager.element.clientHeight){ - totalWidth -= self.rowManager.element.offsetWidth - self.rowManager.element.clientWidth; - } - - this.columnsByIndex.forEach(function(column){ - var width, minWidth, colWidth; - - if(column.visible){ - - width = column.definition.width || 0; - - minWidth = typeof column.minWidth == "undefined" ? self.table.options.columnMinWidth : parseInt(column.minWidth); - - if(typeof(width) == "string"){ - if(width.indexOf("%") > -1){ - colWidth = (totalWidth / 100) * parseInt(width) ; - }else{ - colWidth = parseInt(width); - } - }else{ - colWidth = width; - } - - fixedWidth += colWidth > minWidth ? colWidth : minWidth; - - } - }); - - return fixedWidth; -}; - -ColumnManager.prototype.addColumn = function(definition, before, nextToColumn){ - var column = this._addColumn(definition, before, nextToColumn); - - this._reIndexColumns(); - - if(this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)){ - this.table.modules.responsiveLayout.initialize(); - } - - if(this.table.modExists("columnCalcs")){ - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - - this.redraw(); - - if(this.table.modules.layout.getMode() != "fitColumns"){ - column.reinitializeWidth(); - } - - this._verticalAlignHeaders(); - - this.table.rowManager.reinitialize(); -}; - -//remove column from system -ColumnManager.prototype.deregisterColumn = function(column){ - var field = column.getField(), - index; - - //remove from field list - if(field){ - delete this.columnsByField[field]; - } - - //remove from index list - index = this.columnsByIndex.indexOf(column); - - if(index > -1){ - this.columnsByIndex.splice(index, 1); - } - - //remove from column list - index = this.columns.indexOf(column); - - if(index > -1){ - this.columns.splice(index, 1); - } - - if(this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)){ - this.table.modules.responsiveLayout.initialize(); - } - - this.redraw(); -}; - -//redraw columns -ColumnManager.prototype.redraw = function(force){ - if(force){ - - if(Tabulator.prototype.helpers.elVisible(this.element)){ - this._verticalAlignHeaders(); - } - - this.table.rowManager.resetScroll(); - this.table.rowManager.reinitialize(); - } - - if(this.table.modules.layout.getMode() == "fitColumns"){ - this.table.modules.layout.layout(); - }else{ - if(force){ - this.table.modules.layout.layout(); - }else{ - if(this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)){ - this.table.modules.responsiveLayout.update(); - } - } - } - - if(this.table.modExists("frozenColumns")){ - this.table.modules.frozenColumns.layout(); - } - - if(this.table.modExists("columnCalcs")){ - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - - if(force){ - if(this.table.options.persistentLayout && this.table.modExists("persistence", true)){ - this.table.modules.persistence.save("columns"); - } - - if(this.table.modExists("columnCalcs")){ - this.table.modules.columnCalcs.redraw(); - } - } - - this.table.footerManager.redraw(); - - - -}; diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/core.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/core.js deleted file mode 100644 index 3a3d69f910..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/core.js +++ /dev/null @@ -1,1691 +0,0 @@ -'use strict'; - -/*=include polyfills.js */ - -/*=include column_manager.js */ -/*=include column.js */ -/*=include row_manager.js */ -/*=include row.js */ -/*=include cell.js */ -/*=include footer_manager.js */ - -var Tabulator = function(element, options){ - - this.options = {}; - - this.columnManager = null; // hold Column Manager - this.rowManager = null; //hold Row Manager - this.footerManager = null; //holder Footer Manager - this.browser = ""; //hold current browser type - this.browserSlow = false; //handle reduced functionality for slower browsers - - this.modules = {}; //hold all modules bound to this table - - this.initializeElement(element); - this.initializeOptions(options || {}); - this._create(); - - Tabulator.prototype.comms.register(this); //register table for inderdevice communication -}; - -//default setup options -Tabulator.prototype.defaultOptions = { - - height:false, //height of tabulator - - layout:"fitData", ///layout type "fitColumns" | "fitData" - layoutColumnsOnNewData:false, //update column widths on setData - - columnMinWidth:40, //minimum global width for a column - columnVertAlign:"top", //vertical alignment of column headers - - resizableColumns:true, //resizable columns - resizableRows:false, //resizable rows - autoResize:true, //auto resize table - - columns:[],//store for colum header info - - data:[], //default starting data - - nestedFieldSeparator:".", //seperatpr for nested data - - tooltips: false, //Tool tip value - tooltipsHeader: false, //Tool tip for headers - tooltipGenerationMode:"load", //when to generate tooltips - - initialSort:false, //initial sorting criteria - initialFilter:false, //initial filtering criteria - - columnHeaderSortMulti: true, //multiple or single column sorting - - sortOrderReverse:false, //reverse internal sort ordering - - footerElement:false, //hold footer element - - index:"id", //filed for row index - - keybindings:[], //array for keybindings - - clipboard:false, //enable clipboard - clipboardCopyStyled:true, //formatted table data - clipboardCopySelector:"active", //method of chosing which data is coppied to the clipboard - clipboardCopyFormatter:"table", //convert data to a clipboard string - clipboardPasteParser:"table", //convert pasted clipboard data to rows - clipboardPasteAction:"insert", //how to insert pasted data into the table - clipboardCopyConfig:false, //clipboard config - - clipboardCopied:function(){}, //data has been copied to the clipboard - clipboardPasted:function(){}, //data has been pasted into the table - clipboardPasteError:function(){}, //data has not successfully been pasted into the table - - downloadDataFormatter:false, //function to manipulate table data before it is downloaded - downloadReady:function(data, blob){return blob;}, //function to manipulate download data - downloadComplete:false, //function to manipulate download data - downloadConfig:false, //download config - - dataTree:false, //enable data tree - dataTreeBranchElement: true, //show data tree branch element - dataTreeChildIndent:9, //data tree child indent in px - dataTreeChildField:"_children", //data tre column field to look for child rows - dataTreeCollapseElement:false, //data tree row collapse element - dataTreeExpandElement:false, //data tree row expand element - dataTreeStartExpanded:false, - dataTreeRowExpanded:function(){}, //row has been expanded - dataTreeRowCollapsed:function(){}, //row has been collapsed - - - addRowPos:"bottom", //position to insert blank rows, top|bottom - - selectable:"highlight", //highlight rows on hover - selectableRangeMode: "drag", //highlight rows on hover - selectableRollingSelection:true, //roll selection once maximum number of selectable rows is reached - selectablePersistence:true, // maintain selection when table view is updated - selectableCheck:function(data, row){return true;}, //check wheather row is selectable - - headerFilterPlaceholder: false, //placeholder text to display in header filters - - history:false, //enable edit history - - locale:false, //current system language - langs:{}, - - virtualDom:true, //enable DOM virtualization - - persistentLayout:false, //store column layout in memory - persistentSort:false, //store sorting in memory - persistentFilter:false, //store filters in memory - persistenceID:"", //key for persistent storage - persistenceMode:true, //mode for storing persistence information - - responsiveLayout:false, //responsive layout flags - responsiveLayoutCollapseStartOpen:true, //start showing collapsed data - responsiveLayoutCollapseUseFormatters:true, //responsive layout collapse formatter - responsiveLayoutCollapseFormatter:false, //responsive layout collapse formatter - - pagination:false, //set pagination type - paginationSize:false, //set number of rows to a page - paginationButtonCount: 5, // set count of page button - paginationElement:false, //element to hold pagination numbers - paginationDataSent:{}, //pagination data sent to the server - paginationDataReceived:{}, //pagination data received from the server - paginationAddRow: "page", //add rows on table or page - - ajaxURL:false, //url for ajax loading - ajaxURLGenerator:false, - ajaxParams:{}, //params for ajax loading - ajaxConfig:"get", //ajax request type - ajaxContentType:"form", //ajax request type - ajaxRequestFunc:false, //promise function - ajaxLoader:true, //show loader - ajaxLoaderLoading:false, //loader element - ajaxLoaderError:false, //loader element - ajaxFiltering:false, - ajaxSorting:false, - ajaxProgressiveLoad:false, //progressive loading - ajaxProgressiveLoadDelay:0, //delay between requests - ajaxProgressiveLoadScrollMargin:0, //margin before scroll begins - - groupBy:false, //enable table grouping and set field to group by - groupStartOpen:true, //starting state of group - groupValues:false, - - groupHeader:false, //header generation function - - movableColumns:false, //enable movable columns - - movableRows:false, //enable movable rows - movableRowsConnectedTables:false, //tables for movable rows to be connected to - movableRowsSender:false, - movableRowsReceiver:"insert", - movableRowsSendingStart:function(){}, - movableRowsSent:function(){}, - movableRowsSentFailed:function(){}, - movableRowsSendingStop:function(){}, - movableRowsReceivingStart:function(){}, - movableRowsReceived:function(){}, - movableRowsReceivedFailed:function(){}, - movableRowsReceivingStop:function(){}, - - scrollToRowPosition:"top", - scrollToRowIfVisible:true, - - scrollToColumnPosition:"left", - scrollToColumnIfVisible:true, - - rowFormatter:false, - - placeholder:false, - - //table building callbacks - tableBuilding:function(){}, - tableBuilt:function(){}, - - //render callbacks - renderStarted:function(){}, - renderComplete:function(){}, - - //row callbacks - rowClick:false, - rowDblClick:false, - rowContext:false, - rowTap:false, - rowDblTap:false, - rowTapHold:false, - rowAdded:function(){}, - rowDeleted:function(){}, - rowMoved:function(){}, - rowUpdated:function(){}, - rowSelectionChanged:function(){}, - rowSelected:function(){}, - rowDeselected:function(){}, - rowResized:function(){}, - - //cell callbacks - //row callbacks - cellClick:false, - cellDblClick:false, - cellContext:false, - cellTap:false, - cellDblTap:false, - cellTapHold:false, - cellEditing:function(){}, - cellEdited:function(){}, - cellEditCancelled:function(){}, - - //column callbacks - columnMoved:false, - columnResized:function(){}, - columnTitleChanged:function(){}, - columnVisibilityChanged:function(){}, - - //HTML iport callbacks - htmlImporting:function(){}, - htmlImported:function(){}, - - //data callbacks - dataLoading:function(){}, - dataLoaded:function(){}, - dataEdited:function(){}, - - //ajax callbacks - ajaxRequesting:function(){}, - ajaxResponse:false, - ajaxError:function(){}, - - //filtering callbacks - dataFiltering:false, - dataFiltered:false, - - //sorting callbacks - dataSorting:function(){}, - dataSorted:function(){}, - - //grouping callbacks - groupToggleElement:"arrow", - groupClosedShowCalcs:false, - dataGrouping:function(){}, - dataGrouped:false, - groupVisibilityChanged:function(){}, - groupClick:false, - groupDblClick:false, - groupContext:false, - groupTap:false, - groupDblTap:false, - groupTapHold:false, - - columnCalcs:true, - - //pagination callbacks - pageLoaded:function(){}, - - //localization callbacks - localized:function(){}, - - //validation has failed - validationFailed:function(){}, - - //history callbacks - historyUndo:function(){}, - historyRedo:function(){}, - -}; - -Tabulator.prototype.initializeOptions = function(options){ - for (var key in this.defaultOptions){ - if(key in options){ - this.options[key] = options[key]; - }else{ - if(Array.isArray(this.defaultOptions[key])){ - this.options[key] = []; - }else if(typeof this.defaultOptions[key] === "object"){ - this.options[key] = {}; - }else{ - this.options[key] = this.defaultOptions[key]; - } - } - } -}; - -Tabulator.prototype.initializeElement = function(element){ - - if(element instanceof HTMLElement){ - this.element = element; - return true; - }else if(typeof element === "string"){ - this.element = document.querySelector(element); - - if(this.element){ - return true; - }else{ - console.error("Tabulator Creation Error - no element found matching selector: ", element); - return false; - } - }else{ - console.error("Tabulator Creation Error - Invalid element provided:", element); - return false; - } - -}; - - -//convert depricated functionality to new functions -Tabulator.prototype._mapDepricatedFunctionality = function(){ - -}; - -//concreate table -Tabulator.prototype._create = function(){ - this._clearObjectPointers(); - - this._mapDepricatedFunctionality(); - - this.bindModules(); - - if(this.element.tagName === "TABLE"){ - if(this.modExists("htmlTableImport", true)){ - this.modules.htmlTableImport.parseTable(); - } - } - - this.columnManager = new ColumnManager(this); - this.rowManager = new RowManager(this); - this.footerManager = new FooterManager(this); - - this.columnManager.setRowManager(this.rowManager); - this.rowManager.setColumnManager(this.columnManager); - - this._buildElement(); - - this._loadInitialData(); -}; - -//clear pointers to objects in default config object -Tabulator.prototype._clearObjectPointers = function(){ - this.options.columns = this.options.columns.slice(0); - this.options.data = this.options.data.slice(0); -}; - - -//build tabulator element -Tabulator.prototype._buildElement = function(){ - var element = this.element, - mod = this.modules, - options = this.options; - - options.tableBuilding.call(this); - - element.classList.add("tabulator"); - element.setAttribute("role", "grid"); - - //empty element - while(element.firstChild) element.removeChild(element.firstChild); - - //set table height - if(options.height){ - options.height = isNaN(options.height) ? options.height : options.height + "px"; - element.style.height = options.height; - } - - this.rowManager.initialize(); - - this._detectBrowser(); - - if(this.modExists("layout", true)){ - mod.layout.initialize(options.layout); - } - - //set localization - if(options.headerFilterPlaceholder !== false){ - mod.localize.setHeaderFilterPlaceholder(options.headerFilterPlaceholder); - } - - for(let locale in options.langs){ - mod.localize.installLang(locale, options.langs[locale]); - } - - mod.localize.setLocale(options.locale); - - //configure placeholder element - if(typeof options.placeholder == "string"){ - - var el = document.createElement("div"); - el.classList.add("tabulator-placeholder"); - - var span = document.createElement("span"); - span.innerHTML = options.placeholder; - - el.appendChild(span); - - options.placeholder = el; - } - - //build table elements - element.appendChild(this.columnManager.getElement()); - element.appendChild(this.rowManager.getElement()); - - - if(options.footerElement){ - this.footerManager.activate(); - } - - if(options.dataTree && this.modExists("dataTree", true)){ - mod.dataTree.initialize(); - } - - if( (options.persistentLayout || options.persistentSort || options.persistentFilter) && this.modExists("persistence", true)){ - mod.persistence.initialize(options.persistenceMode, options.persistenceID); - } - - if(options.persistentLayout && this.modExists("persistence", true)){ - options.columns = mod.persistence.load("columns", options.columns) ; - } - - if(options.movableRows && this.modExists("moveRow")){ - mod.moveRow.initialize(); - } - - if(this.modExists("columnCalcs")){ - mod.columnCalcs.initialize(); - } - - this.columnManager.setColumns(options.columns); - - if(this.modExists("frozenRows")){ - this.modules.frozenRows.initialize(); - } - - if((options.persistentSort || options.initialSort) && this.modExists("sort", true)){ - var sorters = []; - - if(options.persistentSort && this.modExists("persistence", true)){ - sorters = mod.persistence.load("sort"); - - if(sorters === false && options.initialSort){ - sorters = options.initialSort; - } - }else if(options.initialSort){ - sorters = options.initialSort; - } - - mod.sort.setSort(sorters); - } - - if((options.persistentFilter || options.initialFilter) && this.modExists("filter", true)){ - var filters = []; - - - if(options.persistentFilter && this.modExists("persistence", true)){ - filters = mod.persistence.load("filter"); - - if(filters === false && options.initialFilter){ - filters = options.initialFilter; - } - }else if(options.initialFilter){ - filters = options.initialFilter; - } - - mod.filter.setFilter(filters); - // this.setFilter(filters); - } - - if(this.modExists("ajax")){ - mod.ajax.initialize(); - } - - if(options.pagination && this.modExists("page", true)){ - mod.page.initialize(); - } - - if(options.groupBy && this.modExists("groupRows", true)){ - mod.groupRows.initialize(); - } - - if(this.modExists("keybindings")){ - mod.keybindings.initialize(); - } - - if(this.modExists("selectRow")){ - mod.selectRow.clearSelectionData(true); - } - - if(options.autoResize && this.modExists("resizeTable")){ - mod.resizeTable.initialize(); - } - - if(this.modExists("clipboard")){ - mod.clipboard.initialize(); - } - - options.tableBuilt.call(this); -}; - -Tabulator.prototype._loadInitialData = function(){ - var self = this; - - if(self.options.pagination && self.modExists("page")){ - self.modules.page.reset(true); - - if(self.options.pagination == "local"){ - if(self.options.data.length){ - self.rowManager.setData(self.options.data); - }else{ - if((self.options.ajaxURL || self.options.ajaxURLGenerator) && self.modExists("ajax")){ - self.modules.ajax.loadData(); - }else{ - self.rowManager.setData(self.options.data); - } - } - }else{ - self.modules.page.setPage(1); - } - }else{ - if(self.options.data.length){ - self.rowManager.setData(self.options.data); - }else{ - if((self.options.ajaxURL || self.options.ajaxURLGenerator) && self.modExists("ajax")){ - self.modules.ajax.loadData(); - }else{ - self.rowManager.setData(self.options.data); - } - } - } -}; - -//deconstructor -Tabulator.prototype.destroy = function(){ - var element = this.element; - - Tabulator.prototype.comms.deregister(this); //deregister table from inderdevice communication - - //clear row data - this.rowManager.rows.forEach(function(row){ - row.wipe(); - }); - - this.rowManager.rows = []; - this.rowManager.activeRows = []; - this.rowManager.displayRows = []; - - //clear event bindings - if(this.options.autoResize && this.modExists("resizeTable")){ - this.modules.resizeTable.clearBindings(); - } - - if(this.modExists("keybindings")){ - this.modules.keybindings.clearBindings(); - } - - //clear DOM - while(element.firstChild) element.removeChild(element.firstChild); - element.classList.remove("tabulator"); -}; - -Tabulator.prototype._detectBrowser = function(){ - var ua = navigator.userAgent; - - if(ua.indexOf("Trident") > -1){ - this.browser = "ie"; - this.browserSlow = true; - }else if(ua.indexOf("Edge") > -1){ - this.browser = "edge"; - this.browserSlow = true; - }else if(ua.indexOf("Firefox") > -1){ - this.browser = "firefox"; - this.browserSlow = false; - }else{ - this.browser = "other"; - this.browserSlow = false; - } -}; - -////////////////// Data Handling ////////////////// - - -//load data -Tabulator.prototype.setData = function(data, params, config){ - if(this.modExists("ajax")){ - this.modules.ajax.blockActiveRequest(); - } - - return this._setData(data, params, config); -}; - -Tabulator.prototype._setData = function(data, params, config, inPosition){ - var self = this; - - if(typeof(data) === "string"){ - if (data.indexOf("{") == 0 || data.indexOf("[") == 0){ - //data is a json encoded string - return self.rowManager.setData(JSON.parse(data), inPosition); - }else{ - - if(self.modExists("ajax", true)){ - if(params){ - self.modules.ajax.setParams(params); - } - - if(config){ - self.modules.ajax.setConfig(config); - } - - self.modules.ajax.setUrl(data); - - if(self.options.pagination == "remote" && self.modExists("page", true)){ - self.modules.page.reset(true); - return self.modules.page.setPage(1); - }else{ - //assume data is url, make ajax call to url to get data - return self.modules.ajax.loadData(inPosition); - } - } - } - }else{ - if(data){ - //asume data is already an object - return self.rowManager.setData(data, inPosition); - }else{ - - //no data provided, check if ajaxURL is present; - if(self.modExists("ajax") && (self.modules.ajax.getUrl || self.options.ajaxURLGenerator)){ - - if(self.options.pagination == "remote" && self.modExists("page", true)){ - self.modules.page.reset(true); - return self.modules.page.setPage(1); - }else{ - return self.modules.ajax.loadData(inPosition); - } - - }else{ - //empty data - return self.rowManager.setData([], inPosition); - } - } - } - }; - -//clear data -Tabulator.prototype.clearData = function(){ - if(this.modExists("ajax")){ - this.modules.ajax.blockActiveRequest(); - } - - this.rowManager.clearData(); -}; - -//get table data array -Tabulator.prototype.getData = function(active){ - return this.rowManager.getData(active); -}; - -//get table data array count -Tabulator.prototype.getDataCount = function(active){ - return this.rowManager.getDataCount(active); -}; - -//search for specific row components -Tabulator.prototype.searchRows = function(field, type, value){ - if(this.modExists("filter", true)){ - return this.modules.filter.search("rows", field, type, value); - } -}; - -//search for specific data -Tabulator.prototype.searchData = function(field, type, value){ - if(this.modExists("filter", true)){ - return this.modules.filter.search("data", field, type, value); - } -}; - -//get table html -Tabulator.prototype.getHtml = function(active){ - return this.rowManager.getHtml(active); -}; - -//retrieve Ajax URL -Tabulator.prototype.getAjaxUrl = function(){ - if(this.modExists("ajax", true)){ - return this.modules.ajax.getUrl(); - } -}; - -//replace data, keeping table in position with same sort -Tabulator.prototype.replaceData = function(data, params, config){ - if(this.modExists("ajax")){ - this.modules.ajax.blockActiveRequest(); - } - - return this._setData(data, params, config, true); -}; - - -//update table data -Tabulator.prototype.updateData = function(data){ - var self = this; - var responses = 0; - - return new Promise((resolve, reject) => { - if(this.modExists("ajax")){ - this.modules.ajax.blockActiveRequest(); - } - - if(typeof data === "string"){ - data = JSON.parse(data); - } - - if(data){ - data.forEach(function(item){ - var row = self.rowManager.findRow(item[self.options.index]); - - if(row){ - responses++; - - row.updateData(item) - .then(()=>{ - responses--; - - if(!responses){ - resolve(); - } - }); - } - }); - }else{ - console.warn("Update Error - No data provided"); - reject("Update Error - No data provided"); - } - }); - -}; - -Tabulator.prototype.addData = function(data, pos, index){ - return new Promise((resolve, reject) => { - if(this.modExists("ajax")){ - this.modules.ajax.blockActiveRequest(); - } - - if(typeof data === "string"){ - data = JSON.parse(data); - } - - if(data){ - this.rowManager.addRows(data, pos, index) - .then((rows) => { - var output = []; - - rows.forEach(function(row){ - output.push(row.getComponent()); - }); - - resolve(output); - }); - }else{ - console.warn("Update Error - No data provided"); - reject("Update Error - No data provided"); - } - }); -}; - -//update table data -Tabulator.prototype.updateOrAddData = function(data){ - var self = this, - rows = [], - responses = 0; - - return new Promise((resolve, reject) => { - if(this.modExists("ajax")){ - this.modules.ajax.blockActiveRequest(); - } - - if(typeof data === "string"){ - data = JSON.parse(data); - } - - if(data){ - data.forEach(function(item){ - var row = self.rowManager.findRow(item[self.options.index]); - - responses++; - - if(row){ - row.updateData(item) - .then(()=>{ - responses--; - rows.push(row.getComponent()); - - if(!responses){ - resolve(rows); - } - }); - }else{ - self.rowManager.addRows(item) - .then((newRows)=>{ - responses--; - rows.push(newRows[0].getComponent()); - - if(!responses){ - resolve(rows); - } - }); - } - }); - }else{ - console.warn("Update Error - No data provided"); - reject("Update Error - No data provided"); - } - }); -}; - -//get row object -Tabulator.prototype.getRow = function(index){ - var row = this.rowManager.findRow(index); - - if(row){ - return row.getComponent(); - }else{ - console.warn("Find Error - No matching row found:", index); - return false; - } -}; - -//get row object -Tabulator.prototype.getRowFromPosition = function(position, active){ - var row = this.rowManager.getRowFromPosition(position, active); - - if(row){ - return row.getComponent(); - }else{ - console.warn("Find Error - No matching row found:", position); - return false; - } -}; - -//delete row from table -Tabulator.prototype.deleteRow = function(index){ - return new Promise((resolve, reject) => { - var row = this.rowManager.findRow(index); - - if(row){ - row.delete() - .then(() => { - resolve(); - }) - .catch((err) => { - reject(err); - }); - - }else{ - console.warn("Delete Error - No matching row found:", index); - reject("Delete Error - No matching row found") - } - }); -}; - -//add row to table -Tabulator.prototype.addRow = function(data, pos, index){ - return new Promise((resolve, reject) => { - if(typeof data === "string"){ - data = JSON.parse(data); - } - - this.rowManager.addRows(data, pos, index) - .then((rows)=>{ - //recalc column calculations if present - if(this.modExists("columnCalcs")){ - this.modules.columnCalcs.recalc(this.rowManager.activeRows); - } - - resolve(rows[0].getComponent()); - }); - }); -}; - -//update a row if it exitsts otherwise create it -Tabulator.prototype.updateOrAddRow = function(index, data){ - return new Promise((resolve, reject) => { - var row = this.rowManager.findRow(index); - - if(typeof data === "string"){ - data = JSON.parse(data); - } - - if(row){ - row.updateData(data) - .then(()=>{ - //recalc column calculations if present - if(this.modExists("columnCalcs")){ - this.modules.columnCalcs.recalc(this.rowManager.activeRows); - } - - resolve(row.getComponent()); - }) - .catch((err)=>{ - reject(err); - }); - }else{ - row = this.rowManager.addRows(data) - .then((rows)=>{ - //recalc column calculations if present - if(this.modExists("columnCalcs")){ - this.modules.columnCalcs.recalc(this.rowManager.activeRows); - } - - resolve(rows[0].getComponent()); - }) - .catch((err)=>{ - reject(err); - }); - } - }); -}; - -//update row data -Tabulator.prototype.updateRow = function(index, data){ - return new Promise((resolve, reject) => { - var row = this.rowManager.findRow(index); - - if(typeof data === "string"){ - data = JSON.parse(data); - } - - if(row){ - row.updateData(data).then(()=>{ - resolve(row.getComponent()); - }) - .catch((err)=>{ - reject(err); - }); - }else{ - console.warn("Update Error - No matching row found:", index); - reject("Update Error - No matching row found"); - } - }); -}; - -//scroll to row in DOM -Tabulator.prototype.scrollToRow = function(index, position, ifVisible){ - return new Promise((resolve, reject) => { - var row = this.rowManager.findRow(index); - - if(row){ - this.rowManager.scrollToRow(row, position, ifVisible) - .then(()=>{ - resolve(); - }) - .catch((err)=>{ - reject(err); - }); - }else{ - console.warn("Scroll Error - No matching row found:", index); - reject("Scroll Error - No matching row found"); - } - }); -}; - -Tabulator.prototype.getRows = function(active){ - return this.rowManager.getComponents(active); -}; - -//get position of row in table -Tabulator.prototype.getRowPosition = function(index, active){ - var row = this.rowManager.findRow(index); - - if(row){ - return this.rowManager.getRowPosition(row, active); - }else{ - console.warn("Position Error - No matching row found:", index); - return false; - } -}; - -//copy table data to clipboard -Tabulator.prototype.copyToClipboard = function(selector, selectorParams, formatter, formatterParams){ - if(this.modExists("clipboard", true)){ - this.modules.clipboard.copy(selector, selectorParams, formatter, formatterParams); - } -}; - -/////////////// Column Functions /////////////// - -Tabulator.prototype.setColumns = function(definition){ - this.columnManager.setColumns(definition); -}; - -Tabulator.prototype.getColumns = function(structured){ - return this.columnManager.getComponents(structured); -}; - -Tabulator.prototype.getColumn = function(field){ - var col = this.columnManager.findColumn(field); - - if(col){ - return col.getComponent(); - }else{ - console.warn("Find Error - No matching column found:", field); - return false; - } -}; - -Tabulator.prototype.getColumnDefinitions = function(){ - return this.columnManager.getDefinitionTree(); -}; - -Tabulator.prototype.getColumnLayout = function(){ - if(this.modExists("persistence", true)){ - return this.modules.persistence.parseColumns(this.columnManager.getColumns()); - } -}; - -Tabulator.prototype.setColumnLayout = function(layout){ - if(this.modExists("persistence", true)){ - this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns, layout)) - return true; - } - return false; -}; - -Tabulator.prototype.showColumn = function(field){ - var column = this.columnManager.findColumn(field); - - if(column){ - column.show(); - - if(this.options.responsiveLayout && this.modExists("responsiveLayout", true)){ - this.modules.responsiveLayout.update(); - } - }else{ - console.warn("Column Show Error - No matching column found:", field); - return false; - } -}; - -Tabulator.prototype.hideColumn = function(field){ - var column = this.columnManager.findColumn(field); - - if(column){ - column.hide(); - - if(this.options.responsiveLayout && this.modExists("responsiveLayout", true)){ - this.modules.responsiveLayout.update(); - } - }else{ - console.warn("Column Hide Error - No matching column found:", field); - return false; - } -}; - - -Tabulator.prototype.toggleColumn = function(field){ - var column = this.columnManager.findColumn(field); - - if(column){ - if(column.visible){ - column.hide(); - }else{ - column.show(); - } - }else{ - console.warn("Column Visibility Toggle Error - No matching column found:", field); - return false; - } -}; - -Tabulator.prototype.addColumn = function(definition, before, field){ - var column = this.columnManager.findColumn(field); - - this.columnManager.addColumn(definition, before, column) -}; - -Tabulator.prototype.deleteColumn = function(field){ - var column = this.columnManager.findColumn(field); - - if(column){ - column.delete(); - }else{ - console.warn("Column Delete Error - No matching column found:", field); - return false; - } -}; - -//scroll to column in DOM -Tabulator.prototype.scrollToColumn = function(field, position, ifVisible){ - - return new Promise((resolve, reject) => { - var column = this.columnManager.findColumn(field); - - if(column){ - this.columnManager.scrollToColumn(column, position, ifVisible) - .then(()=>{ - resolve(); - }) - .catch((err)=>{ - reject(err); - }); - }else{ - console.warn("Scroll Error - No matching column found:", field); - reject("Scroll Error - No matching column found"); - } - }); - -}; - - -//////////// Localization Functions //////////// -Tabulator.prototype.setLocale = function(locale){ - this.modules.localize.setLocale(locale); -}; - -Tabulator.prototype.getLocale = function(){ - return this.modules.localize.getLocale(); -}; - -Tabulator.prototype.getLang = function(locale){ - return this.modules.localize.getLang(locale); -}; - -//////////// General Public Functions //////////// - -//redraw list without updating data -Tabulator.prototype.redraw = function(force){ - this.columnManager.redraw(force); - this.rowManager.redraw(force); -}; - -Tabulator.prototype.setHeight = function(height){ - this.options.height = isNaN(height) ? height : height + "px"; - this.element.style.height = this.options.height; - this.rowManager.redraw(); -}; - -///////////////////// Sorting //////////////////// - -//trigger sort -Tabulator.prototype.setSort = function(sortList, dir){ - if(this.modExists("sort", true)){ - this.modules.sort.setSort(sortList, dir); - this.rowManager.sorterRefresh(); - } -}; - -Tabulator.prototype.getSorters = function(){ - if(this.modExists("sort", true)){ - return this.modules.sort.getSort(); - } -}; - -Tabulator.prototype.clearSort = function(){ - if(this.modExists("sort", true)){ - this.modules.sort.clear(); - this.rowManager.sorterRefresh(); - } -}; - - -///////////////////// Filtering //////////////////// - -//set standard filters -Tabulator.prototype.setFilter = function(field, type, value){ - if(this.modExists("filter", true)){ - this.modules.filter.setFilter(field, type, value); - this.rowManager.filterRefresh(); - } -}; - -//add filter to array -Tabulator.prototype.addFilter = function(field, type, value){ - if(this.modExists("filter", true)){ - this.modules.filter.addFilter(field, type, value); - this.rowManager.filterRefresh(); - } -}; - -//get all filters -Tabulator.prototype.getFilters = function(all){ - if(this.modExists("filter", true)){ - return this.modules.filter.getFilters(all); - } -}; - -Tabulator.prototype.setHeaderFilterFocus = function(field){ - if(this.modExists("filter", true)){ - var column = this.columnManager.findColumn(field); - - if(column){ - this.modules.filter.setHeaderFilterFocus(column); - }else{ - console.warn("Column Filter Focus Error - No matching column found:", field); - return false; - } - } -}; - - -Tabulator.prototype.setHeaderFilterValue = function(field, value){ - if(this.modExists("filter", true)){ - var column = this.columnManager.findColumn(field); - - if(column){ - this.modules.filter.setHeaderFilterValue(column, value); - }else{ - console.warn("Column Filter Error - No matching column found:", field); - return false; - } - } -}; - -Tabulator.prototype.getHeaderFilters = function(){ - if(this.modExists("filter", true)){ - return this.modules.filter.getHeaderFilters(); - } -}; - - -//remove filter from array -Tabulator.prototype.removeFilter = function(field, type, value){ - if(this.modExists("filter", true)){ - this.modules.filter.removeFilter(field, type, value); - this.rowManager.filterRefresh(); - } -}; - -//clear filters -Tabulator.prototype.clearFilter = function(all){ - if(this.modExists("filter", true)){ - this.modules.filter.clearFilter(all); - this.rowManager.filterRefresh(); - } -}; - -//clear header filters -Tabulator.prototype.clearHeaderFilter = function(){ - if(this.modExists("filter", true)){ - this.modules.filter.clearHeaderFilter(); - this.rowManager.filterRefresh(); - } -}; - -///////////////////// Filtering //////////////////// -Tabulator.prototype.selectRow = function(rows){ - if(this.modExists("selectRow", true)){ - this.modules.selectRow.selectRows(rows); - } -}; - -Tabulator.prototype.deselectRow = function(rows){ - if(this.modExists("selectRow", true)){ - this.modules.selectRow.deselectRows(rows); - } -}; - -Tabulator.prototype.toggleSelectRow = function(row){ - if(this.modExists("selectRow", true)){ - this.modules.selectRow.toggleRow(row); - } -}; - -Tabulator.prototype.getSelectedRows = function(){ - if(this.modExists("selectRow", true)){ - return this.modules.selectRow.getSelectedRows(); - } -}; - -Tabulator.prototype.getSelectedData = function(){ - if(this.modExists("selectRow", true)){ - return this.modules.selectRow.getSelectedData(); - } -}; - -//////////// Pagination Functions //////////// - -Tabulator.prototype.setMaxPage = function(max){ - if(this.options.pagination && this.modExists("page")){ - this.modules.page.setMaxPage(max); - }else{ - return false; - } -}; - -Tabulator.prototype.setPage = function(page){ - if(this.options.pagination && this.modExists("page")){ - this.modules.page.setPage(page); - }else{ - return false; - } -}; - -Tabulator.prototype.setPageSize = function(size){ - if(this.options.pagination && this.modExists("page")){ - this.modules.page.setPageSize(size); - this.modules.page.setPage(1); - }else{ - return false; - } -}; - -Tabulator.prototype.getPageSize = function(){ - if(this.options.pagination && this.modExists("page", true)){ - return this.modules.page.getPageSize(); - } -}; - -Tabulator.prototype.previousPage = function(){ - if(this.options.pagination && this.modExists("page")){ - this.modules.page.previousPage(); - }else{ - return false; - } -}; - -Tabulator.prototype.nextPage = function(){ - if(this.options.pagination && this.modExists("page")){ - this.modules.page.nextPage(); - }else{ - return false; - } -}; - -Tabulator.prototype.getPage = function(){ - if(this.options.pagination && this.modExists("page")){ - return this.modules.page.getPage(); - }else{ - return false; - } -}; - -Tabulator.prototype.getPageMax = function(){ - if(this.options.pagination && this.modExists("page")){ - return this.modules.page.getPageMax(); - }else{ - return false; - } -}; - -///////////////// Grouping Functions /////////////// - -Tabulator.prototype.setGroupBy = function(groups){ - if(this.modExists("groupRows", true)){ - this.options.groupBy = groups; - this.modules.groupRows.initialize(); - this.rowManager.refreshActiveData("display"); - }else{ - return false; - } -}; - -Tabulator.prototype.setGroupStartOpen = function(values){ - if(this.modExists("groupRows", true)){ - this.options.groupStartOpen = values; - this.modules.groupRows.initialize(); - if(this.options.groupBy){ - this.rowManager.refreshActiveData("group"); - }else{ - console.warn("Grouping Update - cant refresh view, no groups have been set"); - } - }else{ - return false; - } -}; - -Tabulator.prototype.setGroupHeader = function(values){ - if(this.modExists("groupRows", true)){ - this.options.groupHeader = values; - this.modules.groupRows.initialize(); - if(this.options.groupBy){ - this.rowManager.refreshActiveData("group"); - }else{ - console.warn("Grouping Update - cant refresh view, no groups have been set"); - } - }else{ - return false; - } -}; - -Tabulator.prototype.getGroups = function(values){ - if(this.modExists("groupRows", true)){ - return this.modules.groupRows.getGroups(true); - }else{ - return false; - } -}; - -// get grouped table data in the same format as getData() -Tabulator.prototype.getGroupedData = function(){ - if (this.modExists("groupRows", true)){ - return this.options.groupBy ? - this.modules.groupRows.getGroupedData() : this.getData() - } -} - -///////////////// Column Calculation Functions /////////////// -Tabulator.prototype.getCalcResults = function(){ - if(this.modExists("columnCalcs", true)){ - return this.modules.columnCalcs.getResults(); - }else{ - return false; - } -}; - -/////////////// Navigation Management ////////////// - -Tabulator.prototype.navigatePrev = function(){ - var cell = false; - - if(this.modExists("edit", true)){ - cell = this.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - return cell.nav().prev(); - } - } - - return false; -}; - -Tabulator.prototype.navigateNext = function(){ - var cell = false; - - if(this.modExists("edit", true)){ - cell = this.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - return cell.nav().next(); - } - } - - return false; -}; - -Tabulator.prototype.navigateLeft = function(){ - var cell = false; - - if(this.modExists("edit", true)){ - cell = this.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - return cell.nav().left(); - } - } - - return false; -}; - -Tabulator.prototype.navigateRight = function(){ - var cell = false; - - if(this.modExists("edit", true)){ - cell = this.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - return cell.nav().right(); - } - } - - return false; -}; - -Tabulator.prototype.navigateUp = function(){ - var cell = false; - - if(this.modExists("edit", true)){ - cell = this.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - return cell.nav().up(); - } - } - - return false; -}; - -Tabulator.prototype.navigateDown = function(){ - var cell = false; - - if(this.modExists("edit", true)){ - cell = this.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - return cell.nav().dpwn(); - } - } - - return false; -}; - - -/////////////// History Management ////////////// -Tabulator.prototype.undo = function(){ - if(this.options.history && this.modExists("history", true)){ - return this.modules.history.undo(); - }else{ - return false; - } -}; - -Tabulator.prototype.redo = function(){ - if(this.options.history && this.modExists("history", true)){ - return this.modules.history.redo(); - }else{ - return false; - } -}; - -Tabulator.prototype.getHistoryUndoSize = function(){ - if(this.options.history && this.modExists("history", true)){ - return this.modules.history.getHistoryUndoSize(); - }else{ - return false; - } -}; - -Tabulator.prototype.getHistoryRedoSize = function(){ - if(this.options.history && this.modExists("history", true)){ - return this.modules.history.getHistoryRedoSize(); - }else{ - return false; - } -}; - -/////////////// Download Management ////////////// - -Tabulator.prototype.download = function(type, filename, options){ - if(this.modExists("download", true)){ - this.modules.download.download(type, filename, options); - } -}; - -/////////// Inter Table Communications /////////// - -Tabulator.prototype.tableComms = function(table, module, action, data){ - this.modules.comms.receive(table, module, action, data); -}; - -////////////// Extension Management ////////////// - -//object to hold module -Tabulator.prototype.moduleBindings = {}; - -//extend module -Tabulator.prototype.extendModule = function(name, property, values){ - - if(Tabulator.prototype.moduleBindings[name]){ - var source = Tabulator.prototype.moduleBindings[name].prototype[property]; - - if(source){ - if(typeof values == "object"){ - for(let key in values){ - source[key] = values[key]; - } - }else{ - console.warn("Module Error - Invalid value type, it must be an object"); - } - }else{ - console.warn("Module Error - property does not exist:", property); - } - }else{ - console.warn("Module Error - module does not exist:", name); - } - -}; - -//add module to tabulator -Tabulator.prototype.registerModule = function(name, module){ - var self = this; - Tabulator.prototype.moduleBindings[name] = module; -}; - -//ensure that module are bound to instantiated function -Tabulator.prototype.bindModules = function(){ - this.modules = {}; - - for(var name in Tabulator.prototype.moduleBindings){ - this.modules[name] = new Tabulator.prototype.moduleBindings[name](this); - } -}; - -//Check for module -Tabulator.prototype.modExists = function(plugin, required){ - if(this.modules[plugin]){ - return true; - }else{ - if(required){ - console.error("Tabulator Module Not Installed: " + plugin); - } - return false; - } -}; - - -Tabulator.prototype.helpers = { - - elVisible: function(el){ - return !(el.offsetWidth <= 0 && el.offsetHeight <= 0); - }, - - elOffset: function(el){ - var box = el.getBoundingClientRect(); - - return { - top: box.top + window.pageYOffset - document.documentElement.clientTop, - left: box.left + window.pageXOffset - document.documentElement.clientLeft - }; - }, - - deepClone: function(obj){ - var clone = Array.isArray(obj) ? [] : {}; - - for(var i in obj) { - if(obj[i] != null && typeof(obj[i]) === "object"){ - if (obj[i] instanceof Date) { - clone[i] = new Date(obj[i]); - } else { - clone[i] = this.deepClone(obj[i]); - } - } - else{ - clone[i] = obj[i]; - } - } - return clone; - } -}; - -Tabulator.prototype.comms = { - tables:[], - register:function(table){ - Tabulator.prototype.comms.tables.push(table); - }, - deregister:function(table){ - var index = Tabulator.prototype.comms.tables.indexOf(table); - - if(index > -1){ - Tabulator.prototype.comms.tables.splice(index, 1); - } - }, - lookupTable:function(query){ - var results = [], - matches, match; - - if(typeof query === "string"){ - matches = document.querySelectorAll(query); - - if(matches.length){ - for(var i = 0; i < matches.length; i++){ - match = Tabulator.prototype.comms.matchElement(matches[i]); - - if(match){ - results.push(match); - } - } - } - - }else if(query instanceof HTMLElement || query instanceof Tabulator){ - match = Tabulator.prototype.comms.matchElement(query); - - if(match){ - results.push(match); - } - }else if(Array.isArray(query)){ - query.forEach(function(item){ - results = results.concat(Tabulator.prototype.comms.lookupTable(item)); - }); - }else{ - console.warn("Table Connection Error - Invalid Selector", query); - } - - return results; - }, - matchElement:function(element){ - return Tabulator.prototype.comms.tables.find(function(table){ - return element instanceof Tabulator ? table === element : table.element === element; - }); - } -}; - -/*=include modules/layout.js */ -/*=include modules/localize.js */ -/*=include modules/comms.js */ diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/core_modules.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/core_modules.js deleted file mode 100644 index 4d2e328d15..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/core_modules.js +++ /dev/null @@ -1,16 +0,0 @@ -;(function (global, factory) { - if(typeof exports === 'object' && typeof module !== 'undefined'){ - module.exports = factory(); - }else if(typeof define === 'function' && define.amd){ - define(factory); - }else{ - global.Tabulator = factory(); - } -}(this, (function () { - - /*=include core.js */ - /*=include modules_enabled.js */ - - return Tabulator; - -}))); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/footer_manager.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/footer_manager.js deleted file mode 100644 index d2bd50f108..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/footer_manager.js +++ /dev/null @@ -1,93 +0,0 @@ -var FooterManager = function(table){ - this.table = table; - this.active = false; - this.element = this.createElement(); //containing element - this.external = false; - this.links = []; - - this._initialize(); -}; - -FooterManager.prototype.createElement = function (){ - var el = document.createElement("div"); - - el.classList.add("tabulator-footer"); - - return el; -}; - -FooterManager.prototype._initialize = function(element){ - if(this.table.options.footerElement){ - - switch(typeof this.table.options.footerElement){ - case "string": - - if(this.table.options.footerElement[0] === "<"){ - this.element.innerHTML = this.table.options.footerElement; - }else{ - this.external = true; - this.element = document.querySelector(this.table.options.footerElement); - } - break; - default: - this.element = this.table.options.footerElement; - break; - } - - } -}; - -FooterManager.prototype.getElement = function(){ - return this.element; -}; - - -FooterManager.prototype.append = function(element, parent){ - this.activate(parent); - - this.element.appendChild(element); - this.table.rowManager.adjustTableSize(); -}; - -FooterManager.prototype.prepend = function(element, parent){ - this.activate(parent); - - this.element.insertBefore(element, this.element.firstChild); - this.table.rowManager.adjustTableSize(); -}; - -FooterManager.prototype.remove = function(element){ - element.parentNode.removeChild(element); - this.deactivate(); -}; - -FooterManager.prototype.deactivate = function(force){ - if(!this.element.firstChild || force){ - if(!this.external){ - this.element.parentNode.removeChild(this.element); - } - this.active = false; - } - - // this.table.rowManager.adjustTableSize(); -}; - -FooterManager.prototype.activate = function(parent){ - if(!this.active){ - this.active = true; - if(!this.external){ - this.table.element.appendChild(this.getElement()); - this.table.element.style.display = ''; - } - } - - if(parent){ - this.links.push(parent); - } -}; - -FooterManager.prototype.redraw = function(){ - this.links.forEach(function(link){ - link.footerRedraw(); - }); -}; \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/jquery_wrapper.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/jquery_wrapper.js deleted file mode 100644 index 1f72fca8a5..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/jquery_wrapper.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * This file is part of the Tabulator package. - * - * (c) Oliver Folkerd - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Full Documentation & Demos can be found at: http://olifolkerd.github.io/tabulator/ - * - */ - - (function (factory) { - "use strict"; - if (typeof define === 'function' && define.amd) { - define(['jquery'], factory); - } - else if(typeof module !== 'undefined' && module.exports) { - module.exports = factory(require('jquery')); - } - else { - factory(jQuery); - } - }(function ($, undefined) { - $.widget("ui.tabulator", { - _create:function(){ - this.table = new Tabulator(this.element[0], this.options); - - //map tabulator functions to jquery wrapper - for(var key in Tabulator.prototype){ - if(typeof Tabulator.prototype[key] === "function" && key.charAt(0) !== "_"){ - this[key] = this.table[key].bind(this.table); - } - } - }, - - _setOption: function(option, value){ - console.error("Tabulator jQuery wrapper does not support setting options after the table has been instantiated"); - }, - - _destroy: function(option, value){ - this.table.destroy(); - }, - }); - })); - - diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/accessor.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/accessor.js deleted file mode 100644 index b0cb780256..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/accessor.js +++ /dev/null @@ -1,93 +0,0 @@ -var Accessor = function(table){ - this.table = table; //hold Tabulator object - this.allowedTypes = ["", "data", "download", "clipboard"] //list of accessor types -}; - - -//initialize column accessor -Accessor.prototype.initializeColumn = function(column){ - var self = this, - match = false, - config = {}; - - this.allowedTypes.forEach(function(type){ - var key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)), - accessor; - - if(column.definition[key]){ - accessor = self.lookupAccessor(column.definition[key]); - - if(accessor){ - match = true; - - config[key] = { - accessor:accessor, - params: column.definition[key + "Params"] || {}, - } - } - } - }); - - if(match){ - column.modules.accessor = config; - } -}, - -Accessor.prototype.lookupAccessor = function(value){ - var accessor = false; - - //set column accessor - switch(typeof value){ - case "string": - if(this.accessors[value]){ - accessor = this.accessors[value] - }else{ - console.warn("Accessor Error - No such accessor found, ignoring: ", value); - } - break; - - case "function": - accessor = value; - break; - } - - return accessor; -} - - -//apply accessor to row -Accessor.prototype.transformRow = function(dataIn, type){ - var self = this, - key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)); - - //clone data object with deep copy to isolate internal data from returned result - var data = Tabulator.prototype.helpers.deepClone(dataIn || {}); - - self.table.columnManager.traverse(function(column){ - var value, accessor, params, component; - - if(column.modules.accessor){ - - accessor = column.modules.accessor[key] || column.modules.accessor.accessor || false; - - if(accessor){ - value = column.getFieldValue(data); - - if(value != "undefined"){ - component = column.getComponent(); - params = typeof accessor.params === "function" ? accessor.params(value, data, type, component) : accessor.params; - column.setFieldValue(data, accessor.accessor(value, data, type, params, component)); - } - } - } - }); - - return data; -}, - -//default accessors -Accessor.prototype.accessors = {}; - - - -Tabulator.prototype.registerModule("accessor", Accessor); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/ajax.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/ajax.js deleted file mode 100644 index 4bc737f338..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/ajax.js +++ /dev/null @@ -1,428 +0,0 @@ -var Ajax = function(table){ - - this.table = table; //hold Tabulator object - this.config = false; //hold config object for ajax request - this.url = ""; //request URL - this.urlGenerator = false; - this.params = false; //request parameters - - this.loaderElement = this.createLoaderElement(); //loader message div - this.msgElement = this.createMsgElement(); //message element - this.loadingElement = false; - this.errorElement = false; - this.loaderPromise = false; - - this.progressiveLoad = false; - this.loading = false; - - this.requestOrder = 0; //prevent requests comming out of sequence if overridden by another load request -}; - -//initialize setup options -Ajax.prototype.initialize = function(){ - this.loaderElement.appendChild(this.msgElement); - - if(this.table.options.ajaxLoaderLoading){ - this.loadingElement = this.table.options.ajaxLoaderLoading; - } - - this.loaderPromise = this.table.options.ajaxRequestFunc || this.defaultLoaderPromise; - - this.urlGenerator = this.table.options.ajaxURLGenerator || this.defaultURLGenerator; - - if(this.table.options.ajaxLoaderError){ - this.errorElement = this.table.options.ajaxLoaderError; - } - - if(this.table.options.ajaxParams){ - this.setParams(this.table.options.ajaxParams); - } - - if(this.table.options.ajaxConfig){ - this.setConfig(this.table.options.ajaxConfig); - } - - if(this.table.options.ajaxURL){ - this.setUrl(this.table.options.ajaxURL); - } - - if(this.table.options.ajaxProgressiveLoad){ - if(this.table.options.pagination){ - this.progressiveLoad = false; - console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"); - }else{ - if(this.table.modExists("page")){ - this.progressiveLoad = this.table.options.ajaxProgressiveLoad; - this.table.modules.page.initializeProgressive(this.progressiveLoad); - }else{ - console.error("Pagination plugin is required for progressive ajax loading"); - } - } - } -}; - -Ajax.prototype.createLoaderElement = function (){ - var el = document.createElement("div"); - el.classList.add("tabulator-loader"); - return el; -}; - -Ajax.prototype.createMsgElement = function (){ - var el = document.createElement("div"); - - el.classList.add("tabulator-loader-msg"); - el.setAttribute("role", "alert"); - - return el; -}; - -//set ajax params -Ajax.prototype.setParams = function(params, update){ - if(update){ - this.params = this.params || {}; - - for(let key in params){ - this.params[key] = params[key]; - } - }else{ - this.params = params; - } -}; - -Ajax.prototype.getParams = function(){ - return this.params || {}; -}; - -//load config object -Ajax.prototype.setConfig = function(config){ - this._loadDefaultConfig(); - - if(typeof config == "string"){ - this.config.method = config; - }else{ - for(let key in config){ - this.config[key] = config[key]; - } - } -}; - -//create config object from default -Ajax.prototype._loadDefaultConfig = function(force){ - var self = this; - if(!self.config || force){ - - self.config = {}; - - //load base config from defaults - for(let key in self.defaultConfig){ - self.config[key] = self.defaultConfig[key]; - } - } -}; - -//set request url -Ajax.prototype.setUrl = function(url){ - this.url = url; -}; - -//get request url -Ajax.prototype.getUrl = function(){ - return this.url; -}; - -//lstandard loading function -Ajax.prototype.loadData = function(inPosition){ - var self = this; - - if(this.progressiveLoad){ - return this._loadDataProgressive(); - }else{ - return this._loadDataStandard(inPosition); - } -}; - -Ajax.prototype.nextPage = function(diff){ - var margin; - - if(!this.loading){ - - margin = this.table.options.ajaxProgressiveLoadScrollMargin || (this.table.rowManager.getElement().clientHeight * 2); - - if(diff < margin){ - this.table.modules.page.nextPage() - .then(()=>{}).catch(()=>{}); - } - } -}; - -Ajax.prototype.blockActiveRequest = function(){ - this.requestOrder ++; -}; - -Ajax.prototype._loadDataProgressive = function(){ - this.table.rowManager.setData([]); - return this.table.modules.page.setPage(1); -}; - -Ajax.prototype._loadDataStandard = function(inPosition){ - return new Promise((resolve, reject)=>{ - this.sendRequest(inPosition) - .then((data)=>{ - this.table.rowManager.setData(data, inPosition); - resolve(); - }) - .catch((e)=>{reject()}); - }); -}; - -Ajax.prototype.generateParamsList = function(data, prefix){ - var self = this, - output = []; - - prefix = prefix || ""; - - if ( Array.isArray(data) ) { - data.forEach(function(item, i){ - output = output.concat(self.generateParamsList(item, prefix ? prefix + "[" + i + "]" : i)); - }); - }else if (typeof data === "object"){ - for (var key in data){ - output = output.concat(self.generateParamsList(data[key], prefix ? prefix + "[" + key + "]" : key)); - } - }else{ - output.push({key:prefix, value:data}); - } - - return output; -}; - - -Ajax.prototype.serializeParams = function(params){ - var output = this.generateParamsList(params), - encoded = []; - - output.forEach(function(item){ - encoded.push(encodeURIComponent(item.key) + "=" + encodeURIComponent(item.value)); - }); - - return encoded.join("&"); -}; - - -//send ajax request -Ajax.prototype.sendRequest = function(silent){ - var self = this, - url = self.url, - requestNo, esc, query; - - self.requestOrder ++; - requestNo = self.requestOrder; - - self._loadDefaultConfig(); - - return new Promise((resolve, reject)=>{ - if(self.table.options.ajaxRequesting.call(this.table, self.url, self.params) !== false){ - - self.loading = true; - - if(!silent){ - self.showLoader(); - } - - this.loaderPromise(url, self.config, self.params).then((data)=>{ - if(requestNo === self.requestOrder){ - if(self.table.options.ajaxResponse){ - data = self.table.options.ajaxResponse.call(self.table, self.url, self.params, data); - } - resolve(data); - }else{ - console.warn("Ajax Response Blocked - An active ajax request was blocked by an attempt to change table data while the request was being made"); - } - - self.hideLoader(); - - self.loading = false; - }) - .catch((error)=>{ - console.error("Ajax Load Error: ", error); - self.table.options.ajaxError.call(self.table, error); - - self.showError(); - - setTimeout(function(){ - self.hideLoader(); - }, 3000); - - self.loading = false; - - reject(); - }); - }else{ - reject(); - } - }); - - -}; - -Ajax.prototype.showLoader = function(){ - var shouldLoad = typeof this.table.options.ajaxLoader === "function" ? this.table.options.ajaxLoader() : this.table.options.ajaxLoader; - - if(shouldLoad){ - - this.hideLoader(); - - while(this.msgElement.firstChild) this.msgElement.removeChild(this.msgElement.firstChild); - this.msgElement.classList.remove("tabulator-error"); - this.msgElement.classList.add("tabulator-loading"); - - if(this.loadingElement){ - this.msgElement.appendChild(this.loadingElement); - }else{ - this.msgElement.innerHTML = this.table.modules.localize.getText("ajax|loading"); - } - - this.table.element.appendChild(this.loaderElement); - } -}; - -Ajax.prototype.showError = function(){ - this.hideLoader(); - - while(this.msgElement.firstChild) this.msgElement.removeChild(this.msgElement.firstChild); - this.msgElement.classList.remove("tabulator-loading"); - this.msgElement.classList.add("tabulator-error"); - - if(this.errorElement){ - this.msgElement.appendChild(this.errorElement); - }else{ - this.msgElement.innerHTML = this.table.modules.localize.getText("ajax|error"); - } - - this.table.element.appendChild(this.loaderElement); -}; - -Ajax.prototype.hideLoader = function(){ - if(this.loaderElement.parentNode){ - this.loaderElement.parentNode.removeChild(this.loaderElement); - } -}; - -//default ajax config object -Ajax.prototype.defaultConfig = { - method: "GET", -}; - -Ajax.prototype.defaultURLGenerator = function(url, config, params){ - if(params && Object.keys(params).length){ - if(!config.method || config.method.toLowerCase() == "get"){ - config.method = "get"; - url += "?" + this.serializeParams(params); - } - } - - return url; -}; - -Ajax.prototype.defaultLoaderPromise = function(url, config, params){ - var self = this, contentType; - - return new Promise(function(resolve, reject){ - - //set url - url = self.urlGenerator(url, config, params); - - //set body content if not GET request - if(config.method != "get"){ - contentType = typeof self.table.options.ajaxContentType === "object" ? self.table.options.ajaxContentType : self.contentTypeFormatters[self.table.options.ajaxContentType]; - if(contentType){ - - for(var key in contentType.headers){ - if(!config.headers){ - config.headers = {}; - } - - if(typeof config.headers[key] === "undefined"){ - config.headers[key] = contentType.headers[key]; - } - } - - config.body = contentType.body.call(self, url, config, params); - - }else{ - console.warn("Ajax Error - Invalid ajaxContentType value:", self.table.options.ajaxContentType); - } - } - - if(url){ - - //configure headers - if(typeof config.credentials === "undefined"){ - config.credentials = 'include'; - } - - if(typeof config.headers === "undefined"){ - config.headers = {}; - } - - if(typeof config.headers.Accept === "undefined"){ - config.headers.Accept = "application/json"; - } - - if(typeof config.headers["X-Requested-With"] === "undefined"){ - config.headers["X-Requested-With"] = "XMLHttpRequest"; - } - - //send request - fetch(url, config) - .then((response)=>{ - if(response.ok) { - response.json() - .then((data)=>{ - resolve(data); - }).catch((error)=>{ - reject(error); - console.warn("Ajax Load Error - Invalid JSON returned", error); - }); - }else{ - console.error("Ajax Load Error - Connection Error: " + response.status, response.statusText); - reject(response); - } - }) - .catch((error)=>{ - console.error("Ajax Load Error - Connection Error: ", error); - reject(error); - }); - }else{ - reject("No URL Set"); - } - - }); -}; - -Ajax.prototype.contentTypeFormatters = { - "json":{ - headers:{ - 'Content-Type': 'application/json', - }, - body:function(url, config, params){ - return JSON.stringify(params); - }, - }, - "form":{ - headers:{ - }, - body:function(url, config, params){ - var output = this.generateParamsList(params), - form = new FormData(); - - output.forEach(function(item){ - form.append(item.key, item.value); - }); - - return form; - }, - }, -} - -Tabulator.prototype.registerModule("ajax", Ajax); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/calculation_colums.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/calculation_colums.js deleted file mode 100644 index 87adbe38e1..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/calculation_colums.js +++ /dev/null @@ -1,457 +0,0 @@ -var ColumnCalcs = function(table){ - this.table = table; //hold Tabulator object - this.topCalcs = []; - this.botCalcs = []; - this.genColumn = false; - this.topElement = this.createElement(); - this.botElement = this.createElement(); - this.topRow = false; - this.botRow = false; - this.topInitialized = false; - this.botInitialized = false; - - this.initialize(); -}; - -ColumnCalcs.prototype.createElement = function (){ - var el = document.createElement("div"); - el.classList.add("tabulator-calcs-holder"); - return el; -}; - -ColumnCalcs.prototype.initialize = function(){ - this.genColumn = new Column({field:"value"}, this); -}; - -//dummy functions to handle being mock column manager -ColumnCalcs.prototype.registerColumnField = function(){}; - -//initialize column calcs -ColumnCalcs.prototype.initializeColumn = function(column){ - var def = column.definition - - var config = { - topCalcParams:def.topCalcParams || {}, - botCalcParams:def.bottomCalcParams || {}, - }; - - if(def.topCalc){ - - switch(typeof def.topCalc){ - case "string": - if(this.calculations[def.topCalc]){ - config.topCalc = this.calculations[def.topCalc] - }else{ - console.warn("Column Calc Error - No such calculation found, ignoring: ", def.topCalc); - } - break; - - case "function": - config.topCalc = def.topCalc; - break - - } - - if(config.topCalc){ - column.modules.columnCalcs = config; - this.topCalcs.push(column); - - if(this.table.options.columnCalcs != "group"){ - this.initializeTopRow(); - } - } - - } - - if(def.bottomCalc){ - switch(typeof def.bottomCalc){ - case "string": - if(this.calculations[def.bottomCalc]){ - config.botCalc = this.calculations[def.bottomCalc] - }else{ - console.warn("Column Calc Error - No such calculation found, ignoring: ", def.bottomCalc); - } - break; - - case "function": - config.botCalc = def.bottomCalc; - break - - } - - if(config.botCalc){ - column.modules.columnCalcs = config; - this.botCalcs.push(column); - - if(this.table.options.columnCalcs != "group"){ - this.initializeBottomRow(); - } - } - } - -}; - -ColumnCalcs.prototype.removeCalcs = function(){ - var changed = false; - - if(this.topInitialized){ - this.topInitialized = false; - this.topElement.parentNode.removeChild(this.topElement); - changed = true; - } - - if(this.botInitialized){ - this.botInitialized = false; - this.table.footerManager.remove(this.botElement); - changed = true; - } - - if(changed){ - this.table.rowManager.adjustTableSize(); - } -}; - -ColumnCalcs.prototype.initializeTopRow = function(){ - if(!this.topInitialized){ - // this.table.columnManager.headersElement.after(this.topElement); - this.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling); - this.topInitialized = true; - } -}; - -ColumnCalcs.prototype.initializeBottomRow = function(){ - if(!this.botInitialized){ - this.table.footerManager.prepend(this.botElement); - this.botInitialized = true; - } -}; - - -ColumnCalcs.prototype.scrollHorizontal = function(left){ - var hozAdjust = 0, - scrollWidth = this.table.columnManager.getElement().scrollWidth - this.table.element.clientWidth; - - if(this.botInitialized){ - this.botRow.getElement().style.marginLeft = (-left) + "px"; - } -}; - - -ColumnCalcs.prototype.recalc = function(rows){ - var data, row; - - if(this.topInitialized || this.botInitialized){ - data = this.rowsToData(rows); - - if(this.topInitialized){ - row = this.generateRow("top", this.rowsToData(rows)) - this.topRow = row; - while(this.topElement.firstChild) this.topElement.removeChild(this.topElement.firstChild); - this.topElement.appendChild(row.getElement()); - row.initialize(true); - } - - if(this.botInitialized){ - row = this.generateRow("bottom", this.rowsToData(rows)) - this.botRow = row; - while(this.botElement.firstChild) this.botElement.removeChild(this.botElement.firstChild); - this.botElement.appendChild(row.getElement()); - row.initialize(true); - } - - this.table.rowManager.adjustTableSize(); - - //set resizable handles - if(this.table.modExists("frozenColumns")){ - this.table.modules.frozenColumns.layout(); - } - } -}; - -ColumnCalcs.prototype.recalcRowGroup = function(row){ - this.recalcGroup(this.table.modules.groupRows.getRowGroup(row)); -}; - -ColumnCalcs.prototype.recalcGroup = function(group){ - var data, rowData; - - if(group){ - if(group.calcs){ - if(group.calcs.bottom){ - data = this.rowsToData(group.rows); - rowData = this.generateRowData("bottom", data); - - group.calcs.bottom.updateData(rowData); - group.calcs.bottom.reinitialize(); - } - - if(group.calcs.top){ - data = this.rowsToData(group.rows); - rowData = this.generateRowData("top", data); - - group.calcs.top.updateData(rowData); - group.calcs.top.reinitialize(); - } - } - } -}; - - - -//generate top stats row -ColumnCalcs.prototype.generateTopRow = function(rows){ - return this.generateRow("top", this.rowsToData(rows)); -}; -//generate bottom stats row -ColumnCalcs.prototype.generateBottomRow = function(rows){ - return this.generateRow("bottom", this.rowsToData(rows)); -}; - -ColumnCalcs.prototype.rowsToData = function(rows){ - var data = []; - - rows.forEach(function(row){ - data.push(row.getData()); - }); - - return data; -}; - -//generate stats row -ColumnCalcs.prototype.generateRow = function(pos, data){ - var self = this, - rowData = this.generateRowData(pos, data), - row; - - if(self.table.modExists("mutator")){ - self.table.modules.mutator.disable(); - } - - row = new Row(rowData, this); - - if(self.table.modExists("mutator")){ - self.table.modules.mutator.enable(); - } - - row.getElement().classList.add("tabulator-calcs", "tabulator-calcs-" + pos); - row.type = "calc"; - - row.generateCells = function(){ - - var cells = []; - - self.table.columnManager.columnsByIndex.forEach(function(column){ - - if(column.visible){ - //set field name of mock column - self.genColumn.setField(column.getField()); - self.genColumn.hozAlign = column.hozAlign; - - if(column.definition[pos + "CalcFormatter"] && self.table.modExists("format")){ - - self.genColumn.modules.format = { - formatter: self.table.modules.format.getFormatter(column.definition[pos + "CalcFormatter"]), - params: column.definition[pos + "CalcFormatterParams"] - }; - }else{ - self.genColumn.modules.format = { - formatter: self.table.modules.format.getFormatter("plaintext"), - params:{} - }; - } - - //generate cell and assign to correct column - var cell = new Cell(self.genColumn, row); - cell.column = column; - cell.setWidth(column.width); - - column.cells.push(cell); - cells.push(cell); - } - }); - - this.cells = cells; - } - - return row; -}; - -//generate stats row -ColumnCalcs.prototype.generateRowData = function(pos, data){ - var rowData = {}, - calcs = pos == "top" ? this.topCalcs : this.botCalcs, - type = pos == "top" ? "topCalc" : "botCalc", - params, paramKey; - - calcs.forEach(function(column){ - var values = []; - - if(column.modules.columnCalcs && column.modules.columnCalcs[type]){ - data.forEach(function(item){ - values.push(column.getFieldValue(item)); - }); - - paramKey = type + "Params"; - params = typeof column.modules.columnCalcs[paramKey] === "function" ? column.modules.columnCalcs[paramKey](value, data) : column.modules.columnCalcs[paramKey]; - - column.setFieldValue(rowData, column.modules.columnCalcs[type](values, data, params)); - } - }); - - return rowData; -}; - -ColumnCalcs.prototype.hasTopCalcs = function(){ - return !!(this.topCalcs.length); -}, - -ColumnCalcs.prototype.hasBottomCalcs = function(){ - return !!(this.botCalcs.length); -}, - -//handle table redraw -ColumnCalcs.prototype.redraw = function(){ - if(this.topRow){ - this.topRow.normalizeHeight(true); - } - if(this.botRow){ - this.botRow.normalizeHeight(true); - } -}; - -//return the calculated -ColumnCalcs.prototype.getResults = function(){ - var self = this, - results = {}, - groups; - - if(this.table.options.groupBy && this.table.modExists("groupRows")){ - groups = this.table.modules.groupRows.getGroups(true); - - groups.forEach(function(group){ - results[group.getKey()] = self.getGroupResults(group); - }); - }else{ - results = { - top: this.topRow ? this.topRow.getData() : {}, - bottom: this.botRow ? this.botRow.getData() : {}, - } - } - - return results; -} - -//get results from a group -ColumnCalcs.prototype.getGroupResults = function(group){ - var self = this, - groupObj = group._getSelf(), - subGroups = group.getSubGroups(), - subGroupResults = {}, - results = {}; - - subGroups.forEach(function(subgroup){ - subGroupResults[subgroup.getKey()] = self.getGroupResults(subgroup); - }); - - results = { - top: groupObj.calcs.top ? groupObj.calcs.top.getData() : {}, - bottom: groupObj.calcs.bottom ? groupObj.calcs.bottom.getData() : {}, - groups: subGroupResults, - } - - return results; -} - - -//default calculations -ColumnCalcs.prototype.calculations = { - "avg":function(values, data, calcParams){ - var output = 0, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : 2 - - if(values.length){ - output = values.reduce(function(sum, value){ - value = Number(value); - return sum + value; - }); - - output = output / values.length; - - output = precision !== false ? output.toFixed(precision) : output; - } - - return parseFloat(output).toString(); - }, - "max":function(values, data, calcParams){ - var output = null, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; - - values.forEach(function(value){ - - value = Number(value); - - if(value > output || output === null){ - output = value; - } - }); - - return output !== null ? (precision !== false ? output.toFixed(precision) : output) : ""; - }, - "min":function(values, data, calcParams){ - var output = null, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; - - values.forEach(function(value){ - - value = Number(value); - - if(value < output || output === null){ - output = value; - } - }); - - return output !== null ? (precision !== false ? output.toFixed(precision) : output) : ""; - }, - "sum":function(values, data, calcParams){ - var output = 0, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; - - if(values.length){ - values.forEach(function(value){ - value = Number(value); - - output += !isNaN(value) ? Number(value) : 0; - }); - } - - return precision !== false ? output.toFixed(precision) : output; - }, - "concat":function(values, data, calcParams){ - var output = 0; - - if(values.length){ - output = values.reduce(function(sum, value){ - return String(sum) + String(value); - }); - } - - return output; - }, - "count":function(values, data, calcParams){ - var output = 0; - - if(values.length){ - values.forEach(function(value){ - if(value){ - output ++; - } - }); - } - - return output; - }, -}; - - - -Tabulator.prototype.registerModule("columnCalcs", ColumnCalcs); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/clipboard.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/clipboard.js deleted file mode 100644 index 0f2993d580..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/clipboard.js +++ /dev/null @@ -1,916 +0,0 @@ -var Clipboard = function(table){ - this.table = table; - this.mode = true; - this.copySelector = false; - this.copySelectorParams = {}; - this.copyFormatter = false; - this.copyFormatterParams = {}; - this.pasteParser = function(){}; - this.pasteAction = function(){}; - this.htmlElement = false; - this.config = {}; - - this.blocked = true; //block copy actions not originating from this command -}; - -Clipboard.prototype.initialize = function(){ - var self = this; - - this.mode = this.table.options.clipboard; - - if(this.mode === true || this.mode === "copy"){ - this.table.element.addEventListener("copy", function(e){ - var data; - - self.processConfig(); - - if(!self.blocked){ - e.preventDefault(); - - data = self.generateContent(); - - if (window.clipboardData && window.clipboardData.setData) { - window.clipboardData.setData('Text', data); - } else if (e.clipboardData && e.clipboardData.setData) { - e.clipboardData.setData('text/plain', data); - if(self.htmlElement){ - e.clipboardData.setData('text/html', self.htmlElement.outerHTML); - } - } else if (e.originalEvent && e.originalEvent.clipboardData.setData) { - e.originalEvent.clipboardData.setData('text/plain', data); - if(self.htmlElement){ - e.originalEvent.clipboardData.setData('text/html', self.htmlElement.outerHTML); - } - } - - self.table.options.clipboardCopied.call(this.table, data); - - self.reset(); - } - }); - } - - if(this.mode === true || this.mode === "paste"){ - this.table.element.addEventListener("paste", function(e){ - self.paste(e); - }); - } - - this.setPasteParser(this.table.options.clipboardPasteParser); - this.setPasteAction(this.table.options.clipboardPasteAction); -}; - -Clipboard.prototype.processConfig = function(){ - var config = { - columnHeaders:"groups", - rowGroups:true, - }; - - if(typeof this.table.options.clipboardCopyHeader !== "undefined"){ - config.columnHeaders = this.table.options.clipboardCopyHeader; - console.warn("DEPRECATION WANRING - clipboardCopyHeader option has been depricated, please use the columnHeaders property on the clipboardCopyConfig option"); - } - - if(this.table.options.clipboardCopyConfig){ - for(var key in this.table.options.clipboardCopyConfig){ - config[key] = this.table.options.clipboardCopyConfig[key]; - } - } - - if (config.rowGroups && this.table.options.groupBy && this.table.modExists("groupRows")){ - this.config.rowGroups = true; - } - - if(config.columnHeaders){ - if((config.columnHeaders === "groups" || config === true) && this.table.columnManager.columns.length != this.table.columnManager.columnsByIndex.length){ - this.config.columnHeaders = "groups"; - }else{ - this.config.columnHeaders = "columns"; - } - }else{ - this.config.columnHeaders = false; - } -}; - - -Clipboard.prototype.reset = function(){ - this.blocked = false; - this.originalSelectionText = ""; -}; - - -Clipboard.prototype.setPasteAction = function(action){ - - switch(typeof action){ - case "string": - this.pasteAction = this.pasteActions[action]; - - if(!this.pasteAction){ - console.warn("Clipboard Error - No such paste action found:", action); - } - break; - - case "function": - this.pasteAction = action; - break; - } -}; - -Clipboard.prototype.setPasteParser = function(parser){ - switch(typeof parser){ - case "string": - this.pasteParser = this.pasteParsers[parser]; - - if(!this.pasteParser){ - console.warn("Clipboard Error - No such paste parser found:", parser); - } - break; - - case "function": - this.pasteParser = parser; - break; - } -}; - - -Clipboard.prototype.paste = function(e){ - var data, rowData, rows; - - if(this.checkPaseOrigin(e)){ - - data = this.getPasteData(e); - - rowData = this.pasteParser.call(this, data); - - if(rowData){ - e.preventDefault(); - - if(this.table.modExists("mutator")){ - rowData = this.mutateData(rowData); - } - - rows = this.pasteAction.call(this, rowData); - this.table.options.clipboardPasted.call(this.table, data, rowData, rows); - }else{ - this.table.options.clipboardPasteError.call(this.table, data); - } - } -}; - -Clipboard.prototype.mutateData = function(data){ - var self = this, - output = []; - - if(Array.isArray(data)){ - data.forEach(function(row){ - output.push(self.table.modules.mutator.transformRow(row, "clipboard")); - }); - }else{ - output = data; - } - - return output; -}; - - -Clipboard.prototype.checkPaseOrigin = function(e){ - var valid = true; - - if(e.target.tagName != "DIV" || this.table.modules.edit.currentCell){ - valid = false; - } - - return valid; -}; - -Clipboard.prototype.getPasteData = function(e){ - var data; - - if (window.clipboardData && window.clipboardData.getData) { - data = window.clipboardData.getData('Text'); - } else if (e.clipboardData && e.clipboardData.getData) { - data = e.clipboardData.getData('text/plain'); - } else if (e.originalEvent && e.originalEvent.clipboardData.getData) { - data = e.originalEvent.clipboardData.getData('text/plain'); - } - - return data; -}; - - -Clipboard.prototype.copy = function(selector, selectorParams, formatter, formatterParams, internal){ - var range, sel; - this.blocked = false; - - if(this.mode === true || this.mode === "copy"){ - - if (typeof window.getSelection != "undefined" && typeof document.createRange != "undefined") { - range = document.createRange(); - range.selectNodeContents(this.table.element); - sel = window.getSelection(); - - if(sel.toString() && internal){ - selector = "userSelection"; - formatter = "raw"; - selectorParams = sel.toString(); - } - - sel.removeAllRanges(); - sel.addRange(range); - } else if (typeof document.selection != "undefined" && typeof document.body.createTextRange != "undefined") { - textRange = document.body.createTextRange(); - textRange.moveToElementText(this.table.element); - textRange.select(); - } - - this.setSelector(selector); - this.copySelectorParams = typeof selectorParams != "undefined" && selectorParams != null ? selectorParams : this.config.columnHeaders; - this.setFormatter(formatter); - this.copyFormatterParams = typeof formatterParams != "undefined" && formatterParams != null ? formatterParams : {}; - - document.execCommand('copy'); - - if(sel){ - sel.removeAllRanges(); - } - } -}; - -Clipboard.prototype.setSelector = function(selector){ - selector = selector || this.table.options.clipboardCopySelector; - - switch(typeof selector){ - case "string": - if(this.copySelectors[selector]){ - this.copySelector = this.copySelectors[selector]; - }else{ - console.warn("Clipboard Error - No such selector found:", selector); - } - break; - - case "function": - this.copySelector = selector; - break; - } -}; - -Clipboard.prototype.setFormatter = function(formatter){ - - formatter = formatter || this.table.options.clipboardCopyFormatter; - - switch(typeof formatter){ - case "string": - if(this.copyFormatters[formatter]){ - this.copyFormatter = this.copyFormatters[formatter]; - }else{ - console.warn("Clipboard Error - No such formatter found:", formatter); - } - break; - - case "function": - this.copyFormatter = formatter; - break; - } -}; - - -Clipboard.prototype.generateContent = function(){ - var data; - - this.htmlElement = false; - data = this.copySelector.call(this, this.config, this.copySelectorParams); - - return this.copyFormatter.call(this, data, this.config, this.copyFormatterParams); -}; - -Clipboard.prototype.generateSimpleHeaders = function(columns){ - var headers = []; - - columns.forEach(function(column){ - headers.push(column.definition.title); - }); - - return headers; -}; - -Clipboard.prototype.generateColumnGroupHeaders = function(columns){ - var output = []; - - this.table.columnManager.columns.forEach((column) => { - var colData = this.processColumnGroup(column); - - if(colData){ - output.push(colData); - } - }); - - return output; -}; - -Clipboard.prototype.processColumnGroup = function(column){ - var subGroups = column.columns; - - var groupData = { - type:"group", - title:column.definition.title, - column:column, - }; - - if(subGroups.length){ - groupData.subGroups = []; - groupData.width = 0; - - subGroups.forEach((subGroup) => { - var subGroupData = this.processColumnGroup(subGroup); - - if(subGroupData){ - groupData.width += subGroupData.width; - groupData.subGroups.push(subGroupData); - } - }); - - if(!groupData.width){ - return false; - } - }else{ - if(column.field && column.visible){ - groupData.width = 1; - }else{ - return false; - } - } - - return groupData; -}; - -Clipboard.prototype.groupHeadersToRows = function(columns){ - - var headers = []; - - function parseColumnGroup(column, level){ - - if(typeof headers[level] === "undefined"){ - headers[level] = []; - } - - headers[level].push(column.title); - - if(column.subGroups){ - column.subGroups.forEach(function(subGroup){ - parseColumnGroup(subGroup, level+1); - }); - }else{ - padColumnheaders(); - } - } - - function padColumnheaders(){ - var max = 0; - - headers.forEach(function(title){ - var len = title.length; - if(len > max){ - max = len; - } - }); - - headers.forEach(function(title){ - var len = title.length; - if(len < max){ - for(var i = len; i < max; i++){ - title.push(""); - } - } - }); - } - - columns.forEach(function(column){ - parseColumnGroup(column,0); - }); - - return headers; -}; - -Clipboard.prototype.rowsToData = function(rows, config, params){ - var columns = this.table.columnManager.columnsByIndex, - data = []; - - rows.forEach(function(row){ - var rowArray = [], - rowData = row.getData("clipboard"); - - columns.forEach(function(column){ - var value = column.getFieldValue(rowData); - - switch(typeof value){ - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - rowArray.push(value); - }); - - data.push(rowArray); - }); - - return data; -}; - -Clipboard.prototype.buildComplexRows = function(config){ - var output = [], - groups = this.table.modules.groupRows.getGroups(); - - groups.forEach((group) => { - output.push(this.processGroupData(group)); - }); - - return output; -}; - - - -Clipboard.prototype.processGroupData = function(group){ - var subGroups = group.getSubGroups(); - - var groupData = { - type:"group", - key:group.key - }; - - if(subGroups.length){ - groupData.subGroups = []; - - subGroups.forEach((subGroup) => { - groupData.subGroups.push(this.processGroupData(subGroup)); - }); - }else{ - groupData.rows = group.getRows(true); - } - - return groupData; -}; - - -Clipboard.prototype.buildOutput = function(rows, config, params){ - var output = [], - columns = this.table.columnManager.columnsByIndex; - - if(config.columnHeaders){ - - if(config.columnHeaders == "groups"){ - columns = this.generateColumnGroupHeaders(this.table.columnManager.columns); - - output = output.concat(this.groupHeadersToRows(columns)); - }else{ - output.push(this.generateSimpleHeaders(columns)); - } - - } - - //generate styled content - if(this.table.options.clipboardCopyStyled){ - this.generateHTML(rows, columns, config, params); - } - - //generate unstyled content - if(config.rowGroups){ - rows.forEach((row) => { - output = output.concat(this.parseRowGroupData(row, config, params)); - }); - }else{ - output = output.concat(this.rowsToData(rows, config, params)); - } - - return output; -}; - - -Clipboard.prototype.parseRowGroupData = function (group, config, params){ - var groupData = []; - - groupData.push([group.key]); - - if(group.subGroups){ - group.subGroups.forEach((subGroup) => { - groupData = groupData.concat(this.parseRowGroupData(subGroup, config, params)); - }); - }else{ - - groupData = groupData.concat(this.rowsToData(group.rows, config, params)); - } - - return groupData; -}; - - -Clipboard.prototype.generateHTML = function (rows, columns, config, params){ - var self = this, - data = [], - headers = [], body, oddRow, evenRow, firstRow, firstCell, firstGroup, lastCell, styleCells; - - //create table element - this.htmlElement = document.createElement("table"); - self.mapElementStyles(this.table.element, this.htmlElement, ["border-top", "border-left", "border-right", "border-bottom"]); - - function generateSimpleHeaders(){ - var headerEl = document.createElement("tr"); - - columns.forEach(function(column){ - var columnEl = document.createElement("th"); - columnEl.innerHTML = column.definition.title; - - self.mapElementStyles(column.getElement(), columnEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - headerEl.appendChild(columnEl); - }); - - self.mapElementStyles(self.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - self.htmlElement.appendChild(document.createElement("thead").appendChild(headerEl)); - } - - - function generateHeaders(headers){ - - var headerHolderEl = document.createElement("thead"); - - headers.forEach(function(columns){ - var headerEl = document.createElement("tr"); - - columns.forEach(function(column){ - var columnEl = document.createElement("th"); - - if(column.width > 1){ - columnEl.colSpan = column.width; - } - - if(column.height > 1){ - columnEl.rowSpan = column.height; - } - - columnEl.innerHTML = column.title; - - self.mapElementStyles(column.element, columnEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - headerEl.appendChild(columnEl); - }); - - self.mapElementStyles(self.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - headerHolderEl.appendChild(headerEl); - }); - - self.htmlElement.appendChild(headerHolderEl); - - } - - function parseColumnGroup(column, level){ - - if(typeof headers[level] === "undefined"){ - headers[level] = []; - } - - headers[level].push({ - title:column.title, - width:column.width, - height:1, - children:!!column.subGroups, - element:column.column.getElement(), - }); - - if(column.subGroups){ - column.subGroups.forEach(function(subGroup){ - parseColumnGroup(subGroup, level+1); - }); - } - } - - function padVerticalColumnheaders(){ - headers.forEach(function(row, index){ - row.forEach(function(header){ - if(!header.children){ - header.height = headers.length - index; - } - }); - }); - } - - //create headers if needed - if(config.columnHeaders){ - if(config.columnHeaders == "groups"){ - columns.forEach(function(column){ - parseColumnGroup(column,0); - }); - - padVerticalColumnheaders(); - generateHeaders(headers); - }else{ - generateSimpleHeaders(); - } - } - - columns = this.table.columnManager.columnsByIndex; - - //create table body - body = document.createElement("tbody"); - - //lookup row styles - if(window.getComputedStyle){ - oddRow = this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"); - evenRow = this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"); - firstRow = this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"); - firstGroup = this.table.element.getElementsByClassName("tabulator-group")[0]; - - if(firstRow){ - styleCells = firstRow.getElementsByClassName("tabulator-cell"); - firstCell = styleCells[0]; - lastCell = styleCells[styleCells.length - 1]; - } - } - - function processRows(rowArray){ - //add rows to table - rowArray.forEach(function(row, i){ - var rowEl = document.createElement("tr"), - rowData = row.getData("clipboard"), - styleRow = firstRow; - - columns.forEach(function(column, j){ - var cellEl = document.createElement("td"), - value = column.getFieldValue(rowData); - - switch(typeof value){ - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - cellEl.innerHTML = value; - - if(column.definition.align){ - cellEl.style.textAlign = column.definition.align; - } - - if(j < columns.length - 1){ - if(firstCell){ - self.mapElementStyles(firstCell, cellEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); - } - }else{ - if(firstCell){ - self.mapElementStyles(firstCell, cellEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); - } - } - - rowEl.appendChild(cellEl); - }); - - if(!(i % 2) && oddRow){ - styleRow = oddRow; - } - - if((i % 2) && evenRow){ - styleRow = evenRow; - } - - if(styleRow){ - self.mapElementStyles(styleRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); - } - - body.appendChild(rowEl); - }); - } - - function processGroup(group){ - var groupEl = document.createElement("tr"), - groupCellEl = document.createElement("td"); - - groupCellEl.colSpan = columns.length; - - groupCellEl.innerHTML = group.key; - - groupEl.appendChild(groupCellEl); - body.appendChild(groupEl); - - self.mapElementStyles(firstGroup, groupEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); - - if(group.subGroups){ - group.subGroups.forEach((subGroup) => { - processGroup(subGroup); - }); - }else{ - processRows(group.rows); - } - } - - if(config.rowGroups){ - rows.forEach((group) => { - processGroup(group); - }); - }else{ - processRows(rows); - } - - this.htmlElement.appendChild(body); -}; - -Clipboard.prototype.mapElementStyles = function(from, to, props){ - - var lookup = { - "background-color" : "backgroundColor", - "color" : "fontColor", - "font-weight" : "fontWeight", - "font-family" : "fontFamily", - "font-size" : "fontSize", - "border-top" : "borderTop", - "border-left" : "borderLeft", - "border-right" : "borderRight", - "border-bottom" : "borderBottom", - }; - - if(window.getComputedStyle){ - var fromStyle = window.getComputedStyle(from); - - props.forEach(function(prop){ - to.style[lookup[prop]] = fromStyle.getPropertyValue(prop); - }); - } - - // return window.getComputedStyle ? window.getComputedStyle(element, null).getPropertyValue(property) : element.style[property.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); })]; -}; - - -Clipboard.prototype.copySelectors = { - userSelection: function(config, params){ - return params; - }, - selected: function(config, params){ - var rows = []; - - if(this.table.modExists("selectRow", true)){ - rows = this.table.modules.selectRow.getSelectedRows(); - } - - if(config.rowGroups){ - console.warn("Clipboard Warning - select coptSelector does not support row groups"); - } - - return this.buildOutput(rows, config, params) - }, - table: function(config, params){ - if(config.rowGroups){ - console.warn("Clipboard Warning - table coptSelector does not support row groups"); - } - - return this.buildOutput(this.table.rowManager.getComponents(), config, params); - }, - active: function(config, params){ - var rows; - - if(config.rowGroups){ - rows = this.buildComplexRows(config); - }else{ - rows = this.table.rowManager.getComponents(true); - } - - return this.buildOutput(rows, config, params); - }, -}; - -Clipboard.prototype.copyFormatters = { - raw: function(data, params){ - return data; - }, - table: function(data, params){ - var output = []; - - data.forEach(function(row){ - row.forEach(function(value){ - if(typeof value == "undefined"){ - value = ""; - } - - value = typeof value == "undefined" || value === null ? "" : value.toString(); - - if(value.match(/\r|\n/)){ - value = value.split('"').join('""'); - value = '"' + value + '"'; - } - }); - - output.push(row.join("\t")); - }); - - return output.join("\n"); - }, -}; - -Clipboard.prototype.pasteParsers = { - table:function(clipboard){ - var data = [], - success = false, - headerFindSuccess = true, - columns = this.table.columnManager.columns, - columnMap = [], - rows = []; - - //get data from clipboard into array of columns and rows. - clipboard = clipboard.split("\n"); - - clipboard.forEach(function(row){ - data.push(row.split("\t")); - }); - - if(data.length && !(data.length === 1 && data[0].length < 2)){ - success = true; - - //check if headers are present by title - data[0].forEach(function(value){ - var column = columns.find(function(column){ - return value && column.definition.title && value.trim() && column.definition.title.trim() === value.trim(); - }); - - if(column){ - columnMap.push(column); - }else{ - headerFindSuccess = false; - } - }); - - //check if column headers are present by field - if(!headerFindSuccess){ - headerFindSuccess = true; - columnMap = []; - - data[0].forEach(function(value){ - var column = columns.find(function(column){ - return value && column.field && value.trim() && column.field.trim() === value.trim(); - }); - - if(column){ - columnMap.push(column); - }else{ - headerFindSuccess = false; - } - }); - - if(!headerFindSuccess){ - columnMap = this.table.columnManager.columnsByIndex; - } - } - - //remove header row if found - if(headerFindSuccess){ - data.shift(); - } - - data.forEach(function(item){ - var row = {}; - - item.forEach(function(value, i){ - if(columnMap[i]){ - row[columnMap[i].field] = value; - } - }); - - rows.push(row); - }); - - return rows; - }else{ - return false; - } - } -}; - -Clipboard.prototype.pasteActions = { - replace:function(rows){ - return this.table.setData(rows); - }, - update:function(rows){ - return this.table.updateOrAddData(rows); - }, - insert:function(rows){ - return this.table.addData(rows); - }, -}; - - - -Tabulator.prototype.registerModule("clipboard", Clipboard); diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/comms.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/comms.js deleted file mode 100644 index c5c727ea85..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/comms.js +++ /dev/null @@ -1,45 +0,0 @@ -var Comms = function(table){ - this.table = table; -}; - - -Comms.prototype.getConnections = function(selectors){ - var self = this, - connections = [], - connection; - - connection = Tabulator.prototype.comms.lookupTable(selectors); - - connection.forEach(function(con){ - if(self.table !== con){ - connections.push(con); - } - }); - - return connections; -}; - -Comms.prototype.send = function(selectors, module, action, data){ - var self = this, - connections = this.getConnections(selectors); - - connections.forEach(function(connection){ - connection.tableComms(self.table.element, module, action, data); - }); - - if(!connections.length && selectors){ - console.warn("Table Connection Error - No tables matching selector found", selectors); - } -}; - - -Comms.prototype.receive = function(table, module, action, data){ - if(this.table.modExists(module)){ - return this.table.modules[module].commsReceived(table, action, data); - }else{ - console.warn("Inter-table Comms Error - no such module:", module); - } -}; - - -Tabulator.prototype.registerModule("comms", Comms); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/data_tree.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/data_tree.js deleted file mode 100644 index 9381f18187..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/data_tree.js +++ /dev/null @@ -1,301 +0,0 @@ -var DataTree = function(table){ - this.table = table; - this.indent = 10; - this.field = ""; - this.collapseEl = null; - this.expandEl = null; - this.branchEl = null; - - this.startOpen = function(){}; - - this.displayIndex = 0; -}; - -DataTree.prototype.initialize = function(){ - var dummyEl = null, - options = this.table.options; - - this.field = options.dataTreeChildField; - this.indent = options.dataTreeChildIndent; - - if(options.dataTreeBranchElement){ - - if(options.dataTreeBranchElement === true){ - this.branchEl = document.createElement("div"); - this.branchEl.classList.add("tabulator-data-tree-branch"); - }else{ - if(typeof options.dataTreeBranchElement === "string"){ - dummyEl = document.createElement("div"); - dummyEl.innerHTML = options.dataTreeBranchElement; - this.branchEl = dummyEl.firstChild; - }else{ - this.branchEl = options.dataTreeBranchElement; - } - } - } - - if(options.dataTreeCollapseElement){ - if(typeof options.dataTreeCollapseElement === "string"){ - dummyEl = document.createElement("div"); - dummyEl.innerHTML = options.dataTreeCollapseElement; - this.collapseEl = dummyEl.firstChild; - }else{ - this.collapseEl = options.dataTreeCollapseElement; - } - }else{ - this.collapseEl = document.createElement("div"); - this.collapseEl.classList.add("tabulator-data-tree-control"); - this.collapseEl.innerHTML = "
"; - } - - if(options.dataTreeExpandElement){ - if(typeof options.dataTreeExpandElement === "string"){ - dummyEl = document.createElement("div"); - dummyEl.innerHTML = options.dataTreeExpandElement; - this.expandEl = dummyEl.firstChild; - }else{ - this.expandEl = options.dataTreeExpandElement; - } - }else{ - this.expandEl = document.createElement("div"); - this.expandEl.classList.add("tabulator-data-tree-control"); - this.expandEl.innerHTML = "
"; - } - - - switch(typeof options.dataTreeStartExpanded){ - case "boolean": - this.startOpen = function(row, index){ - return options.dataTreeStartExpanded; - }; - break; - - case "function": - this.startOpen = options.dataTreeStartExpanded; - break; - - default: - this.startOpen = function(row, index){ - return options.dataTreeStartExpanded[index]; - }; - break; - } - - - - -}; - -DataTree.prototype.initializeRow = function(row){ - - var children = typeof row.getData()[this.field] !== "undefined"; - - row.modules.dataTree = { - index:0, - open:children ? this.startOpen(row.getComponent(), 0) : false, - controlEl:false, - branchEl:false, - parent:false, - children:children, - }; -}; - - -DataTree.prototype.layoutRow = function(row){ - var cell = row.getCells()[0], - el = cell.getElement(), - config = row.modules.dataTree; - - el.style.paddingLeft = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-left')) + (config.index * this.indent) + "px"; - - if(config.branchEl){ - config.branchEl.parentNode.removeChild(config.branchEl); - } - - this.generateControlElement(row, el); - - if(config.index && this.branchEl){ - config.branchEl = this.branchEl.cloneNode(true); - el.insertBefore(config.branchEl, el.firstChild); - el.style.paddingLeft = (parseInt(el.style.paddingLeft) + ((config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1))) + "px"; - } -}; - -DataTree.prototype.generateControlElement = function(row, el){ - var config = row.modules.dataTree, - el = el || row.getCells()[0].getElement(), - oldControl = config.controlEl; - - if(config.children !== false){ - - if(config.open){ - config.controlEl = this.collapseEl.cloneNode(true); - config.controlEl.addEventListener("click", (e) => { - e.stopPropagation(); - this.collapseRow(row); - }); - }else{ - config.controlEl = this.expandEl.cloneNode(true); - config.controlEl.addEventListener("click", (e) => { - e.stopPropagation(); - this.expandRow(row); - }); - } - - config.controlEl.addEventListener("mousedown", (e) => { - e.stopPropagation(); - }); - - if(oldControl && oldControl.parentNode === el){ - oldControl.parentNode.replaceChild(config.controlEl,oldControl); - }else{ - el.insertBefore(config.controlEl, el.firstChild); - } - } -}; - -DataTree.prototype.setDisplayIndex = function (index) { - this.displayIndex = index; -}; - -DataTree.prototype.getDisplayIndex = function () { - return this.displayIndex; -}; - -DataTree.prototype.getRows = function(rows){ - var output = []; - - rows.forEach((row, i) => { - var config = row.modules.dataTree.children, - children; - - output.push(row); - - if(!config.index && config.children !== false){ - children = this.getChildren(row); - - children.forEach((child) => { - output.push(child); - }); - } - }); - - return output; -}; - - -DataTree.prototype.getChildren = function(row){ - var config = row.modules.dataTree, - output = []; - - if(config.children !== false && config.open){ - if(!Array.isArray(config.children)){ - config.children = this.generateChildren(row); - } - - config.children.forEach((child) => { - output.push(child); - - var subChildren = this.getChildren(child); - - subChildren.forEach((sub) => { - output.push(sub); - }); - }); - } - - return output; -}; - - -DataTree.prototype.generateChildren = function(row){ - var children = []; - - row.getData()[this.field].forEach((childData) => { - var childRow = new Row(childData || {}, this.table.rowManager); - childRow.modules.dataTree.index = row.modules.dataTree.index + 1; - childRow.modules.dataTree.parent = row; - childRow.modules.dataTree.open = this.startOpen(row, childRow.modules.dataTree.index); - children.push(childRow); - }); - - return children; -}; - - - -DataTree.prototype.expandRow = function(row, silent){ - var config = row.modules.dataTree; - - if(config.children !== false){ - config.open = true; - - row.reinitialize(); - - this.table.rowManager.refreshActiveData("tree", false, true); - - this.table.options.dataTreeRowExpanded(row.getComponent(), row.modules.dataTree.index); - } -}; - -DataTree.prototype.collapseRow = function(row){ - var config = row.modules.dataTree; - - if(config.children !== false){ - config.open = false; - - row.reinitialize(); - - this.table.rowManager.refreshActiveData("tree", false, true); - - this.table.options.dataTreeRowCollapsed(row.getComponent(), row.modules.dataTree.index); - } -}; - -DataTree.prototype.toggleRow = function(row){ - var config = row.modules.dataTree; - - if(config.children !== false){ - if(config.open){ - this.collapseRow(row); - }else{ - this.expandRow(row); - } - } -}; - -DataTree.prototype.getTreeParent = function(row){ - return row.modules.dataTree.parent ? row.modules.dataTree.parent.getComponent() : false; -}; - -DataTree.prototype.getTreeChildren = function(row){ - var config = row.modules.dataTree, - output = []; - - if(config.children){ - - if(!Array.isArray(config.children)){ - config.children = this.generateChildren(row); - } - - config.children.forEach((childRow) => { - if(childRow instanceof Row){ - output.push(childRow.getComponent()); - } - }); - } - - return output; -}; - - -DataTree.prototype.checkForRestyle = function(cell){ - if(!cell.row.cells.indexOf(cell)){ - if(cell.row.modules.dataTree.children !== false){ - cell.row.reinitialize(); - } - } -}; - - -Tabulator.prototype.registerModule("dataTree", DataTree); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/download.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/download.js deleted file mode 100644 index 79c2b46010..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/download.js +++ /dev/null @@ -1,735 +0,0 @@ -var Download = function(table){ - this.table = table; //hold Tabulator object - this.fields = {}; //hold filed multi dimension arrays - this.columnsByIndex = []; //hold columns in their order in the table - this.columnsByField = {}; //hold columns with lookup by field name - this.config = {}; -}; - -//trigger file download -Download.prototype.download = function(type, filename, options, interceptCallback){ - var self = this, - downloadFunc = false; - this.processConfig(); - - function buildLink(data, mime){ - if(interceptCallback){ - interceptCallback(data); - }else{ - self.triggerDownload(data, mime, type, filename); - } - } - - if(typeof type == "function"){ - downloadFunc = type; - }else{ - if(self.downloaders[type]){ - downloadFunc = self.downloaders[type]; - }else{ - console.warn("Download Error - No such download type found: ", type); - } - } - - this.processColumns(); - - if(downloadFunc){ - downloadFunc.call(this, self.processDefinitions(), self.processData() , options || {}, buildLink, this.config); - } -}; - - -Download.prototype.processConfig = function(){ - var config = { //download config - columnGroups:true, - rowGroups:true, - }; - - if(this.table.options.downloadConfig){ - for(var key in this.table.options.downloadConfig){ - config[key] = this.table.options.downloadConfig[key]; - } - } - - if (config.rowGroups && this.table.options.groupBy && this.table.modExists("groupRows")){ - this.config.rowGroups = true; - } - - if (config.columnGroups && this.table.columnManager.columns.length != this.table.columnManager.columnsByIndex.length){ - this.config.columnGroups = true; - } -}; - -Download.prototype.processColumns = function () { - var self = this; - - self.columnsByIndex = []; - self.columnsByField = {}; - - self.table.columnManager.columnsByIndex.forEach(function (column) { - - if (column.field && column.visible && column.definition.download !== false) { - self.columnsByIndex.push(column); - self.columnsByField[column.field] = column; - } - }); -}; - -Download.prototype.processDefinitions = function(){ - var self = this, - processedDefinitions = []; - - if(this.config.columnGroups){ - self.table.columnManager.columns.forEach(function(column){ - var colData = self.processColumnGroup(column); - - if(colData){ - processedDefinitions.push(colData); - } - }); - }else{ - self.columnsByIndex.forEach(function(column){ - if(column.download !== false){ - //isolate definiton from defintion object - processedDefinitions.push(self.processDefinition(column)); - } - }); - } - - return processedDefinitions; -}; - -Download.prototype.processColumnGroup = function(column){ - var subGroups = column.columns; - - var groupData = { - type:"group", - title:column.definition.title, - }; - - if(subGroups.length){ - groupData.subGroups = []; - groupData.width = 0; - - subGroups.forEach((subGroup) => { - var subGroupData = this.processColumnGroup(subGroup); - - if(subGroupData){ - groupData.width += subGroupData.width; - groupData.subGroups.push(subGroupData); - } - }); - - if(!groupData.width){ - return false; - } - }else{ - if(column.field && column.visible && column.definition.download !== false){ - groupData.width = 1; - groupData.definition = this.processDefinition(column); - }else{ - return false; - } - } - - return groupData; -}; - -Download.prototype.processDefinition = function(column){ - var def = {}; - - for(var key in column.definition){ - def[key] = column.definition[key]; - } - - if(typeof column.definition.downloadTitle != "undefined"){ - def.title = column.definition.downloadTitle; - } - - return def; -}; - -Download.prototype.processData = function(){ - var self = this, - data = [], - groups = []; - - if(this.config.rowGroups){ - groups = this.table.modules.groupRows.getGroups(); - - groups.forEach((group) => { - data.push(this.processGroupData(group)); - }); - }else{ - data = self.table.rowManager.getData(true, "download"); - } - - //bulk data processing - if(typeof self.table.options.downloadDataFormatter == "function"){ - data = self.table.options.downloadDataFormatter(data); - } - - return data; -}; - -Download.prototype.processGroupData = function(group){ - var subGroups = group.getSubGroups(); - - var groupData = { - type:"group", - key:group.key - }; - - if(subGroups.length){ - groupData.subGroups = []; - - subGroups.forEach((subGroup) => { - groupData.subGroups.push(this.processGroupData(subGroup)); - }); - }else{ - groupData.rows = group.getData(true, "download"); - } - - return groupData; -}; - -Download.prototype.triggerDownload = function(data, mime, type, filename){ - var element = document.createElement('a'), - blob = new Blob([data],{type:mime}), - filename = filename || "Tabulator." + (typeof type === "function" ? "txt" : type); - - blob = this.table.options.downloadReady.call(this.table, data, blob); - - if(blob){ - - if(navigator.msSaveOrOpenBlob){ - navigator.msSaveOrOpenBlob(blob, filename); - }else{ - element.setAttribute('href', window.URL.createObjectURL(blob)); - - //set file title - element.setAttribute('download', filename); - - //trigger download - element.style.display = 'none'; - document.body.appendChild(element); - element.click(); - - //remove temporary link element - document.body.removeChild(element); - } - - - if(this.table.options.downloadComplete){ - this.table.options.downloadComplete(); - } - } - -}; - -//nested field lookup -Download.prototype.getFieldValue = function(field, data){ - var column = this.columnsByField[field]; - - if(column){ - return column.getFieldValue(data); - } - - return false; -}; - - -Download.prototype.commsReceived = function(table, action, data){ - switch(action){ - case "intercept": - this.download(data.type, "", data.options, data.intercept); - break; - } -}; - - -//downloaders -Download.prototype.downloaders = { - csv:function(columns, data, options, setFileContents, config){ - var self = this, - titles = [], - fields = [], - delimiter = options && options.delimiter ? options.delimiter : ",", - fileContents; - - //build column headers - function parseSimpleTitles(){ - columns.forEach(function(column){ - titles.push('"' + String(column.title).split('"').join('""') + '"'); - fields.push(column.field); - }); - } - - function parseColumnGroup(column, level){ - if(column.subGroups){ - column.subGroups.forEach(function(subGroup){ - parseColumnGroup(subGroup, level+1); - }); - }else{ - titles.push('"' + String(column.title).split('"').join('""') + '"'); - fields.push(column.definition.field); - } - } - - if(config.columnGroups){ - console.warn("Download Warning - CSV downloader cannot process column groups"); - - columns.forEach(function(column){ - parseColumnGroup(column,0); - }); - }else{ - parseSimpleTitles(); - } - - - //generate header row - fileContents = [titles.join(delimiter)]; - - function parseRows(data){ - //generate each row of the table - data.forEach(function(row){ - var rowData = []; - - fields.forEach(function(field){ - var value = self.getFieldValue(field, row); - - switch(typeof value){ - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - //escape quotation marks - rowData.push('"' + String(value).split('"').join('""') + '"'); - }); - - fileContents.push(rowData.join(delimiter)); - }); - } - - function parseGroup(group){ - if(group.subGroups){ - group.subGroups.forEach(function(subGroup){ - parseGroup(subGroup); - }); - }else{ - parseRows(group.rows); - } - } - - if(config.rowGroups){ - console.warn("Download Warning - CSV downloader cannot process row groups"); - - data.forEach(function(group){ - parseGroup(group); - }); - }else{ - parseRows(data); - } - - setFileContents(fileContents.join("\n"), "text/csv"); - }, - - json:function(columns, data, options, setFileContents, config){ - var fileContents = JSON.stringify(data, null, '\t'); - - setFileContents(fileContents, "application/json"); - }, - - pdf:function(columns, data, options, setFileContents, config){ - var self = this, - fields = [], - header = [], - body = [], - table = "", - groupRowIndexs = [], - autoTableParams = {}, - rowGroupStyles = {}, - jsPDFParams = options.jsPDF || {}, - title = options && options.title ? options.title : ""; - - if(!jsPDFParams.orientation){ - jsPDFParams.orientation = options.orientation || "landscape"; - } - - if(!jsPDFParams.unit){ - jsPDFParams.unit = "pt"; - } - - //build column headers - function parseSimpleTitles(){ - columns.forEach(function(column){ - if(column.field){ - header.push(column.title || ""); - fields.push(column.field); - } - }); - } - - function parseColumnGroup(column, level){ - if(column.subGroups){ - column.subGroups.forEach(function(subGroup){ - parseColumnGroup(subGroup, level+1); - }); - }else{ - header.push(column.title || ""); - fields.push(column.definition.field); - } - } - - if(config.columnGroups){ - console.warn("Download Warning - PDF downloader cannot process column groups"); - - columns.forEach(function(column){ - parseColumnGroup(column,0); - }); - }else{ - parseSimpleTitles(); - } - - function parseValue(value){ - switch(typeof value){ - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - return value; - } - - function parseRows(data){ - //build table rows - data.forEach(function(row){ - var rowData = []; - - fields.forEach(function(field){ - var value = self.getFieldValue(field, row); - rowData.push(parseValue(value)); - }); - - body.push(rowData); - }); - } - - function parseGroup(group){ - var groupData = []; - - groupData.push(parseValue(group.key)); - - groupRowIndexs.push(body.length); - - body.push(groupData); - - if(group.subGroups){ - group.subGroups.forEach(function(subGroup){ - parseGroup(subGroup); - }); - }else{ - parseRows(group.rows); - } - } - - if(config.rowGroups){ - data.forEach(function(group){ - parseGroup(group); - }); - }else{ - parseRows(data); - } - - var doc = new jsPDF(jsPDFParams); //set document to landscape, better for most tables - - if(options && options.autoTable){ - if(typeof options.autoTable === "function"){ - autoTableParams = options.autoTable(doc) || {}; - }else{ - autoTableParams = options.autoTable; - } - } - - if(config.rowGroups){ - - rowGroupStyles = options.rowGroupStyles || { - fontStyle: "bold", - fontSize: 12, - cellPadding: 6, - fillColor: 220, - }; - - function createdCell (cell, data){ - if(groupRowIndexs.indexOf(data.row.index) > -1){ - for(var key in rowGroupStyles){ - cell.styles[key] = rowGroupStyles[key]; - } - } - } - - if(!autoTableParams.createdCell){ - autoTableParams.createdCell = createdCell; - }else{ - var createdCellHolder = autoTableParams.createdCell; - - autoTableParams.createdCell = function(cell, data){ - createdCell(cell, data); - createdCellHolder(cell, data); - }; - } - } - - if(title){ - autoTableParams.addPageContent = function(data) { - doc.text(title, 40, 30); - }; - } - - doc.autoTable(header, body, autoTableParams); - - setFileContents(doc.output("arraybuffer"), "application/pdf"); - }, - - xlsx:function(columns, data, options, setFileContents, config){ - var self = this, - sheetName = options.sheetName || "Sheet1", - workbook = {SheetNames:[], Sheets:{}}, - groupRowIndexs = [], - groupColumnIndexs = [], - output; - - function generateSheet(){ - var titles = [], - fields = [], - rows = [], - worksheet; - - //convert rows to worksheet - function rowsToSheet(){ - var sheet = {}; - var range = {s: {c:0, r:0}, e: {c:fields.length, r:rows.length }}; - - XLSX.utils.sheet_add_aoa(sheet, rows); - - sheet['!ref'] = XLSX.utils.encode_range(range); - - var merges = generateMerges(); - - if(merges.length){ - sheet["!merges"] = merges; - } - - return sheet; - } - - function parseSimpleTitles(){ - //get field lists - columns.forEach(function(column){ - titles.push(column.title); - fields.push(column.field); - }); - - rows.push(titles); - } - - function parseColumnGroup(column, level){ - - if(typeof titles[level] === "undefined"){ - titles[level] = []; - } - - if(typeof groupColumnIndexs[level] === "undefined"){ - groupColumnIndexs[level] = []; - } - - if(column.width > 1){ - - groupColumnIndexs[level].push({ - type:"hoz", - start:titles[level].length, - end:titles[level].length + column.width - 1, - }); - } - - titles[level].push(column.title); - - if(column.subGroups){ - column.subGroups.forEach(function(subGroup){ - parseColumnGroup(subGroup, level+1); - }); - }else{ - fields.push(column.definition.field); - padColumnTitles(fields.length - 1, level); - - groupColumnIndexs[level].push({ - type:"vert", - start:fields.length - 1, - }); - - } - } - - - function padColumnTitles(){ - var max = 0; - - titles.forEach(function(title){ - var len = title.length; - if(len > max){ - max = len; - } - }); - - titles.forEach(function(title){ - var len = title.length; - if(len < max){ - for(var i = len; i < max; i++){ - title.push(""); - } - } - }); - } - - if(config.columnGroups){ - columns.forEach(function(column){ - parseColumnGroup(column,0); - }); - - titles.forEach(function(title){ - rows.push(title); - }); - }else{ - parseSimpleTitles(); - } - - function generateMerges(){ - var output = []; - - groupRowIndexs.forEach(function(index){ - output.push({s:{r:index,c:0},e:{r:index,c:fields.length - 1}}); - }); - - groupColumnIndexs.forEach(function(merges, level){ - merges.forEach(function(merge){ - if(merge.type === "hoz"){ - output.push({s:{r:level,c:merge.start},e:{r:level,c:merge.end}}); - }else{ - if(level != titles.length - 1){ - output.push({s:{r:level,c:merge.start},e:{r:titles.length - 1,c:merge.start}}); - } - } - }); - }); - - return output; - } - - //generate each row of the table - function parseRows(data){ - data.forEach(function(row){ - var rowData = []; - - fields.forEach(function(field){ - var value = self.getFieldValue(field, row); - - rowData.push(typeof value === "object" ? JSON.stringify(value) : value); - }); - - rows.push(rowData); - }); - } - - function parseGroup(group){ - var groupData = []; - - groupData.push(group.key); - - groupRowIndexs.push(rows.length); - - rows.push(groupData); - - if(group.subGroups){ - group.subGroups.forEach(function(subGroup){ - parseGroup(subGroup); - }); - }else{ - parseRows(group.rows); - } - } - - if(config.rowGroups){ - data.forEach(function(group){ - parseGroup(group); - }); - }else{ - parseRows(data); - } - - worksheet = rowsToSheet(); - - return worksheet; - } - - if(options.sheetOnly){ - setFileContents(generateSheet()); - return; - } - - if(options.sheets){ - for(var sheet in options.sheets){ - - if(options.sheets[sheet] === true){ - workbook.SheetNames.push(sheet); - workbook.Sheets[sheet] = generateSheet(); - }else{ - - workbook.SheetNames.push(sheet); - - this.table.modules.comms.send(options.sheets[sheet], "download", "intercept",{ - type:"xlsx", - options:{sheetOnly:true}, - intercept:function(data){ - workbook.Sheets[sheet] = data; - } - }); - } - } - }else{ - workbook.SheetNames.push(sheetName); - workbook.Sheets[sheetName] = generateSheet(); - } - - //convert workbook to binary array - function s2ab(s) { - var buf = new ArrayBuffer(s.length); - var view = new Uint8Array(buf); - for (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF; - return buf; - } - - output = XLSX.write(workbook, {bookType:'xlsx', bookSST:true, type: 'binary'}); - - setFileContents(s2ab(output), "application/octet-stream"); - }, - -}; - - -Tabulator.prototype.registerModule("download", Download); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/edit.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/edit.js deleted file mode 100644 index ecb311fb19..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/edit.js +++ /dev/null @@ -1,1439 +0,0 @@ -var Edit = function(table){ - this.table = table; //hold Tabulator object - this.currentCell = false; //hold currently editing cell - this.mouseClick = false; //hold mousedown state to prevent click binding being overriden by editor opening - this.recursionBlock = false; //prevent focus recursion - this.invalidEdit = false; -}; - - -//initialize column editor -Edit.prototype.initializeColumn = function(column){ - var self = this, - config = { - editor:false, - blocked:false, - check:column.definition.editable, - params:column.definition.editorParams || {} - }; - - //set column editor - switch(typeof column.definition.editor){ - case "string": - - if(column.definition.editor === "tick"){ - column.definition.editor = "tickCross"; - console.warn("DEPRECATION WANRING - the tick editor has been depricated, please use the tickCross editor"); - } - - if(self.editors[column.definition.editor]){ - config.editor = self.editors[column.definition.editor]; - }else{ - console.warn("Editor Error - No such editor found: ", column.definition.editor); - } - break; - - case "function": - config.editor = column.definition.editor; - break; - - case "boolean": - - if(column.definition.editor === true){ - - if(typeof column.definition.formatter !== "function"){ - - if(column.definition.formatter === "tick"){ - column.definition.formatter = "tickCross"; - console.warn("DEPRECATION WANRING - the tick editor has been depricated, please use the tickCross editor"); - } - - if(self.editors[column.definition.formatter]){ - config.editor = self.editors[column.definition.formatter]; - }else{ - config.editor = self.editors["input"]; - } - }else{ - console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ", column.definition.formatter); - } - } - break; - } - - if(config.editor){ - column.modules.edit = config; - } -}; - -Edit.prototype.getCurrentCell = function(){ - return this.currentCell ? this.currentCell.getComponent() : false; -}; - -Edit.prototype.clearEditor = function(){ - var cell = this.currentCell, - cellEl; - - this.invalidEdit = false; - - if(cell){ - this.currentCell = false; - - cellEl = cell.getElement(); - cellEl.classList.remove("tabulator-validation-fail"); - cellEl.classList.remove("tabulator-editing"); - while(cellEl.firstChild) cellEl.removeChild(cellEl.firstChild); - - cell.row.getElement().classList.remove("tabulator-row-editing"); - } -}; - -Edit.prototype.cancelEdit = function(){ - - if(this.currentCell){ - var cell = this.currentCell; - var component = this.currentCell.getComponent(); - - this.clearEditor(); - cell.setValueActual(cell.getValue()); - - if(cell.column.cellEvents.cellEditCancelled){ - cell.column.cellEvents.cellEditCancelled.call(this.table, component); - } - - this.table.options.cellEditCancelled.call(this.table, component); - } -}; - -//return a formatted value for a cell -Edit.prototype.bindEditor = function(cell){ - var self = this, - element = cell.getElement(); - - element.setAttribute("tabindex", 0); - - element.addEventListener("click", function(e){ - if(!element.classList.contains("tabulator-editing")){ - element.focus(); - } - }); - - element.addEventListener("mousedown", function(e){ - self.mouseClick = true; - }); - - element.addEventListener("focus", function(e){ - if(!self.recursionBlock){ - self.edit(cell, e, false); - } - }); -}; - -Edit.prototype.focusCellNoEvent = function(cell){ - this.recursionBlock = true; - cell.getElement().focus(); - this.recursionBlock = false; -}; - -Edit.prototype.editCell = function(cell, forceEdit){ - this.focusCellNoEvent(cell); - this.edit(cell, false, forceEdit); -}; - -Edit.prototype.edit = function(cell, e, forceEdit){ - var self = this, - allowEdit = true, - rendered = function(){}, - element = cell.getElement(), - cellEditor, component, params; - - //prevent editing if another cell is refusing to leave focus (eg. validation fail) - if(this.currentCell){ - if(!this.invalidEdit){ - this.cancelEdit(); - } - return; - } - - //handle successfull value change - function success(value){ - - if(self.currentCell === cell){ - var valid = true; - - if(cell.column.modules.validate && self.table.modExists("validate")){ - valid = self.table.modules.validate.validate(cell.column.modules.validate, cell.getComponent(), value); - } - - if(valid === true){ - self.clearEditor(); - cell.setValue(value, true); - - if(self.table.options.dataTree && self.table.modExists("dataTree")){ - self.table.modules.dataTree.checkForRestyle(cell); - } - }else{ - self.invalidEdit = true; - element.classList.add("tabulator-validation-fail"); - self.focusCellNoEvent(cell); - rendered(); - self.table.options.validationFailed.call(self.table, cell.getComponent(), value, valid); - } - }else{ - // console.warn("Edit Success Error - cannot call success on a cell that is no longer being edited"); - } - } - - //handle aborted edit - function cancel(){ - if(self.currentCell === cell){ - self.cancelEdit(); - - if(self.table.options.dataTree && self.table.modExists("dataTree")){ - self.table.modules.dataTree.checkForRestyle(cell); - } - }else{ - // console.warn("Edit Success Error - cannot call cancel on a cell that is no longer being edited"); - } - } - - function onRendered(callback){ - rendered = callback; - } - - if(!cell.column.modules.edit.blocked){ - if(e){ - e.stopPropagation(); - } - - switch(typeof cell.column.modules.edit.check){ - case "function": - allowEdit = cell.column.modules.edit.check(cell.getComponent()); - break; - - case "boolean": - allowEdit = cell.column.modules.edit.check; - break; - } - - if(allowEdit || forceEdit){ - - self.cancelEdit(); - - self.currentCell = cell; - - component = cell.getComponent(); - - if(this.mouseClick){ - this.mouseClick = false; - - if(cell.column.cellEvents.cellClick){ - cell.column.cellEvents.cellClick.call(this.table, e, component); - } - } - - if(cell.column.cellEvents.cellEditing){ - cell.column.cellEvents.cellEditing.call(this.table, component); - } - - self.table.options.cellEditing.call(this.table, component); - - params = typeof cell.column.modules.edit.params === "function" ? cell.column.modules.edit.params(component) : cell.column.modules.edit.params; - - cellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params); - - //if editor returned, add to DOM, if false, abort edit - if(cellEditor !== false){ - - if(cellEditor instanceof Node){ - element.classList.add("tabulator-editing"); - cell.row.getElement().classList.add("tabulator-row-editing"); - while(element.firstChild) element.removeChild(element.firstChild); - element.appendChild(cellEditor); - - //trigger onRendered Callback - rendered(); - - //prevent editing from triggering rowClick event - var children = element.children; - - for (var i = 0; i < children.length; i++) { - children[i].addEventListener("click", function(e){ - e.stopPropagation(); - }); - } - }else{ - console.warn("Edit Error - Editor should return an instance of Node, the editor returned:", cellEditor); - element.blur(); - return false; - } - - }else{ - element.blur(); - return false; - } - - return true; - }else{ - this.mouseClick = false; - element.blur(); - return false; - } - }else{ - this.mouseClick = false; - element.blur(); - return false; - } -}; - -//default data editors -Edit.prototype.editors = { - - //input element - input:function(cell, onRendered, success, cancel, editorParams){ - - //create and style input - var cellValue = cell.getValue(), - input = document.createElement("input"); - - input.setAttribute("type", "text"); - - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - - input.value = typeof cellValue !== "undefined" ? cellValue : ""; - - onRendered(function(){ - input.focus(); - input.style.height = "100%"; - }); - - function onChange(e){ - if(((cellValue === null || typeof cellValue === "undefined") && input.value !== "") || input.value != cellValue){ - success(input.value); - }else{ - cancel(); - } - } - - //submit new value on blur or change - input.addEventListener("change", onChange); - input.addEventListener("blur", onChange); - - //submit new value on enter - input.addEventListener("keydown", function(e){ - switch(e.keyCode){ - case 13: - success(input.value); - break; - - case 27: - cancel(); - break; - } - }); - - return input; - }, - - //resizable text area element - textarea:function(cell, onRendered, success, cancel, editorParams){ - var self = this, - cellValue = cell.getValue(), - value = String(typeof cellValue == "null" || typeof cellValue == "undefined" ? "" : cellValue), - count = (value.match(/(?:\r\n|\r|\n)/g) || []).length + 1, - input = document.createElement("textarea"), - scrollHeight = 0; - - //create and style input - input.style.display = "block"; - input.style.padding = "2px"; - input.style.height = "100%"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - input.style.whiteSpace = "pre-wrap"; - input.style.resize = "none"; - - input.value = value; - - onRendered(function(){ - input.focus(); - input.style.height = "100%"; - }); - - function onChange(e){ - - if(((cellValue === null || typeof cellValue === "undefined") && input.value !== "") || input.value != cellValue){ - success(input.value); - setTimeout(function(){ - cell.getRow().normalizeHeight(); - },300) - }else{ - cancel(); - } - } - - //submit new value on blur or change - input.addEventListener("change", onChange); - input.addEventListener("blur", onChange); - - input.addEventListener("keyup", function(){ - - input.style.height = ""; - - var heightNow = input.scrollHeight; - - input.style.height = heightNow + "px"; - - if(heightNow != scrollHeight){ - scrollHeight = heightNow; - cell.getRow().normalizeHeight(); - } - }); - - input.addEventListener("keydown", function(e){ - if(e.keyCode == 27){ - cancel(); - } - }); - - return input; - }, - - //input element with type of number - number:function(cell, onRendered, success, cancel, editorParams){ - - var cellValue = cell.getValue(), - input = document.createElement("input"); - - input.setAttribute("type", "number"); - - if(typeof editorParams.max != "undefined"){ - input.setAttribute("max", editorParams.max); - } - - if(typeof editorParams.min != "undefined"){ - input.setAttribute("min", editorParams.min); - } - - if(typeof editorParams.step != "undefined"){ - input.setAttribute("step", editorParams.step); - } - - //create and style input - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - - input.value = cellValue; - - onRendered(function () { - input.focus(); - input.style.height = "100%"; - }); - - function onChange(){ - var value = input.value; - - if(!isNaN(value) && value !==""){ - value = Number(value); - } - - if(value != cellValue){ - success(value); - }else{ - cancel(); - } - } - - //submit new value on blur - input.addEventListener("blur", function(e){ - onChange(); - }); - - //submit new value on enter - input.addEventListener("keydown", function(e){ - switch(e.keyCode){ - case 13: - case 9: - onChange(); - break; - - case 27: - cancel(); - break; - } - }); - - return input; - }, - - //input element with type of number - range:function(cell, onRendered, success, cancel, editorParams){ - - var cellValue = cell.getValue(), - input = document.createElement("input"); - - input.setAttribute("type", "range"); - - if (typeof editorParams.max != "undefined") { - input.setAttribute("max", editorParams.max); - } - - if (typeof editorParams.min != "undefined") { - input.setAttribute("min", editorParams.min); - } - - if (typeof editorParams.step != "undefined") { - input.setAttribute("step", editorParams.step); - } - - //create and style input - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - - input.value = cellValue; - - onRendered(function () { - input.focus(); - input.style.height = "100%"; - }); - - function onChange(){ - var value = input.value; - - if(!isNaN(value) && value !==""){ - value = Number(value); - } - - if(value != cellValue){ - success(value); - }else{ - cancel(); - } - } - - //submit new value on blur - input.addEventListener("blur", function(e){ - onChange(); - }); - - //submit new value on enter - input.addEventListener("keydown", function(e){ - switch(e.keyCode){ - case 13: - case 9: - onChange(); - break; - - case 27: - cancel(); - break; - } - }); - - return input; - }, - - //select - select:function(cell, onRendered, success, cancel, editorParams){ - var self = this, - cellEl = cell.getElement(), - initialValue = cell.getValue(), - input = document.createElement("input"), - listEl = document.createElement("div"), - dataItems = [], - displayItems = [], - currentItem = {}, - blurable = true; - - if(Array.isArray(editorParams) || (!Array.isArray(editorParams) && typeof editorParams === "object" && !editorParams.values)){ - console.warn("DEPRECATION WANRING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"); - editorParams = {values:editorParams}; - } - - function getUniqueColumnValues(){ - var output = {}, - column = cell.getColumn()._getSelf(), - data = self.table.getData(); - - data.forEach(function(row){ - var val = column.getFieldValue(row); - - if(val !== null && typeof val !== "undefined" && val !== ""){ - output[val] = true; - } - }); - - return Object.keys(output); - } - - function parseItems(inputValues, curentValue){ - var dataList = []; - var displayList = []; - - function processComplexListItem(item){ - var item = { - label:editorParams.listItemFormatter ? editorParams.listItemFormatter(item.value, item.label) : item.label, - value:item.value, - element:false, - }; - - if(item.value === curentValue){ - setCurrentItem(item); - } - - dataList.push(item); - displayList.push(item); - - return item; - } - - if(typeof inputValues == "function"){ - inputValues = inputValues(cell); - } - - if(Array.isArray(inputValues)){ - inputValues.forEach(function(value){ - var item; - - if(typeof value === "object"){ - - if(value.options){ - item = { - label:value.label, - group:true, - element:false, - }; - - displayList.push(item); - - value.options.forEach(function(item){ - processComplexListItem(item); - }); - }else{ - processComplexListItem(value); - } - - }else{ - item = { - label:editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value, - value:value, - element:false, - }; - - if(item.value === curentValue){ - setCurrentItem(item); - } - - dataList.push(item); - displayList.push(item); - } - }); - }else{ - for(var key in inputValues){ - var item = { - label:editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : inputValues[key], - value:key, - element:false, - }; - - if(item.value === curentValue){ - setCurrentItem(item); - } - - dataList.push(item); - displayList.push(item); - } - } - - dataItems = dataList; - displayItems = displayList; - - fillList(); - } - - function fillList(){ - while(listEl.firstChild) listEl.removeChild(listEl.firstChild); - - displayItems.forEach(function(item){ - var el = item.element; - - if(!el){ - - if(item.group){ - el = document.createElement("div"); - el.classList.add("tabulator-edit-select-list-group"); - el.tabIndex = 0; - el.innerHTML = item.label === "" ? " " : item.label; - }else{ - el = document.createElement("div"); - el.classList.add("tabulator-edit-select-list-item"); - el.tabIndex = 0; - el.innerHTML = item.label === "" ? " " : item.label; - - el.addEventListener("click", function(){ - setCurrentItem(item); - chooseItem(); - }); - - if(item === currentItem){ - el.classList.add("active"); - } - } - - el.addEventListener("mousedown", function(){ - blurable = false; - - setTimeout(function(){ - blurable = true; - }, 10); - }); - - item.element = el; - - - } - - listEl.appendChild(el); - }); - } - - - function setCurrentItem(item){ - - if(currentItem && currentItem.element){ - currentItem.element.classList.remove("active"); - } - - currentItem = item; - input.value = item.label === " " ? "" : item.label; - - if(item.element){ - item.element.classList.add("active"); - } - } - - - function chooseItem(){ - hideList(); - - if(initialValue !== currentItem.value){ - initialValue = currentItem.value; - success(currentItem.value); - }else{ - cancel(); - } - } - - function cancelItem(){ - hideList(); - cancel(); - } - - function showList(){ - if(!listEl.parentNode){ - - if(editorParams.values === true){ - parseItems(getUniqueColumnValues(), initialValue); - }else{ - parseItems(editorParams.values || [], initialValue); - } - - - var offset = Tabulator.prototype.helpers.elOffset(cellEl); - - listEl.style.minWidth = cellEl.offsetWidth + "px"; - - listEl.style.top = (offset.top + cellEl.offsetHeight) + "px"; - listEl.style.left = offset.left + "px"; - document.body.appendChild(listEl); - } - } - - function hideList(){ - if(listEl.parentNode){ - listEl.parentNode.removeChild(listEl); - } - } - - //style input - input.setAttribute("type", "text"); - - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - input.readonly = true; - - //allow key based navigation - input.addEventListener("keydown", function(e){ - var index; - - switch(e.keyCode){ - case 38: //up arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - - index = dataItems.indexOf(currentItem); - - if(index > 0){ - setCurrentItem(dataItems[index - 1]); - } - break; - - case 40: //down arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - - index = dataItems.indexOf(currentItem); - - if(index < dataItems.length - 1){ - if(index == -1){ - setCurrentItem(dataItems[0]); - }else{ - setCurrentItem(dataItems[index + 1]); - } - } - break; - - case 13: //enter - chooseItem(); - break; - - case 27: //escape - cancelItem(); - break; - } - }); - - input.addEventListener("blur", function(e){ - if(blurable){ - cancelItem(); - } - }); - - input.addEventListener("focus", function(e){ - showList(); - }); - - //style list element - listEl = document.createElement("div"); - listEl.classList.add("tabulator-edit-select-list"); - - onRendered(function(){ - input.style.height = "100%"; - input.focus(); - }); - - return input; - }, - - - //autocomplete - autocomplete:function(cell, onRendered, success, cancel, editorParams){ - var self = this, - cellEl = cell.getElement(), - initialValue = cell.getValue(), - input = document.createElement("input"), - listEl = document.createElement("div"), - allItems = [], - displayItems = [], - currentItem = {}, - blurable = true; - - function getUniqueColumnValues(){ - var output = {}, - column = cell.getColumn()._getSelf(), - data = self.table.getData(); - - data.forEach(function(row){ - var val = column.getFieldValue(row); - - if(val !== null && typeof val !== "undefined" && val !== ""){ - output[val] = true; - } - }); - - return Object.keys(output); - } - - function parseItems(inputValues, curentValue){ - var itemList = []; - - if(Array.isArray(inputValues)){ - inputValues.forEach(function(value){ - var item = { - title:editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value, - value:value, - element:false, - }; - - if(item.value === curentValue){ - setCurrentItem(item); - } - - itemList.push(item); - }); - }else{ - for(var key in inputValues){ - var item = { - title:editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : inputValues[key], - value:key, - element:false, - }; - - if(item.value === curentValue){ - setCurrentItem(item); - } - - itemList.push(item); - } - } - - allItems = itemList; - } - - function filterList(term){ - var matches = []; - - if(editorParams.searchFunc){ - matches = editorParams.searchFunc(term, values); - }else{ - if(term === ""){ - - if(editorParams.showListOnEmpty){ - allItems.forEach(function(item){ - matches.push(item); - }); - } - }else{ - allItems.forEach(function(item){ - - if(item.value !== null || typeof item.value !== "undefined"){ - if(String(item.value).toLowerCase().indexOf(String(term).toLowerCase()) > -1){ - matches.push(item); - } - } - }); - } - } - - displayItems = matches; - - fillList(); - } - - function fillList(){ - var current = false; - - while(listEl.firstChild) listEl.removeChild(listEl.firstChild); - - displayItems.forEach(function(item){ - var el = item.element; - - if(!el){ - el = document.createElement("div"); - el.classList.add("tabulator-edit-select-list-item"); - el.tabIndex = 0; - el.innerHTML = item.title; - - el.addEventListener("click", function(){ - setCurrentItem(item); - chooseItem(); - }); - - el.addEventListener("mousedown", function(){ - blurable = false; - - setTimeout(function(){ - blurable = true; - }, 10); - }); - - item.element = el; - - if(item === currentItem){ - item.element.classList.add("active"); - current = true; - } - } - - listEl.appendChild(el); - }); - - if(!current){ - setCurrentItem(false); - } - } - - - function setCurrentItem(item, showInputValue){ - if(currentItem && currentItem.element){ - currentItem.element.classList.remove("active"); - } - - currentItem = item; - - if(item && item.element){ - item.element.classList.add("active"); - } - } - - - function chooseItem(){ - hideList(); - - if(currentItem){ - if(initialValue !== currentItem.value){ - initialValue = currentItem.value; - input.value = currentItem.value; - success(input.value); - }else{ - cancel(); - } - }else{ - if(editorParams.freetext){ - initialValue = input.value; - success(input.value); - }else{ - if(editorParams.allowEmpty && input.value === ""){ - initialValue = input.value; - success(input.value); - }else{ - cancel(); - } - } - } - } - - function cancelItem(){ - hideList(); - cancel(); - } - - function showList(){ - if(!listEl.parentNode){ - while(listEl.firstChild) listEl.removeChild(listEl.firstChild); - - if(editorParams.values === true){ - parseItems(getUniqueColumnValues(), initialValue); - }else{ - parseItems(editorParams.values || [], initialValue); - } - - var offset = Tabulator.prototype.helpers.elOffset(cellEl); - - listEl.style.minWidth = cellEl.offsetWidth + "px"; - - listEl.style.top = (offset.top + cellEl.offsetHeight) + "px"; - listEl.style.left = offset.left + "px"; - document.body.appendChild(listEl); - } - } - - function hideList(){ - if(listEl.parentNode){ - listEl.parentNode.removeChild(listEl); - } - } - - //style input - input.setAttribute("type", "text"); - - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - - //allow key based navigation - input.addEventListener("keydown", function(e){ - var index; - - switch(e.keyCode){ - case 38: //up arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - - index = displayItems.indexOf(currentItem); - - if(index > 0){ - setCurrentItem(displayItems[index - 1]); - }else{ - setCurrentItem(false); - } - break; - - case 40: //down arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - - index = displayItems.indexOf(currentItem); - - if(index < displayItems.length - 1){ - if(index == -1){ - setCurrentItem(displayItems[0]); - }else{ - setCurrentItem(displayItems[index + 1]); - } - } - break; - - case 13: //enter - chooseItem(); - break; - - case 27: //escape - cancelItem(); - break; - } - }); - - input.addEventListener("keyup", function(e){ - - switch(e.keyCode){ - case 38: //up arrow - case 37: //left arrow - case 39: //up arrow - case 40: //right arrow - case 13: //enter - case 27: //escape - break; - - default: - filterList(input.value); - } - - }); - - input.addEventListener("blur", function(e){ - if(blurable){ - chooseItem(); - } - }); - - input.addEventListener("focus", function(e){ - showList(); - input.value = initialValue; - filterList(initialValue); - }); - - //style list element - listEl = document.createElement("div"); - listEl.classList.add("tabulator-edit-select-list"); - - onRendered(function(){ - input.style.height = "100%"; - input.focus(); - }); - - return input; - }, - - //start rating - star:function(cell, onRendered, success, cancel, editorParams){ - var self = this, - element = cell.getElement(), - value = cell.getValue(), - maxStars = element.getElementsByTagName("svg").length || 5, - size = element.getElementsByTagName("svg")[0] ? element.getElementsByTagName("svg")[0].getAttribute("width") : 14, - stars = [], - starsHolder = document.createElement("div"), - star = document.createElementNS('http://www.w3.org/2000/svg', "svg"); - - //change star type - function starChange(val){ - stars.forEach(function(star, i){ - if(i < val){ - if(self.table.browser == "ie"){ - star.setAttribute("class", "tabulator-star-active"); - }else{ - star.classList.replace("tabulator-star-inactive", "tabulator-star-active"); - } - - star.innerHTML = ''; - }else{ - if(self.table.browser == "ie"){ - star.setAttribute("class", "tabulator-star-inactive"); - }else{ - star.classList.replace("tabulator-star-active", "tabulator-star-inactive"); - } - - star.innerHTML = ''; - } - }); - } - - //build stars - function buildStar(i){ - var nextStar = star.cloneNode(true); - - stars.push(nextStar); - - nextStar.addEventListener("mouseover", function(e){ - e.stopPropagation(); - starChange(i); - }); - - nextStar.addEventListener("click", function(e){ - e.stopPropagation(); - success(i); - }); - - starsHolder.appendChild(nextStar); - } - - //handle keyboard navigation value change - function changeValue(val){ - value = val; - starChange(val); - } - - //style cell - element.style.whiteSpace = "nowrap"; - element.style.overflow = "hidden"; - element.style.textOverflow = "ellipsis"; - - //style holding element - starsHolder.style.verticalAlign = "middle"; - starsHolder.style.display = "inline-block"; - starsHolder.style.padding = "4px"; - - //style star - star.setAttribute("width", size); - star.setAttribute("height", size); - star.setAttribute("viewBox", "0 0 512 512"); - star.setAttribute("xml:space", "preserve"); - star.style.padding = "0 1px"; - - //create correct number of stars - for(var i=1;i<= maxStars;i++){ - buildStar(i); - } - - //ensure value does not exceed number of stars - value = Math.min(parseInt(value), maxStars); - - // set initial styling of stars - starChange(value); - - starsHolder.addEventListener("mouseover", function(e){ - starChange(0); - }); - - starsHolder.addEventListener("click", function(e){ - success(0); - }); - - element.addEventListener("blur", function(e){ - cancel(); - }); - - //allow key based navigation - element.addEventListener("keydown", function(e){ - switch(e.keyCode){ - case 39: //right arrow - changeValue(value + 1); - break; - - case 37: //left arrow - changeValue(value - 1); - break; - - case 13: //enter - success(value); - break; - - case 27: //escape - cancel(); - break; - } - }); - - return starsHolder; - }, - - //draggable progress bar - progress:function(cell, onRendered, success, cancel, editorParams){ - var element = cell.getElement(), - max = typeof editorParams.max === "undefined" ? ( element.getElementsByTagName("div")[0].getAttribute("max") || 100) : editorParams.max, - min = typeof editorParams.min === "undefined" ? ( element.getElementsByTagName("div")[0].getAttribute("min") || 0) : editorParams.min, - percent = (max - min) / 100, - value = cell.getValue() || 0, - handle = document.createElement("div"), - bar = document.createElement("div"), - mouseDrag, mouseDragWidth; - - //set new value - function updateValue(){ - var calcVal = (percent * Math.round(bar.offsetWidth / (element.clientWidth/100))) + min; - success(calcVal); - element.setAttribute("aria-valuenow", calcVal); - element.setAttribute("aria-label", value); - } - - //style handle - handle.style.position = "absolute"; - handle.style.right = "0"; - handle.style.top = "0"; - handle.style.bottom = "0"; - handle.style.width = "5px"; - handle.classList.add("tabulator-progress-handle"); - - //style bar - bar.style.display = "inline-block"; - bar.style.position = "absolute"; - bar.style.top = "8px"; - bar.style.bottom = "8px"; - bar.style.left = "4px"; - bar.style.marginRight = "4px"; - bar.style.backgroundColor = "#488CE9"; - bar.style.maxWidth = "100%"; - bar.style.minWidth = "0%"; - - //style cell - element.style.padding = "0 4px"; - - //make sure value is in range - value = Math.min(parseFloat(value), max); - value = Math.max(parseFloat(value), min); - - //workout percentage - value = 100 - Math.round((value - min) / percent); - bar.style.right = value + "%"; - - element.setAttribute("aria-valuemin", min); - element.setAttribute("aria-valuemax", max); - - bar.appendChild(handle); - - handle.addEventListener("mousedown", function(e){ - mouseDrag = e.screenX; - mouseDragWidth = bar.offsetWidth; - }); - - handle.addEventListener("mouseover", function(){ - handle.style.cursor = "ew-resize"; - }); - - element.addEventListener("mousemove", function(e){ - if(mouseDrag){ - bar.style.width = (mouseDragWidth + e.screenX - mouseDrag) + "px"; - } - }); - - element.addEventListener("mouseup", function(e){ - if(mouseDrag){ - e.stopPropagation(); - e.stopImmediatePropagation(); - - mouseDrag = false; - mouseDragWidth = false; - - updateValue(); - } - }); - - //allow key based navigation - element.addEventListener("keydown", function(e){ - switch(e.keyCode){ - case 39: //right arrow - bar.style.width = (bar.clientWidth + element.clientWidth/100) + "px"; - break; - - case 37: //left arrow - bar.style.width = (bar.clientWidth - element.clientWidth/100) + "px"; - break; - - case 13: //enter - updateValue(); - break; - - case 27: //escape - cancel(); - break; - - } - }); - - element.addEventListener("blur", function(){ - cancel(); - }); - - return bar; - }, - - //checkbox - tickCross:function(cell, onRendered, success, cancel, editorParams){ - var value = cell.getValue(), - input = document.createElement("input"), - tristate = editorParams.tristate, - indetermValue = typeof editorParams.indeterminateValue === "undefined" ? null : editorParams.indeterminateValue, - indetermState = false; - - input.setAttribute("type", "checkbox"); - input.style.marginTop = "5px"; - input.style.boxSizing = "border-box"; - - input.value = value; - - if(tristate && (typeof value === "undefined" || value === indetermValue || value === "")){ - indetermState = true; - input.indeterminate = true; - } - - if(this.table.browser != "firefox"){ //prevent blur issue on mac firefox - onRendered(function(){ - input.focus(); - }); - } - - input.checked = value === true || value === "true" || value === "True" || value === 1; - - function setValue(blur){ - if(tristate){ - if(!blur){ - if(input.checked && !indetermState){ - input.checked = false; - input.indeterminate = true; - indetermState = true; - return indetermValue; - }else{ - indetermState = false; - return input.checked; - } - }else{ - if(indetermState){ - return indetermValue; - }else{ - return input.checked; - } - } - }else{ - return input.checked; - } - } - - //submit new value on blur - input.addEventListener("change", function(e){ - success(setValue()); - }); - - input.addEventListener("blur", function(e){ - success(setValue(true)); - }); - - //submit new value on enter - input.addEventListener("keydown", function(e){ - if(e.keyCode == 13){ - success(setValue()); - } - if(e.keyCode == 27){ - cancel(); - } - }); - - return input; - }, -}; - -Tabulator.prototype.registerModule("edit", Edit); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/filter.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/filter.js deleted file mode 100644 index d8296b5e54..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/filter.js +++ /dev/null @@ -1,711 +0,0 @@ -var Filter = function(table){ - - this.table = table; //hold Tabulator object - - this.filterList = []; //hold filter list - this.headerFilters = {}; //hold column filters - this.headerFilterElements = []; //hold header filter elements for manipulation - this.headerFilterColumns = []; //hold columns that use header filters - - this.changed = false; //has filtering changed since last render -}; - - -//initialize column header filter -Filter.prototype.initializeColumn = function(column, value){ - var self = this, - field = column.getField(), - prevSuccess, params; - - - //handle successfull value change - function success(value){ - var filterType = (column.modules.filter.tagType == "input" && column.modules.filter.attrType == "text") || column.modules.filter.tagType == "textarea" ? "partial" : "match", - type = "", - filterFunc; - - if(typeof prevSuccess === "undefined" || prevSuccess !== value){ - - prevSuccess = value; - - if(!column.modules.filter.emptyFunc(value)){ - column.modules.filter.value = value; - - switch(typeof column.definition.headerFilterFunc){ - case "string": - if(self.filters[column.definition.headerFilterFunc]){ - type = column.definition.headerFilterFunc; - filterFunc = function(data){ - return self.filters[column.definition.headerFilterFunc](value, column.getFieldValue(data)); - }; - }else{ - console.warn("Header Filter Error - Matching filter function not found: ", column.definition.headerFilterFunc); - } - break; - - case "function": - filterFunc = function(data){ - var params = column.definition.headerFilterFuncParams || {}; - var fieldVal = column.getFieldValue(data); - - params = typeof params === "function" ? params(value, fieldVal, data) : params; - - return column.definition.headerFilterFunc(value, fieldVal, data, params); - }; - - type = filterFunc; - break; - } - - if(!filterFunc){ - switch(filterType){ - case "partial": - filterFunc = function(data){ - return String(column.getFieldValue(data)).toLowerCase().indexOf(String(value).toLowerCase()) > -1; - }; - type = "like"; - break; - - default: - filterFunc = function(data){ - return column.getFieldValue(data) == value; - }; - type = "="; - } - } - - self.headerFilters[field] = {value:value, func:filterFunc, type:type}; - - }else{ - delete self.headerFilters[field]; - } - - self.changed = true; - - self.table.rowManager.filterRefresh(); - } - } - - column.modules.filter = { - success:success, - attrType:false, - tagType:false, - emptyFunc:false, - }; - - this.generateHeaderFilterElement(column); -}; - -Filter.prototype.generateHeaderFilterElement = function(column, initialValue){ - var self = this, - success = column.modules.filter.success, - field = column.getField(), - filterElement, editor, editorElement, cellWrapper, typingTimer, searchTrigger, params; - - //handle aborted edit - function cancel(){} - - if(column.modules.filter.headerElement && column.modules.filter.headerElement.parentNode){ - column.modules.filter.headerElement.parentNode.removeChild(column.modules.filter.headerElement); - } - - if(field){ - - //set empty value function - column.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function(value){ - return !value && value !== "0"; - }; - - filterElement = document.createElement("div"); - filterElement.classList.add("tabulator-header-filter"); - - //set column editor - switch(typeof column.definition.headerFilter){ - case "string": - if(self.table.modules.edit.editors[column.definition.headerFilter]){ - editor = self.table.modules.edit.editors[column.definition.headerFilter]; - - if((column.definition.headerFilter === "tick" || column.definition.headerFilter === "tickCross") && !column.definition.headerFilterEmptyCheck){ - column.modules.filter.emptyFunc = function(value){ - return value !== true && value !== false; - }; - } - }else{ - console.warn("Filter Error - Cannot build header filter, No such editor found: ", column.definition.editor); - } - break; - - case "function": - editor = column.definition.headerFilter; - break; - - case "boolean": - if(column.modules.edit && column.modules.edit.editor){ - editor = column.modules.edit.editor; - }else{ - if(column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]){ - editor = self.table.modules.edit.editors[column.definition.formatter]; - - if((column.definition.formatter === "tick" || column.definition.formatter === "tickCross") && !column.definition.headerFilterEmptyCheck){ - column.modules.filter.emptyFunc = function(value){ - return value !== true && value !== false; - }; - } - }else{ - editor = self.table.modules.edit.editors["input"]; - } - } - break; - } - - if(editor){ - - cellWrapper = { - getValue:function(){ - return typeof initialValue !== "undefined" ? initialValue : ""; - }, - getField:function(){ - return column.definition.field; - }, - getElement:function(){ - return filterElement; - }, - getColumn:function(){ - return column.getComponent(); - }, - getRow:function(){ - return { - normalizeHeight:function(){ - - } - }; - } - }; - - params = column.definition.headerFilterParams || {}; - - params = typeof params === "function" ? params.call(self.table) : params; - - editorElement = editor.call(this.table.modules.edit, cellWrapper, function(){}, success, cancel, params); - - if(!editorElement){ - console.warn("Filter Error - Cannot add filter to " + field + " column, editor returned a value of false"); - return; - } - - if(!(editorElement instanceof Node)){ - console.warn("Filter Error - Cannot add filter to " + field + " column, editor should return an instance of Node, the editor returned:", editorElement); - return; - } - - //set Placeholder Text - if(field){ - self.table.modules.localize.bind("headerFilters|columns|" + column.definition.field, function(value){ - editorElement.setAttribute("placeholder", typeof value !== "undefined" && value ? value : self.table.modules.localize.getText("headerFilters|default")); - }); - }else{ - self.table.modules.localize.bind("headerFilters|default", function(value){ - editorElement.setAttribute("placeholder", typeof self.column.definition.headerFilterPlaceholder !== "undefined" && self.column.definition.headerFilterPlaceholder ? self.column.definition.headerFilterPlaceholder : value); - }); - } - - //focus on element on click - editorElement.addEventListener("click", function(e){ - e.stopPropagation(); - editorElement.focus(); - }); - - //live update filters as user types - typingTimer = false; - - searchTrigger = function(e){ - if(typingTimer){ - clearTimeout(typingTimer); - } - - typingTimer = setTimeout(function(){ - success(editorElement.value); - },300); - }; - - column.modules.filter.headerElement = editorElement; - column.modules.filter.attrType = editorElement.hasAttribute("type") ? editorElement.getAttribute("type").toLowerCase() : "" ; - column.modules.filter.tagType = editorElement.tagName.toLowerCase(); - - if(column.definition.headerFilterLiveFilter !== false){ - - if(!(column.definition.headerFilter === "autocomplete" || (column.definition.editor === "autocomplete" && column.definition.headerFilter === true))){ - editorElement.addEventListener("keyup", searchTrigger); - editorElement.addEventListener("search", searchTrigger); - - - //update number filtered columns on change - if(column.modules.filter.attrType == "number"){ - editorElement.addEventListener("change", function(e){ - success(editorElement.value); - }); - } - - //change text inputs to search inputs to allow for clearing of field - if(column.modules.filter.attrType == "text" && this.table.browser !== "ie"){ - editorElement.setAttribute("type", "search"); - // editorElement.off("change blur"); //prevent blur from triggering filter and preventing selection click - } - - } - - //prevent input and select elements from propegating click to column sorters etc - if(column.modules.filter.tagType == "input" || column.modules.filter.tagType == "select" || column.modules.filter.tagType == "textarea"){ - editorElement.addEventListener("mousedown",function(e){ - e.stopPropagation(); - }); - } - } - - filterElement.appendChild(editorElement); - - column.contentElement.appendChild(filterElement); - - self.headerFilterElements.push(editorElement); - self.headerFilterColumns.push(column); - } - }else{ - console.warn("Filter Error - Cannot add header filter, column has no field set:", column.definition.title); - } - -}; - -//hide all header filter elements (used to ensure correct column widths in "fitData" layout mode) -Filter.prototype.hideHeaderFilterElements = function(){ - this.headerFilterElements.forEach(function(element){ - element.style.display = 'none'; - }); -}; - -//show all header filter elements (used to ensure correct column widths in "fitData" layout mode) -Filter.prototype.showHeaderFilterElements = function(){ - this.headerFilterElements.forEach(function(element){ - element.style.display = ''; - }); -}; - - -//programatically set value of header filter -Filter.prototype.setHeaderFilterFocus = function(column){ - if(column.modules.filter && column.modules.filter.headerElement){ - column.modules.filter.headerElement.focus(); - }else{ - console.warn("Column Filter Focus Error - No header filter set on column:", column.getField()); - } -}; - -//programatically set value of header filter -Filter.prototype.setHeaderFilterValue = function(column, value){ - if (column){ - if(column.modules.filter && column.modules.filter.headerElement){ - this.generateHeaderFilterElement(column, value); - column.modules.filter.success(value); - }else{ - console.warn("Column Filter Error - No header filter set on column:", column.getField()); - } - } -}; - -Filter.prototype.reloadHeaderFilter = function(column){ - if (column){ - if(column.modules.filter && column.modules.filter.headerElement){ - this.generateHeaderFilterElement(column, column.modules.filter.value); - }else{ - console.warn("Column Filter Error - No header filter set on column:", column.getField()); - } - } -} - -//check if the filters has changed since last use -Filter.prototype.hasChanged = function(){ - var changed = this.changed; - this.changed = false; - return changed; -}; - -//set standard filters -Filter.prototype.setFilter = function(field, type, value){ - var self = this; - - self.filterList = []; - - if(!Array.isArray(field)){ - field = [{field:field, type:type, value:value}]; - } - - self.addFilter(field); - -}; - -//add filter to array -Filter.prototype.addFilter = function(field, type, value){ - var self = this; - - if(!Array.isArray(field)){ - field = [{field:field, type:type, value:value}]; - } - - field.forEach(function(filter){ - - filter = self.findFilter(filter); - - if(filter){ - self.filterList.push(filter); - - self.changed = true; - } - }); - - if(this.table.options.persistentFilter && this.table.modExists("persistence", true)){ - this.table.modules.persistence.save("filter"); - } - -}; - -Filter.prototype.findFilter = function(filter){ - var self = this, - column; - - if(Array.isArray(filter)){ - return this.findSubFilters(filter); - } - - - var filterFunc = false; - - if(typeof filter.field == "function"){ - filterFunc = function(data){ - return filter.field(data, filter.type || {})// pass params to custom filter function - } - }else{ - - if(self.filters[filter.type]){ - - column = self.table.columnManager.getColumnByField(filter.field); - - if(column){ - filterFunc = function(data){ - return self.filters[filter.type](filter.value, column.getFieldValue(data)); - } - }else{ - filterFunc = function(data){ - return self.filters[filter.type](filter.value, data[filter.field]); - } - } - - - }else{ - console.warn("Filter Error - No such filter type found, ignoring: ", filter.type); - } - } - - - filter.func = filterFunc; - - - - return filter.func ? filter : false; -}; - -Filter.prototype.findSubFilters = function(filters){ - var self = this, - output = []; - - filters.forEach(function(filter){ - filter = self.findFilter(filter); - - if(filter){ - output.push(filter); - } - }); - - return output.length ? output : false; -} - - -//get all filters -Filter.prototype.getFilters = function(all, ajax){ - var self = this, - output = []; - - if(all){ - output = self.getHeaderFilters(); - } - - self.filterList.forEach(function(filter){ - output.push({field:filter.field, type:filter.type, value:filter.value}); - }); - - if(ajax){ - output.forEach(function(item){ - if(typeof item.type == "function"){ - item.type = "function"; - } - }) - } - - return output; -}; - -//get all filters -Filter.prototype.getHeaderFilters = function(){ - var self = this, - output = []; - - for(var key in this.headerFilters){ - output.push({field:key, type:this.headerFilters[key].type, value:this.headerFilters[key].value}); - } - - return output; -}; - -//remove filter from array -Filter.prototype.removeFilter = function(field, type, value){ - var self = this; - - if(!Array.isArray(field)){ - field = [{field:field, type:type, value:value}]; - } - - field.forEach(function(filter){ - var index = -1; - - if(typeof filter.field == "object"){ - index = self.filterList.findIndex(function(element){ - return filter === element; - }); - }else{ - index = self.filterList.findIndex(function(element){ - return filter.field === element.field && filter.type === element.type && filter.value === element.value - }); - } - - if(index > -1){ - self.filterList.splice(index, 1); - self.changed = true; - }else{ - console.warn("Filter Error - No matching filter type found, ignoring: ", filter.type); - } - - }); - - if(this.table.options.persistentFilter && this.table.modExists("persistence", true)){ - this.table.modules.persistence.save("filter"); - } - -}; - -//clear filters -Filter.prototype.clearFilter = function(all){ - this.filterList = []; - - if(all){ - this.clearHeaderFilter(); - } - - this.changed = true; - - if(this.table.options.persistentFilter && this.table.modExists("persistence", true)){ - this.table.modules.persistence.save("filter"); - } -}; - -//clear header filters -Filter.prototype.clearHeaderFilter = function(){ - var self = this; - - this.headerFilters = {}; - - this.headerFilterColumns.forEach(function(column){ - column.modules.filter.value = null; - self.reloadHeaderFilter(column); - }); - - this.changed = true; -}; - -//search data and return matching rows -Filter.prototype.search = function (searchType, field, type, value){ - var self = this, - activeRows = [], - filterList = []; - - if(!Array.isArray(field)){ - field = [{field:field, type:type, value:value}]; - } - - field.forEach(function(filter){ - filter = self.findFilter(filter); - - if(filter){ - filterList.push(filter); - } - }); - - this.table.rowManager.rows.forEach(function(row){ - var match = true; - - filterList.forEach(function(filter){ - if(!self.filterRecurse(filter, row.getData())){ - match = false; - } - }); - - if(match){ - activeRows.push(searchType === "data" ? row.getData("data") : row.getComponent()); - } - - }); - - return activeRows; -}; - -//filter row array -Filter.prototype.filter = function(rowList, filters){ - var self = this, - activeRows = [], - activeRowComponents = []; - - if(self.table.options.dataFiltering){ - self.table.options.dataFiltering.call(self.table, self.getFilters()); - } - - if(!self.table.options.ajaxFiltering && (self.filterList.length || Object.keys(self.headerFilters).length)){ - - rowList.forEach(function(row){ - if(self.filterRow(row)){ - activeRows.push(row); - } - }); - - }else{ - activeRows = rowList.slice(0); - } - - if(self.table.options.dataFiltered){ - - activeRows.forEach(function(row){ - activeRowComponents.push(row.getComponent()); - }); - - self.table.options.dataFiltered.call(self.table, self.getFilters(), activeRowComponents); - } - - return activeRows; - -}; - -//filter individual row -Filter.prototype.filterRow = function(row, filters){ - var self = this, - match = true, - data = row.getData(); - - self.filterList.forEach(function(filter){ - if(!self.filterRecurse(filter, data)){ - match = false; - } - }); - - - for(var field in self.headerFilters){ - if(!self.headerFilters[field].func(data)){ - match = false; - } - } - - return match; -}; - -Filter.prototype.filterRecurse = function(filter, data){ - var self = this, - match = false; - - if(Array.isArray(filter)){ - filter.forEach(function(subFilter){ - if(self.filterRecurse(subFilter, data)){ - match = true; - } - }); - }else{ - match = filter.func(data); - } - - return match; -}; - - - -//list of available filters -Filter.prototype.filters ={ - - //equal to - "=":function(filterVal, rowVal){ - return rowVal == filterVal ? true : false; - }, - - //less than - "<":function(filterVal, rowVal){ - return rowVal < filterVal ? true : false; - }, - - //less than or equal to - "<=":function(filterVal, rowVal){ - return rowVal <= filterVal ? true : false; - }, - - //greater than - ">":function(filterVal, rowVal){ - return rowVal > filterVal ? true : false; - }, - - //greater than or equal to - ">=":function(filterVal, rowVal){ - return rowVal >= filterVal ? true : false; - }, - - //not equal to - "!=":function(filterVal, rowVal){ - return rowVal != filterVal ? true : false; - }, - - "regex":function(filterVal, rowVal){ - - if(typeof filterVal == "string"){ - filterVal = new RegExp(filterVal); - } - - return filterVal.test(rowVal); - }, - - //contains the string - "like":function(filterVal, rowVal){ - if(filterVal === null || typeof filterVal === "undefined"){ - return rowVal === filterVal ? true : false; - }else{ - if(typeof rowVal !== 'undefined' && rowVal !== null){ - return String(rowVal).toLowerCase().indexOf(filterVal.toLowerCase()) > -1 ? true : false; - } - else{ - return false; - } - } - }, - - //in array - "in":function(filterVal, rowVal){ - if(Array.isArray(filterVal)){ - return filterVal.indexOf(rowVal) > -1; - }else{ - console.warn("Filter Error - filter value is not an array:", filterVal); - return false; - } - }, -}; - -Tabulator.prototype.registerModule("filter", Filter); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/format.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/format.js deleted file mode 100644 index b76a38ca3a..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/format.js +++ /dev/null @@ -1,526 +0,0 @@ -var Format = function(table){ - this.table = table; //hold Tabulator object -}; - -//initialize column formatter -Format.prototype.initializeColumn = function(column){ - var self = this, - config = {params:column.definition.formatterParams || {}}; - - //set column formatter - switch(typeof column.definition.formatter){ - case "string": - - if(column.definition.formatter === "tick"){ - column.definition.formatter = "tickCross"; - - if(typeof config.params.crossElement == "undefined"){ - config.params.crossElement = false; - } - - console.warn("DEPRECATION WANRING - the tick formatter has been depricated, please use the tickCross formatter with the crossElement param set to false"); - } - - if(self.formatters[column.definition.formatter]){ - config.formatter = self.formatters[column.definition.formatter]; - }else{ - console.warn("Formatter Error - No such formatter found: ", column.definition.formatter); - config.formatter = self.formatters.plaintext; - } - break; - - case "function": - config.formatter = column.definition.formatter; - break; - - default: - config.formatter = self.formatters.plaintext; - break; - } - - column.modules.format = config; -}; - -Format.prototype.cellRendered = function(cell){ - if(cell.column.modules.format.renderedCallback){ - cell.column.modules.format.renderedCallback(); - } -}; - -//return a formatted value for a cell -Format.prototype.formatValue = function(cell){ - var component = cell.getComponent(), - params = typeof cell.column.modules.format.params === "function" ? cell.column.modules.format.params(component) : cell.column.modules.format.params; - - function onRendered(callback){ - cell.column.modules.format.renderedCallback = callback; - } - - return cell.column.modules.format.formatter.call(this, component, params, onRendered); -}; - - -Format.prototype.sanitizeHTML = function(value){ - if(value){ - var entityMap = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '/': '/', - '`': '`', - '=': '=' - }; - - return String(value).replace(/[&<>"'`=\/]/g, function (s) { - return entityMap[s]; - }); - }else{ - return value; - } -}; - -Format.prototype.emptyToSpace = function(value){ - return value === null || typeof value === "undefined" ? " " : value; -}; - -//get formatter for cell -Format.prototype.getFormatter = function(formatter){ - var formatter; - - switch(typeof formatter){ - case "string": - if(this.formatters[formatter]){ - formatter = this.formatters[formatter] - }else{ - console.warn("Formatter Error - No such formatter found: ", formatter); - formatter = this.formatters.plaintext; - } - break; - - case "function": - formatter = formatter; - break; - - default: - formatter = this.formatters.plaintext; - break; - } - - return formatter; - -}; - -//default data formatters -Format.prototype.formatters = { - //plain text value - plaintext:function(cell, formatterParams, onRendered){ - return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); - }, - - //html text value - html:function(cell, formatterParams, onRendered){ - return cell.getValue(); - }, - - //multiline text area - textarea:function(cell, formatterParams, onRendered){ - cell.getElement().style.whiteSpace = "pre-wrap"; - return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); - }, - - //currency formatting - money:function(cell, formatterParams, onRendered){ - var floatVal = parseFloat(cell.getValue()), - number, integer, decimal, rgx; - - var decimalSym = formatterParams.decimal || "."; - var thousandSym = formatterParams.thousand || ","; - var symbol = formatterParams.symbol || ""; - var after = !!formatterParams.symbolAfter; - var precision = typeof formatterParams.precision !== "undefined" ? formatterParams.precision : 2; - - if(isNaN(floatVal)){ - return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); - } - - number = precision !== false ? floatVal.toFixed(precision) : floatVal; - number = String(number).split("."); - - integer = number[0]; - decimal = number.length > 1 ? decimalSym + number[1] : ""; - - rgx = /(\d+)(\d{3})/; - - while (rgx.test(integer)){ - integer = integer.replace(rgx, "$1" + thousandSym + "$2"); - } - - return after ? integer + decimal + symbol : symbol + integer + decimal; - }, - - //clickable anchor tag - link:function(cell, formatterParams, onRendered){ - var value = this.sanitizeHTML(cell.getValue()), - urlPrefix = formatterParams.urlPrefix || "", - label = this.emptyToSpace(value), - el = document.createElement("a"), - data; - - if(formatterParams.labelField){ - data = cell.getData(); - label = data[formatterParams.labelField]; - } - - if(formatterParams.label){ - switch(typeof formatterParams.label){ - case "string": - label = formatterParams.label; - break; - - case "function": - label = formatterParams.label(cell); - break; - } - } - - if(formatterParams.urlField){ - data = cell.getData(); - value = data[formatterParams.urlField]; - } - - if(formatterParams.url){ - switch(typeof formatterParams.url){ - case "string": - value = formatterParams.url; - break; - - case "function": - value = formatterParams.url(cell); - break; - } - } - - el.setAttribute("href", urlPrefix + value); - - if(formatterParams.target){ - el.setAttribute("target", formatterParams.target); - } - - el.innerHTML = this.emptyToSpace(label); - - return el; - }, - - //image element - image:function(cell, formatterParams, onRendered){ - var el = document.createElement("img"); - el.setAttribute("src", cell.getValue()); - - switch(typeof formatterParams.height){ - case "number": - element.style.height = formatterParams.height + "px"; - break; - - case "string": - element.style.height = formatterParams.height; - break; - } - - switch(typeof formatterParams.width){ - case "number": - element.style.width = formatterParams.width + "px"; - break; - - case "string": - element.style.width = formatterParams.width; - break; - } - - el.addEventListener("load", function(){ - cell.getRow().normalizeHeight(); - }); - - return el; - }, - - //tick or cross - tickCross:function(cell, formatterParams, onRendered){ - var value = cell.getValue(), - element = cell.getElement(), - empty = formatterParams.allowEmpty, - truthy = formatterParams.allowTruthy, - tick = typeof formatterParams.tickElement !== "undefined" ? formatterParams.tickElement : '', - cross = typeof formatterParams.crossElement !== "undefined" ? formatterParams.crossElement : ''; - - if((truthy && value) || (value === true || value === "true" || value === "True" || value === 1 || value === "1")){ - element.setAttribute("aria-checked", true); - return tick || ""; - }else{ - if(empty && (value === "null" || value === "" || value === null || typeof value === "undefined")){ - element.setAttribute("aria-checked", "mixed"); - return ""; - }else{ - element.setAttribute("aria-checked", false); - return cross || ""; - } - } - }, - - datetime:function(cell, formatterParams, onRendered){ - var inputFormat = formatterParams.inputFormat || "YYYY-MM-DD hh:mm:ss"; - var outputFormat = formatterParams.outputFormat || "DD/MM/YYYY hh:mm:ss"; - var invalid = typeof formatterParams.invalidPlaceholder !== "undefined" ? formatterParams.invalidPlaceholder : ""; - var value = cell.getValue(); - - var newDatetime = moment(value, inputFormat); - - if(newDatetime.isValid()){ - return newDatetime.format(outputFormat); - }else{ - - if(invalid === true){ - return value; - }else if(typeof invalid === "function"){ - return invalid(value); - }else{ - return invalid; - } - } - }, - - datetimediff: function datetime(cell, formatterParams, onRendered) { - var inputFormat = formatterParams.inputFormat || "YYYY-MM-DD hh:mm:ss"; - var invalid = typeof formatterParams.invalidPlaceholder !== "undefined" ? formatterParams.invalidPlaceholder : ""; - var suffix = typeof formatterParams.suffix !== "undefined" ? formatterParams.suffix : false; - var unit = typeof formatterParams.unit !== "undefined" ? formatterParams.unit : undefined; - var humanize = typeof formatterParams.humanize !== "undefined" ? formatterParams.humanize : false; - var date = typeof formatterParams.date !== "undefined" ? formatterParams.date : moment(); - var value = cell.getValue(); - - var newDatetime = moment(value, inputFormat); - - if (newDatetime.isValid()) { - if(humanize){ - return moment.duration(newDatetime.diff(date)).humanize(suffix); - }else{ - return newDatetime.diff(date, unit) + (suffix ? " " + suffix : ""); - } - - } else { - - if (invalid === true) { - return value; - } else if (typeof invalid === "function") { - return invalid(value); - } else { - return invalid; - } - } - }, - - //select - lookup: function (cell, formatterParams, onRendered) { - var value = cell.getValue(); - - if (typeof formatterParams[value] === "undefined") { - console.warn('Missing display value for ' + value); - return value; - } - - return formatterParams[value]; - }, - - //star rating - star:function(cell, formatterParams, onRendered){ - var value = cell.getValue(), - element = cell.getElement(), - maxStars = formatterParams && formatterParams.stars ? formatterParams.stars : 5, - stars = document.createElement("span"), - star = document.createElementNS('http://www.w3.org/2000/svg', "svg"), - starActive = '', - starInactive = ''; - - //style stars holder - stars.style.verticalAlign = "middle"; - - //style star - star.setAttribute("width", "14"); - star.setAttribute("height", "14"); - star.setAttribute("viewBox", "0 0 512 512"); - star.setAttribute("xml:space", "preserve"); - star.style.padding = "0 1px"; - - value = parseInt(value) < maxStars ? parseInt(value) : maxStars; - - for(var i=1;i<= maxStars;i++){ - var nextStar = star.cloneNode(true); - nextStar.innerHTML = i <= value ? starActive : starInactive; - - stars.appendChild(nextStar); - } - - element.style.whiteSpace = "nowrap"; - element.style.overflow = "hidden"; - element.style.textOverflow = "ellipsis"; - - element.setAttribute("aria-label", value); - - return stars; - }, - - //progress bar - progress:function(cell, formatterParams, onRendered){ //progress bar - var value = this.sanitizeHTML(cell.getValue()) || 0, - element = cell.getElement(), - max = formatterParams && formatterParams.max ? formatterParams.max : 100, - min = formatterParams && formatterParams.min ? formatterParams.min : 0, - legendAlign = formatterParams && formatterParams.legendAlign ? formatterParams.legendAlign : "center", - percent, percentValue, color, legend, legendColor, top, left, right, bottom; - - //make sure value is in range - percentValue = parseFloat(value) <= max ? parseFloat(value) : max; - percentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min; - - //workout percentage - percent = (max - min) / 100; - percentValue = Math.round((percentValue - min) / percent); - - //set bar color - switch(typeof formatterParams.color){ - case "string": - color = formatterParams.color; - break; - case "function": - color = formatterParams.color(value); - break; - case "object": - if(Array.isArray(formatterParams.color)){ - var unit = 100 / formatterParams.color.length; - var index = Math.floor(percentValue / unit); - - index = Math.min(index, formatterParams.color.length - 1); - index = Math.max(index, 0); - color = formatterParams.color[index]; - break; - } - default: - color = "#2DC214"; - } - - //generate legend - switch(typeof formatterParams.legend){ - case "string": - legend = formatterParams.legend; - break; - case "function": - legend = formatterParams.legend(value); - break; - case "boolean": - legend = value; - break; - default: - legend = false; - } - - //set legend color - switch(typeof formatterParams.legendColor){ - case "string": - legendColor = formatterParams.legendColor; - break; - case "function": - legendColor = formatterParams.legendColor(value); - break; - case "object": - if(Array.isArray(formatterParams.legendColor)){ - var unit = 100 / formatterParams.legendColor.length; - var index = Math.floor(percentValue / unit); - - index = Math.min(index, formatterParams.legendColor.length - 1); - index = Math.max(index, 0); - legendColor = formatterParams.legendColor[index]; - } - break; - default: - legendColor = "#000"; - } - - element.style.minWidth = "30px"; - element.style.position = "relative"; - - element.setAttribute("aria-label", percentValue); - - return "
" + (legend ? "
" + legend + "
" : ""); - }, - - //background color - color:function(cell, formatterParams, onRendered){ - cell.getElement().style.backgroundColor = this.sanitizeHTML(cell.getValue()); - return ""; - }, - - //tick icon - buttonTick:function(cell, formatterParams, onRendered){ - return ''; - }, - - //cross icon - buttonCross:function(cell, formatterParams, onRendered){ - return ''; - }, - - //current row number - rownum:function(cell, formatterParams, onRendered){ - return this.table.rowManager.activeRows.indexOf(cell.getRow()._getSelf()) + 1; - }, - - //row handle - handle:function(cell, formatterParams, onRendered){ - cell.getElement().classList.add("tabulator-row-handle"); - return "
"; - }, - - responsiveCollapse:function(cell, formatterParams, onRendered){ - var self = this, - open = false, - el = document.createElement("div"); - - function toggleList(isOpen){ - var collapse = cell.getRow().getElement().getElementsByClassName("tabulator-responsive-collapse")[0]; - - open = isOpen; - - if(open){ - el.classList.add("open"); - if(collapse){ - collapse.style.display = ''; - } - }else{ - el.classList.remove("open"); - if(collapse){ - collapse.style.display = 'none'; - } - } - } - - el.classList.add("tabulator-responsive-collapse-toggle"); - el.innerHTML = "+-"; - - cell.getElement().classList.add("tabulator-row-handle"); - - if(self.table.options.responsiveLayoutCollapseStartOpen){ - open = true; - } - - el.addEventListener("click", function(){ - toggleList(!open); - }); - - toggleList(open); - - return el; - }, -}; - -Tabulator.prototype.registerModule("format", Format); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/frozen_columns.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/frozen_columns.js deleted file mode 100644 index f9fecfae56..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/frozen_columns.js +++ /dev/null @@ -1,160 +0,0 @@ -var FrozenColumns = function(table){ - this.table = table; //hold Tabulator object - this.leftColumns = []; - this.rightColumns = []; - this.leftMargin = 0; - this.rightMargin = 0; - this.initializationMode = "left"; - this.active = false; -}; - -//reset initial state -FrozenColumns.prototype.reset = function(){ - this.initializationMode = "left"; - this.leftColumns = []; - this.rightColumns = []; - this.active = false; -}; - -//initialize specific column -FrozenColumns.prototype.initializeColumn = function(column){ - var config = {margin:0, edge:false}; - - if(column.definition.frozen){ - - if(!column.parent.isGroup){ - - - if(!column.isGroup){ - config.position = this.initializationMode; - - if(this.initializationMode == "left"){ - this.leftColumns.push(column); - }else{ - this.rightColumns.unshift(column); - } - - this.active = true; - - column.modules.frozen = config; - }else{ - console.warn("Frozen Column Error - Column Groups cannot be frozen"); - } - }else{ - console.warn("Frozen Column Error - Grouped columns cannot be frozen"); - } - - }else{ - this.initializationMode = "right"; - } -}; - -//layout columns appropropriatly -FrozenColumns.prototype.layout = function(){ - var self = this, - tableHolder = this.table.rowManager.element, - rightMargin = 0; - - if(self.active){ - - //calculate row padding - - self.leftMargin = self._calcSpace(self.leftColumns, self.leftColumns.length); - self.table.columnManager.headersElement.style.marginLeft = self.leftMargin + "px"; - - self.rightMargin = self._calcSpace(self.rightColumns, self.rightColumns.length); - self.table.columnManager.element.style.paddingRight = self.rightMargin + "px"; - - self.table.rowManager.activeRows.forEach(function(row){ - self.layoutRow(row); - }); - - if(self.table.modExists("columnCalcs")){ - if(self.table.modules.columnCalcs.topInitialized && self.table.modules.columnCalcs.topRow){ - self.layoutRow(self.table.modules.columnCalcs.topRow); - } - if(self.table.modules.columnCalcs.botInitialized && self.table.modules.columnCalcs.botRow){ - self.layoutRow(self.table.modules.columnCalcs.botRow); - } - } - - //calculate left columns - self.leftColumns.forEach(function(column, i){ - column.modules.frozen.margin = self._calcSpace(self.leftColumns, i) + self.table.columnManager.scrollLeft; - - if(i == self.leftColumns.length - 1){ - column.modules.frozen.edge = true; - }else{ - column.modules.frozen.edge = false; - } - - self.layoutColumn(column); - }); - - //calculate right frozen columns - rightMargin = self.table.rowManager.element.clientWidth + self.table.columnManager.scrollLeft; - - // if(tableHolder.scrollHeight > tableHolder.clientHeight){ - // rightMargin -= tableHolder.offsetWidth - tableHolder.clientWidth; - // } - - self.rightColumns.forEach(function(column, i){ - column.modules.frozen.margin = rightMargin - self._calcSpace(self.rightColumns, i + 1); - - if(i == self.rightColumns.length - 1){ - column.modules.frozen.edge = true; - }else{ - column.modules.frozen.edge = false; - } - - self.layoutColumn(column); - }); - - this.table.rowManager.tableElement.style.marginRight = this.rightMargin + "px"; - } -}; - -FrozenColumns.prototype.layoutColumn = function(column){ - var self = this; - - self.layoutElement(column.getElement(), column); - - column.cells.forEach(function(cell){ - self.layoutElement(cell.getElement(), column); - }); -}; - -FrozenColumns.prototype.layoutRow = function(row){ - var rowEl = row.getElement(); - - rowEl.style.paddingLeft = this.leftMargin + "px"; - // rowEl.style.paddingRight = this.rightMargin + "px"; -}; - -FrozenColumns.prototype.layoutElement = function(element, column){ - - if(column.modules.frozen){ - element.style.position = "absolute"; - element.style.left = column.modules.frozen.margin + "px"; - - element.classList.add("tabulator-frozen"); - - if(column.modules.frozen.edge){ - element.classList.add("tabulator-frozen-" + column.modules.frozen.position); - } - } -}; - -FrozenColumns.prototype._calcSpace = function(columns, index){ - var width = 0; - - for (let i = 0; i < index; i++){ - if(columns[i].visible){ - width += columns[i].getWidth(); - } - } - - return width; -}; - -Tabulator.prototype.registerModule("frozenColumns", FrozenColumns); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/frozen_rows.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/frozen_rows.js deleted file mode 100644 index 5dbf7cc3b3..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/frozen_rows.js +++ /dev/null @@ -1,99 +0,0 @@ -var FrozenRows = function(table){ - this.table = table; //hold Tabulator object - this.topElement = document.createElement("div"); - this.rows = []; - this.displayIndex = 0; //index in display pipeline -}; - -FrozenRows.prototype.initialize = function(){ - this.rows = []; - - this.topElement.classList.add("tabulator-frozen-rows-holder"); - - // this.table.columnManager.element.append(this.topElement); - this.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling); -}; - -FrozenRows.prototype.setDisplayIndex = function(index){ - this.displayIndex = index; -}; - -FrozenRows.prototype.getDisplayIndex = function(){ - return this.displayIndex; -}; - -FrozenRows.prototype.isFrozen = function(){ - return !!this.rows.length; -}; - -//filter frozen rows out of display data -FrozenRows.prototype.getRows = function(rows){ - var self = this, - frozen = [], - output = rows.slice(0); - - this.rows.forEach(function(row){ - var index = output.indexOf(row); - - if(index > -1){ - output.splice(index, 1); - } - }); - - return output; -}; - -FrozenRows.prototype.freezeRow = function(row){ - if(!row.modules.frozen){ - row.modules.frozen = true; - this.topElement.appendChild(row.getElement()); - row.initialize(); - row.normalizeHeight(); - this.table.rowManager.adjustTableSize(); - - this.rows.push(row); - - this.table.rowManager.refreshActiveData("display"); - - this.styleRows(); - - }else{ - console.warn("Freeze Error - Row is already frozen"); - } -}; - -FrozenRows.prototype.unfreezeRow = function(row){ - var index = this.rows.indexOf(row); - - if(row.modules.frozen){ - - row.modules.frozen = false; - - var rowEl = row.getElement(); - rowEl.parentNode.removeChild(rowEl); - - this.table.rowManager.adjustTableSize(); - - this.rows.splice(index, 1); - - this.table.rowManager.refreshActiveData("display"); - - if(this.rows.length){ - this.styleRows(); - } - - }else{ - console.warn("Freeze Error - Row is already unfrozen"); - } -}; - -FrozenRows.prototype.styleRows = function(row){ - var self = this; - - this.rows.forEach(function(row, i){ - self.table.rowManager.styleRow(row, i); - }); -} - - -Tabulator.prototype.registerModule("frozenRows", FrozenRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/group_rows.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/group_rows.js deleted file mode 100644 index 9efa3480b9..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/group_rows.js +++ /dev/null @@ -1,995 +0,0 @@ - - -//public group object -var GroupComponent = function (group){ - this._group = group; - this.type = "GroupComponent"; -}; - -GroupComponent.prototype.getKey = function(){ - return this._group.key; -}; - -GroupComponent.prototype.getElement = function(){ - return this._group.element; -}; - -GroupComponent.prototype.getRows = function(){ - return this._group.getRows(true); -}; - -GroupComponent.prototype.getSubGroups = function(){ - return this._group.getSubGroups(true); -}; - -GroupComponent.prototype.getParentGroup = function(){ - return this._group.parent ? this._group.parent.getComponent() : false; -}; - -GroupComponent.prototype.getVisibility = function(){ - return this._group.visible; -}; - -GroupComponent.prototype.show = function(){ - this._group.show(); -}; - -GroupComponent.prototype.hide = function(){ - this._group.hide(); -}; - -GroupComponent.prototype.toggle = function(){ - this._group.toggleVisibility(); -}; - -GroupComponent.prototype._getSelf = function(){ - return this._group; -}; - -GroupComponent.prototype.getTable = function(){ - return this._group.table; -}; - -////////////////////////////////////////////////// -//////////////// Group Functions ///////////////// -////////////////////////////////////////////////// - -var Group = function(groupManager, parent, level, key, field, generator, oldGroup){ - - this.groupManager = groupManager; - this.parent = parent; - this.key = key; - this.level = level; - this.field = field; - this.hasSubGroups = level < (groupManager.groupIDLookups.length - 1); - this.addRow = this.hasSubGroups ? this._addRowToGroup : this._addRow; - this.type = "group"; //type of element - this.old = oldGroup; - this.rows = []; - this.groups = []; - this.groupList = []; - this.generator = generator; - this.elementContents = false; - this.height = 0; - this.outerHeight = 0; - this.initialized = false; - this.calcs = {}; - this.initialized = false; - this.modules = {}; - - this.visible = oldGroup ? oldGroup.visible : (typeof groupManager.startOpen[level] !== "undefined" ? groupManager.startOpen[level] : groupManager.startOpen[0]); - - this.createElements(); - this.addBindings(); - - this.createValueGroups(); -}; - -Group.prototype.createElements = function(){ - this.element = document.createElement("div"); - this.element.classList.add("tabulator-row"); - this.element.classList.add("tabulator-group"); - this.element.classList.add("tabulator-group-level-" + this.level); - this.element.setAttribute("role", "rowgroup"); - - this.arrowElement = document.createElement("div"); - this.arrowElement.classList.add("tabulator-arrow"); -}; - -Group.prototype.createValueGroups = function(){ - var level = this.level + 1; - if(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){ - this.groupManager.allowedValues[level].forEach((value) => { - this._createGroup(value, level); - }); - } -}; - -Group.prototype.addBindings = function(){ - var self = this, - dblTap, tapHold, tap, toggleElement; - - - //handle group click events - if (self.groupManager.table.options.groupClick){ - self.element.addEventListener("click", function(e){ - self.groupManager.table.options.groupClick(e, self.getComponent()); - }); - } - - if (self.groupManager.table.options.groupDblClick){ - self.element.addEventListener("dblclick", function(e){ - self.groupManager.table.options.groupDblClick(e, self.getComponent()); - }); - } - - if (self.groupManager.table.options.groupContext){ - self.element.addEventListener("contextmenu", function(e){ - self.groupManager.table.options.groupContext(e, self.getComponent()); - }); - } - - if (self.groupManager.table.options.groupTap){ - - tap = false; - - self.element.addEventListener("touchstart", function(e){ - tap = true; - }); - - self.element.addEventListener("touchend", function(e){ - if(tap){ - self.groupManager.table.options.groupTap(e, self.getComponent()); - } - - tap = false; - }); - } - - if (self.groupManager.table.options.groupDblTap){ - - dblTap = null; - - self.element.addEventListener("touchend", function(e){ - - if(dblTap){ - clearTimeout(dblTap); - dblTap = null; - - self.groupManager.table.options.groupDblTap(e, self.getComponent()); - }else{ - - dblTap = setTimeout(function(){ - clearTimeout(dblTap); - dblTap = null; - }, 300); - } - - }); - } - - - if (self.groupManager.table.options.groupTapHold){ - - tapHold = null; - - self.element.addEventListener("touchstart", function(e){ - clearTimeout(tapHold); - - tapHold = setTimeout(function(){ - clearTimeout(tapHold); - tapHold = null; - tap = false; - self.groupManager.table.options.groupTapHold(e, self.getComponent()); - }, 1000); - - }); - - self.element.addEventListener("touchend", function(e){ - clearTimeout(tapHold); - tapHold = null; - }); - } - - - - if(self.groupManager.table.options.groupToggleElement){ - toggleElement = self.groupManager.table.options.groupToggleElement == "arrow" ? self.arrowElement : self.element; - - toggleElement.addEventListener("click", function(e){ - e.stopPropagation(); - e.stopImmediatePropagation(); - self.toggleVisibility(); - }); - } - -}; - - -Group.prototype._createGroup = function(groupID, level){ - var groupKey = level + "_" + groupID; - var group = new Group(this.groupManager, this, level, groupID, this.groupManager.groupIDLookups[level].field, this.groupManager.headerGenerator[level] || this.groupManager.headerGenerator[0], this.old ? this.old.groups[groupKey] : false); - - this.groups[groupKey] = group; - this.groupList.push(group); -}; - -Group.prototype._addRowToGroup = function(row){ - - var level = this.level + 1; - - if(this.hasSubGroups){ - var groupID = this.groupManager.groupIDLookups[level].func(row.getData()), - groupKey = level + "_" + groupID; - - if(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){ - if(this.groups[groupKey]){ - this.groups[groupKey].addRow(row); - } - }else{ - if(!this.groups[groupKey]){ - this._createGroup(groupID, level); - } - - this.groups[groupKey].addRow(row); - } - } -}; - -Group.prototype._addRow = function(row){ - this.rows.push(row); - row.modules.group = this; -}; - -Group.prototype.insertRow = function(row, to, after){ - var data = this.conformRowData({}); - - row.updateData(data); - - var toIndex = this.rows.indexOf(to); - - if(toIndex > -1){ - if(after){ - this.rows.splice(toIndex+1, 0, row); - }else{ - this.rows.splice(toIndex, 0, row); - } - }else{ - if(after){ - this.rows.push(row); - }else{ - this.rows.unshift(row); - } - } - - row.modules.group = this; - - this.generateGroupHeaderContents(); - - if(this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.options.columnCalcs != "table"){ - this.groupManager.table.modules.columnCalcs.recalcGroup(this); - } -}; - -Group.prototype.getRowIndex = function(row){ - -}; - -//update row data to match grouping contraints -Group.prototype.conformRowData = function(data){ - if(this.field){ - data[this.field] = this.key; - }else{ - console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"); - } - - if(this.parent){ - data = this.parent.conformRowData(data); - } - - return data; -}; - - - -Group.prototype.removeRow = function(row){ - var index = this.rows.indexOf(row); - - if(index > -1){ - this.rows.splice(index, 1); - } - - if(!this.rows.length){ - if(this.parent){ - this.parent.removeGroup(this); - }else{ - this.groupManager.removeGroup(this); - } - - this.groupManager.updateGroupRows(true); - }else{ - this.generateGroupHeaderContents(); - if(this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.options.columnCalcs != "table"){ - this.groupManager.table.modules.columnCalcs.recalcGroup(this); - } - } -}; - -Group.prototype.removeGroup = function(group){ - var groupKey = group.level + "_" + group.key, - index; - - if(this.groups[groupKey]){ - delete this.groups[groupKey]; - - index = this.groupList.indexOf(group); - - if(index > -1){ - this.groupList.splice(index, 1); - } - - if(!this.groupList.length){ - if(this.parent){ - this.parent.removeGroup(this); - }else{ - this.groupManager.removeGroup(this); - } - } - } -}; - -Group.prototype.getHeadersAndRows = function(){ - var output = []; - - output.push(this); - - this._visSet(); - - if(this.visible){ - - if(this.groupList.length){ - this.groupList.forEach(function(group){ - output = output.concat(group.getHeadersAndRows()); - }); - - }else{ - if(this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){ - this.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows); - output.push(this.calcs.top); - } - - output = output.concat(this.rows); - - if(this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){ - this.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows); - output.push(this.calcs.bottom); - } - } - }else{ - if(!this.groupList.length && this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.options.groupClosedShowCalcs){ - if(this.groupManager.table.modExists("columnCalcs")){ - if(this.groupManager.table.modules.columnCalcs.hasTopCalcs()){ - this.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows); - output.push(this.calcs.top); - } - - if(this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){ - this.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows); - output.push(this.calcs.bottom); - } - } - } - } - - return output; -}; - -Group.prototype.getData = function(visible, transform){ - var self = this, - output = []; - - this._visSet(); - - if(!visible || (visible && this.visible)){ - this.rows.forEach(function(row){ - output.push(row.getData(transform || "data")); - }); - } - - return output; -}; - -// Group.prototype.getRows = function(){ -// this._visSet(); - -// return this.visible ? this.rows : []; -// }; - -Group.prototype.getRowCount = function(){ - var count = 0; - - if(this.groupList.length){ - this.groupList.forEach(function(group){ - count += group.getRowCount(); - }); - }else{ - count = this.rows.length; - } - return count; -}; - -Group.prototype.toggleVisibility = function(){ - if(this.visible){ - this.hide(); - }else{ - this.show(); - } -}; - -Group.prototype.hide = function(){ - this.visible = false; - - if(this.groupManager.table.rowManager.getRenderMode() == "classic" && !this.groupManager.table.options.pagination){ - - this.element.classList.remove("tabulator-group-visible"); - - if(this.groupList.length){ - this.groupList.forEach(function(group){ - - var el; - - if(group.calcs.top){ - el = group.calcs.top.getElement(); - el.parentNode.removeChild(el); - } - - if(group.calcs.bottom){ - el = group.calcs.bottom.getElement(); - el.parentNode.removeChild(el); - } - - var rows = group.getHeadersAndRows(); - - rows.forEach(function(row){ - var rowEl = row.getElement(); - rowEl.parentNode.removeChild(rowEl); - }); - }); - - }else{ - this.rows.forEach(function(row){ - var rowEl = row.getElement(); - rowEl.parentNode.removeChild(rowEl); - }); - } - - this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex()); - - }else{ - this.groupManager.updateGroupRows(true); - } - - this.groupManager.table.options.groupVisibilityChanged.call(this.table, this.getComponent(), false); -}; - -Group.prototype.show = function(){ - var self = this; - - self.visible = true; - - if(this.groupManager.table.rowManager.getRenderMode() == "classic" && !this.groupManager.table.options.pagination){ - - this.element.classList.add("tabulator-group-visible"); - - var prev = self.getElement(); - - if(this.groupList.length){ - this.groupList.forEach(function(group){ - var rows = group.getHeadersAndRows(); - - rows.forEach(function(row){ - var rowEl = row.getElement(); - prev.parentNode.insertBefore(rowEl, prev.nextSibling); - row.initialize(); - prev = rowEl; - }); - }); - - }else{ - self.rows.forEach(function(row){ - var rowEl = row.getElement(); - prev.parentNode.insertBefore(rowEl, prev.nextSibling); - row.initialize(); - prev = rowEl; - }); - } - - this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex()); - }else{ - this.groupManager.updateGroupRows(true); - } - - this.groupManager.table.options.groupVisibilityChanged.call(this.table, this.getComponent(), true); -}; - -Group.prototype._visSet = function(){ - var data = []; - - if(typeof this.visible == "function"){ - - this.rows.forEach(function(row){ - data.push(row.getData()); - }); - - this.visible = this.visible(this.key, this.getRowCount(), data, this.getComponent()); - } -}; - -Group.prototype.getRowGroup = function(row){ - var match = false; - if(this.groupList.length){ - this.groupList.forEach(function(group){ - var result = group.getRowGroup(row); - - if(result){ - match = result; - } - }); - }else{ - if(this.rows.find(function(item){ - return item === row; - })){ - match = this; - } - } - - return match; -}; - -Group.prototype.getSubGroups = function(component){ - var output = []; - - this.groupList.forEach(function(child){ - output.push(component ? child.getComponent() : child); - }); - - return output; -}; - -Group.prototype.getRows = function(compoment){ - var output = []; - - this.rows.forEach(function(row){ - output.push(compoment ? row.getComponent() : row); - }); - - return output; -}; - -Group.prototype.generateGroupHeaderContents = function(){ - var data = []; - - this.rows.forEach(function(row){ - data.push(row.getData()); - }); - - this.elementContents = this.generator(this.key, this.getRowCount(), data, this.getComponent()); - - while(this.element.firstChild) this.element.removeChild(this.element.firstChild); - - if(typeof this.elementContents === "string"){ - this.element.innerHTML = this.elementContents; - }else{ - this.element.appendChild(this.elementContents); - } - - this.element.insertBefore(this.arrowElement, this.element.firstChild); -}; - -////////////// Standard Row Functions ////////////// - -Group.prototype.getElement = function(){ - this.addBindingsd = false; - - this._visSet(); - - - if(this.visible){ - this.element.classList.add("tabulator-group-visible"); - }else{ - this.element.classList.remove("tabulator-group-visible"); - } - - this.element.childNodes.forEach(function(child){ - child.parentNode.removeChild(child); - }); - - this.generateGroupHeaderContents(); - - // this.addBindings(); - - return this.element; -}; - -//normalize the height of elements in the row -Group.prototype.normalizeHeight = function(){ - this.setHeight(this.element.clientHeight); -}; - -Group.prototype.initialize = function(force){ - if(!this.initialized || force){ - this.normalizeHeight(); - this.initialized = true; - } -}; - -Group.prototype.reinitialize = function(){ - this.initialized = false; - this.height = 0; - - if(Tabulator.prototype.helpers.elVisible(this.element)){ - this.initialize(true); - } -}; - -Group.prototype.setHeight = function(height){ - if(this.height != height){ - this.height = height; - this.outerHeight = this.element.offsetHeight; - } -}; - -//return rows outer height -Group.prototype.getHeight = function(){ - return this.outerHeight; -}; - -Group.prototype.getGroup = function(){ - return this; -}; - -Group.prototype.reinitializeHeight = function(){ -}; -Group.prototype.calcHeight = function(){ -}; -Group.prototype.setCellHeight = function(){ -}; -Group.prototype.clearCellHeight = function(){ -}; - - -//////////////// Object Generation ///////////////// -Group.prototype.getComponent = function(){ - return new GroupComponent(this); -}; - -////////////////////////////////////////////////// -////////////// Group Row Extension /////////////// -////////////////////////////////////////////////// - -var GroupRows = function(table){ - - this.table = table; //hold Tabulator object - - this.groupIDLookups = false; //enable table grouping and set field to group by - this.startOpen = [function(){return false;}]; //starting state of group - this.headerGenerator = [function(){return "";}]; - this.groupList = []; //ordered list of groups - this.allowedValues = false; - this.groups = {}; //hold row groups - this.displayIndex = 0; //index in display pipeline -}; - -//initialize group configuration -GroupRows.prototype.initialize = function(){ - var self = this, - groupBy = self.table.options.groupBy, - startOpen = self.table.options.groupStartOpen, - groupHeader = self.table.options.groupHeader; - - this.allowedValues = self.table.options.groupValues; - - self.headerGenerator = [function(){return "";}]; - this.startOpen = [function(){return false;}]; //starting state of group - - self.table.modules.localize.bind("groups|item", function(langValue, lang){ - self.headerGenerator[0] = function(value, count, data){ //header layout function - return (typeof value === "undefined" ? "" : value) + "(" + count + " " + ((count === 1) ? langValue : lang.groups.items) + ")"; - }; - }); - - this.groupIDLookups = []; - - if(Array.isArray(groupBy) || groupBy){ - if(this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "table" && this.table.options.columnCalcs != "both"){ - this.table.modules.columnCalcs.removeCalcs(); - } - }else{ - if(this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "group"){ - - var cols = this.table.columnManager.getRealColumns(); - - cols.forEach(function(col){ - if(col.definition.topCalc){ - self.table.modules.columnCalcs.initializeTopRow(); - } - - if(col.definition.bottomCalc){ - self.table.modules.columnCalcs.initializeBottomRow(); - } - }); - } - } - - - - if(!Array.isArray(groupBy)){ - groupBy = [groupBy]; - } - - groupBy.forEach(function(group, i){ - var lookupFunc, column; - - if(typeof group == "function"){ - lookupFunc = group; - }else{ - column = self.table.columnManager.getColumnByField(group); - - if(column){ - lookupFunc = function(data){ - return column.getFieldValue(data); - }; - }else{ - lookupFunc = function(data){ - return data[group]; - }; - } - } - - self.groupIDLookups.push({ - field: typeof group === "function" ? false : group, - func:lookupFunc, - values:self.allowedValues ? self.allowedValues[i] : false, - }); - }); - - - - if(startOpen){ - - if(!Array.isArray(startOpen)){ - startOpen = [startOpen]; - } - - startOpen.forEach(function(level){ - level = typeof level == "function" ? level : function(){return true;}; - }); - - self.startOpen = startOpen; - } - - if(groupHeader){ - self.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader]; - } - - this.initialized = true; - -}; - -GroupRows.prototype.setDisplayIndex = function(index){ - this.displayIndex = index; -}; - -GroupRows.prototype.getDisplayIndex = function(){ - return this.displayIndex; -}; - - -//return appropriate rows with group headers -GroupRows.prototype.getRows = function(rows){ - if(this.groupIDLookups.length){ - - this.table.options.dataGrouping.call(this.table); - - this.generateGroups(rows); - - if(this.table.options.dataGrouped){ - this.table.options.dataGrouped.call(this.table, this.getGroups(true)); - } - - return this.updateGroupRows(); - - }else{ - return rows.slice(0); - } - -}; - -GroupRows.prototype.getGroups = function(compoment){ - var groupComponents = []; - - this.groupList.forEach(function(group){ - groupComponents.push(compoment ? group.getComponent() : group); - }); - - return groupComponents; -}; - -GroupRows.prototype.pullGroupListData = function(groupList) { - var self = this; - var groupListData = []; - - groupList.forEach( function(group) { - var groupHeader = {}; - groupHeader.level = 0; - groupHeader.rowCount = 0; - groupHeader.headerContent = ""; - var childData = []; - - if (group.hasSubGroups) { - childData = self.pullGroupListData(group.groupList); - - groupHeader.level = group.level; - groupHeader.rowCount = childData.length - group.groupList.length; // data length minus number of sub-headers - groupHeader.headerContent = group.generator(group.key, groupHeader.rowCount, group.rows, group); - - groupListData.push(groupHeader); - groupListData = groupListData.concat(childData); - } - - else { - groupHeader.level = group.level; - groupHeader.headerContent = group.generator(group.key, group.rows.length, group.rows, group); - groupHeader.rowCount = group.getRows().length; - - groupListData.push(groupHeader); - - group.getRows().forEach( function(row) { - groupListData.push(row.getData("data")); - }); - } - }); - - return groupListData -}; - -GroupRows.prototype.getGroupedData = function(){ - - return this.pullGroupListData(this.groupList); -}; - -GroupRows.prototype.getRowGroup = function(row){ - var match = false; - - this.groupList.forEach(function(group){ - var result = group.getRowGroup(row); - - if(result){ - match = result; - } - }); - - return match; -}; - -GroupRows.prototype.countGroups = function(){ - return this.groupList.length; -}; - -GroupRows.prototype.generateGroups = function(rows){ - var self = this, - oldGroups = self.groups; - - self.groups = {}; - self.groupList =[]; - - if(this.allowedValues && this.allowedValues[0]){ - this.allowedValues[0].forEach(function(value){ - self.createGroup(value, 0, oldGroups); - }); - - rows.forEach(function(row){ - self.assignRowToExistingGroup(row, oldGroups); - }); - }else{ - rows.forEach(function(row){ - self.assignRowToGroup(row, oldGroups); - }); - } - -}; - -GroupRows.prototype.createGroup = function(groupID, level, oldGroups){ - var groupKey = level + "_" + groupID, - group; - - oldGroups = oldGroups || []; - - group = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]); - - this.groups[groupKey] = group; - this.groupList.push(group); -}; - -GroupRows.prototype.assignRowToGroup = function(row, oldGroups){ - var groupID = this.groupIDLookups[0].func(row.getData()), - groupKey = "0_" + groupID; - - if(!this.groups[groupKey]){ - this.createGroup(groupID, 0, oldGroups); - } - - this.groups[groupKey].addRow(row); -}; - -GroupRows.prototype.assignRowToExistingGroup = function(row, oldGroups){ - var groupID = this.groupIDLookups[0].func(row.getData()), - groupKey = "0_" + groupID; - - if(this.groups[groupKey]){ - this.groups[groupKey].addRow(row); - } -}; - - -GroupRows.prototype.assignRowToGroup = function(row, oldGroups){ - var groupID = this.groupIDLookups[0].func(row.getData()), - newGroupNeeded = !this.groups["0_" + groupID]; - - if(newGroupNeeded){ - this.createGroup(groupID, 0, oldGroups); - } - - this.groups["0_" + groupID].addRow(row); - - return !newGroupNeeded; -}; - - - -GroupRows.prototype.updateGroupRows = function(force){ - var self = this, - output = [], - oldRowCount; - - self.groupList.forEach(function(group){ - output = output.concat(group.getHeadersAndRows()); - }); - - //force update of table display - if(force){ - - var displayIndex = self.table.rowManager.setDisplayRows(output, this.getDisplayIndex()); - - if(displayIndex !== true){ - this.setDisplayIndex(displayIndex); - } - - self.table.rowManager.refreshActiveData("group", true, true); - } - - return output; -}; - -GroupRows.prototype.scrollHeaders = function(left){ - this.groupList.forEach(function(group){ - group.arrowElement.style.marginLeft = left + "px"; - }); -}; - -GroupRows.prototype.removeGroup = function(group){ - var groupKey = group.level + "_" + group.key, - index; - - if(this.groups[groupKey]){ - delete this.groups[groupKey]; - - index = this.groupList.indexOf(group); - - if(index > -1){ - this.groupList.splice(index, 1); - } - } -}; - -Tabulator.prototype.registerModule("groupRows", GroupRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/history.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/history.js deleted file mode 100644 index 17be37623a..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/history.js +++ /dev/null @@ -1,135 +0,0 @@ -var History = function(table){ - this.table = table; //hold Tabulator object - - this.history = []; - this.index = -1; -}; - - -History.prototype.clear = function(){ - this.history = []; - this.index = -1; -}; - -History.prototype.action = function(type, component, data){ - - this.history = this.history.slice(0, this.index + 1); - - this.history.push({ - type:type, - component:component, - data:data, - }); - - this.index ++; -}; - -History.prototype.getHistoryUndoSize = function(){ - return this.index + 1; -}; - -History.prototype.getHistoryRedoSize = function(){ - return this.history.length - (this.index + 1); -}; - -History.prototype.undo = function(){ - - if(this.index > -1){ - let action = this.history[this.index]; - - this.undoers[action.type].call(this, action); - - this.index--; - - this.table.options.historyUndo.call(this.table, action.type, action.component.getComponent(), action.data); - - return true; - }else{ - console.warn("History Undo Error - No more history to undo"); - return false; - } -}; - -History.prototype.redo = function(){ - if(this.history.length-1 > this.index){ - - this.index++; - - let action = this.history[this.index]; - - this.redoers[action.type].call(this, action); - - this.table.options.historyRedo.call(this.table, action.type, action.component.getComponent(), action.data); - - return true; - }else{ - console.warn("History Redo Error - No more history to redo"); - return false; - } -}; - - -History.prototype.undoers = { - cellEdit: function(action){ - action.component.setValueProcessData(action.data.oldValue); - }, - - rowAdd: function(action){ - action.component.deleteActual(); - }, - - rowDelete: function(action){ - var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); - - this._rebindRow(action.component, newRow); - }, - - rowMove: function(action){ - this.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.pos], false); - this.table.rowManager.redraw(); - }, -}; - - -History.prototype.redoers = { - cellEdit: function(action){ - action.component.setValueProcessData(action.data.newValue); - }, - - rowAdd: function(action){ - var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); - - this._rebindRow(action.component, newRow); - }, - - rowDelete:function(action){ - action.component.deleteActual(); - }, - - rowMove: function(action){ - this.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.pos], false); - this.table.rowManager.redraw(); - }, -}; - -//rebind rows to new element after deletion -History.prototype._rebindRow = function(oldRow, newRow){ - this.history.forEach(function(action){ - if(action.component instanceof Row){ - if(action.component === oldRow){ - action.component = newRow; - } - }else if(action.component instanceof Cell){ - if(action.component.row === oldRow){ - var field = action.component.column.getField(); - - if(field){ - action.component = newRow.getCell(field); - } - - } - } - }); -}; - -Tabulator.prototype.registerModule("history", History); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/html_table_import.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/html_table_import.js deleted file mode 100644 index b841738d97..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/html_table_import.js +++ /dev/null @@ -1,196 +0,0 @@ -var HtmlTableImport = function(table){ - this.table = table; //hold Tabulator object - this.fieldIndex = []; - this.hasIndex = false; -}; - -HtmlTableImport.prototype.parseTable = function(){ - var self = this, - element = self.table.element, - options = self.table.options, - columns = options.columns, - headers = element.getElementsByTagName("th"), - rows = element.getElementsByTagName("tbody")[0], - data = [], - newTable; - - self.hasIndex = false; - - self.table.options.htmlImporting.call(this.table); - - rows = rows ? rows.getElementsByTagName("tr") : []; - - //check for tablator inline options - self._extractOptions(element, options); - - if(headers.length){ - self._extractHeaders(headers, rows); - }else{ - self._generateBlankHeaders(headers, rows); - } - - - //iterate through table rows and build data set - for(var index = 0; index < rows.length; index++){ - var row = rows[index], - cells = row.getElementsByTagName("td"), - item = {}; - - //create index if the dont exist in table - if(!self.hasIndex){ - item[options.index] = index; - } - - for(var i = 0; i < cells.length; i++){ - var cell = cells[i]; - if(typeof this.fieldIndex[i] !== "undefined"){ - item[this.fieldIndex[i]] = cell.innerHTML; - } - } - - //add row data to item - data.push(item); - } - - //create new element - var newElement = document.createElement("div"); - - //transfer attributes to new element - var attributes = element.attributes; - - // loop through attributes and apply them on div - - for(var i in attributes){ - if(typeof attributes[i] == "object"){ - newElement.setAttribute(attributes[i].name, attributes[i].value); - } - } - - // replace table with div element - element.parentNode.replaceChild(newElement, element); - - options.data = data; - - self.table.options.htmlImported.call(this.table); - - // // newElement.tabulator(options); - - this.table.element = newElement; -}; - -//extract tabulator attribute options -HtmlTableImport.prototype._extractOptions = function(element, options){ - var attributes = element.attributes; - - for(var index in attributes){ - var attrib = attributes[index]; - var name; - - if(typeof attrib == "object" && attrib.name && attrib.name.indexOf("tabulator-") === 0){ - name = attrib.name.replace("tabulator-", ""); - - for(var key in options){ - if(key.toLowerCase() == name){ - options[key] = this._attribValue(attrib.value); - } - } - } - } -}; - -//get value of attribute -HtmlTableImport.prototype._attribValue = function(value){ - if(value === "true"){ - return true; - } - - if(value === "false"){ - return false; - } - - return value; -}; - -//find column if it has already been defined -HtmlTableImport.prototype._findCol = function(title){ - var match = this.table.options.columns.find(function(column){ - return column.title === title; - }); - - return match || false; -}; - -//extract column from headers -HtmlTableImport.prototype._extractHeaders = function(headers, rows){ - for(var index = 0; index < headers.length; index++){ - var header = headers[index], - exists = false, - col = this._findCol(header.textContent), - width, attributes; - - if(col){ - exists = true; - }else{ - col = {title:header.textContent.trim()}; - } - - if(!col.field) { - col.field = header.textContent.trim().toLowerCase().replace(" ", "_"); - } - - width = header.getAttribute("width"); - - if(width && !col.width) { - col.width = width; - } - - //check for tablator inline options - attributes = header.attributes; - - // //check for tablator inline options - this._extractOptions(header, col); - - for(var i in attributes){ - var attrib = attributes[i], - name; - - if(typeof attrib == "object" && attrib.name && attrib.name.indexOf("tabulator-") === 0){ - - name = attrib.name.replace("tabulator-", ""); - - col[name] = this._attribValue(attrib.value); - } - } - - this.fieldIndex[index] = col.field; - - if(col.field == this.table.options.index){ - this.hasIndex = true; - } - - if(!exists){ - this.table.options.columns.push(col); - } - - } -}; - -//generate blank headers -HtmlTableImport.prototype._generateBlankHeaders = function(headers, rows){ - for(var index = 0; index < headers.length; index++){ - var header = headers[index], - col = {title:"", field:"col" + index}; - - this.fieldIndex[index] = col.field; - - var width = header.getAttribute("width"); - - if(width){ - col.width = width; - } - - this.table.options.columns.push(col); - } -}; - -Tabulator.prototype.registerModule("htmlTableImport", HtmlTableImport); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/keybindings.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/keybindings.js deleted file mode 100644 index 6dd3ca3560..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/keybindings.js +++ /dev/null @@ -1,355 +0,0 @@ -var Keybindings = function(table){ - this.table = table; //hold Tabulator object - this.watchKeys = null; - this.pressedKeys = null; - this.keyupBinding = false; - this.keydownBinding = false; -}; - -Keybindings.prototype.initialize = function(){ - var bindings = this.table.options.keybindings, - mergedBindings = {}; - - this.watchKeys = {}; - this.pressedKeys = []; - - if(bindings !== false){ - - for(let key in this.bindings){ - mergedBindings[key] = this.bindings[key]; - } - - if(Object.keys(bindings).length){ - - for(let key in bindings){ - mergedBindings[key] = bindings[key]; - } - } - - this.mapBindings(mergedBindings); - this.bindEvents(); - } -}; - -Keybindings.prototype.mapBindings = function(bindings){ - var self = this; - - for(let key in bindings){ - - if(this.actions[key]){ - - if(bindings[key]){ - - if(typeof bindings[key] !== "object"){ - bindings[key] = [bindings[key]]; - } - - bindings[key].forEach(function(binding){ - self.mapBinding(key, binding); - }); - } - - }else{ - console.warn("Key Binding Error - no such action:", key); - } - } -}; - -Keybindings.prototype.mapBinding = function(action, symbolsList){ - var self = this; - - var binding = { - action: this.actions[action], - keys: [], - ctrl: false, - shift: false, - }; - - var symbols = symbolsList.toString().toLowerCase().split(" ").join("").split("+"); - - symbols.forEach(function(symbol){ - switch(symbol){ - case "ctrl": - binding.ctrl = true; - break; - - case "shift": - binding.shift = true; - break; - - default: - symbol = parseInt(symbol); - binding.keys.push(symbol); - - if(!self.watchKeys[symbol]){ - self.watchKeys[symbol] = []; - } - - self.watchKeys[symbol].push(binding); - } - }); -}; - -Keybindings.prototype.bindEvents = function(){ - var self = this; - - this.keyupBinding = function(e){ - var code = e.keyCode; - var bindings = self.watchKeys[code]; - - if(bindings){ - - self.pressedKeys.push(code); - - bindings.forEach(function(binding){ - self.checkBinding(e, binding); - }); - } - }; - - this.keydownBinding = function(e){ - var code = e.keyCode; - var bindings = self.watchKeys[code]; - - if(bindings){ - - var index = self.pressedKeys.indexOf(code); - - if(index > -1){ - self.pressedKeys.splice(index, 1); - } - } - }; - - this.table.element.addEventListener("keydown", this.keyupBinding); - - this.table.element.addEventListener("keyup", this.keydownBinding); -}; - -Keybindings.prototype.clearBindings = function(){ - if(this.keyupBinding){ - this.table.element.removeEventListener("keydown", this.keyupBinding); - } - - if(this.keydownBinding){ - this.table.element.removeEventListener("keyup", this.keydownBinding); - } -}; - - -Keybindings.prototype.checkBinding = function(e, binding){ - var self = this, - match = true; - - if(e.ctrlKey == binding.ctrl && e.shiftKey == binding.shift){ - binding.keys.forEach(function(key){ - var index = self.pressedKeys.indexOf(key); - - if(index == -1){ - match = false; - } - }); - - if(match){ - binding.action.call(self, e); - } - - return true; - } - - return false; -}; - -//default bindings -Keybindings.prototype.bindings = { - navPrev:"shift + 9", - navNext:9, - navUp:38, - navDown:40, - scrollPageUp:33, - scrollPageDown:34, - scrollToStart:36, - scrollToEnd:35, - undo:"ctrl + 90", - redo:"ctrl + 89", - copyToClipboard:"ctrl + 67", -}; - -//default actions -Keybindings.prototype.actions = { - keyBlock:function(e){ - e.stopPropagation(); - e.preventDefault(); - }, - scrollPageUp:function(e){ - var rowManager = this.table.rowManager, - newPos = rowManager.scrollTop - rowManager.height, - scrollMax = rowManager.element.scrollHeight; - - e.preventDefault(); - - if(rowManager.displayRowsCount){ - if(newPos >= 0){ - rowManager.element.scrollTop = newPos; - }else{ - rowManager.scrollToRow(rowManager.getDisplayRows()[0]); - } - } - - this.table.element.focus(); - }, - scrollPageDown:function(e){ - var rowManager = this.table.rowManager, - newPos = rowManager.scrollTop + rowManager.height, - scrollMax = rowManager.element.scrollHeight; - - e.preventDefault(); - - if(rowManager.displayRowsCount){ - if(newPos <= scrollMax){ - rowManager.element.scrollTop = newPos; - }else{ - rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]); - } - } - - this.table.element.focus(); - - }, - scrollToStart:function(e){ - var rowManager = this.table.rowManager; - - e.preventDefault(); - - if(rowManager.displayRowsCount){ - rowManager.scrollToRow(rowManager.getDisplayRows()[0]); - } - - this.table.element.focus(); - }, - scrollToEnd:function(e){ - var rowManager = this.table.rowManager; - - e.preventDefault(); - - if(rowManager.displayRowsCount){ - rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]); - } - - this.table.element.focus(); - }, - navPrev:function(e){ - var cell = false; - - if(this.table.modExists("edit")){ - cell = this.table.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - cell.nav().prev(); - } - } - }, - - navNext:function(e){ - var cell = false; - - if(this.table.modExists("edit")){ - cell = this.table.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - cell.nav().next(); - } - } - }, - - navLeft:function(e){ - var cell = false; - - if(this.table.modExists("edit")){ - cell = this.table.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - cell.nav().left(); - } - } - }, - - navRight:function(e){ - var cell = false; - - if(this.table.modExists("edit")){ - cell = this.table.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - cell.nav().right(); - } - } - }, - - navUp:function(e){ - var cell = false; - - if(this.table.modExists("edit")){ - cell = this.table.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - cell.nav().up(); - } - } - }, - - navDown:function(e){ - var cell = false; - - if(this.table.modExists("edit")){ - cell = this.table.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - cell.nav().down(); - } - } - }, - - undo:function(e){ - var cell = false; - if(this.table.options.history && this.table.modExists("history") && this.table.modExists("edit")){ - - cell = this.table.modules.edit.currentCell; - - if(!cell){ - e.preventDefault(); - this.table.modules.history.undo(); - } - } - }, - - redo:function(e){ - var cell = false; - if(this.table.options.history && this.table.modExists("history") && this.table.modExists("edit")){ - - cell = this.table.modules.edit.currentCell; - - if(!cell){ - e.preventDefault(); - this.table.modules.history.redo(); - } - } - }, - - copyToClipboard:function(e){ - if(!this.table.modules.edit.currentCell){ - if(this.table.modExists("clipboard", true)){ - this.table.modules.clipboard.copy(!this.table.options.selectable || this.table.options.selectable == "highlight" ? "active" : "selected", null, null, null, true); - } - } - }, -}; - - -Tabulator.prototype.registerModule("keybindings", Keybindings); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/layout.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/layout.js deleted file mode 100644 index 8242659722..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/layout.js +++ /dev/null @@ -1,225 +0,0 @@ -var Layout = function(table){ - this.table = table; - this.mode = null; -}; - -//initialize layout system -Layout.prototype.initialize = function(layout){ - - if(this.modes[layout]){ - this.mode = layout; - }else{ - console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : " + layout); - this.mode = 'fitData'; - } - - this.table.element.setAttribute("tabulator-layout", this.mode); -}; - -Layout.prototype.getMode = function(){ - return this.mode; -}; - -//trigger table layout -Layout.prototype.layout = function(){ - this.modes[this.mode].call(this, this.table.columnManager.columnsByIndex); -}; - -//layout render functions -Layout.prototype.modes = { - - //resize columns to fit data the contain - "fitData": function(columns){ - columns.forEach(function(column){ - column.reinitializeWidth(); - }); - - if(this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)){ - this.table.modules.responsiveLayout.update(); - } - }, - - //resize columns to fit data the contain - "fitDataFill": function(columns){ - columns.forEach(function(column){ - column.reinitializeWidth(); - }); - - if(this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)){ - this.table.modules.responsiveLayout.update(); - } - }, - - //resize columns to fit - "fitColumns": function(columns){ - var self = this; - - var totalWidth = self.table.element.clientWidth; //table element width - var fixedWidth = 0; //total width of columns with a defined width - var flexWidth = 0; //total width available to flexible columns - var flexGrowUnits = 0; //total number of widthGrow blocks accross all columns - var flexColWidth = 0; //desired width of flexible columns - var flexColumns = []; //array of flexible width columns - var fixedShrinkColumns = []; //array of fixed width columns that can shrink - var flexShrinkUnits = 0; //total number of widthShrink blocks accross all columns - var overflowWidth = 0; //horizontal overflow width - var gapFill=0; //number of pixels to be added to final column to close and half pixel gaps - - function calcWidth(width){ - var colWidth; - - if(typeof(width) == "string"){ - if(width.indexOf("%") > -1){ - colWidth = (totalWidth / 100) * parseInt(width); - }else{ - colWidth = parseInt(width); - } - }else{ - colWidth = width; - } - - return colWidth; - } - - //ensure columns resize to take up the correct amount of space - function scaleColumns(columns, freeSpace, colWidth, shrinkCols){ - - var oversizeCols = [], - oversizeSpace = 0, - remainingSpace = 0, - nextColWidth = 0, - gap = 0, - changeUnits = 0, - undersizeCols = []; - - function calcGrow(col){ - return (colWidth * (col.column.definition.widthGrow || 1)); - } - - function calcShrink(col){ - return (calcWidth(col.width) - (colWidth * (col.column.definition.widthShrink || 0))) - } - - columns.forEach(function(col, i){ - var width = shrinkCols ? calcShrink(col) : calcGrow(col); - if(col.column.minWidth >= width){ - oversizeCols.push(col); - }else{ - undersizeCols.push(col); - changeUnits += shrinkCols ? (col.column.definition.widthShrink || 1) : (col.column.definition.widthGrow || 1); - } - }); - - if(oversizeCols.length){ - oversizeCols.forEach(function(col){ - oversizeSpace += shrinkCols ? col.width - col.column.minWidth : col.column.minWidth; - col.width = col.column.minWidth; - }); - - remainingSpace = freeSpace - oversizeSpace; - - nextColWidth = changeUnits ? Math.floor(remainingSpace/changeUnits) : remainingSpace; - - gap = remainingSpace - (nextColWidth * changeUnits); - - gap += scaleColumns(undersizeCols, remainingSpace, nextColWidth, shrinkCols); - }else{ - gap = changeUnits ? freeSpace - (Math.floor(freeSpace/changeUnits) * changeUnits) : freeSpace; - - undersizeCols.forEach(function(column){ - column.width = shrinkCols ? calcShrink(column) : calcGrow(column); - }); - } - - return gap; - } - - - if(this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)){ - this.table.modules.responsiveLayout.update(); - } - - //adjust for vertical scrollbar if present - if(this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight){ - totalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth; - } - - columns.forEach(function(column){ - var width, minWidth, colWidth; - - if(column.visible){ - - width = column.definition.width; - minWidth = parseInt(column.minWidth); - - if(width){ - - colWidth = calcWidth(width); - - fixedWidth += colWidth > minWidth ? colWidth : minWidth; - - if(column.definition.widthShrink){ - fixedShrinkColumns.push({ - column:column, - width:colWidth > minWidth ? colWidth : minWidth - }); - flexShrinkUnits += column.definition.widthShrink; - } - - }else{ - flexColumns.push({ - column:column, - width:0, - }); - flexGrowUnits += column.definition.widthGrow || 1; - } - } - }); - - - //calculate available space - flexWidth = totalWidth - fixedWidth; - - //calculate correct column size - flexColWidth = Math.floor(flexWidth / flexGrowUnits) - - //generate column widths - var gapFill = scaleColumns(flexColumns, flexWidth, flexColWidth, false); - - //increase width of last column to account for rounding errors - if(flexColumns.length && gapFill > 0){ - flexColumns[flexColumns.length-1].width += + gapFill; - } - - //caculate space for columns to be shrunk into - flexColumns.forEach(function(col){ - flexWidth -= col.width; - }) - - overflowWidth = Math.abs(gapFill) + flexWidth; - - - //shrink oversize columns if there is no available space - if(overflowWidth > 0 && flexShrinkUnits){ - gapFill = scaleColumns(fixedShrinkColumns, overflowWidth, Math.floor(overflowWidth / flexShrinkUnits), true); - } - - //decrease width of last column to account for rounding errors - if(fixedShrinkColumns.length){ - fixedShrinkColumns[fixedShrinkColumns.length-1].width -= gapFill; - } - - - flexColumns.forEach(function(col){ - col.column.setWidth(col.width); - }); - - fixedShrinkColumns.forEach(function(col){ - col.column.setWidth(col.width); - }); - - }, -}; - - -Tabulator.prototype.registerModule("layout", Layout); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/localize.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/localize.js deleted file mode 100644 index f066525449..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/localize.js +++ /dev/null @@ -1,196 +0,0 @@ -var Localize = function(table){ - this.table = table; //hold Tabulator object - this.locale = "default"; //current locale - this.lang = false; //current language - this.bindings = {}; //update events to call when locale is changed -}; - -//set header placehoder -Localize.prototype.setHeaderFilterPlaceholder = function(placeholder){ - this.langs.default.headerFilters.default = placeholder; -}; - -//set header filter placeholder by column -Localize.prototype.setHeaderFilterColumnPlaceholder = function(column, placeholder){ - this.langs.default.headerFilters.columns[column] = placeholder; - - if(this.lang && !this.lang.headerFilters.columns[column]){ - this.lang.headerFilters.columns[column] = placeholder; - } -}; - -//setup a lang description object -Localize.prototype.installLang = function(locale, lang){ - if(this.langs[locale]){ - this._setLangProp(this.langs[locale], lang); - }else{ - this.langs[locale] = lang; - } -}; - -Localize.prototype._setLangProp = function(lang, values){ - for(let key in values){ - if(lang[key] && typeof lang[key] == "object"){ - this._setLangProp(lang[key], values[key]) - }else{ - lang[key] = values[key]; - } - } -}; - - -//set current locale -Localize.prototype.setLocale = function(desiredLocale){ - var self = this; - - desiredLocale = desiredLocale || "default"; - - //fill in any matching languge values - function traverseLang(trans, path){ - for(var prop in trans){ - - if(typeof trans[prop] == "object"){ - if(!path[prop]){ - path[prop] = {}; - } - traverseLang(trans[prop], path[prop]); - }else{ - path[prop] = trans[prop]; - } - } - } - - //determing correct locale to load - if(desiredLocale === true && navigator.language){ - //get local from system - desiredLocale = navigator.language.toLowerCase(); - } - - if(desiredLocale){ - - //if locale is not set, check for matching top level locale else use default - if(!self.langs[desiredLocale]){ - let prefix = desiredLocale.split("-")[0]; - - if(self.langs[prefix]){ - console.warn("Localization Error - Exact matching locale not found, using closest match: ", desiredLocale, prefix); - desiredLocale = prefix; - }else{ - console.warn("Localization Error - Matching locale not found, using default: ", desiredLocale); - desiredLocale = "default"; - } - } - } - - self.locale = desiredLocale; - - //load default lang template - self.lang = Tabulator.prototype.helpers.deepClone(self.langs.default || {}); - - if(desiredLocale != "default"){ - traverseLang(self.langs[desiredLocale], self.lang); - } - - self.table.options.localized.call(self.table, self.locale, self.lang); - - self._executeBindings(); -}; - -//get current locale -Localize.prototype.getLocale = function(locale){ - return self.locale; -}; - -//get lang object for given local or current if none provided -Localize.prototype.getLang = function(locale){ - return locale ? this.langs[locale] : this.lang; -}; - -//get text for current locale -Localize.prototype.getText = function(path, value){ - var path = value ? path + "|" + value : path, - pathArray = path.split("|"), - text = this._getLangElement(pathArray, this.locale); - - // if(text === false){ - // console.warn("Localization Error - Matching localized text not found for given path: ", path); - // } - - return text || ""; -}; - -//traverse langs object and find localized copy -Localize.prototype._getLangElement = function(path, locale){ - var self = this; - var root = self.lang; - - path.forEach(function(level){ - var rootPath; - - if(root){ - rootPath = root[level]; - - if(typeof rootPath != "undefined"){ - root = rootPath; - }else{ - root = false; - } - } - }); - - return root; -}; - -//set update binding -Localize.prototype.bind = function(path, callback){ - if(!this.bindings[path]){ - this.bindings[path] = []; - } - - this.bindings[path].push(callback); - - callback(this.getText(path), this.lang); -}; - -//itterate through bindings and trigger updates -Localize.prototype._executeBindings = function(){ - var self = this; - - for(let path in self.bindings){ - self.bindings[path].forEach(function(binding){ - binding(self.getText(path), self.lang); - }); - } -}; - -//Localized text listings -Localize.prototype.langs = { - "default":{ //hold default locale text - "groups":{ - "item":"item", - "items":"items", - }, - "columns":{ - }, - "ajax":{ - "loading":"Loading", - "error":"Error", - }, - "pagination":{ - "first":"First", - "first_title":"First Page", - "last":"Last", - "last_title":"Last Page", - "prev":"Prev", - "prev_title":"Prev Page", - "next":"Next", - "next_title":"Next Page", - }, - "headerFilters":{ - "default":"filter column...", - "columns":{} - } - }, -}; - -Tabulator.prototype.registerModule("localize", Localize); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/moveable_columns.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/moveable_columns.js deleted file mode 100644 index 9891b8bed2..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/moveable_columns.js +++ /dev/null @@ -1,195 +0,0 @@ -var MoveColumns = function(table){ - this.table = table; //hold Tabulator object - this.placeholderElement = this.createPlaceholderElement(); - this.hoverElement = false; //floating column header element - this.checkTimeout = false; //click check timeout holder - this.checkPeriod = 250; //period to wait on mousedown to consider this a move and not a click - this.moving = false; //currently moving column - this.toCol = false; //destination column - this.toColAfter = false; //position of moving column relative to the desitnation column - this.startX = 0; //starting position within header element - this.autoScrollMargin = 40; //auto scroll on edge when within margin - this.autoScrollStep = 5; //auto scroll distance in pixels - this.autoScrollTimeout = false; //auto scroll timeout - - this.moveHover = this.moveHover.bind(this); - this.endMove = this.endMove.bind(this); -}; - -MoveColumns.prototype.createPlaceholderElement = function(){ - var el = document.createElement("div"); - - el.classList.add("tabulator-col"); - el.classList.add("tabulator-col-placeholder"); - - return el; -}; - -MoveColumns.prototype.initializeColumn = function(column){ - var self = this, - config = {}, - colEl; - - if(!column.modules.frozen){ - - colEl = column.getElement(); - - config.mousemove = function(e){ - if(column.parent === self.moving.parent){ - if(((e.pageX - Tabulator.prototype.helpers.elOffset(colEl).left) + self.table.columnManager.element.scrollLeft) > (column.getWidth() / 2)){ - if(self.toCol !== column || !self.toColAfter){ - colEl.parentNode.insertBefore(self.placeholderElement, colEl.nextSibling); - self.moveColumn(column, true); - } - }else{ - if(self.toCol !== column || self.toColAfter){ - colEl.parentNode.insertBefore(self.placeholderElement, colEl); - self.moveColumn(column, false); - } - } - } - }.bind(self); - - colEl.addEventListener("mousedown", function(e){ - if(e.which === 1){ - self.checkTimeout = setTimeout(function(){ - self.startMove(e, column); - }, self.checkPeriod); - } - }); - - colEl.addEventListener("mouseup", function(e){ - if(e.which === 1){ - if(self.checkTimeout){ - clearTimeout(self.checkTimeout); - } - } - }); - } - - column.modules.moveColumn = config; -}; - -MoveColumns.prototype.startMove = function(e, column){ - var element = column.getElement(); - - - this.moving = column; - this.startX = e.pageX - Tabulator.prototype.helpers.elOffset(element).left; - - this.table.element.classList.add("tabulator-block-select"); - - //create placeholder - - this.placeholderElement.style.width = column.getWidth() + "px"; - this.placeholderElement.style.height = column.getHeight() + "px"; - - element.parentNode.insertBefore(this.placeholderElement, element); - element.parentNode.removeChild(element); - - //create hover element - this.hoverElement = element.cloneNode(true); - this.hoverElement.classList.add("tabulator-moving"); - - this.table.columnManager.getElement().appendChild(this.hoverElement); - - this.hoverElement.style.left = "0"; - this.hoverElement.style.bottom = "0"; - - this._bindMouseMove(); - - document.body.addEventListener("mousemove", this.moveHover); - document.body.addEventListener("mouseup", this.endMove); - - this.moveHover(e); -}; - -MoveColumns.prototype._bindMouseMove = function(){ - this.table.columnManager.columnsByIndex.forEach(function(column){ - if(column.modules.moveColumn.mousemove){ - column.getElement().addEventListener("mousemove", column.modules.moveColumn.mousemove); - } - }); -}; - -MoveColumns.prototype._unbindMouseMove = function(){ - this.table.columnManager.columnsByIndex.forEach(function(column){ - if(column.modules.moveColumn.mousemove){ - column.getElement().removeEventListener("mousemove", column.modules.moveColumn.mousemove); - } - }); -}; - -MoveColumns.prototype.moveColumn = function(column, after){ - var movingCells = this.moving.getCells(); - - this.toCol = column; - this.toColAfter = after; - - if(after){ - column.getCells().forEach(function(cell, i){ - var cellEl = cell.getElement(); - cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling); - }); - }else{ - column.getCells().forEach(function(cell, i){ - var cellEl = cell.getElement(); - cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl); - }); - } -}; - -MoveColumns.prototype.endMove = function(e){ - if(e.which === 1){ - this._unbindMouseMove(); - - this.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling); - this.placeholderElement.parentNode.removeChild(this.placeholderElement); - this.hoverElement.parentNode.removeChild(this.hoverElement); - - this.table.element.classList.remove("tabulator-block-select"); - - if(this.toCol){ - this.table.columnManager.moveColumn(this.moving, this.toCol, this.toColAfter); - } - - this.moving = false; - this.toCol = false; - this.toColAfter = false; - - document.body.removeEventListener("mousemove", this.moveHover); - document.body.removeEventListener("mouseup", this.endMove); - } -}; - -MoveColumns.prototype.moveHover = function(e){ - var self = this, - columnHolder = self.table.columnManager.getElement(), - scrollLeft = columnHolder.scrollLeft, - xPos = (e.pageX - Tabulator.prototype.helpers.elOffset(columnHolder).left) + scrollLeft, - scrollPos; - - self.hoverElement.style.left = (xPos - self.startX) + "px"; - - if(xPos - scrollLeft < self.autoScrollMargin){ - if(!self.autoScrollTimeout){ - self.autoScrollTimeout = setTimeout(function(){ - scrollPos = Math.max(0,scrollLeft-5); - self.table.rowManager.getElement().scrollLeft = scrollPos; - self.autoScrollTimeout = false; - }, 1); - } - } - - if(scrollLeft + columnHolder.clientWidth - xPos < self.autoScrollMargin){ - if(!self.autoScrollTimeout){ - self.autoScrollTimeout = setTimeout(function(){ - scrollPos = Math.min(columnHolder.clientWidth, scrollLeft+5); - self.table.rowManager.getElement().scrollLeft = scrollPos; - self.autoScrollTimeout = false; - }, 1); - } - } -}; - -Tabulator.prototype.registerModule("moveColumn", MoveColumns); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/moveable_rows.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/moveable_rows.js deleted file mode 100644 index 2477e6fdd3..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/moveable_rows.js +++ /dev/null @@ -1,460 +0,0 @@ -var MoveRows = function(table){ - - this.table = table; //hold Tabulator object - this.placeholderElement = this.createPlaceholderElement(); - this.hoverElement = false; //floating row header element - this.checkTimeout = false; //click check timeout holder - this.checkPeriod = 150; //period to wait on mousedown to consider this a move and not a click - this.moving = false; //currently moving row - this.toRow = false; //destination row - this.toRowAfter = false; //position of moving row relative to the desitnation row - this.hasHandle = false; //row has handle instead of fully movable row - this.startY = 0; //starting Y position within header element - this.startX = 0; //starting X position within header element - - this.moveHover = this.moveHover.bind(this); - this.endMove = this.endMove.bind(this); - this.tableRowDropEvent = false; - - this.connection = false; - this.connections = []; - - this.connectedTable = false; - this.connectedRow = false; -}; - -MoveRows.prototype.createPlaceholderElement = function(){ - var el = document.createElement("div"); - - el.classList.add("tabulator-row"); - el.classList.add("tabulator-row-placeholder"); - - return el; -}; - - -MoveRows.prototype.initialize = function(handle){ - this.connection = this.table.options.movableRowsConnectedTables; -}; - -MoveRows.prototype.setHandle = function(handle){ - this.hasHandle = handle; -}; - -MoveRows.prototype.initializeRow = function(row){ - var self = this, - config = {}, - rowEl; - - //inter table drag drop - config.mouseup = function(e){ - self.tableRowDrop(e, row); - }.bind(self); - - //same table drag drop - config.mousemove = function(e){ - if(((e.pageY - Tabulator.prototype.helpers.elOffset(row.element).top) + self.table.rowManager.element.scrollTop) > (row.getHeight() / 2)){ - if(self.toRow !== row || !self.toRowAfter){ - var rowEl = row.getElement(); - rowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling); - self.moveRow(row, true); - } - }else{ - if(self.toRow !== row || self.toRowAfter){ - var rowEl = row.getElement(); - rowEl.parentNode.insertBefore(self.placeholderElement, rowEl); - self.moveRow(row, false); - } - } - }.bind(self); - - - if(!this.hasHandle){ - - rowEl = row.getElement(); - - rowEl.addEventListener("mousedown", function(e){ - if(e.which === 1){ - self.checkTimeout = setTimeout(function(){ - self.startMove(e, row); - }, self.checkPeriod); - } - }); - - rowEl.addEventListener("mouseup", function(e){ - if(e.which === 1){ - if(self.checkTimeout){ - clearTimeout(self.checkTimeout); - } - } - }); - } - - row.modules.moveRow = config; -}; - -MoveRows.prototype.initializeCell = function(cell){ - var self = this, - cellEl = cell.getElement(); - - cellEl.addEventListener("mousedown", function(e){ - if(e.which === 1){ - self.checkTimeout = setTimeout(function(){ - self.startMove(e, cell.row); - }, self.checkPeriod); - } - }); - - cellEl.addEventListener("mouseup", function(e){ - if(e.which === 1){ - if(self.checkTimeout){ - clearTimeout(self.checkTimeout); - } - } - }); -}; - -MoveRows.prototype._bindMouseMove = function(){ - var self = this; - - self.table.rowManager.getDisplayRows().forEach(function(row){ - if(row.type === "row" && row.modules.moveRow.mousemove){ - row.getElement().addEventListener("mousemove", row.modules.moveRow.mousemove); - } - }); -}; - -MoveRows.prototype._unbindMouseMove = function(){ - var self = this; - - self.table.rowManager.getDisplayRows().forEach(function(row){ - if(row.type === "row" && row.modules.moveRow.mousemove){ - row.getElement().removeEventListener("mousemove", row.modules.moveRow.mousemove); - } - }); -}; - -MoveRows.prototype.startMove = function(e, row){ - var element = row.getElement(); - - this.setStartPosition(e, row); - - this.moving = row; - - this.table.element.classList.add("tabulator-block-select"); - - //create placeholder - this.placeholderElement.style.width = row.getWidth() + "px"; - this.placeholderElement.style.height = row.getHeight() + "px"; - - if(!this.connection){ - element.parentNode.insertBefore(this.placeholderElement, element); - element.parentNode.removeChild(element); - }else{ - this.table.element.classList.add("tabulator-movingrow-sending"); - this.connectToTables(row); - } - - //create hover element - this.hoverElement = element.cloneNode(true); - this.hoverElement.classList.add("tabulator-moving"); - - if(this.connection){ - document.body.appendChild(this.hoverElement); - this.hoverElement.style.left = "0"; - this.hoverElement.style.top = "0"; - this.hoverElement.style.width = this.table.element.clientWidth + "px"; - this.hoverElement.style.whiteSpace = "nowrap"; - this.hoverElement.style.overflow = "hidden"; - this.hoverElement.style.pointerEvents = "none"; - }else{ - this.table.rowManager.getTableElement().appendChild(this.hoverElement); - - this.hoverElement.style.left = "0"; - this.hoverElement.style.top = "0"; - - this._bindMouseMove(); - } - - document.body.addEventListener("mousemove", this.moveHover); - document.body.addEventListener("mouseup", this.endMove); - - this.moveHover(e); -}; - - -MoveRows.prototype.setStartPosition = function(e, row){ - var element, position; - - element = row.getElement(); - if(this.connection){ - position = element.getBoundingClientRect(); - - this.startX = position.left - e.pageX + window.scrollX; - this.startY = position.top - e.pageY + window.scrollY; - }else{ - this.startY = (e.pageY - element.getBoundingClientRect().top); - } -}; - -MoveRows.prototype.endMove = function(e){ - if(!e || e.which === 1){ - this._unbindMouseMove(); - - if(!this.connection){ - this.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling); - this.placeholderElement.parentNode.removeChild(this.placeholderElement); - } - - this.hoverElement.parentNode.removeChild(this.hoverElement); - - this.table.element.classList.remove("tabulator-block-select"); - - if(this.toRow){ - this.table.rowManager.moveRow(this.moving, this.toRow, this.toRowAfter); - } - - this.moving = false; - this.toRow = false; - this.toRowAfter = false; - - document.body.removeEventListener("mousemove", this.moveHover); - document.body.removeEventListener("mouseup", this.endMove); - - if(this.connection){ - this.table.element.classList.remove("tabulator-movingrow-sending"); - this.disconnectFromTables(); - } - } -}; - -MoveRows.prototype.moveRow = function(row, after){ - this.toRow = row; - this.toRowAfter = after; -}; - -MoveRows.prototype.moveHover = function(e){ - if(this.connection){ - this.moveHoverConnections.call(this, e); - }else{ - this.moveHoverTable.call(this, e); - } -}; - -MoveRows.prototype.moveHoverTable = function(e){ - var rowHolder = this.table.rowManager.getElement(), - scrollTop = rowHolder.scrollTop, - yPos = (e.pageY - rowHolder.getBoundingClientRect().top) + scrollTop, - scrollPos; - - this.hoverElement.style.top = (yPos - this.startY) + "px"; -}; - - -MoveRows.prototype.moveHoverConnections = function(e){ - this.hoverElement.style.left = (this.startX + e.pageX) + "px"; - this.hoverElement.style.top = (this.startY + e.pageY) + "px"; -}; - - -//establish connection with other tables -MoveRows.prototype.connectToTables = function(row){ - var self = this, - connections = this.table.modules.comms.getConnections(this.connection); - - this.table.options.movableRowsSendingStart.call(this.table, connections); - - this.table.modules.comms.send(this.connection, "moveRow", "connect", { - row:row, - }); -}; - - -//disconnect from other tables -MoveRows.prototype.disconnectFromTables = function(){ - var self = this, - connections = this.table.modules.comms.getConnections(this.connection); - - this.table.options.movableRowsSendingStop.call(this.table, connections); - - this.table.modules.comms.send(this.connection, "moveRow", "disconnect"); -}; - - -//accept incomming connection -MoveRows.prototype.connect = function(table, row){ - var self = this; - if(!this.connectedTable){ - this.connectedTable = table; - this.connectedRow = row; - - this.table.element.classList.add("tabulator-movingrow-receiving"); - - self.table.rowManager.getDisplayRows().forEach(function(row){ - if(row.type === "row" && row.modules.moveRow && row.modules.moveRow.mouseup){ - row.getElement().addEventListener("mouseup", row.modules.moveRow.mouseup); - } - }); - - self.tableRowDropEvent = self.tableRowDrop.bind(self); - - self.table.element.addEventListener("mouseup", self.tableRowDropEvent); - - this.table.options.movableRowsReceivingStart.call(this.table, row, table); - - return true; - }else{ - console.warn("Move Row Error - Table cannot accept connection, already connected to table:", this.connectedTable); - return false; - } -}; - -//close incomming connection -MoveRows.prototype.disconnect = function(table){ - var self = this; - if(table === this.connectedTable){ - this.connectedTable = false; - this.connectedRow = false; - - this.table.element.classList.remove("tabulator-movingrow-receiving"); - - self.table.rowManager.getDisplayRows().forEach(function(row){ - if(row.type === "row" && row.modules.moveRow && row.modules.moveRow.mouseup){ - row.getElement().removeEventListener("mouseup", row.modules.moveRow.mouseup); - } - }); - - self.table.element.removeEventListener("mouseup", self.tableRowDropEvent); - - this.table.options.movableRowsReceivingStop.call(this.table, table); - }else{ - console.warn("Move Row Error - trying to disconnect from non connected table") - } -}; - -MoveRows.prototype.dropComplete = function(table, row, success){ - var sender = false; - - if(success){ - - switch(typeof this.table.options.movableRowsSender){ - case "string": - sender = this.senders[this.table.options.movableRowsSender]; - break; - - case "function": - sender = this.table.options.movableRowsSender; - break; - } - - if(sender){ - sender.call(this, this.moving.getComponent(), row ? row.getComponent() : undefined, table) - }else{ - if(this.table.options.movableRowsSender){ - console.warn("Mover Row Error - no matching sender found:", this.table.options.movableRowsSender); - } - } - - this.table.options.movableRowsSent.call(this.table, this.moving.getComponent(), row ? row.getComponent() : undefined, table); - - }else{ - this.table.options.movableRowsSentFailed.call(this.table, this.moving.getComponent(), row ? row.getComponent() : undefined, table); - } - - this.endMove(); - -}; - - -MoveRows.prototype.tableRowDrop = function(e, row){ - var receiver = false, - success = false; - - e.stopImmediatePropagation(); - - switch(typeof this.table.options.movableRowsReceiver){ - case "string": - receiver = this.receivers[this.table.options.movableRowsReceiver]; - break; - - case "function": - receiver = this.table.options.movableRowsReceiver; - break; - } - - if(receiver){ - success = receiver.call(this, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable) - }else{ - console.warn("Mover Row Error - no matching receiver found:", this.table.options.movableRowsReceiver) - } - - if(success){ - this.table.options.movableRowsReceived.call(this.table, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); - }else{ - this.table.options.movableRowsReceivedFailed.call(this.table, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); - } - - this.table.modules.comms.send(this.connectedTable, "moveRow", "dropcomplete", { - row:row, - success:success, - }); -}; - - - -MoveRows.prototype.receivers = { - insert:function(fromRow, toRow, fromTable){ - this.table.addRow(fromRow.getData(), undefined, toRow); - return true; - }, - - add:function(fromRow, toRow, fromTable){ - this.table.addRow(fromRow.getData()); - return true; - }, - - update:function(fromRow, toRow, fromTable){ - if(toRow){ - toRow.update(fromRow.getData()); - return true; - } - - return false; - }, - - replace:function(fromRow, toRow, fromTable){ - if(toRow){ - this.table.addRow(fromRow.getData(), undefined, toRow); - toRow.delete(); - return true; - } - - return false; - }, -}; - -MoveRows.prototype.senders = { - delete:function(fromRow, toRow, toTable){ - fromRow.delete(); - } -}; - - -MoveRows.prototype.commsReceived = function(table, action, data){ - switch(action){ - case "connect": - return this.connect(table, data.row); - break; - - case "disconnect": - return this.disconnect(table); - break; - - case "dropcomplete": - return this.dropComplete(table, data.row, data.success); - break; - } -}; - - -Tabulator.prototype.registerModule("moveRow", MoveRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/mutator.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/mutator.js deleted file mode 100644 index b6044ba5aa..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/mutator.js +++ /dev/null @@ -1,110 +0,0 @@ -var Mutator = function(table){ - this.table = table; //hold Tabulator object - this.allowedTypes = ["", "data", "edit", "clipboard"]; //list of muatation types - this.enabled = true; -}; - -//initialize column mutator -Mutator.prototype.initializeColumn = function(column){ - var self = this, - match = false, - config = {}; - - this.allowedTypes.forEach(function(type){ - var key = "mutator" + (type.charAt(0).toUpperCase() + type.slice(1)), - mutator; - - if(column.definition[key]){ - mutator = self.lookupMutator(column.definition[key]); - - if(mutator){ - match = true; - - config[key] = { - mutator:mutator, - params: column.definition[key + "Params"] || {}, - }; - } - } - }); - - if(match){ - column.modules.mutate = config; - } -}; - -Mutator.prototype.lookupMutator = function(value){ - var mutator = false; - - //set column mutator - switch(typeof value){ - case "string": - if(this.mutators[value]){ - mutator = this.mutators[value]; - }else{ - console.warn("Mutator Error - No such mutator found, ignoring: ", value); - } - break; - - case "function": - mutator = value; - break; - } - - return mutator; -}; - -//apply mutator to row -Mutator.prototype.transformRow = function(data, type, update){ - var self = this, - key = "mutator" + (type.charAt(0).toUpperCase() + type.slice(1)), - value; - - if(this.enabled){ - - self.table.columnManager.traverse(function(column){ - var mutator, params, component; - - if(column.modules.mutate){ - mutator = column.modules.mutate[key] || column.modules.mutate.mutator || false; - - if(mutator){ - value = column.getFieldValue(data); - - if(!update || (update && typeof value !== "undefined")){ - component = column.getComponent(); - params = typeof mutator.params === "function" ? mutator.params(value, data, type, component) : mutator.params; - column.setFieldValue(data, mutator.mutator(value, data, type, params, component)); - } - } - } - }); - } - - return data; -}; - -//apply mutator to new cell value -Mutator.prototype.transformCell = function(cell, value){ - var mutator = cell.column.modules.mutate.mutatorEdit || cell.column.modules.mutate.mutator || false; - - if(mutator){ - return mutator.mutator(value, cell.row.getData(), "edit", mutator.params, cell.getComponent()); - }else{ - return value; - } -}; - -Mutator.prototype.enable = function(){ - this.enabled = true; -}; - -Mutator.prototype.disable = function(){ - this.enabled = false; -}; - - -//default mutators -Mutator.prototype.mutators = {}; - -Tabulator.prototype.registerModule("mutator", Mutator); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/page.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/page.js deleted file mode 100644 index 5ff005f2f2..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/page.js +++ /dev/null @@ -1,532 +0,0 @@ -var Page = function(table){ - - this.table = table; //hold Tabulator object - - this.mode = "local"; - this.progressiveLoad = false; - - this.size = 0; - this.page = 1; - this.count = 5; - this.max = 1; - - this.displayIndex = 0; //index in display pipeline - - this.createElements(); -}; - -Page.prototype.createElements = function(){ - - var button; - - this.element = document.createElement("span"); - this.element.classList.add("tabulator-paginator"); - - this.pagesElement = document.createElement("span"); - this.pagesElement.classList.add("tabulator-pages"); - - button = document.createElement("button"); - button.classList.add("tabulator-page"); - button.setAttribute("type", "button"); - button.setAttribute("role", "button"); - button.setAttribute("aria-label", ""); - button.setAttribute("title", ""); - - this.firstBut = button.cloneNode(true); - this.firstBut.setAttribute("data-page", "first"); - - this.prevBut = button.cloneNode(true); - this.prevBut.setAttribute("data-page", "prev"); - - this.nextBut = button.cloneNode(true); - this.nextBut.setAttribute("data-page", "next"); - - this.lastBut = button.cloneNode(true); - this.lastBut.setAttribute("data-page", "last"); -}; - -//setup pageination -Page.prototype.initialize = function(hidden){ - var self = this; - - //update param names - for(let key in self.table.options.paginationDataSent){ - self.paginationDataSentNames[key] = self.table.options.paginationDataSent[key]; - } - - for(let key in self.table.options.paginationDataReceived){ - self.paginationDataReceivedNames[key] = self.table.options.paginationDataReceived[key]; - } - - //build pagination element - - //bind localizations - self.table.modules.localize.bind("pagination|first", function(value){ - self.firstBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|first_title", function(value){ - self.firstBut.setAttribute("aria-label", value); - self.firstBut.setAttribute("title", value); - }); - - self.table.modules.localize.bind("pagination|prev", function(value){ - self.prevBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|prev_title", function(value){ - self.prevBut.setAttribute("aria-label", value); - self.prevBut.setAttribute("title", value); - }); - - self.table.modules.localize.bind("pagination|next", function(value){ - self.nextBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|next_title", function(value){ - self.nextBut.setAttribute("aria-label", value); - self.nextBut.setAttribute("title", value); - }); - - self.table.modules.localize.bind("pagination|last", function(value){ - self.lastBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|last_title", function(value){ - self.lastBut.setAttribute("aria-label", value); - self.lastBut.setAttribute("title", value); - }); - - //click bindings - self.firstBut.addEventListener("click", function(){ - self.setPage(1); - }); - - self.prevBut.addEventListener("click", function(){ - self.previousPage(); - }); - - self.nextBut.addEventListener("click", function(){ - self.nextPage().then(()=>{}).catch(()=>{}); - }); - - self.lastBut.addEventListener("click", function(){ - self.setPage(self.max); - }); - - if(self.table.options.paginationElement){ - self.element = self.table.options.paginationElement; - } - - //append to DOM - self.element.appendChild(self.firstBut); - self.element.appendChild(self.prevBut); - self.element.appendChild(self.pagesElement); - self.element.appendChild(self.nextBut); - self.element.appendChild(self.lastBut); - - if(!self.table.options.paginationElement && !hidden){ - self.table.footerManager.append(self.element, self); - } - - //set default values - self.mode = self.table.options.pagination; - self.size = self.table.options.paginationSize || Math.floor(self.table.rowManager.getElement().clientHeight / 24); - self.count = self.table.options.paginationButtonCount; -}; - -Page.prototype.initializeProgressive = function(mode){ - this.initialize(true); - this.mode = "progressive_" + mode; - this.progressiveLoad = true; -}; - -Page.prototype.setDisplayIndex = function(index){ - this.displayIndex = index; -}; - -Page.prototype.getDisplayIndex = function(){ - return this.displayIndex; -}; - - -//calculate maximum page from number of rows -Page.prototype.setMaxRows = function(rowCount){ - if(!rowCount){ - this.max = 1; - }else{ - this.max = Math.ceil(rowCount/this.size); - } - - if(this.page > this.max){ - this.page = this.max; - } -}; - -//reset to first page without triggering action -Page.prototype.reset = function(force){ - if(this.mode == "local" || force){ - this.page = 1; - } - return true; -}; - -//set the maxmum page -Page.prototype.setMaxPage = function(max){ - this.max = max || 1; - - if(this.page > this.max){ - this.page = this.max; - this.trigger(); - } -}; - -//set current page number -Page.prototype.setPage = function(page){ - return new Promise((resolve, reject)=>{ - if(page > 0 && page <= this.max){ - this.page = page; - this.trigger() - .then(()=>{ - resolve(); - }) - .catch(()=>{ - reject(); - }); - }else{ - console.warn("Pagination Error - Requested page is out of range of 1 - " + this.max + ":", page); - reject(); - } - }); -}; - -Page.prototype.setPageSize = function(size){ - if(size > 0){ - this.size = size; - } -}; - - -//setup the pagination buttons -Page.prototype._setPageButtons = function(){ - var self = this; - - let leftSize = Math.floor((this.count-1) / 2); - let rightSize = Math.ceil((this.count-1) / 2); - let min = this.max - this.page + leftSize + 1 < this.count ? this.max-this.count+1: Math.max(this.page-leftSize,1); - let max = this.page <= rightSize? Math.min(this.count, this.max) :Math.min(this.page+rightSize, this.max); - - while(self.pagesElement.firstChild) self.pagesElement.removeChild(self.pagesElement.firstChild); - - if(self.page == 1){ - self.firstBut.disabled = true; - self.prevBut.disabled = true; - }else{ - self.firstBut.disabled = false; - self.prevBut.disabled = false; - } - - if(self.page == self.max){ - self.lastBut.disabled = true; - self.nextBut.disabled = true; - }else{ - self.lastBut.disabled = false; - self.nextBut.disabled = false; - } - - for(let i = min; i <= max; i++){ - if(i>0 && i <= self.max){ - self.pagesElement.appendChild(self._generatePageButton(i)); - } - } - - this.footerRedraw(); -}; - -Page.prototype._generatePageButton = function(page){ - var self = this, - button = document.createElement("button"); - - button.classList.add("tabulator-page"); - if(page == self.page){ - button.classList.add("active"); - } - - button.setAttribute("type", "button"); - button.setAttribute("role", "button"); - button.setAttribute("aria-label", "Show Page " + page); - button.setAttribute("title", "Show Page " + page); - button.setAttribute("data-page", page); - button.textContent = page; - - button.addEventListener("click", function(e){ - self.setPage(page); - }); - - return button; -}; - -//previous page -Page.prototype.previousPage = function(){ - return new Promise((resolve, reject)=>{ - if(this.page > 1){ - this.page--; - this.trigger() - .then(()=>{ - resolve(); - }) - .catch(()=>{ - reject(); - }); - }else{ - console.warn("Pagination Error - Previous page would be less than page 1:", 0); - reject() - } - }); -}; - -//next page -Page.prototype.nextPage = function(){ - return new Promise((resolve, reject)=>{ - if(this.page < this.max){ - this.page++; - this.trigger() - .then(()=>{ - resolve(); - }) - .catch(()=>{ - reject(); - }); - }else{ - if(!this.progressiveLoad){ - console.warn("Pagination Error - Next page would be greater than maximum page of " + this.max + ":", this.max + 1); - } - reject(); - } - }); -}; - -//return current page number -Page.prototype.getPage = function(){ - return this.page; -}; - -//return max page number -Page.prototype.getPageMax = function(){ - return this.max; -}; - -Page.prototype.getPageSize = function(size){ - return this.size; -}; - -Page.prototype.getMode = function(){ - return this.mode; -}; - -//return appropriate rows for current page -Page.prototype.getRows = function(data){ - var output, start, end; - - if(this.mode == "local"){ - output = []; - start = this.size * (this.page - 1); - end = start + parseInt(this.size); - - this._setPageButtons(); - - for(let i = start; i < end; i++){ - if(data[i]){ - output.push(data[i]); - } - } - - return output; - }else{ - - this._setPageButtons(); - - return data.slice(0); - } -}; - -Page.prototype.trigger = function(){ - var left; - - return new Promise((resolve, reject)=>{ - - switch(this.mode){ - case "local": - left = this.table.rowManager.scrollLeft; - - this.table.rowManager.refreshActiveData("page"); - this.table.rowManager.scrollHorizontal(left); - - this.table.options.pageLoaded.call(this.table, this.getPage()); - resolve(); - break; - - case "remote": - case "progressive_load": - case "progressive_scroll": - this.table.modules.ajax.blockActiveRequest(); - this._getRemotePage() - .then(()=>{ - resolve(); - }) - .catch(()=>{ - reject(); - }); - break; - - default: - console.warn("Pagination Error - no such pagination mode:", this.mode); - reject(); - } - }); -}; - -Page.prototype._getRemotePage = function(){ - var self = this, - oldParams, pageParams; - - - return new Promise((resolve, reject)=>{ - - if(!self.table.modExists("ajax", true)){ - reject() - } - - //record old params and restore after request has been made - oldParams = Tabulator.prototype.helpers.deepClone(self.table.modules.ajax.getParams() || {}); - pageParams = self.table.modules.ajax.getParams(); - - //configure request params - pageParams[this.paginationDataSentNames.page] = self.page; - - //set page size if defined - if(this.size){ - pageParams[this.paginationDataSentNames.size] = this.size; - } - - //set sort data if defined - if(this.table.options.ajaxSorting && this.table.modExists("sort")){ - let sorters = self.table.modules.sort.getSort(); - - sorters.forEach(function(item){ - delete item.column; - }); - - pageParams[this.paginationDataSentNames.sorters] = sorters; - } - - //set filter data if defined - if(this.table.options.ajaxFiltering && this.table.modExists("filter")){ - let filters = self.table.modules.filter.getFilters(true, true); - pageParams[this.paginationDataSentNames.filters] = filters; - } - - self.table.modules.ajax.setParams(pageParams); - - self.table.modules.ajax.sendRequest(this.progressiveLoad) - .then((data)=>{ - self._parseRemoteData(data); - resolve(); - }) - .catch((e)=>{reject()}); - - self.table.modules.ajax.setParams(oldParams); - }); -}; - - - -Page.prototype._parseRemoteData = function(data){ - var self = this, - left, data, margin; - - if(typeof data[this.paginationDataReceivedNames.last_page] === "undefined"){ - console.warn("Remote Pagination Error - Server response missing '" + this.paginationDataReceivedNames.last_page + "' property"); - } - - if(data[this.paginationDataReceivedNames.data]){ - this.max = parseInt(data[this.paginationDataReceivedNames.last_page]) || 1; - - if(this.progressiveLoad){ - switch(this.mode){ - case "progressive_load": - this.table.rowManager.addRows(data[this.paginationDataReceivedNames.data]); - if(this.page < this.max){ - setTimeout(function(){ - self.nextPage().then(()=>{}).catch(()=>{}); - }, self.table.options.ajaxProgressiveLoadDelay); - } - break; - - case "progressive_scroll": - data = this.table.rowManager.getData().concat(data[this.paginationDataReceivedNames.data]); - - this.table.rowManager.setData(data, true); - - margin = this.table.options.ajaxProgressiveLoadScrollMargin || (this.table.rowManager.element.clientHeight * 2); - - if(self.table.rowManager.element.scrollHeight <= (self.table.rowManager.element.clientHeight + margin)){ - self.nextPage().then(()=>{}).catch(()=>{}); - } - break; - } - }else{ - left = this.table.rowManager.scrollLeft; - - this.table.rowManager.setData(data[this.paginationDataReceivedNames.data]); - - this.table.rowManager.scrollHorizontal(left); - - this.table.columnManager.scrollHorizontal(left); - - this.table.options.pageLoaded.call(this.table, this.getPage()); - } - - }else{ - console.warn("Remote Pagination Error - Server response missing '" + this.paginationDataReceivedNames.data + "' property"); - } - -}; - - - - -//handle the footer element being redrawn -Page.prototype.footerRedraw = function(){ - var footer = this.table.footerManager.element; - - if((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){ - this.pagesElement.style.display = 'none'; - }else{ - this.pagesElement.style.display = ''; - - if((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){ - this.pagesElement.style.display = 'none'; - } - } -}; - -//set the paramter names for pagination requests -Page.prototype.paginationDataSentNames = { - "page":"page", - "size":"size", - "sorters":"sorters", - // "sort_dir":"sort_dir", - "filters":"filters", - // "filter_value":"filter_value", - // "filter_type":"filter_type", -}; - -//set the property names for pagination responses -Page.prototype.paginationDataReceivedNames = { - "current_page":"current_page", - "last_page":"last_page", - "data":"data", -}; - -Tabulator.prototype.registerModule("page", Page); diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/persistence.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/persistence.js deleted file mode 100644 index 41baf9ada3..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/persistence.js +++ /dev/null @@ -1,208 +0,0 @@ -var Persistence = function(table){ - this.table = table; //hold Tabulator object - this.mode = ""; - this.id = ""; - this.persistProps = ["field", "width", "visible"]; -}; - -//setup parameters -Persistence.prototype.initialize = function(mode, id){ - //determine persistent layout storage type - this.mode = mode !== true ? mode : (typeof window.localStorage !== 'undefined' ? "local" : "cookie"); - - //set storage tag - this.id = "tabulator-" + (id || (this.table.element.getAttribute("id") || "")); -}; - -//load saved definitions -Persistence.prototype.load = function(type, current){ - - var data = this.retreiveData(type); - - if(current){ - data = data ? this.mergeDefinition(current, data) : current; - } - - return data; -}; - -//retreive data from memory -Persistence.prototype.retreiveData = function(type){ - var data = "", - id = this.id + (type === "columns" ? "" : "-" + type); - - switch(this.mode){ - case "local": - data = localStorage.getItem(id); - break; - - case "cookie": - - //find cookie - let cookie = document.cookie, - cookiePos = cookie.indexOf(id + "="), - end; - - //if cookie exists, decode and load column data into tabulator - if(cookiePos > -1){ - cookie = cookie.substr(cookiePos); - - end = cookie.indexOf(";"); - - if(end > -1){ - cookie = cookie.substr(0, end); - } - - data = cookie.replace(id + "=", ""); - } - break; - - default: - console.warn("Persistance Load Error - invalid mode selected", this.mode); - } - - return data ? JSON.parse(data) : false; -}; - -//merge old and new column defintions -Persistence.prototype.mergeDefinition = function(oldCols, newCols){ - var self = this, - output = []; - - // oldCols = oldCols || []; - newCols = newCols || []; - - newCols.forEach(function(column, to){ - - var from = self._findColumn(oldCols, column); - - if(from){ - - from.width = column.width; - from.visible = column.visible; - - if(from.columns){ - from.columns = self.mergeDefinition(from.columns, column.columns); - } - - output.push(from); - } - - }); - oldCols.forEach(function (column, i) { - var from = self._findColumn(newCols, column); - if (!from) { - if(output.length>i){ - output.splice(i, 0, column); - }else{ - output.push(column); - } - } - }); - - return output; -}; - -//find matching columns -Persistence.prototype._findColumn = function(columns, subject){ - var type = subject.columns ? "group" : (subject.field ? "field" : "object"); - - return columns.find(function(col){ - switch(type){ - case "group": - return col.title === subject.title && col.columns.length === subject.columns.length; - break; - - case "field": - return col.field === subject.field; - break; - - case "object": - return col === subject; - break; - } - }); -}; - -//save data -Persistence.prototype.save = function(type){ - var data = {}; - - - switch(type){ - case "columns": - data = this.parseColumns(this.table.columnManager.getColumns()) - break; - - case "filter": - data = this.table.modules.filter.getFilters(); - break; - - case "sort": - data = this.validateSorters(this.table.modules.sort.getSort()); - break; - } - - var id = this.id + (type === "columns" ? "" : "-" + type); - - this.saveData(id, data); -}; - -//ensure sorters contain no function data -Persistence.prototype.validateSorters = function(data){ - data.forEach(function(item){ - item.column = item.field; - delete item.field; - }); - - return data; -}; - -//save data to chosed medium -Persistence.prototype.saveData = function(id, data){ - - data = JSON.stringify(data); - - switch(this.mode){ - case "local": - localStorage.setItem(id, data); - break; - - case "cookie": - let expireDate = new Date(); - expireDate.setDate(expireDate.getDate() + 10000); - - //save cookie - document.cookie = id + "=" + data + "; expires=" + expireDate.toUTCString(); - break; - - default: - console.warn("Persistance Save Error - invalid mode selected", this.mode); - } -}; - -//build premission list -Persistence.prototype.parseColumns = function(columns){ - var self = this, - definitions = []; - - columns.forEach(function(column){ - var def = {}; - - if(column.isGroup){ - def.title = column.getDefinition().title; - def.columns = self.parseColumns(column.getColumns()); - }else{ - def.title = column.getDefinition().title; - def.field = column.getField(); - def.width = column.getWidth(); - def.visible = column.visible; - } - - definitions.push(def); - }); - - return definitions; -}; - -Tabulator.prototype.registerModule("persistence", Persistence); diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/resize_columns.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/resize_columns.js deleted file mode 100644 index a74f101fec..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/resize_columns.js +++ /dev/null @@ -1,147 +0,0 @@ -var ResizeColumns = function(table){ - this.table = table; //hold Tabulator object - this.startColumn = false; - this.startX = false; - this.startWidth = false; - this.handle = null; - this.prevHandle = null; -}; - -ResizeColumns.prototype.initializeColumn = function(type, column, element){ - var self = this, - variableHeight =false, - mode = this.table.options.resizableColumns; - - //set column resize mode - if(type === "header"){ - variableHeight = column.definition.formatter == "textarea" || column.definition.variableHeight; - column.modules.resize = {variableHeight:variableHeight}; - } - - if(mode === true || mode == type){ - - var handle = document.createElement('div'); - handle.className = "tabulator-col-resize-handle"; - - - var prevHandle = document.createElement('div'); - prevHandle.className = "tabulator-col-resize-handle prev"; - - handle.addEventListener("click", function(e){ - e.stopPropagation(); - }); - - handle.addEventListener("mousedown", function(e){ - var nearestColumn = column.getLastColumn(); - - if(nearestColumn && self._checkResizability(nearestColumn)){ - self.startColumn = column; - self._mouseDown(e, nearestColumn); - } - }); - - //reszie column on double click - handle.addEventListener("dblclick", function(e){ - if(self._checkResizability(column)){ - column.reinitializeWidth(true); - } - }); - - - prevHandle.addEventListener("click", function(e){ - e.stopPropagation(); - }); - - prevHandle.addEventListener("mousedown", function(e){ - var nearestColumn, colIndex, prevColumn; - - nearestColumn = column.getFirstColumn(); - - if(nearestColumn){ - colIndex = self.table.columnManager.findColumnIndex(nearestColumn); - prevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false; - - if(prevColumn && self._checkResizability(prevColumn)){ - self.startColumn = column; - self._mouseDown(e, prevColumn); - } - } - }); - - //resize column on double click - prevHandle.addEventListener("dblclick", function(e){ - var nearestColumn, colIndex, prevColumn; - - nearestColumn = column.getFirstColumn(); - - if(nearestColumn){ - colIndex = self.table.columnManager.findColumnIndex(nearestColumn); - prevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false; - - if(prevColumn && self._checkResizability(prevColumn)){ - prevColumn.reinitializeWidth(true); - } - } - }); - - element.appendChild(handle); - element.appendChild(prevHandle); - } -}; - - -ResizeColumns.prototype._checkResizability = function(column){ - return typeof column.definition.resizable != "undefined" ? column.definition.resizable : this.table.options.resizableColumns; -}; - -ResizeColumns.prototype._mouseDown = function(e, column){ - var self = this; - - self.table.element.classList.add("tabulator-block-select"); - - function mouseMove(e){ - column.setWidth(self.startWidth + (e.screenX - self.startX)); - - if(!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight){ - column.checkCellHeights(); - } - } - - function mouseUp(e){ - - //block editor from taking action while resizing is taking place - if(self.startColumn.modules.edit){ - self.startColumn.modules.edit.blocked = false; - } - - if(self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight){ - column.checkCellHeights(); - } - - document.body.removeEventListener("mouseup", mouseUp); - document.body.removeEventListener("mousemove", mouseMove); - - self.table.element.classList.remove("tabulator-block-select"); - - if(self.table.options.persistentLayout && self.table.modExists("persistence", true)){ - self.table.modules.persistence.save("columns"); - } - - self.table.options.columnResized.call(self.table, self.startColumn.getComponent()); - } - - e.stopPropagation(); //prevent resize from interfereing with movable columns - - //block editor from taking action while resizing is taking place - if(self.startColumn.modules.edit){ - self.startColumn.modules.edit.blocked = true; - } - - self.startX = e.screenX; - self.startWidth = column.getWidth(); - - document.body.addEventListener("mousemove", mouseMove); - document.body.addEventListener("mouseup", mouseUp); -}; - -Tabulator.prototype.registerModule("resizeColumns", ResizeColumns); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/resize_rows.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/resize_rows.js deleted file mode 100644 index d95b313eb7..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/resize_rows.js +++ /dev/null @@ -1,85 +0,0 @@ -var ResizeRows = function(table){ - this.table = table; //hold Tabulator object - this.startColumn = false; - this.startY = false; - this.startHeight = false; - this.handle = null; - this.prevHandle = null; -}; - -ResizeRows.prototype.initializeRow = function(row){ - var self = this, - rowEl = row.getElement(); - - var handle = document.createElement('div'); - handle.className = "tabulator-row-resize-handle"; - - var prevHandle = document.createElement('div'); - prevHandle.className = "tabulator-row-resize-handle prev"; - - handle.addEventListener("click", function(e){ - e.stopPropagation(); - }); - - handle.addEventListener("mousedown", function(e){ - self.startRow = row; - self._mouseDown(e, row); - }); - - prevHandle.addEventListener("click", function(e){ - e.stopPropagation(); - }); - - prevHandle.addEventListener("mousedown", function(e){ - var prevRow = self.table.rowManager.prevDisplayRow(row); - - if(prevRow){ - self.startRow = prevRow; - self._mouseDown(e, prevRow); - } - }); - - rowEl.appendChild(handle); - rowEl.appendChild(prevHandle); -}; - -ResizeRows.prototype._mouseDown = function(e, row){ - var self = this; - - self.table.element.classList.add("tabulator-block-select"); - - function mouseMove(e){ - row.setHeight(self.startHeight + (e.screenY - self.startY)); - } - - function mouseUp(e){ - - // //block editor from taking action while resizing is taking place - // if(self.startColumn.modules.edit){ - // self.startColumn.modules.edit.blocked = false; - // } - - document.body.removeEventListener("mouseup", mouseMove); - document.body.removeEventListener("mousemove", mouseMove); - - self.table.element.classList.remove("tabulator-block-select"); - - self.table.options.rowResized.call(this.table, row.getComponent()); - } - - e.stopPropagation(); //prevent resize from interfereing with movable columns - - //block editor from taking action while resizing is taking place - // if(self.startColumn.modules.edit){ - // self.startColumn.modules.edit.blocked = true; - // } - - self.startY = e.screenY; - self.startHeight = row.getHeight(); - - document.body.addEventListener("mousemove", mouseMove); - - document.body.addEventListener("mouseup", mouseUp); -}; - -Tabulator.prototype.registerModule("resizeRows", ResizeRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/resize_table.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/resize_table.js deleted file mode 100644 index 6c019f6043..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/resize_table.js +++ /dev/null @@ -1,36 +0,0 @@ -var ResizeTable = function(table){ - this.table = table; //hold Tabulator object - this.binding = false; - this.observer = false; -}; - -ResizeTable.prototype.initialize = function(row){ - var table = this.table, - observer; - - if(typeof ResizeObserver !== "undefined" && table.rowManager.getRenderMode() === "virtual"){ - this.observer = new ResizeObserver(function(entry){ - table.redraw(); - }); - - this.observer.observe(table.element); - }else{ - this.binding = function(){ - table.redraw(); - }; - - window.addEventListener("resize", this.binding); - } -}; - -ResizeTable.prototype.clearBindings = function(row){ - if(this.binding){ - window.removeEventListener("resize", this.binding); - } - - if(this.observer){ - this.observer.unobserve(this.table.element); - } -}; - -Tabulator.prototype.registerModule("resizeTable", ResizeTable); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/responsive_layout.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/responsive_layout.js deleted file mode 100644 index db3748177f..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/responsive_layout.js +++ /dev/null @@ -1,242 +0,0 @@ -var ResponsiveLayout = function(table){ - this.table = table; //hold Tabulator object - this.columns = []; - this.hiddenColumns = []; - this.mode = ""; - this.index = 0; - this.collapseFormatter = []; - this.collapseStartOpen = true; -}; - -//generate resposive columns list -ResponsiveLayout.prototype.initialize = function(){ - var self = this, - columns = []; - - this.mode = this.table.options.responsiveLayout; - this.collapseFormatter = this.table.options.responsiveLayoutCollapseFormatter || this.formatCollapsedData; - this.collapseStartOpen = this.table.options.responsiveLayoutCollapseStartOpen; - this.hiddenColumns = []; - - //detemine level of responsivity for each column - this.table.columnManager.columnsByIndex.forEach(function(column, i){ - if(column.modules.responsive){ - if(column.modules.responsive.order && column.modules.responsive.visible){ - column.modules.responsive.index = i; - columns.push(column); - - if(!column.visible && self.mode === "collapse"){ - self.hiddenColumns.push(column); - } - } - } - }); - - //sort list by responsivity - columns = columns.reverse(); - columns = columns.sort(function(a, b){ - var diff = b.modules.responsive.order - a.modules.responsive.order; - return diff || (b.modules.responsive.index - a.modules.responsive.index); - }); - - this.columns = columns; - - if(this.mode === "collapse"){ - this.generateCollapsedContent(); - } -}; - -//define layout information -ResponsiveLayout.prototype.initializeColumn = function(column){ - var def = column.getDefinition(); - - column.modules.responsive = {order: typeof def.responsive === "undefined" ? 1 : def.responsive, visible:def.visible === false ? false : true}; -}; - -ResponsiveLayout.prototype.layoutRow = function(row){ - var rowEl = row.getElement(), - el = document.createElement("div"); - - el.classList.add("tabulator-responsive-collapse"); - - if(!rowEl.classList.contains("tabulator-calcs")){ - row.modules.responsiveLayout = { - element:el, - }; - - if(!this.collapseStartOpen){ - el.style.display = 'none'; - } - - rowEl.appendChild(el); - - this.generateCollapsedRowContent(row); - } -}; - -//update column visibility -ResponsiveLayout.prototype.updateColumnVisibility = function(column, visible){ - var index; - if(column.modules.responsive){ - column.modules.responsive.visible = visible; - this.initialize(); - } -}; - -ResponsiveLayout.prototype.hideColumn = function(column){ - column.hide(false, true); - - if(this.mode === "collapse"){ - this.hiddenColumns.unshift(column); - this.generateCollapsedContent(); - } -}; - -ResponsiveLayout.prototype.showColumn = function(column){ - var index; - - column.show(false, true); - //set column width to prevent calculation loops on uninitialized columns - column.setWidth(column.getWidth()); - - if(this.mode === "collapse"){ - index = this.hiddenColumns.indexOf(column); - - if(index > -1){ - this.hiddenColumns.splice(index, 1); - } - - this.generateCollapsedContent(); - } -}; - -//redraw columns to fit space -ResponsiveLayout.prototype.update = function(){ - var self = this, - working = true; - - while(working){ - - let width = self.table.modules.layout.getMode() == "fitColumns" ? self.table.columnManager.getFlexBaseWidth() : self.table.columnManager.getWidth(); - - let diff = self.table.columnManager.element.clientWidth - width; - - if(diff < 0){ - //table is too wide - let column = self.columns[self.index]; - - if(column){ - self.hideColumn(column); - self.index ++; - }else{ - working = false; - } - - }else{ - - //table has spare space - let column = self.columns[self.index -1]; - - if(column){ - if(diff > 0){ - if(diff >= column.getWidth()){ - self.showColumn(column); - self.index --; - }else{ - working = false; - } - }else{ - working = false; - } - }else{ - working = false; - } - } - - if(!self.table.rowManager.activeRowsCount){ - self.table.rowManager.renderEmptyScroll(); - } - } -}; - -ResponsiveLayout.prototype.generateCollapsedContent = function(){ - var self = this, - rows = this.table.rowManager.getDisplayRows(); - - rows.forEach(function(row){ - self.generateCollapsedRowContent(row); - }); -}; - -ResponsiveLayout.prototype.generateCollapsedRowContent = function(row){ - var el, contents; - - if(row.modules.responsiveLayout){ - el = row.modules.responsiveLayout.element; - - while(el.firstChild) el.removeChild(el.firstChild); - - contents = this.collapseFormatter(this.generateCollapsedRowData(row)); - - if(contents){ - el.appendChild(contents); - } - } -}; - -ResponsiveLayout.prototype.generateCollapsedRowData = function(row){ - var self = this, - data = row.getData(), - output = {}, - mockCellComponent; - - this.hiddenColumns.forEach(function(column){ - var value = column.getFieldValue(data); - - if(column.definition.title && column.field){ - if(column.modules.format && self.table.options.responsiveLayoutCollapseUseFormatters){ - - mockCellComponent = { - value:false, - data:{}, - getValue:function(){ - return value; - }, - getData:function(){ - return data; - }, - getElement:function(){ - return document.createElement("div"); - }, - getRow:function(){ - return row.getComponent(); - }, - getColumn:function(){ - return column.getComponent(); - }, - }; - - output[column.definition.title] = column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params); - }else{ - output[column.definition.title] = value; - } - } - }); - - return output; -}; - -ResponsiveLayout.prototype.formatCollapsedData = function(data){ - var list = document.createElement("table"), - listContents = ""; - - for(var key in data){ - listContents += "" + key + "" + data[key] + ""; - } - - list.innerHTML = listContents; - - return Object.keys(data).length ? list : ""; -}; - -Tabulator.prototype.registerModule("responsiveLayout", ResponsiveLayout); diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/select_row.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/select_row.js deleted file mode 100644 index 29002faebc..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/select_row.js +++ /dev/null @@ -1,293 +0,0 @@ -var SelectRow = function(table){ - this.table = table; //hold Tabulator object - this.selecting = false; //flag selecting in progress - this.lastClickedRow = false; //last clicked row - this.selectPrev = []; //hold previously selected element for drag drop selection - this.selectedRows = []; //hold selected rows -}; - -SelectRow.prototype.clearSelectionData = function(silent){ - this.selecting = false; - this.lastClickedRow = false; - this.selectPrev = []; - this.selectedRows = []; - - if(!silent){ - this._rowSelectionChanged(); - } -}; - -SelectRow.prototype.initializeRow = function(row){ - var self = this, - element = row.getElement(); - - // trigger end of row selection - var endSelect = function(){ - - setTimeout(function(){ - self.selecting = false; - }, 50); - - document.body.removeEventListener("mouseup", endSelect); - }; - - - row.modules.select = {selected:false}; - - //set row selection class - if(self.table.options.selectableCheck.call(this.table, row.getComponent())){ - element.classList.add("tabulator-selectable"); - element.classList.remove("tabulator-unselectable"); - - if(self.table.options.selectable && self.table.options.selectable != "highlight"){ - if(self.table.options.selectableRangeMode && self.table.options.selectableRangeMode === "click"){ - element.addEventListener("click", function(e){ - if(e.shiftKey){ - self.lastClickedRow = self.lastClickedRow || row; - - var lastClickedRowIdx = self.table.rowManager.getDisplayRowIndex(self.lastClickedRow); - var rowIdx = self.table.rowManager.getDisplayRowIndex(row); - - var fromRowIdx = lastClickedRowIdx <= rowIdx ? lastClickedRowIdx : rowIdx; - var toRowIdx = lastClickedRowIdx >= rowIdx ? lastClickedRowIdx : rowIdx; - - var rows = self.table.rowManager.getDisplayRows().slice(0); - var toggledRows = rows.splice(fromRowIdx, toRowIdx - fromRowIdx + 1); - - if(e.ctrlKey){ - toggledRows.forEach(function(toggledRow){ - if(toggledRow !== self.lastClickedRow){ - self.toggleRow(toggledRow) - } - }); - self.lastClickedRow = row; - }else{ - self.deselectRows(); - self.selectRows(toggledRows); - } - } - else if(e.ctrlKey){ - self.toggleRow(row); - self.lastClickedRow = row; - }else{ - self.deselectRows(); - self.selectRows(row); - self.lastClickedRow = row; - } - }); - }else{ - element.addEventListener("click", function(e){ - if(!self.selecting){ - self.toggleRow(row); - } - }); - - element.addEventListener("mousedown", function(e){ - if(e.shiftKey){ - self.selecting = true; - - self.selectPrev = []; - - document.body.addEventListener("mouseup", endSelect); - document.body.addEventListener("keyup", endSelect); - - self.toggleRow(row); - - return false; - } - }); - - element.addEventListener("mouseenter", function(e){ - if(self.selecting){ - self.toggleRow(row); - - if(self.selectPrev[1] == row){ - self.toggleRow(self.selectPrev[0]); - } - } - }); - - element.addEventListener("mouseout", function(e){ - if(self.selecting){ - self.selectPrev.unshift(row); - } - }); - } - } - - }else{ - element.classList.add("tabulator-unselectable"); - element.classList.remove("tabulator-selectable"); - } -}; - -//toggle row selection -SelectRow.prototype.toggleRow = function(row){ - if(this.table.options.selectableCheck.call(this.table, row.getComponent())){ - if(row.modules.select.selected){ - this._deselectRow(row); - }else{ - this._selectRow(row); - } - } -}; - -//select a number of rows -SelectRow.prototype.selectRows = function(rows){ - var self = this; - - switch(typeof rows){ - case "undefined": - self.table.rowManager.rows.forEach(function(row){ - self._selectRow(row, false, true); - }); - - self._rowSelectionChanged(); - break; - - case "boolean": - if(rows === true){ - self.table.rowManager.activeRows.forEach(function(row){ - self._selectRow(row, false, true); - }); - - self._rowSelectionChanged(); - } - break; - - default: - if(Array.isArray(rows)){ - rows.forEach(function(row){ - self._selectRow(row); - }); - - self._rowSelectionChanged(); - }else{ - self._selectRow(rows); - } - break; - } -}; - -//select an individual row -SelectRow.prototype._selectRow = function(rowInfo, silent, force){ - var index; - - //handle max row count - if(!isNaN(this.table.options.selectable) && this.table.options.selectable !== true && !force){ - if(this.selectedRows.length >= this.table.options.selectable){ - if(this.table.options.selectableRollingSelection){ - this._deselectRow(this.selectedRows[0]); - }else{ - return false; - } - } - } - - var row = this.table.rowManager.findRow(rowInfo); - - if(row){ - if(this.selectedRows.indexOf(row) == -1){ - row.modules.select.selected = true; - row.getElement().classList.add("tabulator-selected"); - - this.selectedRows.push(row); - - if(!silent){ - this.table.options.rowSelected.call(this.table, row.getComponent()); - this._rowSelectionChanged(); - } - } - }else{ - if(!silent){ - console.warn("Selection Error - No such row found, ignoring selection:" + rowInfo); - } - } -}; - -SelectRow.prototype.isRowSelected = function(row){ - return this.selectedRows.indexOf(row) !== -1; -}; - -//deselect a number of rows -SelectRow.prototype.deselectRows = function(rows){ - var self = this, - rowCount; - - if(typeof rows == "undefined"){ - - rowCount = self.selectedRows.length; - - for(let i = 0; i < rowCount; i++){ - self._deselectRow(self.selectedRows[0], false); - } - - self._rowSelectionChanged(); - }else{ - if(Array.isArray(rows)){ - rows.forEach(function(row){ - self._deselectRow(row); - }); - - self._rowSelectionChanged(); - }else{ - self._deselectRow(rows); - } - } -}; - -//deselect an individual row -SelectRow.prototype._deselectRow = function(rowInfo, silent){ - var self = this, - row = self.table.rowManager.findRow(rowInfo), - index; - - if(row){ - index = self.selectedRows.findIndex(function(selectedRow){ - return selectedRow == row; - }); - - if(index > -1){ - - row.modules.select.selected = false; - row.getElement().classList.remove("tabulator-selected"); - self.selectedRows.splice(index, 1); - - if(!silent){ - self.table.options.rowDeselected.call(this.table, row.getComponent()); - self._rowSelectionChanged(); - } - } - }else{ - if(!silent){ - console.warn("Deselection Error - No such row found, ignoring selection:" + rowInfo); - } - } -}; - -SelectRow.prototype.getSelectedData = function(){ - var data = []; - - this.selectedRows.forEach(function(row){ - data.push(row.getData()); - }); - - return data; -}; - -SelectRow.prototype.getSelectedRows = function(){ - - var rows = []; - - this.selectedRows.forEach(function(row){ - rows.push(row.getComponent()); - }); - - return rows; -}; - -SelectRow.prototype._rowSelectionChanged = function(){ - this.table.options.rowSelectionChanged.call(this.table, this.getSelectedData(), this.getSelectedRows()); -}; - -Tabulator.prototype.registerModule("selectRow", SelectRow); diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/sort.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/sort.js deleted file mode 100644 index 3d36374e41..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/sort.js +++ /dev/null @@ -1,522 +0,0 @@ -var Sort = function(table){ - this.table = table; //hold Tabulator object - this.sortList = []; //holder current sort - this.changed = false; //has the sort changed since last render - }; - -//initialize column header for sorting -Sort.prototype.initializeColumn = function(column, content){ - var self = this, - sorter = false, - colEl, - arrowEl; - - - switch(typeof column.definition.sorter){ - case "string": - if(self.sorters[column.definition.sorter]){ - sorter = self.sorters[column.definition.sorter]; - }else{ - console.warn("Sort Error - No such sorter found: ", column.definition.sorter); - } - break; - - case "function": - sorter = column.definition.sorter; - break; - } - - column.modules.sort = { - sorter:sorter, dir:"none", - params:column.definition.sorterParams || {}, - startingDir:column.definition.headerSortStartingDir || "asc", - }; - - if(column.definition.headerSort !== false){ - - colEl = column.getElement(); - - colEl.classList.add("tabulator-sortable"); - - - arrowEl = document.createElement("div"); - arrowEl.classList.add("tabulator-arrow"); - //create sorter arrow - content.appendChild(arrowEl); - - //sort on click - colEl.addEventListener("click", function(e){ - var dir = "", - sorters=[], - match = false; - - if(column.modules.sort){ - dir = column.modules.sort.dir == "asc" ? "desc" : (column.modules.sort.dir == "desc" ? "asc" : column.modules.sort.startingDir); - - if (self.table.options.columnHeaderSortMulti && (e.shiftKey || e.ctrlKey)) { - sorters = self.getSort(); - - - match = sorters.findIndex(function(sorter){ - return sorter.field === column.getField(); - }); - - if(match > -1){ - sorters[match].dir = sorters[match].dir == "asc" ? "desc" : "asc"; - - if(match != sorters.length -1){ - sorters.push(sorters.splice(match, 1)[0]); - } - }else{ - sorters.push({column:column, dir:dir}); - } - - //add to existing sort - self.setSort(sorters); - }else{ - //sort by column only - self.setSort(column, dir); - } - - self.table.rowManager.sorterRefresh(); - } - }); - } -}; - -//check if the sorters have changed since last use -Sort.prototype.hasChanged = function(){ - var changed = this.changed; - this.changed = false; - return changed; -}; - -//return current sorters -Sort.prototype.getSort = function(){ - var self = this, - sorters = []; - - self.sortList.forEach(function(item){ - if(item.column){ - sorters.push({column:item.column.getComponent(), field:item.column.getField(), dir:item.dir}); - } - }); - - return sorters; -}; - -//change sort list and trigger sort -Sort.prototype.setSort = function(sortList, dir){ - var self = this, - newSortList = []; - - if(!Array.isArray(sortList)){ - sortList = [{column: sortList, dir:dir}]; - } - - sortList.forEach(function(item){ - var column; - - column = self.table.columnManager.findColumn(item.column); - - if(column){ - item.column = column; - newSortList.push(item); - self.changed = true; - }else{ - console.warn("Sort Warning - Sort field does not exist and is being ignored: ", item.column); - } - - }); - - self.sortList = newSortList; - - if(this.table.options.persistentSort && this.table.modExists("persistence", true)){ - this.table.modules.persistence.save("sort"); - } -}; - -//clear sorters -Sort.prototype.clear = function(){ - this.setSort([]); -}; - -//find appropriate sorter for column -Sort.prototype.findSorter = function(column){ - var row = this.table.rowManager.activeRows[0], - sorter = "string", - field, value; - - if(row){ - row = row.getData(); - field = column.getField(); - - if(field){ - - value = column.getFieldValue(row); - - switch(typeof value){ - case "undefined": - sorter = "string"; - break; - - case "boolean": - sorter = "boolean"; - break; - - default: - if(!isNaN(value) && value !== ""){ - sorter = "number"; - }else{ - if(value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){ - sorter = "alphanum"; - } - } - break; - } - } - } - - return this.sorters[sorter]; -}; - -//work through sort list sorting data -Sort.prototype.sort = function(){ - var self = this, lastSort, sortList; - - sortList = this.table.options.sortOrderReverse ? self.sortList.slice().reverse() : self.sortList; - - if(self.table.options.dataSorting){ - self.table.options.dataSorting.call(self.table, self.getSort()); - } - - self.clearColumnHeaders(); - - if(!self.table.options.ajaxSorting){ - - sortList.forEach(function(item, i){ - - if(item.column && item.column.modules.sort){ - - //if no sorter has been defined, take a guess - if(!item.column.modules.sort.sorter){ - item.column.modules.sort.sorter = self.findSorter(item.column); - } - - self._sortItem(item.column, item.dir, sortList, i); - } - - self.setColumnHeader(item.column, item.dir); - }); - }else{ - sortList.forEach(function(item, i){ - self.setColumnHeader(item.column, item.dir); - }); - } - - if(self.table.options.dataSorted){ - self.table.options.dataSorted.call(self.table, self.getSort(), self.table.rowManager.getComponents(true)); - } - -}; - -//clear sort arrows on columns -Sort.prototype.clearColumnHeaders = function(){ - this.table.columnManager.getRealColumns().forEach(function(column){ - if(column.modules.sort){ - column.modules.sort.dir = "none"; - column.getElement().setAttribute("aria-sort", "none"); - } - }); -}; - -//set the column header sort direction -Sort.prototype.setColumnHeader = function(column, dir){ - column.modules.sort.dir = dir; - column.getElement().setAttribute("aria-sort", dir); -}; - -//sort each item in sort list -Sort.prototype._sortItem = function(column, dir, sortList, i){ - var self = this; - - var activeRows = self.table.rowManager.activeRows; - - var params = typeof column.modules.sort.params === "function" ? column.modules.sort.params(column.getComponent(), dir) : column.modules.sort.params; - - activeRows.sort(function(a, b){ - - var result = self._sortRow(a, b, column, dir, params); - - //if results match recurse through previous searchs to be sure - if(result === 0 && i){ - for(var j = i-1; j>= 0; j--){ - result = self._sortRow(a, b, sortList[j].column, sortList[j].dir, params); - - if(result !== 0){ - break; - } - } - } - - return result; - }); -}; - -//process individual rows for a sort function on active data -Sort.prototype._sortRow = function(a, b, column, dir, params){ - var el1Comp, el2Comp, colComp; - - //switch elements depending on search direction - var el1 = dir == "asc" ? a : b; - var el2 = dir == "asc" ? b : a; - - a = column.getFieldValue(el1.getData()); - b = column.getFieldValue(el2.getData()); - - a = typeof a !== "undefined" ? a : ""; - b = typeof b !== "undefined" ? b : ""; - - el1Comp = el1.getComponent(); - el2Comp = el2.getComponent(); - - return column.modules.sort.sorter.call(this, a, b, el1Comp, el2Comp, column.getComponent(), dir, params); -}; - - -//default data sorters -Sort.prototype.sorters = { - - //sort numbers - number:function(a, b, aRow, bRow, column, dir, params){ - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - - a = parseFloat(String(a).replace(",","")); - b = parseFloat(String(b).replace(",","")); - - //handle non numeric values - if(isNaN(a)){ - emptyAlign = isNaN(b) ? 0 : -1; - }else if(isNaN(b)){ - emptyAlign = 1; - }else{ - //compare valid values - return a - b; - } - - //fix empty values in position - if((alignEmptyValues === "top" && dir === "desc") || (alignEmptyValues === "bottom" && dir === "asc")){ - emptyAlign *= -1; - } - - return emptyAlign; - }, - - //sort strings - string:function(a, b, aRow, bRow, column, dir, params){ - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - var locale; - - //handle empty values - if(!a){ - emptyAlign = !b ? 0 : -1; - }else if(!b){ - emptyAlign = 1; - }else{ - //compare valid values - switch(typeof params.locale){ - case "boolean": - if(params.locale){ - locale = this.table.modules.localize.getLocale(); - } - break; - case "string": - locale = params.locale; - break; - } - - return String(a).toLowerCase().localeCompare(String(b).toLowerCase(), locale); - } - - //fix empty values in position - if((alignEmptyValues === "top" && dir === "desc") || (alignEmptyValues === "bottom" && dir === "asc")){ - emptyAlign *= -1; - } - - return emptyAlign; - }, - - //sort date - date:function(a, b, aRow, bRow, column, dir, params){ - if(!params.format){ - params.format = "DD/MM/YYYY"; - } - - return this.sorters.datetime.call(this, a, b, aRow, bRow, column, dir, params); - }, - - //sort hh:mm formatted times - time:function(a, b, aRow, bRow, column, dir, params){ - if(!params.format){ - params.format = "hh:mm"; - } - - return this.sorters.datetime.call(this, a, b, aRow, bRow, column, dir, params); - }, - - //sort datetime - datetime:function(a, b, aRow, bRow, column, dir, params){ - var format = params.format || "DD/MM/YYYY hh:mm:ss", - alignEmptyValues = params.alignEmptyValues, - emptyAlign = 0; - - if(typeof moment != "undefined"){ - a = moment(a, format); - b = moment(b, format); - - if(!a.isValid()){ - emptyAlign = !b.isValid() ? 0 : -1; - }else if(!b.isValid()){ - emptyAlign = 1; - }else{ - //compare valid values - return a - b; - } - - //fix empty values in position - if((alignEmptyValues === "top" && dir === "desc") || (alignEmptyValues === "bottom" && dir === "asc")){ - emptyAlign *= -1; - } - - return emptyAlign; - - }else{ - console.error("Sort Error - 'datetime' sorter is dependant on moment.js"); - } - }, - - //sort booleans - boolean:function(a, b, aRow, bRow, column, dir, params){ - var el1 = a === true || a === "true" || a === "True" || a === 1 ? 1 : 0; - var el2 = b === true || b === "true" || b === "True" || b === 1 ? 1 : 0; - - return el1 - el2; - }, - - //sort if element contains any data - array:function(a, b, aRow, bRow, column, dir, params){ - var el1 = 0; - var el2 = 0; - var type = params.type || "length"; - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - - function calc(value){ - - switch(type){ - case "length": - return value.length; - break; - - case "sum": - return value.reduce(function(c, d){ - return c + d; - }); - break; - - case "max": - return Math.max.apply(null, value) ; - break; - - case "min": - return Math.min.apply(null, value) ; - break; - - case "avg": - return value.reduce(function(c, d){ - return c + d; - }) / value.length; - break; - } - } - - //handle non array values - if(!Array.isArray(a)){ - alignEmptyValues = !Array.isArray(b) ? 0 : -1; - }else if(!Array.isArray(b)){ - alignEmptyValues = 1; - }else{ - - //compare valid values - el1 = a ? calc(a) : 0; - el2 = b ? calc(b) : 0; - - return el1 - el2; - } - - //fix empty values in position - if((alignEmptyValues === "top" && dir === "desc") || (alignEmptyValues === "bottom" && dir === "asc")){ - emptyAlign *= -1; - } - - return emptyAlign; - }, - - - //sort if element contains any data - exists:function(a, b, aRow, bRow, column, dir, params){ - var el1 = typeof a == "undefined" ? 0 : 1; - var el2 = typeof b == "undefined" ? 0 : 1; - - return el1 - el2; - }, - - //sort alpha numeric strings - alphanum:function(as, bs, aRow, bRow, column, dir, params){ - var a, b, a1, b1, i= 0, L, rx = /(\d+)|(\D+)/g, rd = /\d/; - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - - //handle empty values - if(!as && as!== 0){ - emptyAlign = !bs && bs!== 0 ? 0 : -1; - }else if(!bs && bs!== 0){ - emptyAlign = 1; - }else{ - - if(isFinite(as) && isFinite(bs)) return as - bs; - a = String(as).toLowerCase(); - b = String(bs).toLowerCase(); - if(a === b) return 0; - if(!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1; - a = a.match(rx); - b = b.match(rx); - L = a.length > b.length ? b.length : a.length; - while(i < L){ - a1= a[i]; - b1= b[i++]; - if(a1 !== b1){ - if(isFinite(a1) && isFinite(b1)){ - if(a1.charAt(0) === "0") a1 = "." + a1; - if(b1.charAt(0) === "0") b1 = "." + b1; - return a1 - b1; - } - else return a1 > b1 ? 1 : -1; - } - } - - return a.length > b.length; - } - - //fix empty values in position - if((alignEmptyValues === "top" && dir === "desc") || (alignEmptyValues === "bottom" && dir === "asc")){ - emptyAlign *= -1; - } - - return emptyAlign; - }, -}; - -Tabulator.prototype.registerModule("sort", Sort); diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/validate.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/validate.js deleted file mode 100644 index 5276ba3680..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/validate.js +++ /dev/null @@ -1,211 +0,0 @@ -var Validate = function(table){ - this.table = table; -}; - -//validate -Validate.prototype.initializeColumn = function(column){ - var self = this, - config = [], - validator; - - if(column.definition.validator){ - - if(Array.isArray(column.definition.validator)){ - column.definition.validator.forEach(function(item){ - validator = self._extractValidator(item); - - if(validator){ - config.push(validator); - } - }); - - }else{ - validator = this._extractValidator(column.definition.validator); - - if(validator){ - config.push(validator); - } - } - - column.modules.validate = config.length ? config : false; - } -}; - -Validate.prototype._extractValidator = function(value){ - var parts, type, params; - - switch(typeof value){ - case "string": - parts = value.split(":",2); - type = parts.shift(); - params = parts[0]; - - return this._buildValidator(type, params); - break; - - case "function": - return this._buildValidator(value); - break; - - case "object": - return this._buildValidator(value.type, value.parameters); - break; - } -}; - -Validate.prototype._buildValidator = function(type, params){ - - var func = typeof type == "function" ? type : this.validators[type]; - - if(!func){ - console.warn("Validator Setup Error - No matching validator found:", type); - return false; - }else{ - return { - type:typeof type == "function" ? "function" : type, - func:func, - params:params, - }; - } -}; - - -Validate.prototype.validate = function(validators, cell, value){ - var self = this, - valid = []; - - if(validators){ - validators.forEach(function(item){ - if(!item.func.call(self, cell, value, item.params)){ - valid.push({ - type:item.type, - parameters:item.params - }); - } - }); - } - - return valid.length ? valid : true; -}; - -Validate.prototype.validators = { - - //is integer - integer: function(cell, value, parameters){ - if(value === "" || value === null || typeof value === "undefined"){ - return true; - } - value = Number(value); - return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; - }, - - //is float - float: function(cell, value, parameters){ - if(value === "" || value === null || typeof value === "undefined"){ - return true; - } - value = Number(value); - return typeof value === 'number' && isFinite(value) && value % 1 !== 0; - }, - - //must be a number - numeric: function(cell, value, parameters){ - if(value === "" || value === null || typeof value === "undefined"){ - return true; - } - return !isNaN(value); - }, - - //must be a string - string: function(cell, value, parameters){ - if(value === "" || value === null || typeof value === "undefined"){ - return true; - } - return isNaN(value); - }, - - //maximum value - max: function(cell, value, parameters){ - if(value === "" || value === null || typeof value === "undefined"){ - return true; - } - return parseFloat(value) <= parameters; - }, - - //minimum value - min: function(cell, value, parameters){ - if(value === "" || value === null || typeof value === "undefined"){ - return true; - } - return parseFloat(value) >= parameters; - }, - - //minimum string length - minLength: function(cell, value, parameters){ - if(value === "" || value === null || typeof value === "undefined"){ - return true; - } - return String(value).length >= parameters; - }, - - //maximum string length - maxLength: function(cell, value, parameters){ - if(value === "" || value === null || typeof value === "undefined"){ - return true; - } - return String(value).length <= parameters; - }, - - //in provided value list - in: function(cell, value, parameters){ - if(value === "" || value === null || typeof value === "undefined"){ - return true; - } - if(typeof parameters == "string"){ - parameters = parameters.split("|"); - } - - return value === "" || parameters.indexOf(value) > -1; - }, - - //must match provided regex - regex: function(cell, value, parameters){ - if(value === "" || value === null || typeof value === "undefined"){ - return true; - } - var reg = new RegExp(parameters); - - return reg.test(value); - }, - - //value must be unique in this column - unique: function(cell, value, parameters){ - if(value === "" || value === null || typeof value === "undefined"){ - return true; - } - var unique = true; - - var cellData = cell.getData(); - var column = cell.getColumn()._getSelf(); - - this.table.rowManager.rows.forEach(function(row){ - var data = row.getData(); - - if(data !== cellData){ - if(value == column.getFieldValue(data)){ - unique = false; - } - } - }); - - return unique; - }, - - //must have a value - required:function(cell, value, parameters){ - return value !== "" & value !== null && typeof value !== "undefined"; - }, -}; - - -Tabulator.prototype.registerModule("validate", Validate); diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules_enabled.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules_enabled.js deleted file mode 100644 index a83a22a56b..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules_enabled.js +++ /dev/null @@ -1,27 +0,0 @@ -/*=include modules/accessor.js */ -/*=include modules/ajax.js */ -/*=include modules/calculation_colums.js */ -/*=include modules/clipboard.js */ -/*=include modules/data_tree.js */ -/*=include modules/download.js */ -/*=include modules/edit.js */ -/*=include modules/filter.js */ -/*=include modules/format.js */ -/*=include modules/frozen_columns.js */ -/*=include modules/frozen_rows.js */ -/*=include modules/group_rows.js */ -/*=include modules/history.js */ -/*=include modules/html_table_import.js */ -/*=include modules/keybindings.js */ -/*=include modules/moveable_columns.js */ -/*=include modules/moveable_rows.js */ -/*=include modules/mutator.js */ -/*=include modules/page.js */ -/*=include modules/persistence.js */ -/*=include modules/resize_columns.js */ -/*=include modules/resize_rows.js */ -/*=include modules/resize_table.js */ -/*=include modules/responsive_layout.js */ -/*=include modules/select_row.js */ -/*=include modules/sort.js */ -/*=include modules/validate.js */ \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/polyfills.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/polyfills.js deleted file mode 100644 index 965d6a4c12..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/polyfills.js +++ /dev/null @@ -1,92 +0,0 @@ - - - -// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex -if (!Array.prototype.findIndex) { - Object.defineProperty(Array.prototype, 'findIndex', { - value: function(predicate) { - // 1. Let O be ? ToObject(this value). - if (this == null) { - throw new TypeError('"this" is null or not defined'); - } - - var o = Object(this); - - // 2. Let len be ? ToLength(? Get(O, "length")). - var len = o.length >>> 0; - - // 3. If IsCallable(predicate) is false, throw a TypeError exception. - if (typeof predicate !== 'function') { - throw new TypeError('predicate must be a function'); - } - - // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. - var thisArg = arguments[1]; - - // 5. Let k be 0. - var k = 0; - - // 6. Repeat, while k < len - while (k < len) { - // a. Let Pk be ! ToString(k). - // b. Let kValue be ? Get(O, Pk). - // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). - // d. If testResult is true, return k. - var kValue = o[k]; - if (predicate.call(thisArg, kValue, k, o)) { - return k; - } - // e. Increase k by 1. - k++; - } - - // 7. Return -1. - return -1; - } - }); -} - -// https://tc39.github.io/ecma262/#sec-array.prototype.find -if (!Array.prototype.find) { - Object.defineProperty(Array.prototype, 'find', { - value: function(predicate) { - // 1. Let O be ? ToObject(this value). - if (this == null) { - throw new TypeError('"this" is null or not defined'); - } - - var o = Object(this); - - // 2. Let len be ? ToLength(? Get(O, "length")). - var len = o.length >>> 0; - - // 3. If IsCallable(predicate) is false, throw a TypeError exception. - if (typeof predicate !== 'function') { - throw new TypeError('predicate must be a function'); - } - - // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. - var thisArg = arguments[1]; - - // 5. Let k be 0. - var k = 0; - - // 6. Repeat, while k < len - while (k < len) { - // a. Let Pk be ! ToString(k). - // b. Let kValue be ? Get(O, Pk). - // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). - // d. If testResult is true, return kValue. - var kValue = o[k]; - if (predicate.call(thisArg, kValue, k, o)) { - return kValue; - } - // e. Increase k by 1. - k++; - } - - // 7. Return undefined. - return undefined; - } - }); -} \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/row.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/row.js deleted file mode 100644 index 1d8e401a6f..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/row.js +++ /dev/null @@ -1,681 +0,0 @@ - -//public row object -var RowComponent = function (row){ - this._row = row; -}; - -RowComponent.prototype.getData = function(transform){ - return this._row.getData(transform); -}; - -RowComponent.prototype.getElement = function(){ - return this._row.getElement(); -}; - -RowComponent.prototype.getCells = function(){ - var cells = []; - - this._row.getCells().forEach(function(cell){ - cells.push(cell.getComponent()); - }); - - return cells; -}; - -RowComponent.prototype.getCell = function(column){ - var cell = this._row.getCell(column); - return cell ? cell.getComponent() : false; -}; - -RowComponent.prototype.getIndex = function(){ - return this._row.getData("data")[this._row.table.options.index]; -}; - -RowComponent.prototype.getPosition = function(active){ - return this._row.table.rowManager.getRowPosition(this._row, active); -}; - -RowComponent.prototype.delete = function(){ - return this._row.delete(); -}; - -RowComponent.prototype.scrollTo = function(){ - return this._row.table.rowManager.scrollToRow(this._row); -}; - -RowComponent.prototype.update = function(data){ - return this._row.updateData(data); -}; - -RowComponent.prototype.normalizeHeight = function(){ - this._row.normalizeHeight(true); -}; - -RowComponent.prototype.select = function(){ - this._row.table.modules.selectRow.selectRows(this._row); -}; - -RowComponent.prototype.deselect = function(){ - this._row.table.modules.selectRow.deselectRows(this._row); -}; - -RowComponent.prototype.toggleSelect = function(){ - this._row.table.modules.selectRow.toggleRow(this._row); -}; - -RowComponent.prototype.isSelected = function(){ - return this._row.table.modules.selectRow.isRowSelected(this._row); -}; - -RowComponent.prototype._getSelf = function(){ - return this._row; -}; - -RowComponent.prototype.freeze = function(){ - if(this._row.table.modExists("frozenRows", true)){ - this._row.table.modules.frozenRows.freezeRow(this._row); - } -}; - -RowComponent.prototype.unfreeze = function(){ - if(this._row.table.modExists("frozenRows", true)){ - this._row.table.modules.frozenRows.unfreezeRow(this._row); - } -}; - -RowComponent.prototype.treeCollapse = function(){ - if(this._row.table.modExists("dataTree", true)){ - this._row.table.modules.dataTree.collapseRow(this._row); - } -}; - -RowComponent.prototype.treeExpand = function(){ - if(this._row.table.modExists("dataTree", true)){ - this._row.table.modules.dataTree.expandRow(this._row); - } -}; - -RowComponent.prototype.treeToggle = function(){ - if(this._row.table.modExists("dataTree", true)){ - this._row.table.modules.dataTree.toggleRow(this._row); - } -}; - -RowComponent.prototype.getTreeParent = function(){ - if(this._row.table.modExists("dataTree", true)){ - return this._row.table.modules.dataTree.getTreeParent(this._row); - } - - return false; -}; - -RowComponent.prototype.getTreeChildren = function(){ - if(this._row.table.modExists("dataTree", true)){ - return this._row.table.modules.dataTree.getTreeChildren(this._row); - } - - return false; -}; - -RowComponent.prototype.reformat = function(){ - return this._row.reinitialize(); -}; - -RowComponent.prototype.getGroup = function(){ - return this._row.getGroup().getComponent(); -}; - -RowComponent.prototype.getTable = function(){ - return this._row.table; -}; - -RowComponent.prototype.getNextRow = function(){ - return this._row.nextRow(); -}; - -RowComponent.prototype.getPrevRow = function(){ - return this._row.prevRow(); -}; - - -var Row = function(data, parent){ - this.table = parent.table; - this.parent = parent; - this.data = {}; - this.type = "row"; //type of element - this.element = this.createElement(); - this.modules = {}; //hold module variables; - this.cells = []; - this.height = 0; //hold element height - this.outerHeight = 0; //holde lements outer height - this.initialized = false; //element has been rendered - this.heightInitialized = false; //element has resized cells to fit - - this.setData(data); - this.generateElement(); -}; - -Row.prototype.createElement = function (){ - var el = document.createElement("div"); - - el.classList.add("tabulator-row"); - el.setAttribute("role", "row"); - - return el; -}; - -Row.prototype.getElement = function(){ - return this.element; -}; - - -Row.prototype.generateElement = function(){ - var self = this, - dblTap, tapHold, tap; - - //set row selection characteristics - if(self.table.options.selectable !== false && self.table.modExists("selectRow")){ - self.table.modules.selectRow.initializeRow(this); - } - - //setup movable rows - if(self.table.options.movableRows !== false && self.table.modExists("moveRow")){ - self.table.modules.moveRow.initializeRow(this); - } - - //setup data tree - if(self.table.options.dataTree !== false && self.table.modExists("dataTree")){ - self.table.modules.dataTree.initializeRow(this); - } - - //handle row click events - if (self.table.options.rowClick){ - self.element.addEventListener("click", function(e){ - self.table.options.rowClick(e, self.getComponent()); - }); - } - - if (self.table.options.rowDblClick){ - self.element.addEventListener("dblclick", function(e){ - self.table.options.rowDblClick(e, self.getComponent()); - }); - } - - if (self.table.options.rowContext){ - self.element.addEventListener("contextmenu", function(e){ - self.table.options.rowContext(e, self.getComponent()); - }); - } - - if (self.table.options.rowTap){ - - tap = false; - - self.element.addEventListener("touchstart", function(e){ - tap = true; - }); - - self.element.addEventListener("touchend", function(e){ - if(tap){ - self.table.options.rowTap(e, self.getComponent()); - } - - tap = false; - }); - } - - if (self.table.options.rowDblTap){ - - dblTap = null; - - self.element.addEventListener("touchend", function(e){ - - if(dblTap){ - clearTimeout(dblTap); - dblTap = null; - - self.table.options.rowDblTap(e, self.getComponent()); - }else{ - - dblTap = setTimeout(function(){ - clearTimeout(dblTap); - dblTap = null; - }, 300); - } - - }); - } - - - if (self.table.options.rowTapHold){ - - tapHold = null; - - self.element.addEventListener("touchstart", function(e){ - clearTimeout(tapHold); - - tapHold = setTimeout(function(){ - clearTimeout(tapHold); - tapHold = null; - tap = false; - self.table.options.rowTapHold(e, self.getComponent()); - }, 1000); - - }); - - self.element.addEventListener("touchend", function(e){ - clearTimeout(tapHold); - tapHold = null; - }); - } -}; - -Row.prototype.generateCells = function(){ - this.cells = this.table.columnManager.generateCells(this); -}; - -//functions to setup on first render -Row.prototype.initialize = function(force){ - var self = this; - - if(!self.initialized || force){ - - self.deleteCells(); - - while(self.element.firstChild) self.element.removeChild(self.element.firstChild); - - //handle frozen cells - if(this.table.modExists("frozenColumns")){ - this.table.modules.frozenColumns.layoutRow(this); - } - - this.generateCells(); - - self.cells.forEach(function(cell){ - self.element.appendChild(cell.getElement()); - cell.cellRendered(); - }); - - if(force){ - self.normalizeHeight(); - } - - //setup movable rows - if(self.table.options.dataTree && self.table.modExists("dataTree")){ - self.table.modules.dataTree.layoutRow(this); - } - - //setup movable rows - if(self.table.options.responsiveLayout === "collapse" && self.table.modExists("responsiveLayout")){ - self.table.modules.responsiveLayout.layoutRow(this); - } - - if(self.table.options.rowFormatter){ - self.table.options.rowFormatter(self.getComponent()); - } - - //set resizable handles - if(self.table.options.resizableRows && self.table.modExists("resizeRows")){ - self.table.modules.resizeRows.initializeRow(self); - } - - self.initialized = true; - } -}; - -Row.prototype.reinitializeHeight = function(){ - this.heightInitialized = false; - - if(this.element.offsetParent !== null){ - this.normalizeHeight(true); - } -}; - - -Row.prototype.reinitialize = function(){ - this.initialized = false; - this.heightInitialized = false; - this.height = 0; - - if(this.element.offsetParent !== null){ - this.initialize(true); - } -}; - -//get heights when doing bulk row style calcs in virtual DOM -Row.prototype.calcHeight = function(){ - - var maxHeight = 0, - minHeight = this.table.options.resizableRows ? this.element.clientHeight : 0; - - this.cells.forEach(function(cell){ - var height = cell.getHeight(); - if(height > maxHeight){ - maxHeight = height; - } - }); - - this.height = Math.max(maxHeight, minHeight); - this.outerHeight = this.element.offsetHeight; -}; - -//set of cells -Row.prototype.setCellHeight = function(){ - var height = this.height; - - this.cells.forEach(function(cell){ - cell.setHeight(height); - }); - - this.heightInitialized = true; -}; - -Row.prototype.clearCellHeight = function(){ - this.cells.forEach(function(cell){ - - cell.clearHeight(); - }); -}; - -//normalize the height of elements in the row -Row.prototype.normalizeHeight = function(force){ - - if(force){ - this.clearCellHeight(); - } - - this.calcHeight(); - - this.setCellHeight(); -}; - -Row.prototype.setHeight = function(height){ - this.height = height; - - this.setCellHeight(); -}; - -//set height of rows -Row.prototype.setHeight = function(height, force){ - if(this.height != height || force){ - - this.height = height; - - this.setCellHeight(); - - // this.outerHeight = this.element.outerHeight(); - this.outerHeight = this.element.offsetHeight; - } -}; - -//return rows outer height -Row.prototype.getHeight = function(){ - return this.outerHeight; -}; - -//return rows outer Width -Row.prototype.getWidth = function(){ - return this.element.offsetWidth; -}; - - -//////////////// Cell Management ///////////////// - -Row.prototype.deleteCell = function(cell){ - var index = this.cells.indexOf(cell); - - if(index > -1){ - this.cells.splice(index, 1); - } -}; - -//////////////// Data Management ///////////////// - -Row.prototype.setData = function(data){ - var self = this; - - if(self.table.modExists("mutator")){ - self.data = self.table.modules.mutator.transformRow(data, "data"); - }else{ - self.data = data; - } -}; - -//update the rows data -Row.prototype.updateData = function(data){ - var self = this; - - return new Promise((resolve, reject) => { - - if(typeof data === "string"){ - data = JSON.parse(data); - } - - //mutate incomming data if needed - if(self.table.modExists("mutator")){ - data = self.table.modules.mutator.transformRow(data, "data", true); - } - - //set data - for (var attrname in data) { - self.data[attrname] = data[attrname]; - } - - //update affected cells only - for (var attrname in data) { - let cell = this.getCell(attrname); - - if(cell){ - if(cell.getValue() != data[attrname]){ - cell.setValueProcessData(data[attrname]); - } - } - } - - //Partial reinitialization if visible - if(Tabulator.prototype.helpers.elVisible(this.element)){ - self.normalizeHeight(); - - if(self.table.options.rowFormatter){ - self.table.options.rowFormatter(self.getComponent()); - } - }else{ - this.initialized = false; - this.height = 0; - } - - //self.reinitialize(); - - self.table.options.rowUpdated.call(this.table, self.getComponent()); - - resolve(); - }); -}; - -Row.prototype.getData = function(transform){ - var self = this; - - if(transform){ - if(self.table.modExists("accessor")){ - return self.table.modules.accessor.transformRow(self.data, transform); - } - }else{ - return this.data; - } - -}; - -Row.prototype.getCell = function(column){ - var match = false; - - column = this.table.columnManager.findColumn(column); - - match = this.cells.find(function(cell){ - return cell.column === column; - }); - - return match; -}; - -Row.prototype.getCellIndex = function(findCell){ - return this.cells.findIndex(function(cell){ - return cell === findCell; - }); -}; - - -Row.prototype.findNextEditableCell = function(index){ - var nextCell = false; - - if(index < this.cells.length-1){ - for(var i = index+1; i < this.cells.length; i++){ - let cell = this.cells[i]; - - if(cell.column.modules.edit && Tabulator.prototype.helpers.elVisible(cell.getElement())){ - let allowEdit = true; - - if(typeof cell.column.modules.edit.check == "function"){ - allowEdit = cell.column.modules.edit.check(cell.getComponent()); - } - - if(allowEdit){ - nextCell = cell; - break; - } - } - } - } - - return nextCell; -}; - -Row.prototype.findPrevEditableCell = function(index){ - var prevCell = false; - - if(index > 0){ - for(var i = index-1; i >= 0; i--){ - let cell = this.cells[i], - allowEdit = true; - - if(cell.column.modules.edit && Tabulator.prototype.helpers.elVisible(cell.getElement())){ - if(typeof cell.column.modules.edit.check == "function"){ - allowEdit = cell.column.modules.edit.check(cell.getComponent()); - } - - if(allowEdit){ - prevCell = cell; - break; - } - } - } - } - - return prevCell; -}; - - -Row.prototype.getCells = function(){ - return this.cells; -}; - -Row.prototype.nextRow = function(){ - var row = this.table.rowManager.nextDisplayRow(this, true); - return row ? row.getComponent() : false; -}; - -Row.prototype.prevRow = function(){ - var row = this.table.rowManager.prevDisplayRow(this, true); - return row ? row.getComponent() : false; -}; - -///////////////////// Actions ///////////////////// - -Row.prototype.delete = function(){ - return new Promise((resolve, reject) => { - var index = this.table.rowManager.getRowIndex(this); - - this.deleteActual(); - - if(this.table.options.history && this.table.modExists("history")){ - - if(index){ - index = this.table.rowManager.rows[index-1]; - } - - this.table.modules.history.action("rowDelete", this, {data:this.getData(), pos:!index, index:index}); - } - - resolve(); - }); -}; - - -Row.prototype.deleteActual = function(){ - - var index = this.table.rowManager.getRowIndex(this); - - //deselect row if it is selected - if(this.table.modExists("selectRow")){ - this.table.modules.selectRow._deselectRow(this, true); - } - - // if(this.table.options.dataTree && this.table.modExists("dataTree")){ - // this.table.modules.dataTree.collapseRow(this, true); - // } - - this.table.rowManager.deleteRow(this); - - this.deleteCells(); - - this.initialized = false; - this.heightInitialized = false; - - //remove from group - if(this.modules.group){ - this.modules.group.removeRow(this); - } - - //recalc column calculations if present - if(this.table.modExists("columnCalcs")){ - if(this.table.options.groupBy && this.table.modExists("groupRows")){ - this.table.modules.columnCalcs.recalcRowGroup(this); - }else{ - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - } -}; - - -Row.prototype.deleteCells = function(){ - var cellCount = this.cells.length; - - for(let i = 0; i < cellCount; i++){ - this.cells[0].delete(); - } -}; - -Row.prototype.wipe = function(){ - this.deleteCells(); - - // this.element.children().each(function(){ - // $(this).remove(); - // }) - // this.element.empty(); - - while(this.element.firstChild) this.element.removeChild(this.element.firstChild); - // this.element.remove(); - if(this.element.parentNode){ - this.element.parentNode.removeChild(this.element); - } -}; - - -Row.prototype.getGroup = function(){ - return this.modules.group || false; -}; - - -//////////////// Object Generation ///////////////// -Row.prototype.getComponent = function(){ - return new RowComponent(this); -}; diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/row_manager.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/row_manager.js deleted file mode 100644 index 38f73a94dd..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/row_manager.js +++ /dev/null @@ -1,1637 +0,0 @@ -var RowManager = function(table){ - - this.table = table; - this.element = this.createHolderElement(); //containing element - this.tableElement = this.createTableElement(); //table element - this.columnManager = null; //hold column manager object - this.height = 0; //hold height of table element - - this.firstRender = false; //handle first render - this.renderMode = "classic"; //current rendering mode - - this.rows = []; //hold row data objects - this.activeRows = []; //rows currently available to on display in the table - this.activeRowsCount = 0; //count of active rows - - this.displayRows = []; //rows currently on display in the table - this.displayRowsCount = 0; //count of display rows - - this.scrollTop = 0; - this.scrollLeft = 0; - - this.vDomRowHeight = 20; //approximation of row heights for padding - - this.vDomTop = 0; //hold position for first rendered row in the virtual DOM - this.vDomBottom = 0; //hold possition for last rendered row in the virtual DOM - - this.vDomScrollPosTop = 0; //last scroll position of the vDom top; - this.vDomScrollPosBottom = 0; //last scroll position of the vDom bottom; - - this.vDomTopPad = 0; //hold value of padding for top of virtual DOM - this.vDomBottomPad = 0; //hold value of padding for bottom of virtual DOM - - this.vDomMaxRenderChain = 90; //the maximum number of dom elements that can be rendered in 1 go - - this.vDomWindowBuffer = 0; //window row buffer before removing elements, to smooth scrolling - - this.vDomWindowMinTotalRows = 20; //minimum number of rows to be generated in virtual dom (prevent buffering issues on tables with tall rows) - this.vDomWindowMinMarginRows = 5; //minimum number of rows to be generated in virtual dom margin - - this.vDomTopNewRows = []; //rows to normalize after appending to optimize render speed - this.vDomBottomNewRows = []; //rows to normalize after appending to optimize render speed -}; - -//////////////// Setup Functions ///////////////// - -RowManager.prototype.createHolderElement = function (){ - var el = document.createElement("div"); - - el.classList.add("tabulator-tableHolder"); - el.setAttribute("tabindex", 0); - - return el; -}; - -RowManager.prototype.createTableElement = function (){ - var el = document.createElement("div"); - - el.classList.add("tabulator-table"); - - return el; -}; - -//return containing element -RowManager.prototype.getElement = function(){ - return this.element; -}; - -//return table element -RowManager.prototype.getTableElement = function(){ - return this.tableElement; -}; - -//return position of row in table -RowManager.prototype.getRowPosition = function(row, active){ - if(active){ - return this.activeRows.indexOf(row); - }else{ - return this.rows.indexOf(row); - } -}; - - -//link to column manager -RowManager.prototype.setColumnManager = function(manager){ - this.columnManager = manager; -}; - -RowManager.prototype.initialize = function(){ - var self = this; - - self.setRenderMode(); - - //initialize manager - self.element.appendChild(self.tableElement); - - self.firstRender = true; - - //scroll header along with table body - self.element.addEventListener("scroll", function(){ - var left = self.element.scrollLeft; - - //handle horizontal scrolling - if(self.scrollLeft != left){ - self.columnManager.scrollHorizontal(left); - - if(self.table.options.groupBy){ - self.table.modules.groupRows.scrollHeaders(left); - } - - if(self.table.modExists("columnCalcs")){ - self.table.modules.columnCalcs.scrollHorizontal(left); - } - } - - self.scrollLeft = left; - }); - - //handle virtual dom scrolling - if(this.renderMode === "virtual"){ - - self.element.addEventListener("scroll", function(){ - var top = self.element.scrollTop; - var dir = self.scrollTop > top; - - //handle verical scrolling - if(self.scrollTop != top){ - self.scrollTop = top; - self.scrollVertical(dir); - - if(self.table.options.ajaxProgressiveLoad == "scroll"){ - self.table.modules.ajax.nextPage(self.element.scrollHeight - self.element.clientHeight - top); - } - }else{ - self.scrollTop = top; - } - - }); - } -}; - - -////////////////// Row Manipulation ////////////////// - -RowManager.prototype.findRow = function(subject){ - var self = this; - - if(typeof subject == "object"){ - - if(subject instanceof Row){ - //subject is row element - return subject; - }else if(subject instanceof RowComponent){ - //subject is public row component - return subject._getSelf() || false; - }else if(subject instanceof HTMLElement){ - //subject is a HTML element of the row - let match = self.rows.find(function(row){ - return row.element === subject; - }); - - return match || false; - } - - }else if(typeof subject == "undefined" || subject === null){ - return false; - }else{ - //subject should be treated as the index of the row - let match = self.rows.find(function(row){ - return row.data[self.table.options.index] == subject; - }); - - return match || false; - } - - //catch all for any other type of input - - return false; -}; - -RowManager.prototype.getRowFromPosition = function(position, active){ - if(active){ - return this.activeRows[position]; - }else{ - return this.rows[position]; - } -}; - -RowManager.prototype.scrollToRow = function(row, position, ifVisible){ - var rowIndex = this.getDisplayRows().indexOf(row), - rowEl = row.getElement(), - rowTop, - offset = 0; - - return new Promise((resolve, reject) => { - if(rowIndex > -1){ - - if(typeof position === "undefined"){ - position = this.table.options.scrollToRowPosition; - } - - if(typeof ifVisible === "undefined"){ - ifVisible = this.table.options.scrollToRowIfVisible; - } - - - if(position === "nearest"){ - switch(this.renderMode){ - case"classic": - rowTop = Tabulator.prototype.helpers.elOffset(rowEl).top; - position = Math.abs(this.element.scrollTop - rowTop) > Math.abs(this.element.scrollTop + this.element.clientHeight - rowTop) ? "bottom" : "top"; - break; - case"virtual": - position = Math.abs(this.vDomTop - rowIndex) > Math.abs(this.vDomBottom - rowIndex) ? "bottom" : "top"; - break; - } - } - - //check row visibility - if(!ifVisible){ - if(Tabulator.prototype.helpers.elVisible(rowEl)){ - offset = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(this.element).top; - - if(offset > 0 && offset < this.element.clientHeight - rowEl.offsetHeight){ - return false; - } - } - } - - //scroll to row - switch(this.renderMode){ - case"classic": - this.element.scrollTop = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(this.element).top + this.element.scrollTop; - break; - case"virtual": - this._virtualRenderFill(rowIndex, true); - break; - } - - //align to correct position - switch(position){ - case "middle": - case "center": - this.element.scrollTop = this.element.scrollTop - (this.element.clientHeight / 2); - break; - - case "bottom": - this.element.scrollTop = this.element.scrollTop - this.element.clientHeight + rowEl.offsetHeight; - break; - } - - resolve(); - - }else{ - console.warn("Scroll Error - Row not visible"); - reject("Scroll Error - Row not visible"); - } - }); -}; - - -////////////////// Data Handling ////////////////// - -RowManager.prototype.setData = function(data, renderInPosition){ - var self = this; - - return new Promise((resolve, reject)=>{ - if(renderInPosition && this.getDisplayRows().length){ - if(self.table.options.pagination){ - self._setDataActual(data, true); - }else{ - this.reRenderInPosition(function(){ - self._setDataActual(data); - }); - } - }else{ - this.resetScroll(); - this._setDataActual(data); - } - - resolve(); - }); -}; - -RowManager.prototype._setDataActual = function(data, renderInPosition){ - var self = this; - - self.table.options.dataLoading.call(this.table, data); - - self.rows.forEach(function(row){ - row.wipe(); - }); - - self.rows = []; - - if(this.table.options.history && this.table.modExists("history")){ - this.table.modules.history.clear(); - } - - if(Array.isArray(data)){ - - if(this.table.modExists("selectRow")){ - this.table.modules.selectRow.clearSelectionData(); - } - - data.forEach(function(def, i){ - if(def && typeof def === "object"){ - var row = new Row(def, self); - self.rows.push(row); - }else{ - console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:", def); - } - }); - - self.table.options.dataLoaded.call(this.table, data); - - self.refreshActiveData(false, false, renderInPosition); - }else{ - console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ", typeof data, "\nData: ", data); - } -}; - -RowManager.prototype.deleteRow = function(row){ - var allIndex = this.rows.indexOf(row), - activeIndex = this.activeRows.indexOf(row); - - if(activeIndex > -1){ - this.activeRows.splice(activeIndex, 1); - } - - if(allIndex > -1){ - this.rows.splice(allIndex, 1); - } - - this.setActiveRows(this.activeRows); - - this.displayRowIterator(function(rows){ - var displayIndex = rows.indexOf(row); - - if(displayIndex > -1){ - rows.splice(displayIndex, 1); - } - }); - - this.reRenderInPosition(); - - this.table.options.rowDeleted.call(this.table, row.getComponent()); - - this.table.options.dataEdited.call(this.table, this.getData()); - - if(this.table.options.groupBy && this.table.modExists("groupRows")){ - this.table.modules.groupRows.updateGroupRows(true); - }else if(this.table.options.pagination && this.table.modExists("page")){ - this.refreshActiveData(false, false, true); - }else{ - if(this.table.options.pagination && this.table.modExists("page")){ - this.refreshActiveData("page"); - } - } - -}; - -RowManager.prototype.addRow = function(data, pos, index, blockRedraw){ - - var row = this.addRowActual(data, pos, index, blockRedraw); - - if(this.table.options.history && this.table.modExists("history")){ - this.table.modules.history.action("rowAdd", row, {data:data, pos:pos, index:index}); - } - - return row; -}; - -//add multiple rows -RowManager.prototype.addRows = function(data, pos, index){ - var self = this, - length = 0, - rows = []; - - return new Promise((resolve, reject) => { - pos = this.findAddRowPos(pos); - - if(!Array.isArray(data)){ - data = [data]; - } - - length = data.length - 1; - - if((typeof index == "undefined" && pos) || (typeof index !== "undefined" && !pos)){ - data.reverse(); - } - - data.forEach(function(item, i){ - var row = self.addRow(item, pos, index, true); - rows.push(row); - }); - - if(this.table.options.groupBy && this.table.modExists("groupRows")){ - this.table.modules.groupRows.updateGroupRows(true); - }else if(this.table.options.pagination && this.table.modExists("page")){ - this.refreshActiveData(false, false, true); - }else{ - this.reRenderInPosition(); - } - - //recalc column calculations if present - if(this.table.modExists("columnCalcs")){ - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - - resolve(rows); - }); -}; - -RowManager.prototype.findAddRowPos = function(pos){ - if(typeof pos === "undefined"){ - pos = this.table.options.addRowPos; - } - - if(pos === "pos"){ - pos = true; - } - - if(pos === "bottom"){ - pos = false; - } - - return pos; -}; - - -RowManager.prototype.addRowActual = function(data, pos, index, blockRedraw){ - var row = data instanceof Row ? data : new Row(data || {}, this), - top = this.findAddRowPos(pos), - dispRows; - - if(!index && this.table.options.pagination && this.table.options.paginationAddRow == "page"){ - dispRows = this.getDisplayRows(); - - if(top){ - if(dispRows.length){ - index = dispRows[0]; - }else{ - if(this.activeRows.length){ - index = this.activeRows[this.activeRows.length-1]; - top = false; - } - } - }else{ - if(dispRows.length){ - index = dispRows[dispRows.length - 1]; - top = dispRows.length < this.table.modules.page.getPageSize() ? false : true; - } - } - } - - if(index){ - index = this.findRow(index); - } - - if(this.table.options.groupBy && this.table.modExists("groupRows")){ - this.table.modules.groupRows.assignRowToGroup(row); - - var groupRows = row.getGroup().rows; - - if(groupRows.length > 1){ - - if(!index || (index && groupRows.indexOf(index) == -1)){ - if(top){ - if(groupRows[0] !== row){ - index = groupRows[0]; - this._moveRowInArray(row.getGroup().rows, row, index, top); - } - }else{ - if(groupRows[groupRows.length -1] !== row){ - index = groupRows[groupRows.length -1]; - this._moveRowInArray(row.getGroup().rows, row, index, top); - } - } - }else{ - this._moveRowInArray(row.getGroup().rows, row, index, top); - } - } - } - - if(index){ - let allIndex = this.rows.indexOf(index), - activeIndex = this.activeRows.indexOf(index); - - this.displayRowIterator(function(rows){ - var displayIndex = rows.indexOf(index); - - if(displayIndex > -1){ - rows.splice((top ? displayIndex : displayIndex + 1), 0, row); - } - }); - - if(activeIndex > -1){ - this.activeRows.splice((top ? activeIndex : activeIndex + 1), 0, row); - } - - if(allIndex > -1){ - this.rows.splice((top ? allIndex : allIndex + 1), 0, row); - } - - }else{ - - if(top){ - - this.displayRowIterator(function(rows){ - rows.unshift(row); - }); - - this.activeRows.unshift(row); - this.rows.unshift(row); - }else{ - this.displayRowIterator(function(rows){ - rows.push(row); - }); - - this.activeRows.push(row); - this.rows.push(row); - } - } - - this.setActiveRows(this.activeRows); - - this.table.options.rowAdded.call(this.table, row.getComponent()); - - this.table.options.dataEdited.call(this.table, this.getData()); - - if(!blockRedraw){ - this.reRenderInPosition(); - } - - return row; -}; - -RowManager.prototype.moveRow = function(from, to, after){ - if(this.table.options.history && this.table.modExists("history")){ - this.table.modules.history.action("rowMove", from, {pos:this.getRowPosition(from), to:to, after:after}); - } - - this.moveRowActual(from, to, after); - - this.table.options.rowMoved.call(this.table, from.getComponent()); -}; - - -RowManager.prototype.moveRowActual = function(from, to, after){ - var self = this; - this._moveRowInArray(this.rows, from, to, after); - this._moveRowInArray(this.activeRows, from, to, after); - - this.displayRowIterator(function(rows){ - self._moveRowInArray(rows, from, to, after); - }); - - if(this.table.options.groupBy && this.table.modExists("groupRows")){ - var toGroup = to.getGroup(); - var fromGroup = from.getGroup(); - - if(toGroup === fromGroup){ - this._moveRowInArray(toGroup.rows, from, to, after); - }else{ - if(fromGroup){ - fromGroup.removeRow(from); - } - - toGroup.insertRow(from, to, after); - } - } -}; - - -RowManager.prototype._moveRowInArray = function(rows, from, to, after){ - var fromIndex, toIndex, start, end; - - if(from !== to){ - - fromIndex = rows.indexOf(from); - - if (fromIndex > -1) { - - rows.splice(fromIndex, 1); - - toIndex = rows.indexOf(to); - - if (toIndex > -1) { - - if(after){ - rows.splice(toIndex+1, 0, from); - }else{ - rows.splice(toIndex, 0, from); - } - - }else{ - rows.splice(fromIndex, 0, from); - } - } - - //restyle rows - if(rows === this.getDisplayRows()){ - - start = fromIndex < toIndex ? fromIndex : toIndex; - end = toIndex > fromIndex ? toIndex : fromIndex +1; - - for(let i = start; i <= end; i++){ - if(rows[i]){ - this.styleRow(rows[i], i); - } - } - } - } -}; - -RowManager.prototype.clearData = function(){ - this.setData([]); -}; - -RowManager.prototype.getRowIndex = function(row){ - return this.findRowIndex(row, this.rows); -}; - - -RowManager.prototype.getDisplayRowIndex = function(row){ - var index = this.getDisplayRows().indexOf(row); - return index > -1 ? index : false; -}; - -RowManager.prototype.nextDisplayRow = function(row, rowOnly){ - var index = this.getDisplayRowIndex(row), - nextRow = false; - - - if(index !== false && index < this.displayRowsCount -1){ - nextRow = this.getDisplayRows()[index+1]; - } - - if(nextRow && (!(nextRow instanceof Row) || nextRow.type != "row")){ - return this.nextDisplayRow(nextRow, rowOnly); - } - - return nextRow; -}; - -RowManager.prototype.prevDisplayRow = function(row, rowOnly){ - var index = this.getDisplayRowIndex(row), - prevRow = false; - - if(index){ - prevRow = this.getDisplayRows()[index-1]; - } - - if(prevRow && (!(prevRow instanceof Row) || prevRow.type != "row")){ - return this.prevDisplayRow(prevRow, rowOnly); - } - - return prevRow; -}; - -RowManager.prototype.findRowIndex = function(row, list){ - var rowIndex; - - row = this.findRow(row); - - if(row){ - rowIndex = list.indexOf(row); - - if(rowIndex > -1){ - return rowIndex; - } - } - - return false; -}; - - -RowManager.prototype.getData = function(active, transform){ - var self = this, - output = []; - - var rows = active ? self.activeRows : self.rows; - - rows.forEach(function(row){ - output.push(row.getData(transform || "data")); - }); - - return output; -}; - -RowManager.prototype.getHtml = function(active){ - var data = this.getData(active), - columns = [], - header = "", - body = "", - table = ""; - - //build header row - this.table.columnManager.getColumns().forEach(function(column){ - var def = column.getDefinition(); - - if(column.visible && !def.hideInHtml){ - header += `${(def.title || "")}`; - columns.push(column); - } - }); - - //build body rows - data.forEach(function(rowData){ - var row = ""; - - columns.forEach(function(column){ - var value = column.getFieldValue(rowData); - - if(typeof value === "undefined" || value === null){ - value = ":"; - } - - row += `${value}`; - }); - - body += `${row}`; - }); - - //build table - table = ` - - ${header} - - ${body} -
`; - - return table; - }; - - RowManager.prototype.getComponents = function(active){ - var self = this, - output = []; - - var rows = active ? self.activeRows : self.rows; - - rows.forEach(function(row){ - output.push(row.getComponent()); - }); - - return output; - } - - RowManager.prototype.getDataCount = function(active){ - return active ? this.rows.length : this.activeRows.length; - }; - - RowManager.prototype._genRemoteRequest = function(){ - var self = this, - table = self.table, - options = table.options, - params = {}; - - if(table.modExists("page")){ - //set sort data if defined - if(options.ajaxSorting){ - let sorters = self.table.modules.sort.getSort(); - - sorters.forEach(function(item){ - delete item.column; - }); - - params[self.table.modules.page.paginationDataSentNames.sorters] = sorters; - } - - //set filter data if defined - if(options.ajaxFiltering){ - let filters = self.table.modules.filter.getFilters(true, true); - - params[self.table.modules.page.paginationDataSentNames.filters] = filters; - } - - - self.table.modules.ajax.setParams(params, true); - } - - table.modules.ajax.sendRequest() - .then((data)=>{ - self.setData(data); - }) - .catch((e)=>{}); - -}; - -//choose the path to refresh data after a filter update -RowManager.prototype.filterRefresh = function(){ - var table = this.table, - options = table.options, - left = this.scrollLeft; - - - if(options.ajaxFiltering){ - if(options.pagination == "remote" && table.modExists("page")){ - table.modules.page.reset(true); - table.modules.page.setPage(1); - }else if(options.ajaxProgressiveLoad){ - table.modules.ajax.loadData(); - }else{ - //assume data is url, make ajax call to url to get data - this._genRemoteRequest(); - } - }else{ - this.refreshActiveData("filter"); - } - - this.scrollHorizontal(left); -}; - -//choose the path to refresh data after a sorter update -RowManager.prototype.sorterRefresh = function(){ - var table = this.table, - options = this.table.options, - left = this.scrollLeft; - - if(options.ajaxSorting){ - if((options.pagination == "remote" || options.progressiveLoad) && table.modExists("page")){ - table.modules.page.reset(true); - table.modules.page.setPage(1); - }else if(options.ajaxProgressiveLoad){ - table.modules.ajax.loadData(); - }else{ - //assume data is url, make ajax call to url to get data - this._genRemoteRequest(); - } - }else{ - this.refreshActiveData("sort"); - } - - this.scrollHorizontal(left); -}; - -RowManager.prototype.scrollHorizontal = function(left){ - this.scrollLeft = left; - this.element.scrollLeft = left; - - if(this.table.options.groupBy){ - this.table.modules.groupRows.scrollHeaders(left); - } - - if(this.table.modExists("columnCalcs")){ - this.table.modules.columnCalcs.scrollHorizontal(left); - } -}; - -//set active data set -RowManager.prototype.refreshActiveData = function(stage, skipStage, renderInPosition){ - var self = this, - table = this.table, - displayIndex; - - if(!stage){ - stage = "all"; - } - - if(table.options.selectable && !table.options.selectablePersistence && table.modExists("selectRow")){ - table.modules.selectRow.deselectRows(); - } - - //cascade through data refresh stages - switch(stage){ - case "all": - - case "filter": - if(!skipStage){ - if(table.modExists("filter")){ - self.setActiveRows(table.modules.filter.filter(self.rows)); - }else{ - self.setActiveRows(self.rows.slice(0)); - } - }else{ - skipStage = false; - } - - case "sort": - if(!skipStage){ - if(table.modExists("sort")){ - table.modules.sort.sort(); - } - }else{ - skipStage = false; - } - - //generic stage to allow for pipeline trigger after the data manipulation stage - case "display": - this.resetDisplayRows(); - - case "freeze": - if(!skipStage){ - if(this.table.modExists("frozenRows")){ - if(table.modules.frozenRows.isFrozen()){ - if(!table.modules.frozenRows.getDisplayIndex()){ - table.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.frozenRows.getDisplayIndex(); - - displayIndex = self.setDisplayRows(table.modules.frozenRows.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if(displayIndex !== true){ - table.modules.frozenRows.setDisplayIndex(displayIndex); - } - } - } - }else{ - skipStage = false; - } - - case "group": - if(!skipStage){ - if(table.options.groupBy && table.modExists("groupRows")){ - - if(!table.modules.groupRows.getDisplayIndex()){ - table.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.groupRows.getDisplayIndex(); - - displayIndex = self.setDisplayRows(table.modules.groupRows.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if(displayIndex !== true){ - table.modules.groupRows.setDisplayIndex(displayIndex); - } - } - }else{ - skipStage = false; - } - - - - case "tree": - - if(!skipStage){ - if(table.options.dataTree && table.modExists("dataTree")){ - if(!table.modules.dataTree.getDisplayIndex()){ - table.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.dataTree.getDisplayIndex(); - - displayIndex = self.setDisplayRows(table.modules.dataTree.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if(displayIndex !== true){ - table.modules.dataTree.setDisplayIndex(displayIndex); - } - } - }else{ - skipStage = false; - } - - if(table.options.pagination && table.modExists("page") && !renderInPosition){ - if(table.modules.page.getMode() == "local"){ - table.modules.page.reset(); - } - } - - case "page": - if(!skipStage){ - if(table.options.pagination && table.modExists("page")){ - - if(!table.modules.page.getDisplayIndex()){ - table.modules.page.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.page.getDisplayIndex(); - - if(table.modules.page.getMode() == "local"){ - table.modules.page.setMaxRows(this.getDisplayRows(displayIndex - 1).length); - } - - - displayIndex = self.setDisplayRows(table.modules.page.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if(displayIndex !== true){ - table.modules.page.setDisplayIndex(displayIndex); - } - } - }else{ - skipStage = false; - } - } - - - if(Tabulator.prototype.helpers.elVisible(self.element)){ - if(renderInPosition){ - self.reRenderInPosition(); - }else{ - self.renderTable(); - if(table.options.layoutColumnsOnNewData){ - self.table.columnManager.redraw(true); - } - } - } - - if(table.modExists("columnCalcs")){ - table.modules.columnCalcs.recalc(this.activeRows); - } -}; - -RowManager.prototype.setActiveRows = function(activeRows){ - this.activeRows = activeRows; - this.activeRowsCount = this.activeRows.length; -}; - -//reset display rows array -RowManager.prototype.resetDisplayRows = function(){ - this.displayRows = []; - - this.displayRows.push(this.activeRows.slice(0)); - - this.displayRowsCount = this.displayRows[0].length; - - if(this.table.modExists("frozenRows")){ - this.table.modules.frozenRows.setDisplayIndex(0); - } - - if(this.table.options.groupBy && this.table.modExists("groupRows")){ - this.table.modules.groupRows.setDisplayIndex(0); - } - - if(this.table.options.pagination && this.table.modExists("page")){ - this.table.modules.page.setDisplayIndex(0); - } -}; - - -RowManager.prototype.getNextDisplayIndex = function(){ - return this.displayRows.length; -}; - -//set display row pipeline data -RowManager.prototype.setDisplayRows = function(displayRows, index){ - - var output = true; - - if(index && typeof this.displayRows[index] != "undefined"){ - this.displayRows[index] = displayRows; - output = true; - }else{ - this.displayRows.push(displayRows); - output = index = this.displayRows.length -1; - } - - if(index == this.displayRows.length -1){ - this.displayRowsCount = this.displayRows[this.displayRows.length -1].length; - } - - return output; -}; - -RowManager.prototype.getDisplayRows = function(index){ - if(typeof index == "undefined"){ - return this.displayRows.length ? this.displayRows[this.displayRows.length -1] : []; - }else{ - return this.displayRows[index] || []; - } - -}; - -//repeat action accross display rows -RowManager.prototype.displayRowIterator = function(callback){ - this.displayRows.forEach(callback); - - this.displayRowsCount = this.displayRows[this.displayRows.length -1].length; -}; - -//return only actual rows (not group headers etc) -RowManager.prototype.getRows = function(){ - return this.rows; -}; - -///////////////// Table Rendering ///////////////// - -//trigger rerender of table in current position -RowManager.prototype.reRenderInPosition = function(callback){ - if(this.getRenderMode() == "virtual"){ - - var scrollTop = this.element.scrollTop; - var topRow = false; - var topOffset = false; - - var left = this.scrollLeft; - - var rows = this.getDisplayRows(); - - for(var i = this.vDomTop; i <= this.vDomBottom; i++){ - - if(rows[i]){ - var diff = scrollTop - rows[i].getElement().offsetTop; - - if(topOffset === false || Math.abs(diff) < topOffset){ - topOffset = diff; - topRow = i; - }else{ - break; - } - } - } - - if(callback){ - callback(); - } - - this._virtualRenderFill((topRow === false ? this.displayRowsCount - 1 : topRow), true, topOffset || 0); - - this.scrollHorizontal(left); - }else{ - this.renderTable(); - } -}; - -RowManager.prototype.setRenderMode = function(){ - if((this.table.element.clientHeight || this.table.options.height) && this.table.options.virtualDom){ - this.renderMode = "virtual"; - }else{ - this.renderMode = "classic"; - } -}; - - -RowManager.prototype.getRenderMode = function(){ - return this.renderMode; -}; - -RowManager.prototype.renderTable = function(){ - var self = this; - - self.table.options.renderStarted.call(this.table); - - self.element.scrollTop = 0; - - switch(self.renderMode){ - case "classic": - self._simpleRender(); - break; - - case "virtual": - self._virtualRenderFill(); - break; - } - - if(self.firstRender){ - if(self.displayRowsCount){ - self.firstRender = false; - self.table.modules.layout.layout(); - }else{ - self.renderEmptyScroll(); - } - } - - if(self.table.modExists("frozenColumns")){ - self.table.modules.frozenColumns.layout(); - } - - - if(!self.displayRowsCount){ - if(self.table.options.placeholder){ - - if(this.renderMode){ - self.table.options.placeholder.setAttribute("tabulator-render-mode", this.renderMode); - } - - self.getElement().appendChild(self.table.options.placeholder); - } - } - - self.table.options.renderComplete.call(this.table); -}; - -//simple render on heightless table -RowManager.prototype._simpleRender = function(){ - var self = this, - element = this.tableElement; - - self._clearVirtualDom(); - - if(self.displayRowsCount){ - - var onlyGroupHeaders = true; - - self.getDisplayRows().forEach(function(row, index){ - self.styleRow(row, index); - element.appendChild(row.getElement()); - row.initialize(true); - - if(row.type !== "group"){ - onlyGroupHeaders = false; - } - }); - - if(onlyGroupHeaders){ - element.style.minWidth = self.table.columnManager.getWidth() + "px"; - } - }else{ - self.renderEmptyScroll(); - } -}; - -//show scrollbars on empty table div -RowManager.prototype.renderEmptyScroll = function(){ - this.tableElement.style.minWidth = this.table.columnManager.getWidth(); - this.tableElement.style.minHeight = "1px"; - // this.tableElement.style.visibility = "hidden"; -}; - -RowManager.prototype._clearVirtualDom = function(){ - var element = this.tableElement; - - if(this.table.options.placeholder && this.table.options.placeholder.parentNode){ - this.table.options.placeholder.parentNode.removeChild(this.table.options.placeholder); - } - - // element.children.detach(); - while(element.firstChild) element.removeChild(element.firstChild); - - element.style.paddingTop = ""; - element.style.paddingBottom = ""; - element.style.minWidth = ""; - element.style.minHeight = ""; - element.style.visibility = ""; - - this.scrollTop = 0; - this.scrollLeft = 0; - this.vDomTop = 0; - this.vDomBottom = 0; - this.vDomTopPad = 0; - this.vDomBottomPad = 0; -}; - -RowManager.prototype.styleRow = function(row, index){ - var rowEl = row.getElement(); - - if(index % 2){ - rowEl.classList.add("tabulator-row-even"); - rowEl.classList.remove("tabulator-row-odd"); - }else{ - rowEl.classList.add("tabulator-row-odd"); - rowEl.classList.remove("tabulator-row-even"); - } -}; - -//full virtual render -RowManager.prototype._virtualRenderFill = function(position, forceMove, offset){ - var self = this, - element = self.tableElement, - holder = self.element, - topPad = 0, - rowsHeight = 0, - topPadHeight = 0, - i = 0, - onlyGroupHeaders = true, - rows = self.getDisplayRows(); - - position = position || 0; - - offset = offset || 0; - - if(!position){ - self._clearVirtualDom(); - }else{ - // element.children().detach(); - while(element.firstChild) element.removeChild(element.firstChild); - - //check if position is too close to bottom of table - let heightOccpied = (self.displayRowsCount - position + 1) * self.vDomRowHeight; - - if(heightOccpied < self.height){ - position -= Math.ceil((self.height - heightOccpied) / self.vDomRowHeight); - - if(position < 0){ - position = 0; - } - } - - //calculate initial pad - topPad = Math.min(Math.max(Math.floor(self.vDomWindowBuffer / self.vDomRowHeight), self.vDomWindowMinMarginRows), position); - position -= topPad; - } - - if(self.displayRowsCount && Tabulator.prototype.helpers.elVisible(self.element)){ - - self.vDomTop = position; - - self.vDomBottom = position -1; - - while ((rowsHeight <= self.height + self.vDomWindowBuffer || i < self.vDomWindowMinTotalRows) && self.vDomBottom < self.displayRowsCount -1){ - var index = self.vDomBottom + 1, - row = rows[index]; - - self.styleRow(row, index); - - element.appendChild(row.getElement()); - if(!row.initialized){ - row.initialize(true); - }else{ - if(!row.heightInitialized){ - row.normalizeHeight(true); - } - } - - if(i < topPad){ - topPadHeight += row.getHeight(); - }else{ - rowsHeight += row.getHeight(); - } - - if(row.type !== "group"){ - onlyGroupHeaders = false; - } - - self.vDomBottom ++; - i++; - } - - if(!position){ - this.vDomTopPad = 0; - //adjust rowheight to match average of rendered elements - self.vDomRowHeight = Math.floor((rowsHeight + topPadHeight) / i); - self.vDomBottomPad = self.vDomRowHeight * (self.displayRowsCount - self.vDomBottom -1); - - self.vDomScrollHeight = topPadHeight + rowsHeight + self.vDomBottomPad - self.height; - }else{ - self.vDomTopPad = !forceMove ? self.scrollTop - topPadHeight : (self.vDomRowHeight * this.vDomTop) + offset; - self.vDomBottomPad = self.vDomBottom == self.displayRowsCount-1 ? 0 : Math.max(self.vDomScrollHeight - self.vDomTopPad - rowsHeight - topPadHeight, 0); - } - - element.style.paddingTop = self.vDomTopPad + "px"; - element.style.paddingBottom = self.vDomBottomPad + "px"; - - if(forceMove){ - this.scrollTop = self.vDomTopPad + (topPadHeight) + offset - (this.element.scrollWidth > this.element.clientWidth ? this.element.offsetHeight - this.element.clientHeight : 0); - } - - this.scrollTop = Math.min(this.scrollTop, this.element.scrollHeight - this.height); - - //adjust for horizontal scrollbar if present - if(this.element.scrollWidth > this.element.offsetWidth){ - this.scrollTop += this.element.offsetHeight - this.element.clientHeight; - } - - this.vDomScrollPosTop = this.scrollTop; - this.vDomScrollPosBottom = this.scrollTop; - - holder.scrollTop = this.scrollTop; - - element.style.minWidth = onlyGroupHeaders ? self.table.columnManager.getWidth() + "px" : ""; - - if(self.table.options.groupBy){ - if(self.table.modules.layout.getMode() != "fitDataFill" && self.displayRowsCount == self.table.modules.groupRows.countGroups()){ - self.tableElement.style.minWidth = self.table.columnManager.getWidth(); - } - } - - }else{ - this.renderEmptyScroll(); - } -}; - -//handle vertical scrolling -RowManager.prototype.scrollVertical = function(dir){ - var topDiff = this.scrollTop - this.vDomScrollPosTop; - var bottomDiff = this.scrollTop - this.vDomScrollPosBottom; - var margin = this.vDomWindowBuffer * 2; - - if(-topDiff > margin || bottomDiff > margin){ - //if big scroll redraw table; - var left = this.scrollLeft; - this._virtualRenderFill(Math.floor((this.element.scrollTop / this.element.scrollHeight) * this.displayRowsCount)); - this.scrollHorizontal(left); - }else{ - - if(dir){ - //scrolling up - if(topDiff < 0){ - this._addTopRow(-topDiff); - } - - if(topDiff < 0){ - - //hide bottom row if needed - if(this.vDomScrollHeight - this.scrollTop > this.vDomWindowBuffer){ - this._removeBottomRow(-bottomDiff); - } - } - }else{ - //scrolling down - if(topDiff >= 0){ - - //hide top row if needed - if(this.scrollTop > this.vDomWindowBuffer){ - this._removeTopRow(topDiff); - } - } - - if(bottomDiff >= 0){ - this._addBottomRow(bottomDiff); - } - } - } -}; - -RowManager.prototype._addTopRow = function(topDiff, i=0){ - var table = this.tableElement, - rows = this.getDisplayRows(); - - if(this.vDomTop){ - let index = this.vDomTop -1, - topRow = rows[index], - topRowHeight = topRow.getHeight() || this.vDomRowHeight; - - //hide top row if needed - if(topDiff >= topRowHeight){ - this.styleRow(topRow, index); - table.insertBefore(topRow.getElement(), table.firstChild); - if(!topRow.initialized || !topRow.heightInitialized){ - this.vDomTopNewRows.push(topRow); - - if(!topRow.heightInitialized){ - topRow.clearCellHeight(); - } - } - topRow.initialize(); - - this.vDomTopPad -= topRowHeight; - - if(this.vDomTopPad < 0){ - this.vDomTopPad = index * this.vDomRowHeight; - } - - if(!index){ - this.vDomTopPad = 0; - } - - table.style.paddingTop = this.vDomTopPad + "px"; - this.vDomScrollPosTop -= topRowHeight; - this.vDomTop--; - } - - topDiff = -(this.scrollTop - this.vDomScrollPosTop); - - if(i < this.vDomMaxRenderChain && this.vDomTop && topDiff >= (rows[this.vDomTop -1].getHeight() || this.vDomRowHeight)){ - this._addTopRow(topDiff, i+1); - }else{ - this._quickNormalizeRowHeight(this.vDomTopNewRows); - } - - } - -}; - -RowManager.prototype._removeTopRow = function(topDiff){ - var table = this.tableElement, - topRow = this.getDisplayRows()[this.vDomTop], - topRowHeight = topRow.getHeight() || this.vDomRowHeight; - - if(topDiff >= topRowHeight){ - - var rowEl = topRow.getElement(); - rowEl.parentNode.removeChild(rowEl); - - this.vDomTopPad += topRowHeight; - table.style.paddingTop = this.vDomTopPad + "px"; - this.vDomScrollPosTop += this.vDomTop ? topRowHeight : topRowHeight + this.vDomWindowBuffer; - this.vDomTop++; - - topDiff = this.scrollTop - this.vDomScrollPosTop; - - this._removeTopRow(topDiff); - } - -}; - -RowManager.prototype._addBottomRow = function(bottomDiff, i=0){ - var table = this.tableElement, - rows = this.getDisplayRows(); - - if(this.vDomBottom < this.displayRowsCount -1){ - let index = this.vDomBottom + 1, - bottomRow = rows[index], - bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; - - //hide bottom row if needed - if(bottomDiff >= bottomRowHeight){ - this.styleRow(bottomRow, index); - table.appendChild(bottomRow.getElement()); - - if(!bottomRow.initialized || !bottomRow.heightInitialized){ - this.vDomBottomNewRows.push(bottomRow); - - if(!bottomRow.heightInitialized){ - bottomRow.clearCellHeight(); - } - } - - bottomRow.initialize(); - - this.vDomBottomPad -= bottomRowHeight; - - if(this.vDomBottomPad < 0 || index == this.displayRowsCount -1){ - this.vDomBottomPad = 0; - } - - table.style.paddingBottom = this.vDomBottomPad + "px"; - this.vDomScrollPosBottom += bottomRowHeight; - this.vDomBottom++; - } - - bottomDiff = this.scrollTop - this.vDomScrollPosBottom; - - if(i < this.vDomMaxRenderChain && this.vDomBottom < this.displayRowsCount -1 && bottomDiff >= (rows[this.vDomBottom + 1].getHeight() || this.vDomRowHeight)){ - this._addBottomRow(bottomDiff, i+1); - }else{ - this._quickNormalizeRowHeight(this.vDomBottomNewRows); - } - } -}; - -RowManager.prototype._removeBottomRow = function(bottomDiff){ - var table = this.tableElement, - bottomRow = this.getDisplayRows()[this.vDomBottom], - bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; - - if(bottomDiff >= bottomRowHeight){ - - var rowEl = bottomRow.getElement(); - - if(rowEl.parentNode){ - rowEl.parentNode.removeChild(rowEl); - } - - this.vDomBottomPad += bottomRowHeight; - - if(this.vDomBottomPad < 0){ - this.vDomBottomPad = 0; - } - - table.style.paddingBottom = this.vDomBottomPad + "px"; - this.vDomScrollPosBottom -= bottomRowHeight; - this.vDomBottom--; - - bottomDiff = -(this.scrollTop - this.vDomScrollPosBottom); - - this._removeBottomRow(bottomDiff); - } -}; - -RowManager.prototype._quickNormalizeRowHeight = function(rows){ - rows.forEach(function(row){ - row.calcHeight(); - }); - - rows.forEach(function(row){ - row.setCellHeight(); - }); - - rows.length = 0; -}; - -//normalize height of active rows -RowManager.prototype.normalizeHeight = function(){ - this.activeRows.forEach(function(row){ - row.normalizeHeight(); - }); -}; - -//adjust the height of the table holder to fit in the Tabulator element -RowManager.prototype.adjustTableSize = function(){ - - if(this.renderMode === "virtual"){ - this.height = this.element.clientHeight; - this.vDomWindowBuffer = this.table.options.virtualDomBuffer || this.height; - - let otherHeight = this.columnManager.getElement().offsetHeight + (this.table.footerManager && !this.table.footerManager.external ? this.table.footerManager.getElement().offsetHeight : 0); - - this.element.style.minHeight = "calc(100% - " + otherHeight + "px)"; - this.element.style.height = "calc(100% - " + otherHeight + "px)"; - this.element.style.maxHeight = "calc(100% - " + otherHeight + "px)"; - } -}; - -//renitialize all rows -RowManager.prototype.reinitialize = function(){ - this.rows.forEach(function(row){ - row.reinitialize(); - }); -}; - - -//redraw table -RowManager.prototype.redraw = function (force){ - var pos = 0, - left = this.scrollLeft; - - this.adjustTableSize(); - - if(!force){ - - if(self.renderMode == "classic"){ - - if(self.table.options.groupBy){ - self.refreshActiveData("group", false, false); - }else{ - this._simpleRender(); - } - - }else{ - this.reRenderInPosition(); - this.scrollHorizontal(left); - } - - if(!this.displayRowsCount){ - if(this.table.options.placeholder){ - this.getElement().appendChild(this.table.options.placeholder); - } - } - - }else{ - this.renderTable(); - } -}; - -RowManager.prototype.resetScroll = function(){ - this.element.scrollLeft = 0; - this.element.scrollTop = 0; - - if(this.table.browser === "ie"){ - var event = document.createEvent("Event"); - event.initEvent("scroll", false, true); - this.element.dispatchEvent(event); - }else{ - this.element.dispatchEvent(new Event('scroll')); - } -}; diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/functions4.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/functions4.scss deleted file mode 100644 index ca2dea30d6..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/functions4.scss +++ /dev/null @@ -1,118 +0,0 @@ -// Bootstrap functions -// -// Utility mixins and functions for evalutating source code across our variables, maps, and mixins. - -// Ascending -// Used to evaluate Sass maps like our grid breakpoints. -@mixin _assert-ascending($map, $map-name) { - $prev-key: null; - $prev-num: null; - @each $key, $num in $map { - @if $prev-num == null { - // Do nothing - } @else if not comparable($prev-num, $num) { - @warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !"; - } @else if $prev-num >= $num { - @warn "Invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} which isn't greater than #{$prev-num}, the value of the previous key '#{$prev-key}' !"; - } - $prev-key: $key; - $prev-num: $num; - } -} - -// Starts at zero -// Another grid mixin that ensures the min-width of the lowest breakpoint starts at 0. -@mixin _assert-starts-at-zero($map) { - $values: map-values($map); - $first-value: nth($values, 1); - @if $first-value != 0 { - @warn "First breakpoint in `$grid-breakpoints` must start at 0, but starts at #{$first-value}."; - } -} - -// Replace `$search` with `$replace` in `$string` -// Used on our SVG icon backgrounds for custom forms. -// -// @author Hugo Giraudel -// @param {String} $string - Initial string -// @param {String} $search - Substring to replace -// @param {String} $replace ('') - New value -// @return {String} - Updated string -@function str-replace($string, $search, $replace: "") { - $index: str-index($string, $search); - - @if $index { - @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace); - } - - @return $string; -} - -// Color contrast -@function color-yiq($color) { - $r: red($color); - $g: green($color); - $b: blue($color); - - $yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000; - - @if ($yiq >= $yiq-contrasted-threshold) { - @return $yiq-text-dark; - } @else { - @return $yiq-text-light; - } -} - -// Retrieve color Sass maps -@function color($key: "blue") { - @return map-get($colors, $key); -} - -@function theme-color($key: "primary") { - @return map-get($theme-colors, $key); -} - -@function gray($key: "100") { - @return map-get($grays, $key); -} - -// Request a theme color level -@function theme-color-level($color-name: "primary", $level: 0) { - $color: theme-color($color-name); - $color-base: if($level > 0, $black, $white); - $level: abs($level); - - @return mix($color-base, $color, $level * $theme-color-interval); -} - - -// Tables - -@mixin table-row-variant($state, $background) { - // Exact selectors below required to override `.table-striped` and prevent - // inheritance to nested tables. - .table-#{$state} { - &, - > th, - > td { - background-color: $background; - } - } - - // Hover states for `.table-hover` - // Note: this is not available for cells or rows within `thead` or `tfoot`. - .table-hover { - $hover-background: darken($background, 5%); - - .table-#{$state} { - @include hover { - background-color: $hover-background; - - > td, - > th { - background-color: $hover-background; - } - } - } - } -} diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/tabulator_bootstrap.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/tabulator_bootstrap.scss deleted file mode 100644 index afacfee1c7..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/tabulator_bootstrap.scss +++ /dev/null @@ -1,1021 +0,0 @@ -@import "variables.scss"; - -// Style conversion file, bootstrap to tabulator - -//Main Theme Variables -$backgroundColor: $table-bg !default; //background color of tabulator -$borderColor:$table-border-color !default; //border to tabulator -$textSize:$font-size-base !default; //table text size - -//header themeing -$headerBackgroundColor:#fff !default; //border to tabulator -$headerSeperatorColor:$table-border-color !default; //header bottom seperator color - -$cellPadding:$table-cell-padding !default; //padding round header -$cellPaddingCondensed:$table-condensed-cell-padding !default; //padding round header - -//column header arrows -$sortArrowActive: #666 !default; -$sortArrowInactive: #bbb !default; - -//row themeing -$rowBackgroundColor:$backgroundColor !default; //table row background color -$rowAltBackgroundColor:$table-bg-accent !default; //table row background color -$rowBorderColor:$table-border-color !default; //table border color -$rowHoverBackground:$table-bg-hover !default; //row background color on hover - -$rowSelectedBackground: #9ABCEA !default; //row background color when selected -$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered - - -$editBoxColor:#1D68CD !default; //border color for edit boxes -$errorColor:#dd0000 !default; //error indication - -//footer themeing -$footerBorderColor:$table-border-color !default; //footer border color -$footerSeperatorColor:$table-border-color !default; //footer bottom seperator color -$footerActiveColor:#d00 !default; //footer bottom active text color - - -//Tabulator Containing Element -.tabulator{ - position: relative; - background-color: $backgroundColor; - overflow:hidden; - font-size:$textSize; - text-align: left; - width: 100%; - max-width: 100%; - margin-bottom: $line-height-computed; - - -webkit-transform: translatez(0); - -moz-transform: translatez(0); - -ms-transform: translatez(0); - -o-transform: translatez(0); - transform: translatez(0); - - &[tabulator-layout="fitDataFill"]{ - .tabulator-tableHolder{ - .tabulator-table{ - min-width:100%; - } - } - } - - &.tabulator-block-select{ - user-select: none; - } - - //column header containing element - .tabulator-header{ - position:relative; - box-sizing: border-box; - - width:100%; - - border-bottom:2px solid $headerSeperatorColor; - background-color: $headerBackgroundColor; - font-weight:bold; - - white-space: nowrap; - overflow:hidden; - - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - - //individual column header element - .tabulator-col{ - display:inline-block; - position:relative; - box-sizing:border-box; - background-color: $headerBackgroundColor; - text-align:left; - vertical-align: bottom; - overflow: hidden; - - &.tabulator-moving{ - position: absolute; - border:1px solid $headerSeperatorColor; - background:darken($headerBackgroundColor, 10%); - pointer-events: none; - } - - //hold content of column header - .tabulator-col-content{ - box-sizing:border-box; - position: relative; - padding:$cellPadding; - - //hold title of column header - .tabulator-col-title{ - box-sizing:border-box; - width: 100%; - - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - vertical-align:bottom; - - //element to hold title editor - .tabulator-title-editor{ - box-sizing: border-box; - width: 100%; - - border:1px solid #999; - - padding:1px; - - background: #fff; - } - } - - //column sorter arrow - .tabulator-arrow{ - display: inline-block; - position: absolute; - top:14px; - right:8px; - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid $sortArrowInactive; - } - - } - - //complex header column group - &.tabulator-col-group{ - - //gelement to hold sub columns in column group - .tabulator-col-group-cols{ - position:relative; - display: flex; - - border-top:1px solid $borderColor; - overflow: hidden; - - .tabulator-col:last-child{ - margin-right:-1px; - } - } - } - - - //hide left resize handle on first column - &:first-child{ - .tabulator-col-resize-handle.prev{ - display: none; - } - } - - //placeholder element for sortable columns - &.ui-sortable-helper{ - position: absolute; - background-color:darken($headerBackgroundColor, 10%) !important; - border:1px solid $borderColor; - } - - //header filter containing element - .tabulator-header-filter{ - position: relative; - box-sizing: border-box; - margin-top:2px; - width:100%; - text-align: center; - - //styling adjustment for inbuilt editors - textarea{ - height:auto !important; - } - - svg{ - margin-top: 3px; - } - - input{ - &::-ms-clear { - width : 0; - height: 0; - } - } - } - - - //styling child elements for sortable columns - &.tabulator-sortable{ - .tabulator-col-title{ - padding-right:25px; - } - - &:hover{ - cursor:pointer; - background-color:darken($headerBackgroundColor, 10%); - } - - &[aria-sort="none"]{ - .tabulator-col-content .tabulator-arrow{ - border-top: none; - border-bottom: 6px solid $sortArrowInactive; - } - } - - &[aria-sort="asc"]{ - .tabulator-col-content .tabulator-arrow{ - border-top: none; - border-bottom: 6px solid $sortArrowActive; - } - } - - &[aria-sort="desc"]{ - .tabulator-col-content .tabulator-arrow{ - border-top: 6px solid $sortArrowActive; - border-bottom: none; - } - } - } - - &.tabulator-col-vertical{ - .tabulator-col-content{ - .tabulator-col-title{ - writing-mode: vertical-rl; - text-orientation: mixed; - - display:flex; - align-items:center; - justify-content:center; - } - } - - &.tabulator-col-vertical-flip{ - .tabulator-col-title{ - transform: rotate(180deg); - } - } - - &.tabulator-sortable{ - .tabulator-col-title{ - padding-right:0; - padding-top:20px; - } - - &.tabulator-col-vertical-flip{ - .tabulator-col-title{ - padding-right:0; - padding-bottom:20px; - } - - } - - .tabulator-arrow{ - right:calc(50% - 6px); - } - } - } - - } - - .tabulator-frozen{ - display: inline-block; - position: absolute; - - // background-color: inherit; - - z-index: 10; - - &.tabulator-frozen-left{ - border-right:2px solid $rowBorderColor; - } - - &.tabulator-frozen-right{ - border-left:2px solid $rowBorderColor; - } - } - - .tabulator-calcs-holder{ - box-sizing:border-box; - width:100%; - - background:lighten($headerBackgroundColor, 5%) !important; - - .tabulator-row{ - background:lighten($headerBackgroundColor, 5%) !important; - - .tabulator-col-resize-handle{ - display: none; - } - } - - border-top:1px solid $rowBorderColor; - border-bottom:1px solid $headerSeperatorColor; - - overflow: hidden; - } - - .tabulator-frozen-rows-holder{ - min-width:400%; - - &:empty{ - display: none; - } - } - } - - - - //scrolling element to hold table - .tabulator-tableHolder{ - position:relative; - width:100%; - white-space: nowrap; - overflow:auto; - -webkit-overflow-scrolling: touch; - - &:focus{ - outline: none; - } - - //default placeholder element - .tabulator-placeholder{ - box-sizing:border-box; - display: flex; - align-items:center; - - &[tabulator-render-mode="virtual"]{ - position: absolute; - top:0; - left:0; - height:100%; - } - - width:100%; - - span{ - display: inline-block; - - margin:0 auto; - padding:10px; - - color:#000; - font-weight: bold; - font-size: 20px; - } - } - - //element to hold table rows - .tabulator-table{ - position:relative; - display:inline-block; - background-color:$rowBackgroundColor; - white-space: nowrap; - overflow:visible; - - .tabulator-row{ - &.tabulator-calcs{ - font-weight: bold; - background:darken($rowAltBackgroundColor, 5%) !important; - - &.tabulator-calcs-top{ - border-bottom:2px solid $rowBorderColor; - } - - &.tabulator-calcs-bottom{ - border-top:2px solid $rowBorderColor; - } - } - } - } - } - - - //column resize handles - .tabulator-col-resize-handle{ - position:absolute; - right:0; - top:0; - bottom:0; - width:5px; - - &.prev{ - left:0; - right:auto; - } - - &:hover{ - cursor:ew-resize; - } - } - - - //footer element - .tabulator-footer{ - padding:5px 10px; - border-top:2px solid $footerSeperatorColor; - text-align:right; - font-weight:bold; - white-space:nowrap; - user-select:none; - - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - - .tabulator-calcs-holder{ - box-sizing:border-box; - width:calc(100% + 20px); - margin:-5px -10px 5px -10px; - - text-align: left; - - background:lighten($backgroundColor, 5%) !important; - - .tabulator-row{ - background:lighten($backgroundColor, 5%) !important; - - .tabulator-col-resize-handle{ - display: none; - } - } - - border-bottom:1px solid $rowBorderColor; - border-top:1px solid $rowBorderColor; - - overflow: hidden; - - &:only-child{ - margin-bottom:-5px; - border-bottom:none; - } - } - - //pagination container element - .tabulator-pages{ - margin:0 7px; - } - - //pagination button - .tabulator-page{ - display:inline-block; - margin:0 2px; - border:1px solid $footerBorderColor; - border-radius:3px; - padding:2px 5px; - background:rgba(255,255,255,.2); - font-family:inherit; - font-weight:inherit; - font-size:inherit; - - - &.active{ - color:$footerActiveColor; - } - - &:disabled{ - opacity:.5; - } - - &:not(.disabled){ - &:hover{ - cursor:pointer; - background:rgba(0,0,0,.2); - color:#fff; - } - } - } - } - - //holding div that contains loader and covers tabulator element to prevent interaction - .tabulator-loader{ - position:absolute; - display: flex; - align-items:center; - - top:0; - left:0; - z-index:100; - - height:100%; - width:100%; - background:rgba(0,0,0,.4); - text-align:center; - - //loading message element - .tabulator-loader-msg{ - display:inline-block; - - margin:0 auto; - padding:10px 20px; - - border-radius:10px; - - background:#fff; - font-weight:bold; - font-size:16px; - - //loading message - &.tabulator-loading{ - border:4px solid #333; - color:#000; - } - - //error message - &.tabulator-error{ - border:4px solid #D00; - color:#590000; - } - } - } - - - - //Bootstrap theming classes - - &.table-striped{ - .tabulator-row{ - &:nth-child(even){ - background-color: $rowAltBackgroundColor; - } - } - } - - &.table-bordered{ - border:1px solid $borderColor; - - .tabulator-header{ - .tabulator-col{ - border-right:1px solid $borderColor; - } - } - - .tabulator-tableHolder{ - .tabulator-table{ - .tabulator-row{ - .tabulator-cell{ - border-right:1px solid $borderColor; - } - } - } - } - - } - - &.table-condensed{ - .tabulator-header{ - .tabulator-col{ - .tabulator-col-content{ - padding:$cellPaddingCondensed; - } - } - } - - .tabulator-tableHolder{ - .tabulator-table{ - .tabulator-row{ - min-height:$textSize + ($cellPaddingCondensed * 2); - - .tabulator-cell{ - padding:$cellPaddingCondensed; - } - } - } - } - } - - - //row colors - .tabulator-tableHolder{ - .tabulator-table{ - .tabulator-row{ - &.active{ - background:$table-bg-active!important; - } - &.success{ - background:$state-success-bg!important; - } - &.info{ - background: $state-info-bg!important; - } - &.warning{ - background:$state-warning-bg!important; - } - &.danger{ - background:$state-danger-bg!important; - } - } - } - } - -} - -//row element -.tabulator-row{ - position: relative; - box-sizing: border-box; - - min-height:$textSize + ($cellPadding * 2); - background-color: $rowBackgroundColor; - border-bottom:1px solid $rowBorderColor; - - &.tabulator-selectable:hover{ - background-color:$rowHoverBackground !important; - cursor: pointer; - } - - &.tabulator-selected{ - background-color:$rowSelectedBackground; - } - - &.tabulator-selected:hover{ - background-color:$rowSelectedBackgroundHover; - cursor: pointer; - } - - &.tabulator-moving{ - position: absolute; - - border-top:1px solid $rowBorderColor; - border-bottom:1px solid $rowBorderColor; - - pointer-events: none !important; - z-index:15; - } - - //row resize handles - .tabulator-row-resize-handle{ - position:absolute; - right:0; - bottom:0; - left:0; - height:5px; - - &.prev{ - top:0; - bottom:auto; - } - - &:hover{ - cursor:ns-resize; - } - } - - .tabulator-frozen{ - display: inline-block; - position: absolute; - - background-color: inherit; - - z-index: 10; - - &.tabulator-frozen-left{ - border-right:2px solid $rowBorderColor; - } - - &.tabulator-frozen-right{ - border-left:2px solid $rowBorderColor; - } - } - - - .tabulator-responsive-collapse{ - box-sizing:border-box; - - padding:5px; - - border-top:1px solid $rowBorderColor; - border-bottom:1px solid $rowBorderColor; - - &:empty{ - display:none; - } - - table{ - font-size:$textSize; - - tr{ - td{ - position: relative; - - &:first-of-type{ - padding-right:10px; - } - } - } - } - } - - - //cell element - .tabulator-cell{ - display:inline-block; - position: relative; - box-sizing:border-box; - padding:$cellPadding; - vertical-align:middle; - white-space:nowrap; - overflow:hidden; - text-overflow:ellipsis; - - &:last-of-type{ - border-right: none; - } - - &.tabulator-editing{ - border:1px solid $editBoxColor; - padding: 0; - - input, select{ - border:1px; - background:transparent; - } - } - - &.tabulator-validation-fail{ - border:1px solid $errorColor; - input, select{ - border:1px; - background:transparent; - - color: $errorColor; - } - } - - //hide left resize handle on first column - &:first-child{ - .tabulator-col-resize-handle.prev{ - display: none; - } - } - - //movable row handle - &.tabulator-row-handle{ - - display: inline-flex; - align-items:center; - - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - - //handle holder - .tabulator-row-handle-box{ - width:80%; - - //Hamburger element - .tabulator-row-handle-bar{ - width:100%; - height:3px; - margin-top:2px; - background:#666; - } - } - } - - .tabulator-data-tree-branch{ - display:inline-block; - vertical-align:middle; - - height:9px; - width:7px; - - margin-top:-9px; - margin-right:5px; - - border-bottom-left-radius:1px; - - border-left:2px solid $rowBorderColor; - border-bottom:2px solid $rowBorderColor; - } - - .tabulator-data-tree-control{ - - display:inline-flex; - justify-content:center; - align-items:center; - vertical-align:middle; - - height:11px; - width:11px; - - margin-right:5px; - - border:1px solid #333; - border-radius:2px; - background:rgba(0, 0, 0, .1); - - overflow:hidden; - - &:hover{ - cursor:pointer; - background:rgba(0, 0, 0, .2); - } - - .tabulator-data-tree-control-collapse{ - display:inline-block; - position: relative; - - height: 7px; - width: 1px; - - background: transparent; - - &:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - - height: 1px; - width: 7px; - - background: #333; - } - } - - .tabulator-data-tree-control-expand{ - display:inline-block; - position: relative; - - height: 7px; - width: 1px; - - background: #333; - - &:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - - height: 1px; - width: 7px; - - background: #333; - } - } - - } - - .tabulator-responsive-collapse-toggle{ - display: inline-flex; - align-items:center; - justify-content:center; - - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - - height:15px; - width:15px; - - border-radius:20px; - background:#666; - - color:$rowBackgroundColor; - font-weight:bold; - font-size:1.1em; - - &:hover{ - opacity:.7; - } - - &.open{ - .tabulator-responsive-collapse-toggle-close{ - display:initial; - } - - .tabulator-responsive-collapse-toggle-open{ - display:none; - } - } - - .tabulator-responsive-collapse-toggle-close{ - display:none; - } - } - } - //row grouping element - &.tabulator-group{ - - box-sizing:border-box; - border-bottom:1px solid #999; - border-right:1px solid $rowBorderColor; - border-top:1px solid #999; - padding:5px; - padding-left:10px; - background:#fafafa; - font-weight:bold; - - min-width: 100%; - - &:hover{ - cursor:pointer; - background-color:rgba(0,0,0,.1); - } - - &.tabulator-group-visible{ - .tabulator-arrow{ - margin-right:10px; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-top: 6px solid $sortArrowActive; - border-bottom: 0; - } - } - - &.tabulator-group-level-1{ - .tabulator-arrow{ - margin-left:20px; - } - } - - &.tabulator-group-level-2{ - .tabulator-arrow{ - margin-left:40px; - } - } - - &.tabulator-group-level-3{ - .tabulator-arrow{ - margin-left:60px; - } - } - - &.tabulator-group-level-4{ - .tabulator-arrow{ - margin-left:80px; - } - } - - &.tabulator-group-level-5{ - .tabulator-arrow{ - margin-left:100px; - } - } - - //sorting arrow - .tabulator-arrow{ - display: inline-block; - width: 0; - height: 0; - margin-right:16px; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-right: 0; - border-left: 6px solid $sortArrowActive; - vertical-align:middle; - } - - span{ - margin-left:10px; - color:#666; - } - } -} - -.tabulator-edit-select-list{ - position: absolute; - display:inline-block; - box-sizing:border-box; - - max-height:200px; - - background:$rowBackgroundColor; - border:1px solid $rowBorderColor; - - font-size:$textSize; - - overflow-y:auto; - -webkit-overflow-scrolling: touch; - - z-index: 10000; - - .tabulator-edit-select-list-item{ - padding:4px; - - &.active{ - color:$rowBackgroundColor; - background:$editBoxColor; - } - - &:hover{ - cursor:pointer; - - color:$rowBackgroundColor; - background:$editBoxColor; - } - } - - .tabulator-edit-select-list-group{ - border-bottom:1px solid $rowBorderColor; - - padding:4px; - padding-top:6px; - - font-weight:bold; - } -} \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/tabulator_bootstrap4.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/tabulator_bootstrap4.scss deleted file mode 100644 index 93823a2f56..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/tabulator_bootstrap4.scss +++ /dev/null @@ -1,1215 +0,0 @@ -@import "functions4.scss"; -@import "variables4.scss"; - -// Style conversion file, bootstrap to tabulator - -//Main Theme Variables -$backgroundColor: $table-bg !default; //background color of tabulator -$borderColor:$table-border-color !default; //border to tabulator -$textSize:$font-size-base !default; //table text size - -//header themeing -$headerBackgroundColor:#fff !default; //border to tabulator -$headerSeperatorColor:$table-border-color !default; //header bottom seperator color - -$cellPadding:$table-cell-padding !default; //padding round header - -//column header arrows -$sortArrowActive: #666 !default; -$sortArrowInactive: #bbb !default; - -//row themeing -$rowBackgroundColor:$backgroundColor !default; //table row background color -$rowAltBackgroundColor: $table-accent-bg !default; //table row background color -$rowBorderColor:$table-border-color !default; //table border color -$rowHoverBackground:$table-hover-bg !default; //row background color on hover - -$rowSelectedBackground: #9ABCEA !default; //row background color when selected -$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered - - -$editBoxColor:#1D68CD !default; //border color for edit boxes -$errorColor:#dd0000 !default; //error indication - -//footer themeing -$footerBorderColor:$pagination-border-color !default; //footer border color -$footerSeperatorColor:$table-border-color !default; //footer bottom seperator color -$footerActiveColor:$pagination-active-color !default; //footer bottom active text color - - -//Tabulator Containing Element -.tabulator{ - position: relative; - background-color: $backgroundColor; - overflow:hidden; - font-size:$textSize; - text-align: left; - width: 100%; - max-width: 100%; - // margin-bottom: $line-height-computed; - - -webkit-transform: translatez(0); - -moz-transform: translatez(0); - -ms-transform: translatez(0); - -o-transform: translatez(0); - transform: translatez(0); - - &[tabulator-layout="fitDataFill"]{ - .tabulator-tableHolder{ - .tabulator-table{ - min-width:100%; - } - } - } - - &.tabulator-block-select{ - user-select: none; - } - - //column header containing element - .tabulator-header{ - position:relative; - box-sizing: border-box; - - width:100%; - - border-top:1px solid $headerSeperatorColor; - border-bottom:2px solid $headerSeperatorColor; - background-color: $headerBackgroundColor; - font-weight:bold; - - white-space: nowrap; - overflow:hidden; - - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - - //individual column header element - .tabulator-col{ - display:inline-block; - position:relative; - box-sizing:border-box; - background-color: $headerBackgroundColor; - text-align:left; - vertical-align: bottom; - overflow: hidden; - - &.tabulator-moving{ - position: absolute; - border:1px solid $headerSeperatorColor; - background:darken($headerBackgroundColor, 10%); - pointer-events: none; - } - - //hold content of column header - .tabulator-col-content{ - box-sizing:border-box; - position: relative; - padding:$cellPadding; - - //hold title of column header - .tabulator-col-title{ - box-sizing:border-box; - width: 100%; - - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - vertical-align:bottom; - - //element to hold title editor - .tabulator-title-editor{ - box-sizing: border-box; - width: 100%; - - border:1px solid #999; - - padding:1px; - - background: #fff; - } - } - - //column sorter arrow - .tabulator-arrow{ - display: inline-block; - position: absolute; - top:14px; - right:8px; - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid $sortArrowInactive; - } - - } - - //complex header column group - &.tabulator-col-group{ - - //gelement to hold sub columns in column group - .tabulator-col-group-cols{ - position:relative; - display: flex; - - border-top:1px solid $borderColor; - overflow: hidden; - - .tabulator-col:last-child{ - margin-right:-1px; - } - } - } - - - //hide left resize handle on first column - &:first-child{ - .tabulator-col-resize-handle.prev{ - display: none; - } - } - - //placeholder element for sortable columns - &.ui-sortable-helper{ - position: absolute; - background-color:darken($headerBackgroundColor, 10%) !important; - border:1px solid $borderColor; - } - - //header filter containing element - .tabulator-header-filter{ - position: relative; - box-sizing: border-box; - margin-top:2px; - width:100%; - text-align: center; - - //styling adjustment for inbuilt editors - textarea{ - height:auto !important; - } - - svg{ - margin-top: 3px; - } - - input{ - &::-ms-clear { - width : 0; - height: 0; - } - } - } - - - //styling child elements for sortable columns - &.tabulator-sortable{ - .tabulator-col-title{ - padding-right:25px; - } - - &:hover{ - cursor:pointer; - background-color:darken($headerBackgroundColor, 10%); - } - - &[aria-sort="none"]{ - .tabulator-col-content .tabulator-arrow{ - border-top: none; - border-bottom: 6px solid $sortArrowInactive; - } - } - - &[aria-sort="asc"]{ - .tabulator-col-content .tabulator-arrow{ - border-top: none; - border-bottom: 6px solid $sortArrowActive; - } - } - - &[aria-sort="desc"]{ - .tabulator-col-content .tabulator-arrow{ - border-top: 6px solid $sortArrowActive; - border-bottom: none; - } - } - } - - &.tabulator-col-vertical{ - .tabulator-col-content{ - .tabulator-col-title{ - writing-mode: vertical-rl; - text-orientation: mixed; - - display:flex; - align-items:center; - justify-content:center; - } - } - - &.tabulator-col-vertical-flip{ - .tabulator-col-title{ - transform: rotate(180deg); - } - } - - &.tabulator-sortable{ - .tabulator-col-title{ - padding-right:0; - padding-top:20px; - } - - &.tabulator-col-vertical-flip{ - .tabulator-col-title{ - padding-right:0; - padding-bottom:20px; - } - - } - - .tabulator-arrow{ - right:calc(50% - 6px); - } - } - } - - } - - .tabulator-frozen{ - display: inline-block; - position: absolute; - - // background-color: inherit; - - z-index: 10; - - &.tabulator-frozen-left{ - border-right:2px solid $rowBorderColor; - } - - &.tabulator-frozen-right{ - border-left:2px solid $rowBorderColor; - } - } - - .tabulator-calcs-holder{ - box-sizing:border-box; - width:100%; - - background:lighten($headerBackgroundColor, 5%) !important; - - .tabulator-row{ - background:lighten($headerBackgroundColor, 5%) !important; - - .tabulator-col-resize-handle{ - display: none; - } - } - - border-top:1px solid $rowBorderColor; - border-bottom:1px solid $headerSeperatorColor; - - overflow: hidden; - } - - .tabulator-frozen-rows-holder{ - min-width:400%; - - &:empty{ - display: none; - } - } - } - - - - //scrolling element to hold table - .tabulator-tableHolder{ - position:relative; - width:100%; - white-space: nowrap; - overflow:auto; - -webkit-overflow-scrolling: touch; - - &:focus{ - outline: none; - } - - //default placeholder element - .tabulator-placeholder{ - box-sizing:border-box; - display: flex; - align-items:center; - - &[tabulator-render-mode="virtual"]{ - position: absolute; - top:0; - left:0; - height:100%; - } - - width:100%; - - span{ - display: inline-block; - - margin:0 auto; - padding:10px; - - color:#000; - font-weight: bold; - font-size: 20px; - } - } - - //element to hold table rows - .tabulator-table{ - position:relative; - display:inline-block; - background-color:$rowBackgroundColor; - white-space: nowrap; - overflow:visible; - - .tabulator-row{ - &.tabulator-calcs{ - font-weight: bold; - background:darken($rowAltBackgroundColor, 5%) !important; - - &.tabulator-calcs-top{ - border-bottom:2px solid $rowBorderColor; - } - - &.tabulator-calcs-bottom{ - border-top:2px solid $rowBorderColor; - } - } - } - } - } - - - //column resize handles - .tabulator-col-resize-handle{ - position:absolute; - right:0; - top:0; - bottom:0; - width:5px; - - &.prev{ - left:0; - right:auto; - } - - &:hover{ - cursor:ew-resize; - } - } - - - //footer element - .tabulator-footer{ - padding:5px 10px; - border-top:2px solid $footerSeperatorColor; - text-align:right; - font-weight:bold; - white-space:nowrap; - user-select:none; - - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - - .tabulator-calcs-holder{ - box-sizing:border-box; - width:calc(100% + 20px); - margin:-5px -10px 5px -10px; - - text-align: left; - - background:lighten($backgroundColor, 5%) !important; - - .tabulator-row{ - background:lighten($backgroundColor, 5%) !important; - - .tabulator-col-resize-handle{ - display: none; - } - } - - border-bottom:1px solid $rowBorderColor; - border-top:1px solid $rowBorderColor; - - overflow: hidden; - - &:only-child{ - margin-bottom:-5px; - border-bottom:none; - } - } - - //pagination container element - .tabulator-pages{ - // margin:0 7px; - } - - //pagination button - .tabulator-page{ - display:inline-block; - - margin:0; - margin-top:5px; - padding:8px 12px; - - border:1px solid $footerBorderColor; - border-right:none; - - background:rgba(255,255,255,.2); - - color: $pagination-color; - font-family:inherit; - font-weight:normal; - font-size:inherit; - - &[data-page="first"]{ - border-top-left-radius:4px; - border-bottom-left-radius:4px; - } - - &[data-page="last"]{ - border:1px solid $footerBorderColor; - border-top-right-radius:4px; - border-bottom-right-radius:4px; - } - - &.active{ - border-color:$pagination-active-border-color; - background-color:$pagination-active-bg; - color:$footerActiveColor; - } - - &:disabled{ - border-color:$pagination-disabled-border-color; - background:$pagination-disabled-bg; - color:$pagination-disabled-color; - } - - &:not(.disabled){ - &:hover{ - cursor:pointer; - border-color:$pagination-hover-border-color; - background:$pagination-hover-bg; - color:$pagination-hover-color; - } - } - } - } - - //holding div that contains loader and covers tabulator element to prevent interaction - .tabulator-loader{ - position:absolute; - display: flex; - align-items:center; - - top:0; - left:0; - z-index:100; - - height:100%; - width:100%; - background:rgba(0,0,0,.4); - text-align:center; - - //loading message element - .tabulator-loader-msg{ - display:inline-block; - - margin:0 auto; - padding:10px 20px; - - border-radius:10px; - - background:#fff; - font-weight:bold; - font-size:16px; - - //loading message - &.tabulator-loading{ - border:4px solid #333; - color:#000; - } - - //error message - &.tabulator-error{ - border:4px solid #D00; - color:#590000; - } - } - } - - - - //Bootstrap theming classes - - &.thead-dark{ - .tabulator-header{ - border-color: $table-dark-border-color; - background-color: $table-dark-bg; - color: $table-dark-color; - - .tabulator-col{ - border-color: $table-dark-border-color; - background-color: $table-dark-bg; - color: $table-dark-color; - } - } - } - - &.table-dark{ - background-color: $table-dark-bg; - - &:not(.thead-light) .tabulator-header{ - border-color: $table-dark-border-color; - background-color: $table-dark-bg; - color: $table-dark-color; - - .tabulator-col{ - border-color: $table-dark-border-color; - background-color: $table-dark-bg; - color: $table-dark-color; - } - } - - .tabulator-tableHolder{ - color: $table-dark-color; - } - - - .tabulator-row{ - border-color: $table-dark-border-color; - - &:hover{ - background-color: $table-dark-hover-bg !important; - } - } - } - - &.table-striped{ - .tabulator-row{ - &:nth-child(even){ - background-color: $rowAltBackgroundColor; - - &.tabulator-selected{ - background-color:$rowSelectedBackground; - } - - &.tabulator-selectable:hover{ - background-color:$rowHoverBackground; - cursor: pointer; - } - - &.tabulator-selected:hover{ - background-color:$rowSelectedBackgroundHover; - cursor: pointer; - } - } - } - - &.table-dark{ - .tabulator-row{ - &:nth-child(even){ - background-color: $table-dark-accent-bg; - } - } - } - } - - &.table-bordered{ - border:1px solid $borderColor; - - .tabulator-header{ - .tabulator-col{ - border-right:1px solid $borderColor; - } - } - - .tabulator-tableHolder{ - .tabulator-table{ - .tabulator-row{ - .tabulator-cell{ - border-right:1px solid $borderColor; - } - } - } - } - } - - - &.table-borderless{ - .tabulator-header{ - border:none; - } - - .tabulator-row{ - border:none; - } - } - - &.table-sm{ - .tabulator-header{ - .tabulator-col{ - .tabulator-col-content{ - padding:$table-cell-padding-sm !important; - } - } - } - - .tabulator-tableHolder{ - .tabulator-table{ - .tabulator-row{ - min-height:$textSize + ($table-cell-padding-sm * 2); - - .tabulator-cell{ - padding:$table-cell-padding-sm !important; - } - } - } - } - } - - - //row colors - .tabulator-tableHolder{ - .tabulator-table{ - .tabulator-row{ - &.table-primary{ - background:theme-color-level("primary", -9) !important; - } - &.table-secondary{ - background:theme-color-level("secondary", -9) !important; - } - &.table-success{ - background:theme-color-level("success", -9) !important; - } - &.table-info{ - background:theme-color-level("info", -9) !important; - } - &.table-warning{ - background:theme-color-level("warning", -9) !important; - } - &.table-danger{ - background:theme-color-level("danger", -9) !important; - } - &.table-light{ - background:theme-color-level("light", -9) !important; - } - &.table-dark{ - background:theme-color-level("dark", -9) !important; - } - &.table-active{ - background:$table-active-bg !important; - } - - &.bg-primary{ - background:theme-color-level("primary", 0) !important; - } - &.bg-secondary{ - background:theme-color-level("secondary", 0) !important; - } - &.bg-success{ - background:theme-color-level("success", 0) !important; - } - &.bg-info{ - background:theme-color-level("info", 0) !important; - } - &.bg-warning{ - background:theme-color-level("warning", 0) !important; - } - &.bg-danger{ - background:theme-color-level("danger", 0) !important; - } - &.bg-light{ - background:theme-color-level("light", 0) !important; - } - &.bg-dark{ - background:theme-color-level("dark", 0) !important; - } - &.bg-active{ - background:$table-active-bg !important; - } - - .tabulator-cell{ - &.table-primary{ - background:theme-color-level("primary", -9) !important; - } - &.table-secondary{ - background:theme-color-level("secondary", -9) !important; - } - &.table-success{ - background:theme-color-level("success", -9) !important; - } - &.table-info{ - background:theme-color-level("info", -9) !important; - } - &.table-warning{ - background:theme-color-level("warning", -9) !important; - } - &.table-danger{ - background:theme-color-level("danger", -9) !important; - } - &.table-light{ - background:theme-color-level("light", -9) !important; - } - &.table-dark{ - background:theme-color-level("dark", -9) !important; - } - &.table-active{ - background:$table-active-bg !important; - } - - &.bg-primary{ - background:theme-color-level("primary", 0) !important; - } - &.bg-secondary{ - background:theme-color-level("secondary", 0) !important; - } - &.bg-success{ - background:theme-color-level("success", 0) !important; - } - &.bg-info{ - background:theme-color-level("info", 0) !important; - } - &.bg-warning{ - background:theme-color-level("warning", 0) !important; - } - &.bg-danger{ - background:theme-color-level("danger", 0) !important; - } - &.bg-light{ - background:theme-color-level("light", 0) !important; - } - &.bg-dark{ - background:theme-color-level("dark", 0) !important; - } - &.bg-active{ - background:$table-active-bg !important; - } - } - } - } - } - -} - -//row element -.tabulator-row{ - position: relative; - box-sizing: border-box; - - min-height:$textSize + ($cellPadding * 2); - background-color: $rowBackgroundColor; - border-bottom:1px solid $rowBorderColor; - - &.tabulator-selectable:hover{ - background-color:$rowHoverBackground; - cursor: pointer; - } - - &.tabulator-selected{ - background-color:$rowSelectedBackground; - } - - &.tabulator-selected:hover{ - background-color:$rowSelectedBackgroundHover; - cursor: pointer; - } - - &.tabulator-moving{ - position: absolute; - - border-top:1px solid $rowBorderColor; - border-bottom:1px solid $rowBorderColor; - - pointer-events: none !important; - z-index:15; - } - - //row resize handles - .tabulator-row-resize-handle{ - position:absolute; - right:0; - bottom:0; - left:0; - height:5px; - - &.prev{ - top:0; - bottom:auto; - } - - &:hover{ - cursor:ns-resize; - } - } - - .tabulator-frozen{ - display: inline-block; - position: absolute; - - background-color: inherit; - - z-index: 10; - - &.tabulator-frozen-left{ - border-right:2px solid $rowBorderColor; - } - - &.tabulator-frozen-right{ - border-left:2px solid $rowBorderColor; - } - } - - .tabulator-responsive-collapse{ - box-sizing:border-box; - - padding:5px; - - border-top:1px solid $rowBorderColor; - border-bottom:1px solid $rowBorderColor; - - &:empty{ - display:none; - } - - table{ - font-size:$textSize; - - tr{ - td{ - position: relative; - - &:first-of-type{ - padding-right:10px; - } - } - } - } - } - - //cell element - .tabulator-cell{ - display:inline-block; - position: relative; - box-sizing:border-box; - padding:$cellPadding; - vertical-align:middle; - white-space:nowrap; - overflow:hidden; - text-overflow:ellipsis; - - &:last-of-type{ - border-right: none; - } - - &.tabulator-editing{ - border:1px solid $editBoxColor; - padding: 0; - - input, select{ - border:1px; - background:transparent; - } - } - - &.tabulator-validation-fail{ - border:1px solid $errorColor; - input, select{ - border:1px; - background:transparent; - - color: $errorColor; - } - } - - //hide left resize handle on first column - &:first-child{ - .tabulator-col-resize-handle.prev{ - display: none; - } - } - - //movable row handle - &.tabulator-row-handle{ - - display: inline-flex; - align-items:center; - - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - - //handle holder - .tabulator-row-handle-box{ - width:80%; - - //Hamburger element - .tabulator-row-handle-bar{ - width:100%; - height:3px; - margin-top:2px; - background:#666; - } - } - } - - .tabulator-data-tree-branch{ - display:inline-block; - vertical-align:middle; - - height:9px; - width:7px; - - margin-top:-9px; - margin-right:5px; - - border-bottom-left-radius:1px; - - border-left:2px solid $rowBorderColor; - border-bottom:2px solid $rowBorderColor; - } - - .tabulator-data-tree-control{ - - display:inline-flex; - justify-content:center; - align-items:center; - vertical-align:middle; - - height:11px; - width:11px; - - margin-right:5px; - - border:1px solid #ccc; - border-radius:2px; - background:rgba(0, 0, 0, .1); - - overflow:hidden; - - &:hover{ - cursor:pointer; - background:rgba(0, 0, 0, .2); - } - - .tabulator-data-tree-control-collapse{ - display:inline-block; - position: relative; - - height: 7px; - width: 1px; - - background: transparent; - - &:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - - height: 1px; - width: 7px; - - background: #ccc; - } - } - - .tabulator-data-tree-control-expand{ - display:inline-block; - position: relative; - - height: 7px; - width: 1px; - - background: #ccc; - - &:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - - height: 1px; - width: 7px; - - background: #ccc; - } - } - - } - - .tabulator-responsive-collapse-toggle{ - display: inline-flex; - align-items:center; - justify-content:center; - - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - - height:15px; - width:15px; - - border-radius:20px; - background:#666; - - color:$rowBackgroundColor; - font-weight:bold; - font-size:1.1em; - - &:hover{ - opacity:.7; - } - - &.open{ - .tabulator-responsive-collapse-toggle-close{ - display:initial; - } - - .tabulator-responsive-collapse-toggle-open{ - display:none; - } - } - - .tabulator-responsive-collapse-toggle-close{ - display:none; - } - } - } - - //row grouping element - &.tabulator-group{ - - box-sizing:border-box; - border-bottom:1px solid #999; - border-right:1px solid $rowBorderColor; - border-top:1px solid #999; - padding:5px; - padding-left:10px; - background:#fafafa; - font-weight:bold; - - min-width: 100%; - - &:hover{ - cursor:pointer; - background-color:rgba(0,0,0,.1); - } - - &.tabulator-group-visible{ - .tabulator-arrow{ - margin-right:10px; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-top: 6px solid $sortArrowActive; - border-bottom: 0; - } - } - - &.tabulator-group-level-1{ - .tabulator-arrow{ - margin-left:20px; - } - } - - &.tabulator-group-level-2{ - .tabulator-arrow{ - margin-left:40px; - } - } - - &.tabulator-group-level-3{ - .tabulator-arrow{ - margin-left:60px; - } - } - - &.tabulator-group-level-4{ - .tabulator-arrow{ - margin-left:80px; - } - } - - &.tabulator-group-level-5{ - .tabulator-arrow{ - margin-left:100px; - } - } - - //sorting arrow - .tabulator-arrow{ - display: inline-block; - width: 0; - height: 0; - margin-right:16px; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-right: 0; - border-left: 6px solid $sortArrowActive; - vertical-align:middle; - } - - span{ - margin-left:10px; - color:#666; - } - } -} - -.tabulator-edit-select-list{ - position: absolute; - display:inline-block; - box-sizing:border-box; - - max-height:200px; - - background:$rowBackgroundColor; - border:1px solid $rowBorderColor; - - font-size:$textSize; - - overflow-y:auto; - -webkit-overflow-scrolling: touch; - - z-index: 10000; - - .tabulator-edit-select-list-item{ - padding:4px; - - &.active{ - color:$rowBackgroundColor; - background:$editBoxColor; - } - - &:hover{ - cursor:pointer; - - color:$rowBackgroundColor; - background:$editBoxColor; - } - } - - .tabulator-edit-select-list-group{ - border-bottom:1px solid $rowBorderColor; - - padding:4px; - padding-top:6px; - - font-weight:bold; - } -} \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/variables.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/variables.scss deleted file mode 100644 index 572c983d08..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/variables.scss +++ /dev/null @@ -1,870 +0,0 @@ -// -// Variables -// -------------------------------------------------- - - -//== Colors -// -//## Gray and brand colors for use across Bootstrap. - -$gray-base: #000 !default; -$gray-darker: lighten($gray-base, 13.5%) !default; // #222 -$gray-dark: lighten($gray-base, 20%) !default; // #333 -$gray: lighten($gray-base, 33.5%) !default; // #555 -$gray-light: lighten($gray-base, 46.7%) !default; // #777 -$gray-lighter: lighten($gray-base, 93.5%) !default; // #eee - -$brand-primary: darken(#428bca, 6.5%) !default; // #337ab7 -$brand-success: #5cb85c !default; -$brand-info: #5bc0de !default; -$brand-warning: #f0ad4e !default; -$brand-danger: #d9534f !default; - - -//== Scaffolding -// -//## Settings for some of the most global styles. - -//** Background color for ``. -$body-bg: #fff !default; -//** Global text color on ``. -$text-color: $gray-dark !default; - -//** Global textual link color. -$link-color: $brand-primary !default; -//** Link hover color set via `darken()` function. -$link-hover-color: darken($link-color, 15%) !default; -//** Link hover decoration. -$link-hover-decoration: underline !default; - - -//== Typography -// -//## Font, line-height, and color for body text, headings, and more. - -$font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif !default; -$font-family-serif: Georgia, "Times New Roman", Times, serif !default; -//** Default monospace fonts for ``, ``, and `
`.
-$font-family-monospace:   Menlo, Monaco, Consolas, "Courier New", monospace !default;
-$font-family-base:        $font-family-sans-serif !default;
-
-$font-size-base:          14px !default;
-$font-size-large:         ceil(($font-size-base * 1.25)) !default; // ~18px
-$font-size-small:         ceil(($font-size-base * 0.85)) !default; // ~12px
-
-$font-size-h1:            floor(($font-size-base * 2.6)) !default; // ~36px
-$font-size-h2:            floor(($font-size-base * 2.15)) !default; // ~30px
-$font-size-h3:            ceil(($font-size-base * 1.7)) !default; // ~24px
-$font-size-h4:            ceil(($font-size-base * 1.25)) !default; // ~18px
-$font-size-h5:            $font-size-base !default;
-$font-size-h6:            ceil(($font-size-base * 0.85)) !default; // ~12px
-
-//** Unit-less `line-height` for use in components like buttons.
-$line-height-base:        1.428571429 !default; // 20/14
-//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
-$line-height-computed:    floor(($font-size-base * $line-height-base)) !default; // ~20px
-
-//** By default, this inherits from the ``.
-$headings-font-family:    inherit !default;
-$headings-font-weight:    500 !default;
-$headings-line-height:    1.1 !default;
-$headings-color:          inherit !default;
-
-
-//== Iconography
-//
-//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
-
-//** Load fonts from this directory.
-$icon-font-path:          "../fonts/" !default;
-//** File name for all font files.
-$icon-font-name:          "glyphicons-halflings-regular" !default;
-//** Element ID within SVG icon file.
-$icon-font-svg-id:        "glyphicons_halflingsregular" !default;
-
-
-//== Components
-//
-//## Define common padding and border radius sizes and more. Values based on 14px text and 1@mixin 428 line-height (~20px to start).
-
-$padding-base-vertical:     6px !default;
-$padding-base-horizontal:   12px !default;
-
-$padding-large-vertical:    10px !default;
-$padding-large-horizontal:  16px !default;
-
-$padding-small-vertical:    5px !default;
-$padding-small-horizontal:  10px !default;
-
-$padding-xs-vertical:       1px !default;
-$padding-xs-horizontal:     5px !default;
-
-$line-height-large:         1.3333333 !default; // extra decimals for Win 8.1 Chrome
-$line-height-small:         1.5 !default;
-
-$border-radius-base:        4px !default;
-$border-radius-large:       6px !default;
-$border-radius-small:       3px !default;
-
-//** Global color for active items (e.g., navs or dropdowns).
-$component-active-color:    #fff !default;
-//** Global background color for active items (e.g., navs or dropdowns).
-$component-active-bg:       $brand-primary !default;
-
-//** Width of the `border` for generating carets that indicator dropdowns.
-$caret-width-base:          4px !default;
-//** Carets increase slightly in size for larger components.
-$caret-width-large:         5px !default;
-
-
-//== Tables
-//
-//## Customizes the `.table` component with basic values, each used across all table variations.
-
-//** Padding for ``s and ``s.
-$table-cell-padding:            8px !default;
-//** Padding for cells in `.table-condensed`.
-$table-condensed-cell-padding:  5px !default;
-
-//** Default background color used for all tables.
-// $table-bg:                      transparent !default;
-$table-bg:                      #fff !default;
-//** Background color used for `.table-striped`.
-$table-bg-accent:               #f9f9f9 !default;
-//** Background color used for `.table-hover`.
-$table-bg-hover:                #f5f5f5 !default;
-$table-bg-active:               $table-bg-hover !default;
-
-//** Border color for table and cell borders.
-$table-border-color:            #ddd !default;
-
-
-//== Buttons
-//
-//## For each of Bootstrap's buttons, define text, background and border color.
-
-$btn-font-weight:                normal !default;
-
-$btn-default-color:              #333 !default;
-$btn-default-bg:                 #fff !default;
-$btn-default-border:             #ccc !default;
-
-$btn-primary-color:              #fff !default;
-$btn-primary-bg:                 $brand-primary !default;
-$btn-primary-border:             darken($btn-primary-bg, 5%) !default;
-
-$btn-success-color:              #fff !default;
-$btn-success-bg:                 $brand-success !default;
-$btn-success-border:             darken($btn-success-bg, 5%) !default;
-
-$btn-info-color:                 #fff !default;
-$btn-info-bg:                    $brand-info !default;
-$btn-info-border:                darken($btn-info-bg, 5%) !default;
-
-$btn-warning-color:              #fff !default;
-$btn-warning-bg:                 $brand-warning !default;
-$btn-warning-border:             darken($btn-warning-bg, 5%) !default;
-
-$btn-danger-color:               #fff !default;
-$btn-danger-bg:                  $brand-danger !default;
-$btn-danger-border:              darken($btn-danger-bg, 5%) !default;
-
-$btn-link-disabled-color:        $gray-light !default;
-
-// Allows for customizing button radius independently from global border radius
-$btn-border-radius-base:         $border-radius-base !default;
-$btn-border-radius-large:        $border-radius-large !default;
-$btn-border-radius-small:        $border-radius-small !default;
-
-
-//== Forms
-//
-//##
-
-//** `` background color
-$input-bg:                       #fff !default;
-//** `` background color
-$input-bg-disabled:              $gray-lighter !default;
-
-//** Text color for ``s
-$input-color:                    $gray !default;
-//** `` border color
-$input-border:                   #ccc !default;
-
-// TODO: Rename `$input-border-radius` to `$input-border-radius-base` in v4
-//** Default `.form-control` border radius
-// This has no effect on ``s in CSS.
-$input-border-radius:            $border-radius-base !default;
-//** Large `.form-control` border radius
-$input-border-radius-large:      $border-radius-large !default;
-//** Small `.form-control` border radius
-$input-border-radius-small:      $border-radius-small !default;
-
-//** Border color for inputs on focus
-$input-border-focus:             #66afe9 !default;
-
-//** Placeholder text color
-$input-color-placeholder:        #999 !default;
-
-//** Default `.form-control` height
-$input-height-base:              ($line-height-computed + ($padding-base-vertical * 2) + 2) !default;
-//** Large `.form-control` height
-$input-height-large:             (ceil($font-size-large * $line-height-large) + ($padding-large-vertical * 2) + 2) !default;
-//** Small `.form-control` height
-$input-height-small:             (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2) !default;
-
-//** `.form-group` margin
-$form-group-margin-bottom:       15px !default;
-
-$legend-color:                   $gray-dark !default;
-$legend-border-color:            #e5e5e5 !default;
-
-//** Background color for textual input addons
-$input-group-addon-bg:           $gray-lighter !default;
-//** Border color for textual input addons
-$input-group-addon-border-color: $input-border !default;
-
-//** Disabled cursor for form controls and buttons.
-$cursor-disabled:                not-allowed !default;
-
-
-//== Dropdowns
-//
-//## Dropdown menu container and contents.
-
-//** Background for the dropdown menu.
-$dropdown-bg:                    #fff !default;
-//** Dropdown menu `border-color`.
-$dropdown-border:                rgba(0,0,0,.15) !default;
-//** Dropdown menu `border-color` **for IE8**.
-$dropdown-fallback-border:       #ccc !default;
-//** Divider color for between dropdown items.
-$dropdown-divider-bg:            #e5e5e5 !default;
-
-//** Dropdown link text color.
-$dropdown-link-color:            $gray-dark !default;
-//** Hover color for dropdown links.
-$dropdown-link-hover-color:      darken($gray-dark, 5%) !default;
-//** Hover background for dropdown links.
-$dropdown-link-hover-bg:         #f5f5f5 !default;
-
-//** Active dropdown menu item text color.
-$dropdown-link-active-color:     $component-active-color !default;
-//** Active dropdown menu item background color.
-$dropdown-link-active-bg:        $component-active-bg !default;
-
-//** Disabled dropdown menu item background color.
-$dropdown-link-disabled-color:   $gray-light !default;
-
-//** Text color for headers within dropdown menus.
-$dropdown-header-color:          $gray-light !default;
-
-//** Deprecated `$dropdown-caret-color` as of v3.1.0
-$dropdown-caret-color:           #000 !default;
-
-
-//-- Z-index master list
-//
-// Warning: Avoid customizing these values. They're used for a bird's eye view
-// of components dependent on the z-axis and are designed to all work together.
-//
-// Note: These variables are not generated into the Customizer.
-
-$zindex-navbar:            1000 !default;
-$zindex-dropdown:          1000 !default;
-$zindex-popover:           1060 !default;
-$zindex-tooltip:           1070 !default;
-$zindex-navbar-fixed:      1030 !default;
-$zindex-modal-background:  1040 !default;
-$zindex-modal:             1050 !default;
-
-
-//== Media queries breakpoints
-//
-//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
-
-// Extra small screen / phone
-//** Deprecated `$screen-xs` as of v3.0.1
-$screen-xs:                  480px !default;
-//** Deprecated `$screen-xs-min` as of v3.2.0
-$screen-xs-min:              $screen-xs !default;
-//** Deprecated `$screen-phone` as of v3.0.1
-$screen-phone:               $screen-xs-min !default;
-
-// Small screen / tablet
-//** Deprecated `$screen-sm` as of v3.0.1
-$screen-sm:                  768px !default;
-$screen-sm-min:              $screen-sm !default;
-//** Deprecated `$screen-tablet` as of v3.0.1
-$screen-tablet:              $screen-sm-min !default;
-
-// Medium screen / desktop
-//** Deprecated `$screen-md` as of v3.0.1
-$screen-md:                  992px !default;
-$screen-md-min:              $screen-md !default;
-//** Deprecated `$screen-desktop` as of v3.0.1
-$screen-desktop:             $screen-md-min !default;
-
-// Large screen / wide desktop
-//** Deprecated `$screen-lg` as of v3.0.1
-$screen-lg:                  1200px !default;
-$screen-lg-min:              $screen-lg !default;
-//** Deprecated `$screen-lg-desktop` as of v3.0.1
-$screen-lg-desktop:          $screen-lg-min !default;
-
-// So media queries don't overlap when required, provide a maximum
-$screen-xs-max:              ($screen-sm-min - 1) !default;
-$screen-sm-max:              ($screen-md-min - 1) !default;
-$screen-md-max:              ($screen-lg-min - 1) !default;
-
-
-//== Grid system
-//
-//## Define your custom responsive grid.
-
-//** Number of columns in the grid.
-$grid-columns:              12 !default;
-//** Padding between columns. Gets divided in half for the left and right.
-$grid-gutter-width:         30px !default;
-// Navbar collapse
-//** Point at which the navbar becomes uncollapsed.
-$grid-float-breakpoint:     $screen-sm-min !default;
-//** Point at which the navbar begins collapsing.
-$grid-float-breakpoint-max: ($grid-float-breakpoint - 1) !default;
-
-
-//== Container sizes
-//
-//## Define the maximum width of `.container` for different screen sizes.
-
-// Small screen / tablet
-$container-tablet:             (720px + $grid-gutter-width) !default;
-//** For `$screen-sm-min` and up.
-$container-sm:                 $container-tablet !default;
-
-// Medium screen / desktop
-$container-desktop:            (940px + $grid-gutter-width) !default;
-//** For `$screen-md-min` and up.
-$container-md:                 $container-desktop !default;
-
-// Large screen / wide desktop
-$container-large-desktop:      (1140px + $grid-gutter-width) !default;
-//** For `$screen-lg-min` and up.
-$container-lg:                 $container-large-desktop !default;
-
-
-//== Navbar
-//
-//##
-
-// Basics of a navbar
-$navbar-height:                    50px !default;
-$navbar-margin-bottom:             $line-height-computed !default;
-$navbar-border-radius:             $border-radius-base !default;
-$navbar-padding-horizontal:        floor(($grid-gutter-width / 2)) !default;
-$navbar-padding-vertical:          (($navbar-height - $line-height-computed) / 2) !default;
-$navbar-collapse-max-height:       340px !default;
-
-$navbar-default-color:             #777 !default;
-$navbar-default-bg:                #f8f8f8 !default;
-$navbar-default-border:            darken($navbar-default-bg, 6.5%) !default;
-
-// Navbar links
-$navbar-default-link-color:                #777 !default;
-$navbar-default-link-hover-color:          #333 !default;
-$navbar-default-link-hover-bg:             transparent !default;
-$navbar-default-link-active-color:         #555 !default;
-$navbar-default-link-active-bg:            darken($navbar-default-bg, 6.5%) !default;
-$navbar-default-link-disabled-color:       #ccc !default;
-$navbar-default-link-disabled-bg:          transparent !default;
-
-// Navbar brand label
-$navbar-default-brand-color:               $navbar-default-link-color !default;
-$navbar-default-brand-hover-color:         darken($navbar-default-brand-color, 10%) !default;
-$navbar-default-brand-hover-bg:            transparent !default;
-
-// Navbar toggle
-$navbar-default-toggle-hover-bg:           #ddd !default;
-$navbar-default-toggle-icon-bar-bg:        #888 !default;
-$navbar-default-toggle-border-color:       #ddd !default;
-
-
-//=== Inverted navbar
-// Reset inverted navbar basics
-$navbar-inverse-color:                      lighten($gray-light, 15%) !default;
-$navbar-inverse-bg:                         #222 !default;
-$navbar-inverse-border:                     darken($navbar-inverse-bg, 10%) !default;
-
-// Inverted navbar links
-$navbar-inverse-link-color:                 lighten($gray-light, 15%) !default;
-$navbar-inverse-link-hover-color:           #fff !default;
-$navbar-inverse-link-hover-bg:              transparent !default;
-$navbar-inverse-link-active-color:          $navbar-inverse-link-hover-color !default;
-$navbar-inverse-link-active-bg:             darken($navbar-inverse-bg, 10%) !default;
-$navbar-inverse-link-disabled-color:        #444 !default;
-$navbar-inverse-link-disabled-bg:           transparent !default;
-
-// Inverted navbar brand label
-$navbar-inverse-brand-color:                $navbar-inverse-link-color !default;
-$navbar-inverse-brand-hover-color:          #fff !default;
-$navbar-inverse-brand-hover-bg:             transparent !default;
-
-// Inverted navbar toggle
-$navbar-inverse-toggle-hover-bg:            #333 !default;
-$navbar-inverse-toggle-icon-bar-bg:         #fff !default;
-$navbar-inverse-toggle-border-color:        #333 !default;
-
-
-//== Navs
-//
-//##
-
-//=== Shared nav styles
-$nav-link-padding:                          10px 15px !default;
-$nav-link-hover-bg:                         $gray-lighter !default;
-
-$nav-disabled-link-color:                   $gray-light !default;
-$nav-disabled-link-hover-color:             $gray-light !default;
-
-//== Tabs
-$nav-tabs-border-color:                     #ddd !default;
-
-$nav-tabs-link-hover-border-color:          $gray-lighter !default;
-
-$nav-tabs-active-link-hover-bg:             $body-bg !default;
-$nav-tabs-active-link-hover-color:          $gray !default;
-$nav-tabs-active-link-hover-border-color:   #ddd !default;
-
-$nav-tabs-justified-link-border-color:            #ddd !default;
-$nav-tabs-justified-active-link-border-color:     $body-bg !default;
-
-//== Pills
-$nav-pills-border-radius:                   $border-radius-base !default;
-$nav-pills-active-link-hover-bg:            $component-active-bg !default;
-$nav-pills-active-link-hover-color:         $component-active-color !default;
-
-
-//== Pagination
-//
-//##
-
-$pagination-color:                     $link-color !default;
-$pagination-bg:                        #fff !default;
-$pagination-border:                    #ddd !default;
-
-$pagination-hover-color:               $link-hover-color !default;
-$pagination-hover-bg:                  $gray-lighter !default;
-$pagination-hover-border:              #ddd !default;
-
-$pagination-active-color:              #fff !default;
-$pagination-active-bg:                 $brand-primary !default;
-$pagination-active-border:             $brand-primary !default;
-
-$pagination-disabled-color:            $gray-light !default;
-$pagination-disabled-bg:               #fff !default;
-$pagination-disabled-border:           #ddd !default;
-
-
-//== Pager
-//
-//##
-
-$pager-bg:                             $pagination-bg !default;
-$pager-border:                         $pagination-border !default;
-$pager-border-radius:                  15px !default;
-
-$pager-hover-bg:                       $pagination-hover-bg !default;
-
-$pager-active-bg:                      $pagination-active-bg !default;
-$pager-active-color:                   $pagination-active-color !default;
-
-$pager-disabled-color:                 $pagination-disabled-color !default;
-
-
-//== Jumbotron
-//
-//##
-
-$jumbotron-padding:              30px !default;
-$jumbotron-color:                inherit !default;
-$jumbotron-bg:                   $gray-lighter !default;
-$jumbotron-heading-color:        inherit !default;
-$jumbotron-font-size:            ceil(($font-size-base * 1.5)) !default;
-$jumbotron-heading-font-size:    ceil(($font-size-base * 4.5)) !default;
-
-
-//== Form states and alerts
-//
-//## Define colors for form feedback states and, by default, alerts.
-
-$state-success-text:             #3c763d !default;
-$state-success-bg:               #dff0d8 !default;
-$state-success-border:           darken(adjust-hue($state-success-bg, -10%), 5%) !default;
-
-$state-info-text:                #31708f !default;
-$state-info-bg:                  #d9edf7 !default;
-$state-info-border:              darken(adjust-hue($state-info-bg, -10%), 7%) !default;
-
-$state-warning-text:             #8a6d3b !default;
-$state-warning-bg:               #fcf8e3 !default;
-$state-warning-border:           darken(adjust-hue($state-warning-bg, -10%), 5%) !default;
-
-$state-danger-text:              #a94442 !default;
-$state-danger-bg:                #f2dede !default;
-$state-danger-border:            darken(adjust-hue($state-danger-bg, -10%), 5%) !default;
-
-
-//== Tooltips
-//
-//##
-
-//** Tooltip max width
-$tooltip-max-width:           200px !default;
-//** Tooltip text color
-$tooltip-color:               #fff !default;
-//** Tooltip background color
-$tooltip-bg:                  #000 !default;
-$tooltip-opacity:             .9 !default;
-
-//** Tooltip arrow width
-$tooltip-arrow-width:         5px !default;
-//** Tooltip arrow color
-$tooltip-arrow-color:         $tooltip-bg !default;
-
-
-//== Popovers
-//
-//##
-
-//** Popover body background color
-$popover-bg:                          #fff !default;
-//** Popover maximum width
-$popover-max-width:                   276px !default;
-//** Popover border color
-$popover-border-color:                rgba(0,0,0,.2) !default;
-//** Popover fallback border color
-$popover-fallback-border-color:       #ccc !default;
-
-//** Popover title background color
-$popover-title-bg:                    darken($popover-bg, 3%) !default;
-
-//** Popover arrow width
-$popover-arrow-width:                 10px !default;
-//** Popover arrow color
-$popover-arrow-color:                 $popover-bg !default;
-
-//** Popover outer arrow width
-$popover-arrow-outer-width:           ($popover-arrow-width + 1) !default;
-//** Popover outer arrow color
-$popover-arrow-outer-color:           fadein($popover-border-color, 5%) !default;
-//** Popover outer arrow fallback color
-$popover-arrow-outer-fallback-color:  darken($popover-fallback-border-color, 20%) !default;
-
-
-//== Labels
-//
-//##
-
-//** Default label background color
-$label-default-bg:            $gray-light !default;
-//** Primary label background color
-$label-primary-bg:            $brand-primary !default;
-//** Success label background color
-$label-success-bg:            $brand-success !default;
-//** Info label background color
-$label-info-bg:               $brand-info !default;
-//** Warning label background color
-$label-warning-bg:            $brand-warning !default;
-//** Danger label background color
-$label-danger-bg:             $brand-danger !default;
-
-//** Default label text color
-$label-color:                 #fff !default;
-//** Default text color of a linked label
-$label-link-hover-color:      #fff !default;
-
-
-//== Modals
-//
-//##
-
-//** Padding applied to the modal body
-$modal-inner-padding:         15px !default;
-
-//** Padding applied to the modal title
-$modal-title-padding:         15px !default;
-//** Modal title line-height
-$modal-title-line-height:     $line-height-base !default;
-
-//** Background color of modal content area
-$modal-content-bg:                             #fff !default;
-//** Modal content border color
-$modal-content-border-color:                   rgba(0,0,0,.2) !default;
-//** Modal content border color **for IE8**
-$modal-content-fallback-border-color:          #999 !default;
-
-//** Modal backdrop background color
-$modal-backdrop-bg:           #000 !default;
-//** Modal backdrop opacity
-$modal-backdrop-opacity:      .5 !default;
-//** Modal header border color
-$modal-header-border-color:   #e5e5e5 !default;
-//** Modal footer border color
-$modal-footer-border-color:   $modal-header-border-color !default;
-
-$modal-lg:                    900px !default;
-$modal-md:                    600px !default;
-$modal-sm:                    300px !default;
-
-
-//== Alerts
-//
-//## Define alert colors, border radius, and padding.
-
-$alert-padding:               15px !default;
-$alert-border-radius:         $border-radius-base !default;
-$alert-link-font-weight:      bold !default;
-
-$alert-success-bg:            $state-success-bg !default;
-$alert-success-text:          $state-success-text !default;
-$alert-success-border:        $state-success-border !default;
-
-$alert-info-bg:               $state-info-bg !default;
-$alert-info-text:             $state-info-text !default;
-$alert-info-border:           $state-info-border !default;
-
-$alert-warning-bg:            $state-warning-bg !default;
-$alert-warning-text:          $state-warning-text !default;
-$alert-warning-border:        $state-warning-border !default;
-
-$alert-danger-bg:             $state-danger-bg !default;
-$alert-danger-text:           $state-danger-text !default;
-$alert-danger-border:         $state-danger-border !default;
-
-
-//== Progress bars
-//
-//##
-
-//** Background color of the whole progress component
-$progress-bg:                 #f5f5f5 !default;
-//** Progress bar text color
-$progress-bar-color:          #fff !default;
-//** Variable for setting rounded corners on progress bar.
-$progress-border-radius:      $border-radius-base !default;
-
-//** Default progress bar color
-$progress-bar-bg:             $brand-primary !default;
-//** Success progress bar color
-$progress-bar-success-bg:     $brand-success !default;
-//** Warning progress bar color
-$progress-bar-warning-bg:     $brand-warning !default;
-//** Danger progress bar color
-$progress-bar-danger-bg:      $brand-danger !default;
-//** Info progress bar color
-$progress-bar-info-bg:        $brand-info !default;
-
-
-//== List group
-//
-//##
-
-//** Background color on `.list-group-item`
-$list-group-bg:                 #fff !default;
-//** `.list-group-item` border color
-$list-group-border:             #ddd !default;
-//** List group border radius
-$list-group-border-radius:      $border-radius-base !default;
-
-//** Background color of single list items on hover
-$list-group-hover-bg:           #f5f5f5 !default;
-//** Text color of active list items
-$list-group-active-color:       $component-active-color !default;
-//** Background color of active list items
-$list-group-active-bg:          $component-active-bg !default;
-//** Border color of active list elements
-$list-group-active-border:      $list-group-active-bg !default;
-//** Text color for content within active list items
-$list-group-active-text-color:  lighten($list-group-active-bg, 40%) !default;
-
-//** Text color of disabled list items
-$list-group-disabled-color:      $gray-light !default;
-//** Background color of disabled list items
-$list-group-disabled-bg:         $gray-lighter !default;
-//** Text color for content within disabled list items
-$list-group-disabled-text-color: $list-group-disabled-color !default;
-
-$list-group-link-color:         #555 !default;
-$list-group-link-hover-color:   $list-group-link-color !default;
-$list-group-link-heading-color: #333 !default;
-
-
-//== Panels
-//
-//##
-
-$panel-bg:                    #fff !default;
-$panel-body-padding:          15px !default;
-$panel-heading-padding:       10px 15px !default;
-$panel-footer-padding:        $panel-heading-padding !default;
-$panel-border-radius:         $border-radius-base !default;
-
-//** Border color for elements within panels
-$panel-inner-border:          #ddd !default;
-$panel-footer-bg:             #f5f5f5 !default;
-
-$panel-default-text:          $gray-dark !default;
-$panel-default-border:        #ddd !default;
-$panel-default-heading-bg:    #f5f5f5 !default;
-
-$panel-primary-text:          #fff !default;
-$panel-primary-border:        $brand-primary !default;
-$panel-primary-heading-bg:    $brand-primary !default;
-
-$panel-success-text:          $state-success-text !default;
-$panel-success-border:        $state-success-border !default;
-$panel-success-heading-bg:    $state-success-bg !default;
-
-$panel-info-text:             $state-info-text !default;
-$panel-info-border:           $state-info-border !default;
-$panel-info-heading-bg:       $state-info-bg !default;
-
-$panel-warning-text:          $state-warning-text !default;
-$panel-warning-border:        $state-warning-border !default;
-$panel-warning-heading-bg:    $state-warning-bg !default;
-
-$panel-danger-text:           $state-danger-text !default;
-$panel-danger-border:         $state-danger-border !default;
-$panel-danger-heading-bg:     $state-danger-bg !default;
-
-
-//== Thumbnails
-//
-//##
-
-//** Padding around the thumbnail image
-$thumbnail-padding:           4px !default;
-//** Thumbnail background color
-$thumbnail-bg:                $body-bg !default;
-//** Thumbnail border color
-$thumbnail-border:            #ddd !default;
-//** Thumbnail border radius
-$thumbnail-border-radius:     $border-radius-base !default;
-
-//** Custom text color for thumbnail captions
-$thumbnail-caption-color:     $text-color !default;
-//** Padding around the thumbnail caption
-$thumbnail-caption-padding:   9px !default;
-
-
-//== Wells
-//
-//##
-
-$well-bg:                     #f5f5f5 !default;
-$well-border:                 darken($well-bg, 7%) !default;
-
-
-//== Badges
-//
-//##
-
-$badge-color:                 #fff !default;
-//** Linked badge text color on hover
-$badge-link-hover-color:      #fff !default;
-$badge-bg:                    $gray-light !default;
-
-//** Badge text color in active nav link
-$badge-active-color:          $link-color !default;
-//** Badge background color in active nav link
-$badge-active-bg:             #fff !default;
-
-$badge-font-weight:           bold !default;
-$badge-line-height:           1 !default;
-$badge-border-radius:         10px !default;
-
-
-//== Breadcrumbs
-//
-//##
-
-$breadcrumb-padding-vertical:   8px !default;
-$breadcrumb-padding-horizontal: 15px !default;
-//** Breadcrumb background color
-$breadcrumb-bg:                 #f5f5f5 !default;
-//** Breadcrumb text color
-$breadcrumb-color:              #ccc !default;
-//** Text color of current page in the breadcrumb
-$breadcrumb-active-color:       $gray-light !default;
-//** Textual separator for between breadcrumb elements
-$breadcrumb-separator:          "/" !default;
-
-
-//== Carousel
-//
-//##
-
-$carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6) !default;
-
-$carousel-control-color:                      #fff !default;
-$carousel-control-width:                      15% !default;
-$carousel-control-opacity:                    .5 !default;
-$carousel-control-font-size:                  20px !default;
-
-$carousel-indicator-active-bg:                #fff !default;
-$carousel-indicator-border-color:             #fff !default;
-
-$carousel-caption-color:                      #fff !default;
-
-
-//== Close
-//
-//##
-
-$close-font-weight:           bold !default;
-$close-color:                 #000 !default;
-$close-text-shadow:           0 1px 0 #fff !default;
-
-
-//== Code
-//
-//##
-
-$code-color:                  #c7254e !default;
-$code-bg:                     #f9f2f4 !default;
-
-$kbd-color:                   #fff !default;
-$kbd-bg:                      #333 !default;
-
-$pre-bg:                      #f5f5f5 !default;
-$pre-color:                   $gray-dark !default;
-$pre-border-color:            #ccc !default;
-$pre-scrollable-max-height:   340px !default;
-
-
-//== Type
-//
-//##
-
-//** Horizontal offset for forms and lists.
-$component-offset-horizontal: 180px !default;
-//** Text muted color
-$text-muted:                  $gray-light !default;
-//** Abbreviations and acronyms border color
-$abbr-border-color:           $gray-light !default;
-//** Headings small color
-$headings-small-color:        $gray-light !default;
-//** Blockquote small color
-$blockquote-small-color:      $gray-light !default;
-//** Blockquote font size
-$blockquote-font-size:        ($font-size-base * 1.25) !default;
-//** Blockquote border color
-$blockquote-border-color:     $gray-lighter !default;
-//** Page header border color
-$page-header-border-color:    $gray-lighter !default;
-//** Width of horizontal description list titles
-$dl-horizontal-offset:        $component-offset-horizontal !default;
-//** Point at which .dl-horizontal becomes horizontal
-$dl-horizontal-breakpoint:    $grid-float-breakpoint !default;
-//** Horizontal line color.
-$hr-border:                   $gray-lighter !default;
diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/variables4.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/variables4.scss
deleted file mode 100644
index 9a1d9485ab..0000000000
--- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/variables4.scss
+++ /dev/null
@@ -1,930 +0,0 @@
-
-
-// Variables
-//
-// Variables should follow the `$component-state-property-size` formula for
-// consistent naming. Ex: $nav-link-disabled-color and $modal-content-box-shadow-xs.
-
-
-//
-// Color system
-//
-
-// stylelint-disable
-$white:    #fff !default;
-$gray-100: #f8f9fa !default;
-$gray-200: #e9ecef !default;
-$gray-300: #dee2e6 !default;
-$gray-400: #ced4da !default;
-$gray-500: #adb5bd !default;
-$gray-600: #6c757d !default;
-$gray-700: #495057 !default;
-$gray-800: #343a40 !default;
-$gray-900: #212529 !default;
-$black:    #000 !default;
-
-$grays: () !default;
-$grays: map-merge((
-  "100": $gray-100,
-  "200": $gray-200,
-  "300": $gray-300,
-  "400": $gray-400,
-  "500": $gray-500,
-  "600": $gray-600,
-  "700": $gray-700,
-  "800": $gray-800,
-  "900": $gray-900
-), $grays);
-
-$blue:    #007bff !default;
-$indigo:  #6610f2 !default;
-$purple:  #6f42c1 !default;
-$pink:    #e83e8c !default;
-$red:     #dc3545 !default;
-$orange:  #fd7e14 !default;
-$yellow:  #ffc107 !default;
-$green:   #28a745 !default;
-$teal:    #20c997 !default;
-$cyan:    #17a2b8 !default;
-
-$colors: () !default;
-$colors: map-merge((
-  "blue":       $blue,
-  "indigo":     $indigo,
-  "purple":     $purple,
-  "pink":       $pink,
-  "red":        $red,
-  "orange":     $orange,
-  "yellow":     $yellow,
-  "green":      $green,
-  "teal":       $teal,
-  "cyan":       $cyan,
-  "white":      $white,
-  "gray":       $gray-600,
-  "gray-dark":  $gray-800
-), $colors);
-
-$primary:       $blue !default;
-$secondary:     $gray-600 !default;
-$success:       $green !default;
-$info:          $cyan !default;
-$warning:       $yellow !default;
-$danger:        $red !default;
-$light:         $gray-100 !default;
-$dark:          $gray-800 !default;
-
-$theme-colors: () !default;
-$theme-colors: map-merge((
-  "primary":    $primary,
-  "secondary":  $secondary,
-  "success":    $success,
-  "info":       $info,
-  "warning":    $warning,
-  "danger":     $danger,
-  "light":      $light,
-  "dark":       $dark
-), $theme-colors);
-// stylelint-enable
-
-// Set a specific jump point for requesting color jumps
-$theme-color-interval:      8% !default;
-
-// The yiq lightness value that determines when the lightness of color changes from "dark" to "light". Acceptable values are between 0 and 255.
-$yiq-contrasted-threshold:  150 !default;
-
-// Customize the light and dark text colors for use in our YIQ color contrast function.
-$yiq-text-dark:             $gray-900 !default;
-$yiq-text-light:            $white !default;
-
-// Options
-//
-// Quickly modify global styling by enabling or disabling optional features.
-
-$enable-caret:              true !default;
-$enable-rounded:            true !default;
-$enable-shadows:            false !default;
-$enable-gradients:          false !default;
-$enable-transitions:        true !default;
-$enable-hover-media-query:  false !default; // Deprecated, no longer affects any compiled CSS
-$enable-grid-classes:       true !default;
-$enable-print-styles:       true !default;
-
-
-// Spacing
-//
-// Control the default styling of most Bootstrap elements by modifying these
-// variables. Mostly focused on spacing.
-// You can add more entries to the $spacers map, should you need more variation.
-
-// stylelint-disable
-$spacer: 1rem !default;
-$spacers: () !default;
-$spacers: map-merge((
-  0: 0,
-  1: ($spacer * .25),
-  2: ($spacer * .5),
-  3: $spacer,
-  4: ($spacer * 1.5),
-  5: ($spacer * 3)
-), $spacers);
-
-// This variable affects the `.h-*` and `.w-*` classes.
-$sizes: () !default;
-$sizes: map-merge((
-  25: 25%,
-  50: 50%,
-  75: 75%,
-  100: 100%,
-  auto: auto
-), $sizes);
-// stylelint-enable
-
-// Body
-//
-// Settings for the `` element.
-
-$body-bg:                   $white !default;
-$body-color:                $gray-900 !default;
-
-// Links
-//
-// Style anchor elements.
-
-$link-color:                theme-color("primary") !default;
-$link-decoration:           none !default;
-$link-hover-color:          darken($link-color, 15%) !default;
-$link-hover-decoration:     underline !default;
-
-// Paragraphs
-//
-// Style p element.
-
-$paragraph-margin-bottom:   1rem !default;
-
-
-// Grid breakpoints
-//
-// Define the minimum dimensions at which your layout will change,
-// adapting to different screen sizes, for use in media queries.
-
-$grid-breakpoints: (
-  xs: 0,
-  sm: 576px,
-  md: 768px,
-  lg: 992px,
-  xl: 1200px
-) !default;
-
-@include _assert-ascending($grid-breakpoints, "$grid-breakpoints");
-@include _assert-starts-at-zero($grid-breakpoints);
-
-
-// Grid containers
-//
-// Define the maximum width of `.container` for different screen sizes.
-
-$container-max-widths: (
-  sm: 540px,
-  md: 720px,
-  lg: 960px,
-  xl: 1140px
-) !default;
-
-@include _assert-ascending($container-max-widths, "$container-max-widths");
-
-
-// Grid columns
-//
-// Set the number of columns and specify the width of the gutters.
-
-$grid-columns:                12 !default;
-$grid-gutter-width:           30px !default;
-
-// Components
-//
-// Define common padding and border radius sizes and more.
-
-$line-height-lg:              1.5 !default;
-$line-height-sm:              1.5 !default;
-
-$border-width:                1px !default;
-$border-color:                $gray-300 !default;
-
-$border-radius:               .25rem !default;
-$border-radius-lg:            .3rem !default;
-$border-radius-sm:            .2rem !default;
-
-$box-shadow-sm:               0 .125rem .25rem rgba($black, .075) !default;
-$box-shadow:                  0 .5rem 1rem rgba($black, .15) !default;
-$box-shadow-lg:               0 1rem 3rem rgba($black, .175) !default;
-
-$component-active-color:      $white !default;
-$component-active-bg:         theme-color("primary") !default;
-
-$caret-width:                 .3em !default;
-
-$transition-base:             all .2s ease-in-out !default;
-$transition-fade:             opacity .15s linear !default;
-$transition-collapse:         height .35s ease !default;
-
-
-// Fonts
-//
-// Font, line-height, and color for body text, headings, and more.
-
-// stylelint-disable value-keyword-case
-$font-family-sans-serif:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default;
-$font-family-monospace:       SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default;
-$font-family-base:            $font-family-sans-serif !default;
-// stylelint-enable value-keyword-case
-
-$font-size-base:              1rem !default; // Assumes the browser default, typically `16px`
-$font-size-lg:                ($font-size-base * 1.25) !default;
-$font-size-sm:                ($font-size-base * .875) !default;
-
-$font-weight-light:           300 !default;
-$font-weight-normal:          400 !default;
-$font-weight-bold:            700 !default;
-
-$font-weight-base:            $font-weight-normal !default;
-$line-height-base:            1.5 !default;
-
-$h1-font-size:                $font-size-base * 2.5 !default;
-$h2-font-size:                $font-size-base * 2 !default;
-$h3-font-size:                $font-size-base * 1.75 !default;
-$h4-font-size:                $font-size-base * 1.5 !default;
-$h5-font-size:                $font-size-base * 1.25 !default;
-$h6-font-size:                $font-size-base !default;
-
-$headings-margin-bottom:      ($spacer / 2) !default;
-$headings-font-family:        inherit !default;
-$headings-font-weight:        500 !default;
-$headings-line-height:        1.2 !default;
-$headings-color:              inherit !default;
-
-$display1-size:               6rem !default;
-$display2-size:               5.5rem !default;
-$display3-size:               4.5rem !default;
-$display4-size:               3.5rem !default;
-
-$display1-weight:             300 !default;
-$display2-weight:             300 !default;
-$display3-weight:             300 !default;
-$display4-weight:             300 !default;
-$display-line-height:         $headings-line-height !default;
-
-$lead-font-size:              ($font-size-base * 1.25) !default;
-$lead-font-weight:            300 !default;
-
-$small-font-size:             80% !default;
-
-$text-muted:                  $gray-600 !default;
-
-$blockquote-small-color:      $gray-600 !default;
-$blockquote-font-size:        ($font-size-base * 1.25) !default;
-
-$hr-border-color:             rgba($black, .1) !default;
-$hr-border-width:             $border-width !default;
-
-$mark-padding:                .2em !default;
-
-$dt-font-weight:              $font-weight-bold !default;
-
-$kbd-box-shadow:              inset 0 -.1rem 0 rgba($black, .25) !default;
-$nested-kbd-font-weight:      $font-weight-bold !default;
-
-$list-inline-padding:         .5rem !default;
-
-$mark-bg:                     #fcf8e3 !default;
-
-$hr-margin-y:                 $spacer !default;
-
-
-// Tables
-//
-// Customizes the `.table` component with basic values, each used across all table variations.
-
-$table-cell-padding:          .75rem !default;
-$table-cell-padding-sm:       .3rem !default;
-
-$table-bg:                    transparent !default;
-$table-accent-bg:             rgba($black, .05) !default;
-$table-hover-bg:              rgba($black, .075) !default;
-$table-active-bg:             $table-hover-bg !default;
-
-$table-border-width:          $border-width !default;
-$table-border-color:          $gray-300 !default;
-
-$table-head-bg:               $gray-200 !default;
-$table-head-color:            $gray-700 !default;
-
-$table-dark-bg:               $gray-900 !default;
-$table-dark-accent-bg:        rgba($white, .05) !default;
-$table-dark-hover-bg:         rgba($white, .075) !default;
-$table-dark-border-color:     lighten($gray-900, 7.5%) !default;
-$table-dark-color:            $body-bg !default;
-
-$table-striped-order:         odd !default;
-
-$table-caption-color:         $text-muted !default;
-
-// Buttons + Forms
-//
-// Shared variables that are reassigned to `$input-` and `$btn-` specific variables.
-
-$input-btn-padding-y:         .375rem !default;
-$input-btn-padding-x:         .75rem !default;
-$input-btn-line-height:       $line-height-base !default;
-
-$input-btn-focus-width:       .2rem !default;
-$input-btn-focus-color:       rgba($component-active-bg, .25) !default;
-$input-btn-focus-box-shadow:  0 0 0 $input-btn-focus-width $input-btn-focus-color !default;
-
-$input-btn-padding-y-sm:      .25rem !default;
-$input-btn-padding-x-sm:      .5rem !default;
-$input-btn-line-height-sm:    $line-height-sm !default;
-
-$input-btn-padding-y-lg:      .5rem !default;
-$input-btn-padding-x-lg:      1rem !default;
-$input-btn-line-height-lg:    $line-height-lg !default;
-
-$input-btn-border-width:      $border-width !default;
-
-
-// Buttons
-//
-// For each of Bootstrap's buttons, define text, background, and border color.
-
-$btn-padding-y:               $input-btn-padding-y !default;
-$btn-padding-x:               $input-btn-padding-x !default;
-$btn-line-height:             $input-btn-line-height !default;
-
-$btn-padding-y-sm:            $input-btn-padding-y-sm !default;
-$btn-padding-x-sm:            $input-btn-padding-x-sm !default;
-$btn-line-height-sm:          $input-btn-line-height-sm !default;
-
-$btn-padding-y-lg:            $input-btn-padding-y-lg !default;
-$btn-padding-x-lg:            $input-btn-padding-x-lg !default;
-$btn-line-height-lg:          $input-btn-line-height-lg !default;
-
-$btn-border-width:            $input-btn-border-width !default;
-
-$btn-font-weight:             $font-weight-normal !default;
-$btn-box-shadow:              inset 0 1px 0 rgba($white, .15), 0 1px 1px rgba($black, .075) !default;
-$btn-focus-width:             $input-btn-focus-width !default;
-$btn-focus-box-shadow:        $input-btn-focus-box-shadow !default;
-$btn-disabled-opacity:        .65 !default;
-$btn-active-box-shadow:       inset 0 3px 5px rgba($black, .125) !default;
-
-$btn-link-disabled-color:     $gray-600 !default;
-
-$btn-block-spacing-y:         .5rem !default;
-
-// Allows for customizing button radius independently from global border radius
-$btn-border-radius:           $border-radius !default;
-$btn-border-radius-lg:        $border-radius-lg !default;
-$btn-border-radius-sm:        $border-radius-sm !default;
-
-$btn-transition:              color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
-
-
-// Forms
-
-$label-margin-bottom:                   .5rem !default;
-
-$input-padding-y:                       $input-btn-padding-y !default;
-$input-padding-x:                       $input-btn-padding-x !default;
-$input-line-height:                     $input-btn-line-height !default;
-
-$input-padding-y-sm:                    $input-btn-padding-y-sm !default;
-$input-padding-x-sm:                    $input-btn-padding-x-sm !default;
-$input-line-height-sm:                  $input-btn-line-height-sm !default;
-
-$input-padding-y-lg:                    $input-btn-padding-y-lg !default;
-$input-padding-x-lg:                    $input-btn-padding-x-lg !default;
-$input-line-height-lg:                  $input-btn-line-height-lg !default;
-
-$input-bg:                              $white !default;
-$input-disabled-bg:                     $gray-200 !default;
-
-$input-color:                           $gray-700 !default;
-$input-border-color:                    $gray-400 !default;
-$input-border-width:                    $input-btn-border-width !default;
-$input-box-shadow:                      inset 0 1px 1px rgba($black, .075) !default;
-
-$input-border-radius:                   $border-radius !default;
-$input-border-radius-lg:                $border-radius-lg !default;
-$input-border-radius-sm:                $border-radius-sm !default;
-
-$input-focus-bg:                        $input-bg !default;
-$input-focus-border-color:              lighten($component-active-bg, 25%) !default;
-$input-focus-color:                     $input-color !default;
-$input-focus-width:                     $input-btn-focus-width !default;
-$input-focus-box-shadow:                $input-btn-focus-box-shadow !default;
-
-$input-placeholder-color:               $gray-600 !default;
-$input-plaintext-color:                 $body-color !default;
-
-$input-height-border:                   $input-border-width * 2 !default;
-
-$input-height-inner:                    ($font-size-base * $input-btn-line-height) + ($input-btn-padding-y * 2) !default;
-$input-height:                          calc(#{$input-height-inner} + #{$input-height-border}) !default;
-
-$input-height-inner-sm:                 ($font-size-sm * $input-btn-line-height-sm) + ($input-btn-padding-y-sm * 2) !default;
-$input-height-sm:                       calc(#{$input-height-inner-sm} + #{$input-height-border}) !default;
-
-$input-height-inner-lg:                 ($font-size-lg * $input-btn-line-height-lg) + ($input-btn-padding-y-lg * 2) !default;
-$input-height-lg:                       calc(#{$input-height-inner-lg} + #{$input-height-border}) !default;
-
-$input-transition:                      border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
-
-$form-text-margin-top:                  .25rem !default;
-
-$form-check-input-gutter:               1.25rem !default;
-$form-check-input-margin-y:             .3rem !default;
-$form-check-input-margin-x:             .25rem !default;
-
-$form-check-inline-margin-x:            .75rem !default;
-$form-check-inline-input-margin-x:      .3125rem !default;
-
-$form-group-margin-bottom:              1rem !default;
-
-$input-group-addon-color:               $input-color !default;
-$input-group-addon-bg:                  $gray-200 !default;
-$input-group-addon-border-color:        $input-border-color !default;
-
-$custom-control-gutter:                 1.5rem !default;
-$custom-control-spacer-x:               1rem !default;
-
-$custom-control-indicator-size:         1rem !default;
-$custom-control-indicator-bg:           $gray-300 !default;
-$custom-control-indicator-bg-size:      50% 50% !default;
-$custom-control-indicator-box-shadow:   inset 0 .25rem .25rem rgba($black, .1) !default;
-
-$custom-control-indicator-disabled-bg:          $gray-200 !default;
-$custom-control-label-disabled-color:           $gray-600 !default;
-
-$custom-control-indicator-checked-color:        $component-active-color !default;
-$custom-control-indicator-checked-bg:           $component-active-bg !default;
-$custom-control-indicator-checked-disabled-bg:  rgba(theme-color("primary"), .5) !default;
-$custom-control-indicator-checked-box-shadow:   none !default;
-
-$custom-control-indicator-focus-box-shadow:     0 0 0 1px $body-bg, $input-btn-focus-box-shadow !default;
-
-$custom-control-indicator-active-color:         $component-active-color !default;
-$custom-control-indicator-active-bg:            lighten($component-active-bg, 35%) !default;
-$custom-control-indicator-active-box-shadow:    none !default;
-
-$custom-checkbox-indicator-border-radius:       $border-radius !default;
-$custom-checkbox-indicator-icon-checked:        str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='#{$custom-control-indicator-checked-color}' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E"), "#", "%23") !default;
-
-$custom-checkbox-indicator-indeterminate-bg:          $component-active-bg !default;
-$custom-checkbox-indicator-indeterminate-color:       $custom-control-indicator-checked-color !default;
-$custom-checkbox-indicator-icon-indeterminate:        str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='#{$custom-checkbox-indicator-indeterminate-color}' d='M0 2h4'/%3E%3C/svg%3E"), "#", "%23") !default;
-$custom-checkbox-indicator-indeterminate-box-shadow:  none !default;
-
-$custom-radio-indicator-border-radius:          50% !default;
-$custom-radio-indicator-icon-checked:           str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='#{$custom-control-indicator-checked-color}'/%3E%3C/svg%3E"), "#", "%23") !default;
-
-$custom-select-padding-y:           .375rem !default;
-$custom-select-padding-x:           .75rem !default;
-$custom-select-height:              $input-height !default;
-$custom-select-indicator-padding:   1rem !default; // Extra padding to account for the presence of the background-image based indicator
-$custom-select-line-height:         $input-btn-line-height !default;
-$custom-select-color:               $input-color !default;
-$custom-select-disabled-color:      $gray-600 !default;
-$custom-select-bg:                  $input-bg !default;
-$custom-select-disabled-bg:         $gray-200 !default;
-$custom-select-bg-size:             8px 10px !default; // In pixels because image dimensions
-$custom-select-indicator-color:     $gray-800 !default;
-$custom-select-indicator:           str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='#{$custom-select-indicator-color}' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E"), "#", "%23") !default;
-$custom-select-border-width:        $input-btn-border-width !default;
-$custom-select-border-color:        $input-border-color !default;
-$custom-select-border-radius:       $border-radius !default;
-
-$custom-select-focus-border-color:  $input-focus-border-color !default;
-$custom-select-focus-box-shadow:    inset 0 1px 2px rgba($black, .075), 0 0 5px rgba($custom-select-focus-border-color, .5) !default;
-
-$custom-select-font-size-sm:        75% !default;
-$custom-select-height-sm:           $input-height-sm !default;
-
-$custom-select-font-size-lg:        125% !default;
-$custom-select-height-lg:           $input-height-lg !default;
-
-$custom-range-track-width:          100% !default;
-$custom-range-track-height:         .5rem !default;
-$custom-range-track-cursor:         pointer !default;
-$custom-range-track-bg:             $gray-300 !default;
-$custom-range-track-border-radius:  1rem !default;
-$custom-range-track-box-shadow:     inset 0 .25rem .25rem rgba($black, .1) !default;
-
-$custom-range-thumb-width:            1rem !default;
-$custom-range-thumb-height:           $custom-range-thumb-width !default;
-$custom-range-thumb-bg:               $component-active-bg !default;
-$custom-range-thumb-border:           0 !default;
-$custom-range-thumb-border-radius:    1rem !default;
-$custom-range-thumb-box-shadow:       0 .1rem .25rem rgba($black, .1) !default;
-$custom-range-thumb-focus-box-shadow: 0 0 0 1px $body-bg, $input-btn-focus-box-shadow !default;
-$custom-range-thumb-active-bg:        lighten($component-active-bg, 35%) !default;
-
-$custom-file-height:                $input-height !default;
-$custom-file-focus-border-color:    $input-focus-border-color !default;
-$custom-file-focus-box-shadow:      $input-btn-focus-box-shadow !default;
-
-$custom-file-padding-y:             $input-btn-padding-y !default;
-$custom-file-padding-x:             $input-btn-padding-x !default;
-$custom-file-line-height:           $input-btn-line-height !default;
-$custom-file-color:                 $input-color !default;
-$custom-file-bg:                    $input-bg !default;
-$custom-file-border-width:          $input-btn-border-width !default;
-$custom-file-border-color:          $input-border-color !default;
-$custom-file-border-radius:         $input-border-radius !default;
-$custom-file-box-shadow:            $input-box-shadow !default;
-$custom-file-button-color:          $custom-file-color !default;
-$custom-file-button-bg:             $input-group-addon-bg !default;
-$custom-file-text: (
-  en: "Browse"
-) !default;
-
-
-// Form validation
-$form-feedback-margin-top:          $form-text-margin-top !default;
-$form-feedback-font-size:           $small-font-size !default;
-$form-feedback-valid-color:         theme-color("success") !default;
-$form-feedback-invalid-color:       theme-color("danger") !default;
-
-
-// Dropdowns
-//
-// Dropdown menu container and contents.
-
-$dropdown-min-width:                10rem !default;
-$dropdown-padding-y:                .5rem !default;
-$dropdown-spacer:                   .125rem !default;
-$dropdown-bg:                       $white !default;
-$dropdown-border-color:             rgba($black, .15) !default;
-$dropdown-border-radius:            $border-radius !default;
-$dropdown-border-width:             $border-width !default;
-$dropdown-divider-bg:               $gray-200 !default;
-$dropdown-box-shadow:               0 .5rem 1rem rgba($black, .175) !default;
-
-$dropdown-link-color:               $gray-900 !default;
-$dropdown-link-hover-color:         darken($gray-900, 5%) !default;
-$dropdown-link-hover-bg:            $gray-100 !default;
-
-$dropdown-link-active-color:        $component-active-color !default;
-$dropdown-link-active-bg:           $component-active-bg !default;
-
-$dropdown-link-disabled-color:      $gray-600 !default;
-
-$dropdown-item-padding-y:           .25rem !default;
-$dropdown-item-padding-x:           1.5rem !default;
-
-$dropdown-header-color:             $gray-600 !default;
-
-
-// Z-index master list
-//
-// Warning: Avoid customizing these values. They're used for a bird's eye view
-// of components dependent on the z-axis and are designed to all work together.
-
-$zindex-dropdown:                   1000 !default;
-$zindex-sticky:                     1020 !default;
-$zindex-fixed:                      1030 !default;
-$zindex-modal-backdrop:             1040 !default;
-$zindex-modal:                      1050 !default;
-$zindex-popover:                    1060 !default;
-$zindex-tooltip:                    1070 !default;
-
-// Navs
-
-$nav-link-padding-y:                .5rem !default;
-$nav-link-padding-x:                1rem !default;
-$nav-link-disabled-color:           $gray-600 !default;
-
-$nav-tabs-border-color:             $gray-300 !default;
-$nav-tabs-border-width:             $border-width !default;
-$nav-tabs-border-radius:            $border-radius !default;
-$nav-tabs-link-hover-border-color:  $gray-200 $gray-200 $nav-tabs-border-color !default;
-$nav-tabs-link-active-color:        $gray-700 !default;
-$nav-tabs-link-active-bg:           $body-bg !default;
-$nav-tabs-link-active-border-color: $gray-300 $gray-300 $nav-tabs-link-active-bg !default;
-
-$nav-pills-border-radius:           $border-radius !default;
-$nav-pills-link-active-color:       $component-active-color !default;
-$nav-pills-link-active-bg:          $component-active-bg !default;
-
-$nav-divider-color:                 $gray-200 !default;
-$nav-divider-margin-y:              ($spacer / 2) !default;
-
-// Navbar
-
-$navbar-padding-y:                  ($spacer / 2) !default;
-$navbar-padding-x:                  $spacer !default;
-
-$navbar-nav-link-padding-x:         .5rem !default;
-
-$navbar-brand-font-size:            $font-size-lg !default;
-// Compute the navbar-brand padding-y so the navbar-brand will have the same height as navbar-text and nav-link
-$nav-link-height:                   ($font-size-base * $line-height-base + $nav-link-padding-y * 2) !default;
-$navbar-brand-height:               $navbar-brand-font-size * $line-height-base !default;
-$navbar-brand-padding-y:            ($nav-link-height - $navbar-brand-height) / 2 !default;
-
-$navbar-toggler-padding-y:          .25rem !default;
-$navbar-toggler-padding-x:          .75rem !default;
-$navbar-toggler-font-size:          $font-size-lg !default;
-$navbar-toggler-border-radius:      $btn-border-radius !default;
-
-$navbar-dark-color:                 rgba($white, .5) !default;
-$navbar-dark-hover-color:           rgba($white, .75) !default;
-$navbar-dark-active-color:          $white !default;
-$navbar-dark-disabled-color:        rgba($white, .25) !default;
-$navbar-dark-toggler-icon-bg:       str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$navbar-dark-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"), "#", "%23") !default;
-$navbar-dark-toggler-border-color:  rgba($white, .1) !default;
-
-$navbar-light-color:                rgba($black, .5) !default;
-$navbar-light-hover-color:          rgba($black, .7) !default;
-$navbar-light-active-color:         rgba($black, .9) !default;
-$navbar-light-disabled-color:       rgba($black, .3) !default;
-$navbar-light-toggler-icon-bg:      str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$navbar-light-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"), "#", "%23") !default;
-$navbar-light-toggler-border-color: rgba($black, .1) !default;
-
-// Pagination
-
-$pagination-padding-y:              .5rem !default;
-$pagination-padding-x:              .75rem !default;
-$pagination-padding-y-sm:           .25rem !default;
-$pagination-padding-x-sm:           .5rem !default;
-$pagination-padding-y-lg:           .75rem !default;
-$pagination-padding-x-lg:           1.5rem !default;
-$pagination-line-height:            1.25 !default;
-
-$pagination-color:                  $link-color !default;
-$pagination-bg:                     $white !default;
-$pagination-border-width:           $border-width !default;
-$pagination-border-color:           $gray-300 !default;
-
-$pagination-focus-box-shadow:       $input-btn-focus-box-shadow !default;
-$pagination-focus-outline:          0 !default;
-
-$pagination-hover-color:            $link-hover-color !default;
-$pagination-hover-bg:               $gray-200 !default;
-$pagination-hover-border-color:     $gray-300 !default;
-
-$pagination-active-color:           $component-active-color !default;
-$pagination-active-bg:              $component-active-bg !default;
-$pagination-active-border-color:    $pagination-active-bg !default;
-
-$pagination-disabled-color:         $gray-600 !default;
-$pagination-disabled-bg:            $white !default;
-$pagination-disabled-border-color:  $gray-300 !default;
-
-
-// Jumbotron
-
-$jumbotron-padding:                 2rem !default;
-$jumbotron-bg:                      $gray-200 !default;
-
-
-// Cards
-
-$card-spacer-y:                     .75rem !default;
-$card-spacer-x:                     1.25rem !default;
-$card-border-width:                 $border-width !default;
-$card-border-radius:                $border-radius !default;
-$card-border-color:                 rgba($black, .125) !default;
-$card-inner-border-radius:          calc(#{$card-border-radius} - #{$card-border-width}) !default;
-$card-cap-bg:                       rgba($black, .03) !default;
-$card-bg:                           $white !default;
-
-$card-img-overlay-padding:          1.25rem !default;
-
-$card-group-margin:                 ($grid-gutter-width / 2) !default;
-$card-deck-margin:                  $card-group-margin !default;
-
-$card-columns-count:                3 !default;
-$card-columns-gap:                  1.25rem !default;
-$card-columns-margin:               $card-spacer-y !default;
-
-
-// Tooltips
-
-$tooltip-font-size:                 $font-size-sm !default;
-$tooltip-max-width:                 200px !default;
-$tooltip-color:                     $white !default;
-$tooltip-bg:                        $black !default;
-$tooltip-border-radius:             $border-radius !default;
-$tooltip-opacity:                   .9 !default;
-$tooltip-padding-y:                 .25rem !default;
-$tooltip-padding-x:                 .5rem !default;
-$tooltip-margin:                    0 !default;
-
-$tooltip-arrow-width:               .8rem !default;
-$tooltip-arrow-height:              .4rem !default;
-$tooltip-arrow-color:               $tooltip-bg !default;
-
-
-// Popovers
-
-$popover-font-size:                 $font-size-sm !default;
-$popover-bg:                        $white !default;
-$popover-max-width:                 276px !default;
-$popover-border-width:              $border-width !default;
-$popover-border-color:              rgba($black, .2) !default;
-$popover-border-radius:             $border-radius-lg !default;
-$popover-box-shadow:                0 .25rem .5rem rgba($black, .2) !default;
-
-$popover-header-bg:                 darken($popover-bg, 3%) !default;
-$popover-header-color:              $headings-color !default;
-$popover-header-padding-y:          .5rem !default;
-$popover-header-padding-x:          .75rem !default;
-
-$popover-body-color:                $body-color !default;
-$popover-body-padding-y:            $popover-header-padding-y !default;
-$popover-body-padding-x:            $popover-header-padding-x !default;
-
-$popover-arrow-width:               1rem !default;
-$popover-arrow-height:              .5rem !default;
-$popover-arrow-color:               $popover-bg !default;
-
-$popover-arrow-outer-color:         fade-in($popover-border-color, .05) !default;
-
-
-// Badges
-
-$badge-font-size:                   75% !default;
-$badge-font-weight:                 $font-weight-bold !default;
-$badge-padding-y:                   .25em !default;
-$badge-padding-x:                   .4em !default;
-$badge-border-radius:               $border-radius !default;
-
-$badge-pill-padding-x:              .6em !default;
-// Use a higher than normal value to ensure completely rounded edges when
-// customizing padding or font-size on labels.
-$badge-pill-border-radius:          10rem !default;
-
-
-// Modals
-
-// Padding applied to the modal body
-$modal-inner-padding:               1rem !default;
-
-$modal-dialog-margin:               .5rem !default;
-$modal-dialog-margin-y-sm-up:       1.75rem !default;
-
-$modal-title-line-height:           $line-height-base !default;
-
-$modal-content-bg:                  $white !default;
-$modal-content-border-color:        rgba($black, .2) !default;
-$modal-content-border-width:        $border-width !default;
-$modal-content-border-radius:       $border-radius-lg !default;
-$modal-content-box-shadow-xs:       0 .25rem .5rem rgba($black, .5) !default;
-$modal-content-box-shadow-sm-up:    0 .5rem 1rem rgba($black, .5) !default;
-
-$modal-backdrop-bg:                 $black !default;
-$modal-backdrop-opacity:            .5 !default;
-$modal-header-border-color:         $gray-200 !default;
-$modal-footer-border-color:         $modal-header-border-color !default;
-$modal-header-border-width:         $modal-content-border-width !default;
-$modal-footer-border-width:         $modal-header-border-width !default;
-$modal-header-padding:              1rem !default;
-
-$modal-lg:                          800px !default;
-$modal-md:                          500px !default;
-$modal-sm:                          300px !default;
-
-$modal-transition:                  transform .3s ease-out !default;
-
-
-// Alerts
-//
-// Define alert colors, border radius, and padding.
-
-$alert-padding-y:                   .75rem !default;
-$alert-padding-x:                   1.25rem !default;
-$alert-margin-bottom:               1rem !default;
-$alert-border-radius:               $border-radius !default;
-$alert-link-font-weight:            $font-weight-bold !default;
-$alert-border-width:                $border-width !default;
-
-$alert-bg-level:                    -10 !default;
-$alert-border-level:                -9 !default;
-$alert-color-level:                 6 !default;
-
-
-// Progress bars
-
-$progress-height:                   1rem !default;
-$progress-font-size:                ($font-size-base * .75) !default;
-$progress-bg:                       $gray-200 !default;
-$progress-border-radius:            $border-radius !default;
-$progress-box-shadow:               inset 0 .1rem .1rem rgba($black, .1) !default;
-$progress-bar-color:                $white !default;
-$progress-bar-bg:                   theme-color("primary") !default;
-$progress-bar-animation-timing:     1s linear infinite !default;
-$progress-bar-transition:           width .6s ease !default;
-
-// List group
-
-$list-group-bg:                     $white !default;
-$list-group-border-color:           rgba($black, .125) !default;
-$list-group-border-width:           $border-width !default;
-$list-group-border-radius:          $border-radius !default;
-
-$list-group-item-padding-y:         .75rem !default;
-$list-group-item-padding-x:         1.25rem !default;
-
-$list-group-hover-bg:               $gray-100 !default;
-$list-group-active-color:           $component-active-color !default;
-$list-group-active-bg:              $component-active-bg !default;
-$list-group-active-border-color:    $list-group-active-bg !default;
-
-$list-group-disabled-color:         $gray-600 !default;
-$list-group-disabled-bg:            $list-group-bg !default;
-
-$list-group-action-color:           $gray-700 !default;
-$list-group-action-hover-color:     $list-group-action-color !default;
-
-$list-group-action-active-color:    $body-color !default;
-$list-group-action-active-bg:       $gray-200 !default;
-
-
-// Image thumbnails
-
-$thumbnail-padding:                 .25rem !default;
-$thumbnail-bg:                      $body-bg !default;
-$thumbnail-border-width:            $border-width !default;
-$thumbnail-border-color:            $gray-300 !default;
-$thumbnail-border-radius:           $border-radius !default;
-$thumbnail-box-shadow:              0 1px 2px rgba($black, .075) !default;
-
-
-// Figures
-
-$figure-caption-font-size:          90% !default;
-$figure-caption-color:              $gray-600 !default;
-
-
-// Breadcrumbs
-
-$breadcrumb-padding-y:              .75rem !default;
-$breadcrumb-padding-x:              1rem !default;
-$breadcrumb-item-padding:           .5rem !default;
-
-$breadcrumb-margin-bottom:          1rem !default;
-
-$breadcrumb-bg:                     $gray-200 !default;
-$breadcrumb-divider-color:          $gray-600 !default;
-$breadcrumb-active-color:           $gray-600 !default;
-$breadcrumb-divider:                quote("/") !default;
-
-$breadcrumb-border-radius:          $border-radius !default;
-
-
-// Carousel
-
-$carousel-control-color:            $white !default;
-$carousel-control-width:            15% !default;
-$carousel-control-opacity:          .5 !default;
-
-$carousel-indicator-width:          30px !default;
-$carousel-indicator-height:         3px !default;
-$carousel-indicator-spacer:         3px !default;
-$carousel-indicator-active-bg:      $white !default;
-
-$carousel-caption-width:            70% !default;
-$carousel-caption-color:            $white !default;
-
-$carousel-control-icon-width:       20px !default;
-
-$carousel-control-prev-icon-bg:     str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E"), "#", "%23") !default;
-$carousel-control-next-icon-bg:     str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E"), "#", "%23") !default;
-
-$carousel-transition:               transform .6s ease !default; // Define transform transition first if using multiple transitons (e.g., `transform 2s ease, opacity .5s ease-out`)
-
-
-// Close
-
-$close-font-size:                   $font-size-base * 1.5 !default;
-$close-font-weight:                 $font-weight-bold !default;
-$close-color:                       $black !default;
-$close-text-shadow:                 0 1px 0 $white !default;
-
-// Code
-
-$code-font-size:                    87.5% !default;
-$code-color:                        $pink !default;
-
-$kbd-padding-y:                     .2rem !default;
-$kbd-padding-x:                     .4rem !default;
-$kbd-font-size:                     $code-font-size !default;
-$kbd-color:                         $white !default;
-$kbd-bg:                            $gray-900 !default;
-
-$pre-color:                         $gray-900 !default;
-$pre-scrollable-max-height:         340px !default;
-
-
-// Printing
-$print-page-size:                   a3 !default;
-$print-body-min-width:              map-get($grid-breakpoints, "lg") !default;
diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/semantic-ui/tabulator_semantic-ui.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/semantic-ui/tabulator_semantic-ui.scss
deleted file mode 100644
index 054b6181c9..0000000000
--- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/semantic-ui/tabulator_semantic-ui.scss
+++ /dev/null
@@ -1,1332 +0,0 @@
-
-@import "variables_table.scss";
-
-
-
-//Main Theme Variables
-$backgroundColor: $background !default; //background color of tabulator
-$textSize:14px !default; //table text size
-
-//header themeing
-$headerBackgroundColor:$headerBackground !default; //border to tabulator
-$headerTextColor:$headerColor !default; //header text colour
-$headerBorderColor:#ddd !default;  //header border color
-$headerSeperatorColor:#999 !default; //header bottom seperator color
-$headerMargin:4px !default; //padding round header
-
-//column header arrows
-$sortArrowActive: #666 !default;
-$sortArrowInactive: #bbb !default;
-
-//row themeing
-$rowBorderColor:#ddd !default; //table border color
-$rowTextColor:#333 !default; //table text color
-
-$rowSelectedBackground: #9ABCEA !default; //row background color when selected
-$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered
-
-
-$editBoxColor:#1D68CD !default; //border color for edit boxes
-$errorColor:#dd0000 !default; //error indication
-
-//footer themeing
-$footerBackgroundColor:#fff !default; //border to tabulator
-$footerTextColor:#555 !default; //footer text colour
-$footerBorderColor:#aaa !default; //footer border color
-$footerSeperatorColor:#999 !default; //footer bottom seperator color
-$footerActiveColor:#d00 !default; //footer bottom active text color
-
-
-//Tabulator Containing Element
-.tabulator{
-	position: relative;
-	background-color: $backgroundColor;
-	overflow:hidden;
-	font-size:$textSize;
-	text-align: left;
-	width: 100%;
-
-	margin: $margin;
-	border: $border;
-	box-shadow: $boxShadow;
-	border-radius: $borderRadius;
-	color: $color;
-
-	-webkit-transform: translatez(0);
-	-moz-transform: translatez(0);
-	-ms-transform: translatez(0);
-	-o-transform: translatez(0);
-	transform: translatez(0);
-
-	&[tabulator-layout="fitDataFill"]{
-		.tabulator-tableHolder{
-			.tabulator-table{
-				min-width:100%;
-			}
-		}
-	}
-
-	&.tabulator-block-select{
-		user-select: none;
-	}
-
-	//column header containing element
-	.tabulator-header{
-		position:relative;
-		box-sizing: border-box;
-
-		width:100%;
-
-		border-bottom: $headerBorder;
-		background-color: $headerBackgroundColor;
-
-		box-shadow: $headerBoxShadow;
-
-		color: $headerTextColor;
-		font-style: $headerFontStyle;
-		font-weight: $headerFontWeight;
-		text-transform: $headerTextTransform;
-
-		white-space: nowrap;
-		overflow:hidden;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		//individual column header element
-		.tabulator-col{
-			display:inline-block;
-
-			position:relative;
-			box-sizing:border-box;
-			// border-right: $headerDivider;
-			background-color: $headerBackgroundColor;
-			text-align:left;
-			vertical-align: bottom;
-			overflow: hidden;
-
-			&.tabulator-moving{
-				position: absolute;
-				border:1px solid  $headerSeperatorColor;
-				background:darken($headerBackgroundColor, 10%);
-				pointer-events: none;
-			}
-
-			//hold content of column header
-			.tabulator-col-content{
-				box-sizing:border-box;
-				position: relative;
-				padding: $headerVerticalPadding $headerHorizontalPadding;
-
-				//hold title of column header
-				.tabulator-col-title{
-					box-sizing:border-box;
-					width: 100%;
-
-					white-space: nowrap;
-					overflow: hidden;
-					text-overflow: ellipsis;
-					vertical-align:bottom;
-
-					//element to hold title editor
-					.tabulator-title-editor{
-						box-sizing: border-box;
-						width: 100%;
-
-						border:1px solid #999;
-
-						padding:1px;
-
-						background: #fff;
-					}
-				}
-
-				//column sorter arrow
-				.tabulator-arrow{
-					display: inline-block;
-					position: absolute;
-					top:18px;
-					right:8px;
-					width: 0;
-					height: 0;
-					border-left: 6px solid transparent;
-					border-right: 6px solid transparent;
-					border-bottom: 6px solid $sortArrowInactive;
-				}
-
-			}
-
-			//complex header column group
-			&.tabulator-col-group{
-
-				//gelement to hold sub columns in column group
-				.tabulator-col-group-cols{
-					position:relative;
-					display: flex;
-
-					border-top:1px solid $headerBorderColor;
-					overflow: hidden;
-
-					.tabulator-col:last-child{
-						margin-right:-1px;
-					}
-				}
-			}
-
-
-			//hide left resize handle on first column
-			&:first-child{
-				.tabulator-col-resize-handle.prev{
-					display: none;
-				}
-			}
-
-			//placeholder element for sortable columns
-			&.ui-sortable-helper{
-				position: absolute;
-				background-color:darken($headerBackgroundColor, 10%) !important;
-				border:1px solid $headerBorderColor;
-			}
-
-			//header filter containing element
-			.tabulator-header-filter{
-				position: relative;
-				box-sizing: border-box;
-				margin-top:2px;
-				width:100%;
-				text-align: center;
-
-				//styling adjustment for inbuilt editors
-				textarea{
-					height:auto !important;
-				}
-
-				svg{
-					margin-top: 3px;
-				}
-
-				input{
-					&::-ms-clear {
-					  width : 0;
-					  height: 0;
-					}
-				}
-			}
-
-
-			//styling child elements for sortable columns
-			&.tabulator-sortable{
-				.tabulator-col-title{
-					padding-right:25px;
-				}
-
-				&:hover{
-					cursor:pointer;
-					background-color:darken($headerBackgroundColor, 10%);
-				}
-
-				&[aria-sort="none"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowInactive;
-					}
-				}
-
-				&[aria-sort="asc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowActive;
-					}
-				}
-
-				&[aria-sort="desc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: 6px solid $sortArrowActive;
-						border-bottom: none;
-					}
-				}
-			}
-
-			&.tabulator-col-vertical{
-				.tabulator-col-content{
-					.tabulator-col-title{
-						writing-mode: vertical-rl;
-						text-orientation: mixed;
-
-						display:flex;
-						align-items:center;
-						justify-content:center;
-					}
-				}
-
-				&.tabulator-col-vertical-flip{
-					.tabulator-col-title{
-						transform: rotate(180deg);
-					}
-				}
-
-				&.tabulator-sortable{
-					.tabulator-col-title{
-						padding-right:0;
-						padding-top:20px;
-					}
-
-					&.tabulator-col-vertical-flip{
-						.tabulator-col-title{
-							padding-right:0;
-							padding-bottom:20px;
-						}
-
-					}
-
-					.tabulator-arrow{
-						right:calc(50% - 6px);
-					}
-				}
-			}
-
-		}
-
-		.tabulator-frozen{
-			display: inline-block;
-			position: absolute;
-
-			// background-color: inherit;
-
-			z-index: 10;
-
-			&.tabulator-frozen-left{
-				border-right:2px solid $rowBorderColor;
-			}
-
-			&.tabulator-frozen-right{
-				border-left:2px solid $rowBorderColor;
-			}
-		}
-
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			min-width:400%;
-
-			background:lighten($headerBackgroundColor, 5%) !important;
-
-			.tabulator-row{
-				background:lighten($headerBackgroundColor, 5%) !important;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-			}
-
-			border-top:1px solid $rowBorderColor;
-			border-bottom:1px solid $headerBorderColor;
-
-			overflow: hidden;
-		}
-
-		.tabulator-frozen-rows-holder{
-			min-width:400%;
-
-			&:empty{
-				display: none;
-			}
-		}
-	}
-
-
-
-	//scrolling element to hold table
-	.tabulator-tableHolder{
-		position:relative;
-		width:100%;
-		white-space: nowrap;
-		overflow:auto;
-		-webkit-overflow-scrolling: touch;
-
-		&:focus{
-			outline: none;
-		}
-
-		//default placeholder element
-		.tabulator-placeholder{
-			box-sizing:border-box;
-			display: flex;
-			align-items:center;
-
-			&[tabulator-render-mode="virtual"]{
-				position: absolute;
-				top:0;
-				left:0;
-				height:100%;
-			}
-
-			width:100%;
-
-			span{
-				display: inline-block;
-
-				margin:0 auto;
-				padding:10px;
-
-				color:#000;
-				font-weight: bold;
-				font-size: 20px;
-			}
-		}
-
-		//element to hold table rows
-		.tabulator-table{
-			position:relative;
-			display:inline-block;
-			white-space: nowrap;
-			overflow:visible;
-			color:$rowTextColor;
-
-			.tabulator-row{
-				&.tabulator-calcs{
-					font-weight: bold;
-					background:darken($background, 5%) !important;
-
-					&.tabulator-calcs-top{
-						border-bottom:2px solid $rowBorderColor;
-					}
-
-					&.tabulator-calcs-bottom{
-						border-top:2px solid $rowBorderColor;
-					}
-				}
-			}
-		}
-	}
-
-
-	//column resize handles
-	.tabulator-col-resize-handle{
-		position:absolute;
-		right:0;
-		top:0;
-		bottom:0;
-		width:5px;
-
-		&.prev{
-			left:0;
-			right:auto;
-		}
-
-		&:hover{
-			cursor:ew-resize;
-		}
-	}
-
-
-	//footer element
-	.tabulator-footer{
-		padding: $footerVerticalPadding $footerHorizontalPadding;
-
-		border-top: $footerBorder;
-		box-shadow: $footerBoxShadow;
-
-		background: $footerBackground;
-
-
-		text-align:right;
-		color: $footerColor;
-
-		font-style: $footerFontStyle;
-		font-weight: $footerFontWeight;
-		text-transform: $footerTextTransform;
-
-		white-space:nowrap;
-		user-select:none;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			width:calc(100% + 20px);
-			margin:(-$footerVerticalPadding) (-$footerHorizontalPadding) $footerVerticalPadding (-$footerHorizontalPadding);
-
-			text-align: left;
-
-			background:lighten($footerBackground, 5%) !important;
-
-			.tabulator-row{
-				font-weight: bold;
-				background:lighten($footerBackground, 5%) !important;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-			}
-
-			border-bottom:1px solid $rowBorderColor;
-			border-top:1px solid $rowBorderColor;
-
-			overflow: hidden;
-
-			&:only-child{
-				margin-bottom:-$footerVerticalPadding;
-				border-bottom:none;
-			}
-		}
-
-		//pagination container element
-		.tabulator-pages{
-			margin:0 7px;
-		}
-
-		//pagination button
-		.tabulator-page{
-			display:inline-block;
-			margin:0 2px;
-			border:1px solid $footerBorderColor;
-			border-radius:3px;
-			padding:2px 5px;
-			background:rgba(255,255,255,.2);
-			color: $footerTextColor;
-			font-family:inherit;
-			font-weight:inherit;
-			font-size:inherit;
-
-			&.active{
-				color:$footerActiveColor;
-			}
-
-			&:disabled{
-				opacity:.5;
-			}
-
-			&:not(.disabled){
-				&:hover{
-					cursor:pointer;
-					background:rgba(0,0,0,.2);
-					color:#fff;
-				}
-			}
-		}
-	}
-
-	//holding div that contains loader and covers tabulator element to prevent interaction
-	.tabulator-loader{
-		position:absolute;
-		display: flex;
-		align-items:center;
-
-		top:0;
-		left:0;
-		z-index:100;
-
-		height:100%;
-		width:100%;
-		background:rgba(0,0,0,.4);
-		text-align:center;
-
-		//loading message element
-		.tabulator-loader-msg{
-			display:inline-block;
-
-			margin:0 auto;
-			padding:10px 20px;
-
-			border-radius:10px;
-
-			background:#fff;
-			font-weight:bold;
-			font-size:16px;
-
-			//loading message
-			&.tabulator-loading{
-				border:4px solid #333;
-				color:#000;
-			}
-
-			//error message
-			&.tabulator-error{
-				border:4px solid #D00;
-				color:#590000;
-			}
-		}
-	}
-
-
-	//Semantic-ui theming classes
-
-	.tabulator-tableHolder{
-		.tabulator-table{
-			.tabulator-row{
-				&.positive, .tabulator-cell.positive{
-					box-shadow: $positiveBoxShadow;
-					background: $positiveBackgroundColor !important;
-					color: $positiveColor !important;
-
-					&:hover{
-						background: $positiveBackgroundHover !important;
-						color: $positiveColorHover !important;
-					}
-				}
-
-				&.negative, .tabulator-cell.negative{
-					box-shadow: $negativeBoxShadow;
-					background: $negativeBackgroundColor !important;
-					color: $negativeColor !important;
-
-					&:hover{
-						background: $negativeBackgroundHover !important;
-						color: $negativeColorHover !important;
-					}
-				}
-
-				&.error, .tabulator-cell.error{
-					box-shadow: $errorBoxShadow;
-					background: $errorBackgroundColor !important;
-					color: $errorColor !important;
-
-					&:hover{
-						background: $errorBackgroundHover !important;
-						color: $errorColorHover !important;
-					}
-				}
-
-				&.warning, .tabulator-cell.warning{
-					box-shadow: $warningBoxShadow;
-					background: $warningBackgroundColor !important;
-					color: $warningColor !important;
-
-					&:hover{
-						background: $warningBackgroundHover !important;
-						color: $warningColorHover !important;
-					}
-				}
-
-				&.active, .tabulator-cell.active{
-					box-shadow: $activeBoxShadow;
-					background: $activeBackgroundColor !important;
-					color: $activeColor !important;
-
-					&:hover{
-						background: $positiveBackgroundHover !important;
-						color: $positiveColorHover !important;
-					}
-				}
-
-				&.active, &.disabled:hover, .tabulator-cell.active{
-					pointer-events: none;
-					color: $disabledTextColor;
-				}
-			}
-		}
-	}
-
-
-	&.inverted{
-
-		background: $invertedBackground;
-		color: $invertedCellColor;
-		border: $invertedBorder;
-
-		.tabulator-header{
-			background-color: $invertedHeaderBackground;
-			border-color: $invertedHeaderBorderColor !important;
-			color: $invertedHeaderColor;
-
-			.tabulator-col{
-				border-color: $invertedCellBorderColor !important;
-			}
-		}
-
-		.tabulator-tableHolder{
-			.tabulator-table{
-				.tabulator-row{
-					color: $invertedCellColor;
-					border: $invertedBorder;
-
-					.tabulator-cell{
-						border-color: $invertedCellBorderColor !important;
-					}
-				}
-			}
-		}
-
-		.tabulator-footer{
-			background: $definitionPageBackground;
-		}
-	}
-
-	&.striped{
-		.tabulator-tableHolder{
-			.tabulator-table{
-				.tabulator-row{
-					&:nth-child(even){
-						background-color: $basicTableStripedBackground !important;
-					}
-				}
-			}
-		}
-	}
-
-	&.celled{
-		border:1px solid $borderColor;
-
-		.tabulator-header{
-			.tabulator-col{
-				border-right:$cellBorder;
-			}
-		}
-
-		.tabulator-tableHolder{
-			.tabulator-table{
-				.tabulator-row{
-					.tabulator-cell{
-						border-right:$cellBorder;
-					}
-				}
-			}
-		}
-
-	}
-
-
-	&[class*="single line"]{
-		.tabulator-tableHolder{
-			.tabulator-table{
-				.tabulator-row{
-					.tabulator-cell{
-						border-right:none;
-					}
-				}
-			}
-		}
-	}
-
-	//coloured table varients
-	/* Red */
-	&.red {
-		border-top: $coloredBorderSize solid $red;
-	}
-	&.inverted.red {
-		background-color: $red !important;
-		color: $white !important;
-	}
-
-	/* Orange */
-	&.orange {
-		border-top: $coloredBorderSize solid $orange;
-	}
-	&.inverted.orange {
-		background-color: $orange !important;
-		color: $white !important;
-	}
-
-	/* Yellow */
-	&.yellow {
-		border-top: $coloredBorderSize solid $yellow;
-	}
-	&.inverted.yellow {
-		background-color: $yellow !important;
-		color: $white !important;
-	}
-
-	/* Olive */
-	&.olive {
-		border-top: $coloredBorderSize solid $olive;
-	}
-	&.inverted.olive {
-		background-color: $olive !important;
-		color: $white !important;
-	}
-
-	/* Green */
-	&.green {
-		border-top: $coloredBorderSize solid $green;
-	}
-	&.inverted.green {
-		background-color: $green !important;
-		color: $white !important;
-	}
-
-	/* Teal */
-	&.teal {
-		border-top: $coloredBorderSize solid $teal;
-	}
-	&.inverted.teal {
-		background-color: $teal !important;
-		color: $white !important;
-	}
-
-	/* Blue */
-	&.blue {
-		border-top: $coloredBorderSize solid $blue;
-	}
-	&.inverted.blue {
-		background-color: $blue !important;
-		color: $white !important;
-	}
-
-	/* Violet */
-	&.violet {
-		border-top: $coloredBorderSize solid $violet;
-	}
-	&.inverted.violet {
-		background-color: $violet !important;
-		color: $white !important;
-	}
-
-	/* Purple */
-	&.purple {
-		border-top: $coloredBorderSize solid $purple;
-	}
-	&.inverted.purple {
-		background-color: $purple !important;
-		color: $white !important;
-	}
-
-	/* Pink */
-	&.pink {
-		border-top: $coloredBorderSize solid $pink;
-	}
-	&.inverted.pink {
-		background-color: $pink !important;
-		color: $white !important;
-	}
-
-	/* Brown */
-	&.brown {
-		border-top: $coloredBorderSize solid $brown;
-	}
-	&.inverted.brown {
-		background-color: $brown !important;
-		color: $white !important;
-	}
-
-	/* Grey */
-	&.grey {
-		border-top: $coloredBorderSize solid $grey;
-	}
-	&.inverted.grey {
-		background-color: $grey !important;
-		color: $white !important;
-	}
-
-	/* Black */
-	&.black {
-		border-top: $coloredBorderSize solid $black;
-	}
-	&.inverted.black {
-		background-color: $black !important;
-		color: $white !important;
-	}
-
-	&.padded{
-		.tabulator-header{
-			.tabulator-col{
-				.tabulator-col-content{
-					padding: $paddedVerticalPadding $paddedHorizontalPadding;
-
-					.tabulator-arrow{
-						top:20px;
-					}
-				}
-			}
-		}
-		.tabulator-tableHolder{
-			.tabulator-table{
-				.tabulator-row{
-					.tabulator-cell{
-						padding: $paddedVerticalPadding $paddedHorizontalPadding;
-					}
-				}
-			}
-		}
-
-		&.very{
-			.tabulator-header{
-				.tabulator-col{
-					.tabulator-col-content{
-						padding: $veryPaddedVerticalPadding $veryPaddedHorizontalPadding;
-
-						.tabulator-arrow{
-							top:26px;
-						}
-					}
-				}
-			}
-			.tabulator-tableHolder{
-				.tabulator-table{
-					.tabulator-row{
-						.tabulator-cell{
-							padding: $veryPaddedVerticalPadding $veryPaddedHorizontalPadding;
-						}
-					}
-				}
-			}
-		}
-	}
-
-	&.compact{
-		.tabulator-header{
-			.tabulator-col{
-				.tabulator-col-content{
-					padding: $compactVerticalPadding $compactHorizontalPadding;
-
-					.tabulator-arrow{
-						top:12px;
-					}
-				}
-			}
-		}
-		.tabulator-tableHolder{
-			.tabulator-table{
-				.tabulator-row{
-					.tabulator-cell{
-						padding: $compactVerticalPadding $compactHorizontalPadding;
-					}
-				}
-			}
-		}
-
-		&.very{
-			.tabulator-header{
-				.tabulator-col{
-					.tabulator-col-content{
-						padding: $veryCompactVerticalPadding $veryCompactHorizontalPadding;
-
-						.tabulator-arrow{
-							top:10px;
-						}
-					}
-				}
-			}
-			.tabulator-tableHolder{
-				.tabulator-table{
-					.tabulator-row{
-						.tabulator-cell{
-							padding: $veryCompactVerticalPadding $veryCompactHorizontalPadding;
-						}
-					}
-				}
-			}
-		}
-	}
-}
-
-
-//row element
-.tabulator-row{
-	position: relative;
-	box-sizing: border-box;
-
-	min-height: $textSize + ($headerMargin * 2);
-	border-bottom: $rowBorder;
-
-	&.tabulator-selectable:hover{
-		box-shadow: $activeBoxShadow;
-		background: $activeBackgroundColor !important;
-		color: $activeColor !important;
-		cursor: pointer;
-	}
-
-	&.tabulator-selected{
-		background-color:$rowSelectedBackground;
-	}
-
-	&.tabulator-selected:hover{
-		background-color:$rowSelectedBackgroundHover;
-		cursor: pointer;
-	}
-
-	&.tabulator-moving{
-		position: absolute;
-
-		border-top:1px solid  $rowBorderColor;
-		border-bottom:1px solid  $rowBorderColor;
-
-		pointer-events: none !important;
-		z-index:15;
-	}
-
-	//row resize handles
-	.tabulator-row-resize-handle{
-		position:absolute;
-		right:0;
-		bottom:0;
-		left:0;
-		height:5px;
-
-		&.prev{
-			top:0;
-			bottom:auto;
-		}
-
-		&:hover{
-			cursor:ns-resize;
-		}
-	}
-
-	.tabulator-frozen{
-		display: inline-block;
-		position: absolute;
-
-		background-color: inherit;
-
-		z-index: 10;
-
-		&.tabulator-frozen-left{
-			border-right:2px solid $rowBorderColor;
-		}
-
-		&.tabulator-frozen-right{
-			border-left:2px solid $rowBorderColor;
-		}
-	}
-
-	.tabulator-responsive-collapse{
-		box-sizing:border-box;
-
-		padding:5px;
-
-		border-top:1px solid $rowBorderColor;
-		border-bottom:1px solid $rowBorderColor;
-
-		&:empty{
-			display:none;
-		}
-
-		table{
-			font-size:$textSize;
-
-			tr{
-				td{
-					position: relative;
-
-					&:first-of-type{
-						padding-right:10px;
-					}
-				}
-			}
-		}
-	}
-
-
-	//cell element
-	.tabulator-cell{
-		display:inline-block;
-		position: relative;
-		box-sizing:border-box;
-		padding: $cellVerticalPadding $cellHorizontalPadding;
-		// border-right:1px solid $rowBorderColor;
-		vertical-align:middle;
-		white-space:nowrap;
-		overflow:hidden;
-		text-overflow:ellipsis;
-
-		&:last-of-type{
-			border-right: none;
-		}
-
-		&.tabulator-editing{
-			border:1px solid  $editBoxColor;
-			padding: 0;
-
-			input, select{
-				border:1px;
-				background:transparent;
-			}
-		}
-
-		&.tabulator-validation-fail{
-			border:1px solid $errorColor;
-			input, select{
-				border:1px;
-				background:transparent;
-
-				color: $errorColor;
-			}
-		}
-
-		//hide left resize handle on first column
-		&:first-child{
-			.tabulator-col-resize-handle.prev{
-				display: none;
-			}
-		}
-
-		//movable row handle
-		&.tabulator-row-handle{
-
-			display: inline-flex;
-			align-items:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			//handle holder
-			.tabulator-row-handle-box{
-				width:80%;
-
-				//Hamburger element
-				.tabulator-row-handle-bar{
-					width:100%;
-					height:3px;
-					margin-top:2px;
-					background:#666;
-				}
-			}
-		}
-
-		.tabulator-data-tree-branch{
-			display:inline-block;
-			vertical-align:middle;
-
-			height:9px;
-			width:7px;
-
-			margin-top:-9px;
-			margin-right:5px;
-
-			border-bottom-left-radius:1px;
-
-			border-left:2px solid $rowBorderColor;
-			border-bottom:2px solid $rowBorderColor;
-		}
-
-		.tabulator-data-tree-control{
-
-			display:inline-flex;
-			justify-content:center;
-			align-items:center;
-			vertical-align:middle;
-
-			height:11px;
-			width:11px;
-
-			margin-right:5px;
-
-			border:1px solid $rowTextColor;
-			border-radius:2px;
-			background:rgba(0, 0, 0, .1);
-
-			overflow:hidden;
-
-			&:hover{
-				cursor:pointer;
-				background:rgba(0, 0, 0, .2);
-			}
-
-			.tabulator-data-tree-control-collapse{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: transparent;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-			.tabulator-data-tree-control-expand{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: $rowTextColor;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-		}
-
-		.tabulator-responsive-collapse-toggle{
-			display: inline-flex;
-			align-items:center;
-			justify-content:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			height:15px;
-			width:15px;
-
-			border-radius:20px;
-			background:#666;
-
-			color:#fff;
-			font-weight:bold;
-			font-size:1.1em;
-
-			&:hover{
-				opacity:.7;
-			}
-
-			&.open{
-				.tabulator-responsive-collapse-toggle-close{
-					display:initial;
-				}
-
-				.tabulator-responsive-collapse-toggle-open{
-					display:none;
-				}
-			}
-
-			.tabulator-responsive-collapse-toggle-close{
-				display:none;
-			}
-		}
-	}
-
-	//row grouping element
-	&.tabulator-group{
-
-		box-sizing:border-box;
-		border-bottom:1px solid #999;
-		border-right:1px solid $rowBorderColor;
-		border-top:1px solid #999;
-		padding:5px;
-		padding-left:10px;
-		background:#fafafa;
-		font-weight:bold;
-
-		min-width: 100%;
-
-		&:hover{
-			cursor:pointer;
-			background-color:rgba(0,0,0,.1);
-		}
-
-		&.tabulator-group-visible{
-			.tabulator-arrow{
-				margin-right:10px;
-				border-left: 6px solid transparent;
-				border-right: 6px solid transparent;
-				border-top: 6px solid $sortArrowActive;
-				border-bottom: 0;
-			}
-		}
-
-		&.tabulator-group-level-1{
-			.tabulator-arrow{
-				margin-left:20px;
-			}
-		}
-
-		&.tabulator-group-level-2{
-			.tabulator-arrow{
-				margin-left:40px;
-			}
-		}
-
-		&.tabulator-group-level-3{
-			.tabulator-arrow{
-				margin-left:60px;
-			}
-		}
-
-		&.tabulator-group-level-4{
-			.tabulator-arrow{
-				margin-left:80px;
-			}
-		}
-
-		&.tabulator-group-level-5{
-			.tabulator-arrow{
-				margin-left:100px;
-			}
-		}
-
-		//sorting arrow
-		.tabulator-arrow{
-			display: inline-block;
-			width: 0;
-			height: 0;
-			margin-right:16px;
-			border-top: 6px solid transparent;
-			border-bottom: 6px solid transparent;
-			border-right: 0;
-			border-left: 6px solid $sortArrowActive;
-			vertical-align:middle;
-		}
-
-		span{
-			margin-left:10px;
-			color:#666;
-		}
-	}
-}
-
-.tabulator-edit-select-list{
-	position: absolute;
-	display:inline-block;
-	box-sizing:border-box;
-
-	max-height:200px;
-
-	background:$backgroundColor;
-	border:1px solid $rowBorderColor;
-
-	font-size:$textSize;
-
-	overflow-y:auto;
-	-webkit-overflow-scrolling: touch;
-
-	z-index: 10000;
-
-	.tabulator-edit-select-list-item{
-		padding:4px;
-
-		color:$rowTextColor;
-
-		&.active{
-			color:$backgroundColor;
-			background:$editBoxColor;
-		}
-
-		&:hover{
-			cursor:pointer;
-
-			color:$backgroundColor;
-			background:$editBoxColor;
-		}
-	}
-
-	.tabulator-edit-select-list-group{
-		border-bottom:1px solid $rowBorderColor;
-
-		padding:4px;
-		padding-top:6px;
-
-		color:$rowTextColor;
-		font-weight:bold;
-	}
-}
\ No newline at end of file
diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/semantic-ui/variables.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/semantic-ui/variables.scss
deleted file mode 100644
index a003bf0676..0000000000
--- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/semantic-ui/variables.scss
+++ /dev/null
@@ -1,829 +0,0 @@
-
-
-/*******************************
-         Site Settings
-*******************************/
-
-/*-------------------
-       Fonts
---------------------*/
-
-$fontName          : 'Lato' !default;
-$fontSmoothing     : antialiased !default;
-
-$headerFont        : $fontName, 'Helvetica Neue', Arial, Helvetica, sans-serif !default;
-$pageFont          : $fontName, 'Helvetica Neue', Arial, Helvetica, sans-serif !default;
-
-$googleFontName    : $fontName !default;
-$importGoogleFonts : true !default;
-$googleFontSizes   : '400,700,400italic,700italic' !default;
-$googleSubset      : 'latin' !default;
-
-$googleProtocol    : 'https://' !default;
-$googleFontRequest : '${googleFontName}:${googleFontSizes}&subset=${googleSubset}' !default;
-
-/*-------------------
-      Base Sizes
---------------------*/
-
-/* This is the single variable that controls them all */
-$emSize   : 14px !default;
-
-/* The size of page text  */
-$fontSize : 14px !default;
-
-/*-------------------
-  Exact Pixel Values
---------------------*/
-/*
-  These are used to specify exact pixel values in em
-  for things like borders that remain constantly
-  sized as emSize adjusts
-
-  Since there are many more sizes than names for sizes,
-  these are named by their original pixel values.
-
-*/
-
-
-$a1px  : (1 / $emSize) + rem !default;
-$a4px  : (4 / $emSize) + rem !default;
-$a11px  : (11 / $emSize) + rem !default;
-$a14px  : (14 / $emSize) + rem !default;
-
-$relative1px  : (1 / $emSize) + em !default;
-$relative4px  : (4 / $emSize) + em !default;
-$relative11px  : (11 / $emSize) + em !default;
-$relative14px  : (14 / $emSize) + em !default;
-
-
-
-/*-------------------
-    Border Radius
---------------------*/
-
-/* See Power-user section below
-   for explanation of $px variables
-*/
-$relativeBorderRadius: $relative4px !default;
-$absoluteBorderRadius: $a4px !default;
-
-$defaultBorderRadius: $absoluteBorderRadius !default;
-
-
-
-/*-------------------
-      Site Colors
---------------------*/
-
-/*---  Colors  ---*/
-$red              : #DB2828 !default;
-$orange           : #F2711C !default;
-$yellow           : #FBBD08 !default;
-$olive            : #B5CC18 !default;
-$green            : #21BA45 !default;
-$teal             : #00B5AD !default;
-$blue             : #2185D0 !default;
-$violet           : #6435C9 !default;
-$purple           : #A333C8 !default;
-$pink             : #E03997 !default;
-$brown            : #A5673F !default;
-$grey             : #767676 !default;
-$black            : #1B1C1D !default;
-
-/*---  Light Colors  ---*/
-$lightRed         : #FF695E !default;
-$lightOrange      : #FF851B !default;
-$lightYellow      : #FFE21F !default;
-$lightOlive       : #D9E778 !default;
-$lightGreen       : #2ECC40 !default;
-$lightTeal        : #6DFFFF !default;
-$lightBlue        : #54C8FF !default;
-$lightViolet      : #A291FB !default;
-$lightPurple      : #DC73FF !default;
-$lightPink        : #FF8EDF !default;
-$lightBrown       : #D67C1C !default;
-$lightGrey        : #DCDDDE !default;
-$lightBlack       : #545454 !default;
-
-/*---   Neutrals  ---*/
-$fullBlack        : #000000 !default;
-$offWhite         : #F9FAFB !default;
-$darkWhite        : #F3F4F5 !default;
-$midWhite         : #DCDDDE !default;
-$white            : #FFFFFF !default;
-
-/*--- Colored Backgrounds ---*/
-$redBackground    : #FFE8E6 !default;
-$orangeBackground : #FFEDDE !default;
-$yellowBackground : #FFF8DB !default;
-$oliveBackground  : #FBFDEF !default;
-$greenBackground  : #E5F9E7 !default;
-$tealBackground   : #E1F7F7 !default;
-$blueBackground   : #DFF0FF !default;
-$violetBackground : #EAE7FF !default;
-$purpleBackground : #F6E7FF !default;
-$pinkBackground   : #FFE3FB !default;
-$brownBackground  : #F1E2D3 !default;
-
-/*--- Colored Text ---*/
-$redTextColor    : $red !default;
-$orangeTextColor : $orange !default;
-$yellowTextColor : #B58105 !default; // Yellow text is difficult to read
-$oliveTextColor  : #8ABC1E !default; // Olive is difficult to read
-$greenTextColor  : #1EBC30 !default; // Green is difficult to read
-$tealTextColor   : #10A3A3 !default; // Teal text is difficult to read
-$blueTextColor   : $blue !default;
-$violetTextColor : $violet !default;
-$purpleTextColor : $purple !default;
-$pinkTextColor   : $pink !default;
-$brownTextColor  : $brown !default;
-
-/*--- Colored Headers ---*/
-$redHeaderColor    : darken($redTextColor, 5) !default;
-$oliveHeaderColor  : darken($oliveTextColor, 5) !default;
-$greenHeaderColor  : darken($greenTextColor, 5) !default;
-$yellowHeaderColor : darken($yellowTextColor, 5) !default;
-$blueHeaderColor   : darken($blueTextColor, 5) !default;
-$tealHeaderColor   : darken($tealTextColor, 5) !default;
-$pinkHeaderColor   : darken($pinkTextColor, 5) !default;
-$violetHeaderColor : darken($violetTextColor, 5) !default;
-$purpleHeaderColor : darken($purpleTextColor, 5) !default;
-$orangeHeaderColor : darken($orangeTextColor, 5) !default;
-$brownHeaderColor  : darken($brownTextColor, 5) !default;
-
-/*--- Colored Border ---*/
-$redBorderColor    : $redTextColor !default;
-$orangeBorderColor : $orangeTextColor !default;
-$yellowBorderColor : $yellowTextColor !default;
-$oliveBorderColor  : $oliveTextColor !default;
-$greenBorderColor  : $greenTextColor !default;
-$tealBorderColor   : $tealTextColor !default;
-$blueBorderColor   : $blueTextColor !default;
-$violetBorderColor : $violetTextColor !default;
-$purpleBorderColor : $purpleTextColor !default;
-$pinkBorderColor   : $pinkTextColor !default;
-$brownBorderColor  : $brownTextColor !default;
-
-/*-------------------
-     Alpha Colors
---------------------*/
-
-$subtleTransparentBlack     : rgba(0, 0, 0, 0.03) !default;
-$transparentBlack           : rgba(0, 0, 0, 0.05) !default;
-$strongTransparentBlack     : rgba(0, 0, 0, 0.10) !default;
-$veryStrongTransparentBlack : rgba(0, 0, 0, 0.15) !default;
-
-$subtleTransparentWhite     : rgba(255, 255, 255, 0.02) !default;
-$transparentWhite           : rgba(255, 255, 255, 0.08) !default;
-$strongTransparentWhite     : rgba(255, 255, 255, 0.15) !default;
-
-
-
-/*-------------------
-    Brand Colors
---------------------*/
-
-$primaryColor        : $blue !default;
-$secondaryColor      : $black !default;
-
-$lightPrimaryColor   : $lightBlue !default;
-$lightSecondaryColor : $lightBlack !default;
-
-/*--------------
-  Page Heading
----------------*/
-
-$headerFontWeight : bold !default;
-$headerLineHeight : (18 / 14) * 1em !default;
-
-$h1 : (28 / 14) * 1rem !default;
-$h2 : (24 / 14) * 1rem !default;
-$h3 : (18 / 14) * 1rem !default;
-$h4 : (15 / 14) * 1rem !default;
-$h5 : (14 / 14) * 1rem !default;
-
-
-/*-------------------
-        Page
---------------------*/
-
-$pageBackground      : #FFFFFF !default;
-$pageOverflowX       : hidden !default;
-
-$lineHeight          : 1.4285em !default;
-$textColor           : rgba(0, 0, 0, 0.87) !default;
-
-
-/*--------------
-   Form Input
----------------*/
-
-/* This adjusts the default form input across all elements */
-$inputBackground        : $white !default;
-$inputVerticalPadding   : $relative11px !default;
-$inputHorizontalPadding : $relative14px !default;
-$inputPadding           : $inputVerticalPadding $inputHorizontalPadding !default;
-
-/* Input Text Color */
-$inputColor: $textColor !default;
-$inputPlaceholderColor: lighten($inputColor, 75) !default;
-$inputPlaceholderFocusColor: lighten($inputColor, 45) !default;
-
-/* Line Height Default For Inputs in Browser (Descendors are 17px at 14px base em) */
-$inputLineHeight: (17 / 14) * 1em !default;
-
-/*-------------------
-    Focused Input
---------------------*/
-
-/* Used on inputs, textarea etc */
-$focusedFormBorderColor: #85B7D9 !default;
-
-/* Used on dropdowns, other larger blocks */
-$focusedFormMutedBorderColor: #96C8DA !default;
-
-/*-------------------
-        Sizes
---------------------*/
-
-/*
-  Sizes are all expressed in terms of 14px/em (default em)
-  This ensures these "ratios" remain constant despite changes in EM
-*/
-
-$miniSize        : (11 / 14) !default;
-$tinySize        : (12 / 14) !default;
-$smallSize       : (13 / 14) !default;
-$mediumSize      : (14 / 14) !default;
-$largeSize       : (16 / 14) !default;
-$bigSize         : (18 / 14) !default;
-$hugeSize        : (20 / 14) !default;
-$massiveSize     : (24 / 14) !default;
-
-
-/*-------------------
-      Paragraph
---------------------*/
-
-$paragraphMargin     : 0em 0em 1em !default;
-$paragraphLineHeight : $lineHeight !default;
-
-/*-------------------
-       Links
---------------------*/
-
-$linkColor           : #4183C4 !default;
-$linkUnderline       : none !default;
-$linkHoverColor      : darken(saturate($linkColor, 20), 15) !default;
-$linkHoverUnderline  : $linkUnderline !default;
-
-/*-------------------
-  Highlighted Text
---------------------*/
-
-$highlightBackground      : #CCE2FF !default;
-$highlightColor           : $textColor !default;
-
-$inputHighlightBackground : rgba(100, 100, 100, 0.4) !default;
-$inputHighlightColor      : $textColor !default;
-
-/*-------------------
-       Em Sizes
---------------------*/
-
-/*
-  This rounds $size values to the closest pixel then expresses that value in (r)em.
-  This ensures all size values round to exact pixels
-*/
-$mini            : (round($miniSize * $emSize) / $emSize) * 1rem !default;
-$tiny            : (round($tinySize * $emSize) / $emSize) * 1rem !default;
-$small           : (round($smallSize * $emSize) / $emSize) * 1rem !default;
-$medium          : (round($mediumSize * $emSize) / $emSize) * 1rem !default;
-$large           : (round($largeSize * $emSize) / $emSize) * 1rem !default;
-$big             : (round($bigSize * $emSize) / $emSize) * 1rem !default;
-$huge            : (round($hugeSize * $emSize) / $emSize) * 1rem !default;
-$massive         : (round($massiveSize * $emSize) / $emSize) * 1rem !default;
-
-/* em */
-$relativeMini    : (round($miniSize * $emSize) / $emSize) * 1em !default;
-$relativeTiny    : (round($tinySize * $emSize) / $emSize) * 1em !default;
-$relativeSmall   : (round($smallSize * $emSize) / $emSize) * 1em !default;
-$relativeMedium  : (round($mediumSize * $emSize) / $emSize) * 1em !default;
-$relativeLarge   : (round($largeSize * $emSize) / $emSize) * 1em !default;
-$relativeBig     : (round($bigSize * $emSize) / $emSize) * 1em !default;
-$relativeHuge    : (round($hugeSize * $emSize) / $emSize) * 1em !default;
-$relativeMassive : (round($massiveSize * $emSize) / $emSize) * 1em !default;
-
-/* rem */
-$absoluteMini    : (round($miniSize * $emSize) / $emSize) * 1rem !default;
-$absoluteTiny    : (round($tinySize * $emSize) / $emSize) * 1rem !default;
-$absoluteSmall   : (round($smallSize * $emSize) / $emSize) * 1rem !default;
-$absoluteMedium  : (round($mediumSize * $emSize) / $emSize) * 1rem !default;
-$absoluteLarge   : (round($largeSize * $emSize) / $emSize) * 1rem !default;
-$absoluteBig     : (round($bigSize * $emSize) / $emSize) * 1rem !default;
-$absoluteHuge    : (round($hugeSize * $emSize) / $emSize) * 1rem !default;
-$absoluteMassive : (round($massiveSize * $emSize) / $emSize) * 1rem !default;
-
-
-/*-------------------
-       Loader
---------------------*/
-
-$loaderSize              : $relativeBig !default;
-$loaderSpeed             : 0.6s !default;
-$loaderLineWidth         : 0.2em !default;
-$loaderFillColor         : rgba(0, 0, 0, 0.1) !default;
-$loaderLineColor         : $grey !default;
-
-$invertedLoaderFillColor : rgba(255, 255, 255, 0.15) !default;
-$invertedLoaderLineColor : $white !default;
-
-/*-------------------
-        Grid
---------------------*/
-
-$columnCount: 16 !default;
-
-/*-------------------
-     Transitions
---------------------*/
-
-$defaultDuration : 0.1s !default;
-$defaultEasing   : ease !default;
-
-/*-------------------
-     Breakpoints
---------------------*/
-
-$mobileBreakpoint            : 320px !default;
-$tabletBreakpoint            : 768px !default;
-$computerBreakpoint          : 992px !default;
-$largeMonitorBreakpoint      : 1200px !default;
-$widescreenMonitorBreakpoint : 1920px !default;
-
-
-
-/* Columns */
-$oneWide        : (1 / $columnCount * 100%) !default;
-$twoWide        : (2 / $columnCount * 100%) !default;
-$threeWide      : (3 / $columnCount * 100%) !default;
-$fourWide       : (4 / $columnCount * 100%) !default;
-$fiveWide       : (5 / $columnCount * 100%) !default;
-$sixWide        : (6 / $columnCount * 100%) !default;
-$sevenWide      : (7 / $columnCount * 100%) !default;
-$eightWide      : (8 / $columnCount * 100%) !default;
-$nineWide       : (9 / $columnCount * 100%) !default;
-$tenWide        : (10 / $columnCount * 100%) !default;
-$elevenWide     : (11 / $columnCount * 100%) !default;
-$twelveWide     : (12 / $columnCount * 100%) !default;
-$thirteenWide   : (13 / $columnCount * 100%) !default;
-$fourteenWide   : (14 / $columnCount * 100%) !default;
-$fifteenWide    : (15 / $columnCount * 100%) !default;
-$sixteenWide    : (16 / $columnCount * 100%) !default;
-
-$oneColumn      : (1 / 1 * 100%) !default;
-$twoColumn      : (1 / 2 * 100%) !default;
-$threeColumn    : (1 / 3 * 100%) !default;
-$fourColumn     : (1 / 4 * 100%) !default;
-$fiveColumn     : (1 / 5 * 100%) !default;
-$sixColumn      : (1 / 6 * 100%) !default;
-$sevenColumn    : (1 / 7 * 100%) !default;
-$eightColumn    : (1 / 8 * 100%) !default;
-$nineColumn     : (1 / 9 * 100%) !default;
-$tenColumn      : (1 / 10 * 100%) !default;
-$elevenColumn   : (1 / 11 * 100%) !default;
-$twelveColumn   : (1 / 12 * 100%) !default;
-$thirteenColumn : (1 / 13 * 100%) !default;
-$fourteenColumn : (1 / 14 * 100%) !default;
-$fifteenColumn  : (1 / 15 * 100%) !default;
-$sixteenColumn  : (1 / 16 * 100%) !default;
-
-
-/*******************************
-           Power-User
-*******************************/
-
-
-/*-------------------
-    Emotive Colors
---------------------*/
-
-/* Positive */
-$positiveColor           : $green !default;
-$positiveBackgroundColor : #FCFFF5 !default;
-$positiveBorderColor     : #A3C293 !default;
-$positiveHeaderColor     : #1A531B !default;
-$positiveTextColor       : #2C662D !default;
-
-/* Negative */
-$negativeColor           : $red !default;
-$negativeBackgroundColor : #FFF6F6 !default;
-$negativeBorderColor     : #E0B4B4 !default;
-$negativeHeaderColor     : #912D2B !default;
-$negativeTextColor       : #9F3A38 !default;
-
-/* Info */
-$infoColor              : #31CCEC !default;
-$infoBackgroundColor    : #F8FFFF !default;
-$infoBorderColor        : #A9D5DE !default;
-$infoHeaderColor        : #0E566C !default;
-$infoTextColor          : #276F86 !default;
-
-/* Warning */
-$warningColor           : #F2C037 !default;
-$warningBorderColor     : #C9BA9B !default;
-$warningBackgroundColor : #FFFAF3 !default;
-$warningHeaderColor     : #794B02 !default;
-$warningTextColor       : #573A08 !default;
-
-/*-------------------
-        Paths
---------------------*/
-
-/* For source only. Modified in gulp for dist */
-$imagePath : '../../themes/default/assets/images' !default;
-$fontPath  : '../../themes/default/assets/fonts' !default;
-
-
-/*-------------------
-       Icons
---------------------*/
-
-/* Maximum Glyph Width of Icon */
-$iconWidth : 1.18em !default;
-
-/*-------------------
-     Neutral Text
---------------------*/
-
-$darkTextColor               : rgba(0, 0, 0, 0.85) !default;
-$mutedTextColor              : rgba(0, 0, 0, 0.6) !default;
-$lightTextColor              : rgba(0, 0, 0, 0.4) !default;
-
-$unselectedTextColor         : rgba(0, 0, 0, 0.4) !default;
-$hoveredTextColor            : rgba(0, 0, 0, 0.8) !default;
-$pressedTextColor            : rgba(0, 0, 0, 0.9) !default;
-$selectedTextColor           : rgba(0, 0, 0, 0.95) !default;
-$disabledTextColor           : rgba(0, 0, 0, 0.2) !default;
-
-$invertedTextColor           : rgba(255, 255, 255, 0.9) !default;
-$invertedMutedTextColor      : rgba(255, 255, 255, 0.8) !default;
-$invertedLightTextColor      : rgba(255, 255, 255, 0.7) !default;
-$invertedUnselectedTextColor : rgba(255, 255, 255, 0.5) !default;
-$invertedHoveredTextColor    : rgba(255, 255, 255, 1) !default;
-$invertedPressedTextColor    : rgba(255, 255, 255, 1) !default;
-$invertedSelectedTextColor   : rgba(255, 255, 255, 1) !default;
-$invertedDisabledTextColor   : rgba(255, 255, 255, 0.2) !default;
-
-/*-------------------
-     Brand Colors
---------------------*/
-
-$facebookColor   : #3B5998 !default;
-$twitterColor    : #55ACEE !default;
-$googlePlusColor : #DD4B39 !default;
-$linkedInColor   : #1F88BE !default;
-$youtubeColor    : #CC181E !default;
-$pinterestColor  : #BD081C !default;
-$vkColor         : #4D7198 !default;
-$instagramColor  : #49769C !default;
-
-/*-------------------
-      Borders
---------------------*/
-
-$circularRadius                : 500rem !default;
-
-$borderColor               : rgba(34, 36, 38, 0.15) !default;
-$strongBorderColor         : rgba(34, 36, 38, 0.22) !default;
-$internalBorderColor       : rgba(34, 36, 38, 0.1) !default;
-$selectedBorderColor       : rgba(34, 36, 38, 0.35) !default;
-$strongSelectedBorderColor : rgba(34, 36, 38, 0.5) !default;
-$disabledBorderColor       : rgba(34, 36, 38, 0.5) !default;
-
-$solidInternalBorderColor  : #FAFAFA !default;
-$solidBorderColor          : #D4D4D5 !default;
-$solidSelectedBorderColor  : #BCBDBD !default;
-
-$whiteBorderColor              : rgba(255, 255, 255, 0.1) !default;
-$selectedWhiteBorderColor      : rgba(255, 255, 255, 0.8) !default;
-
-$solidWhiteBorderColor         : #555555 !default;
-$selectedSolidWhiteBorderColor : #999999 !default;
-
-/*-------------------
-       Accents
---------------------*/
-
-/* Differentiating Neutrals */
-$subtleGradient: linear-gradient(transparent, $transparentBlack) !default;
-
-/* Differentiating Layers */
-$subtleShadow:
-  0px 1px 2px 0 $borderColor
- !default;
-$floatingShadow:
-  0px 2px 4px 0px rgba(34, 36, 38, 0.12),
-  0px 2px 10px 0px rgba(34, 36, 38, 0.15)
- !default;
-
-
-/*-------------------
-    Derived Values
---------------------*/
-
-/* Loaders Position Offset */
-$loaderOffset : -($loaderSize / 2) !default;
-$loaderMargin : $loaderOffset 0em 0em $loaderOffset !default;
-
-/* Rendered Scrollbar Width */
-$scrollbarWidth: 17px !default;
-
-/* Maximum Single Character Glyph Width, aka Capital "W" */
-$glyphWidth: 1.1em !default;
-
-/* Used to match floats with text */
-$lineHeightOffset       : (($lineHeight - 1em) / 2) !default;
-$headerLineHeightOffset : ($headerLineHeight - 1em) / 2 !default;
-
-/* Header Spacing */
-$headerTopMargin    : calc(2rem - #{$headerLineHeightOffset}) !default;
-$headerBottomMargin : 1rem !default;
-
-/* Minimum Mobile Width */
-$pageMinWidth       : 320px !default;
-
-/* Positive / Negative Dupes */
-$successBackgroundColor : $positiveBackgroundColor !default;
-$successColor           : $positiveColor !default;
-$successBorderColor     : $positiveBorderColor !default;
-$successHeaderColor     : $positiveHeaderColor !default;
-$successTextColor       : $positiveTextColor !default;
-
-$errorBackgroundColor   : $negativeBackgroundColor !default;
-$errorColor             : $negativeColor !default;
-$errorBorderColor       : $negativeBorderColor !default;
-$errorHeaderColor       : $negativeHeaderColor !default;
-$errorTextColor         : $negativeTextColor !default;
-
-
-/* Responsive */
-$largestMobileScreen : ($tabletBreakpoint - 1px) !default;
-$largestTabletScreen : ($computerBreakpoint - 1px) !default;
-$largestSmallMonitor : ($largeMonitorBreakpoint - 1px) !default;
-$largestLargeMonitor : ($widescreenMonitorBreakpoint - 1px) !default;
-
-
-
-/*******************************
-             States
-*******************************/
-
-/*-------------------
-      Disabled
---------------------*/
-
-$disabledOpacity: 0.45 !default;
-$disabledTextColor: rgba(40, 40, 40, 0.3) !default;
-$invertedDisabledTextColor: rgba(225, 225, 225, 0.3) !default;
-
-/*-------------------
-        Hover
---------------------*/
-
-/*---  Shadows  ---*/
-$floatingShadowHover:
-  0px 2px 4px 0px rgba(34, 36, 38, 0.15),
-  0px 2px 10px 0px rgba(34, 36, 38, 0.25)
- !default;
-
-/*---  Colors  ---*/
-$primaryColorHover    : saturate(darken($primaryColor, 5), 10) !default;
-$secondaryColorHover  : saturate(lighten($secondaryColor, 5), 10) !default;
-
-$redHover             : saturate(darken($red, 5), 10) !default;
-$orangeHover          : saturate(darken($orange, 5), 10) !default;
-$yellowHover          : saturate(darken($yellow, 5), 10) !default;
-$oliveHover           : saturate(darken($olive, 5), 10) !default;
-$greenHover           : saturate(darken($green, 5), 10) !default;
-$tealHover            : saturate(darken($teal, 5), 10) !default;
-$blueHover            : saturate(darken($blue, 5), 10) !default;
-$violetHover          : saturate(darken($violet, 5), 10) !default;
-$purpleHover          : saturate(darken($purple, 5), 10) !default;
-$pinkHover            : saturate(darken($pink, 5), 10) !default;
-$brownHover           : saturate(darken($brown, 5), 10) !default;
-
-$lightRedHover        : saturate(darken($lightRed, 5), 10) !default;
-$lightOrangeHover     : saturate(darken($lightOrange, 5), 10) !default;
-$lightYellowHover     : saturate(darken($lightYellow, 5), 10) !default;
-$lightOliveHover      : saturate(darken($lightOlive, 5), 10) !default;
-$lightGreenHover      : saturate(darken($lightGreen, 5), 10) !default;
-$lightTealHover       : saturate(darken($lightTeal, 5), 10) !default;
-$lightBlueHover       : saturate(darken($lightBlue, 5), 10) !default;
-$lightVioletHover     : saturate(darken($lightViolet, 5), 10) !default;
-$lightPurpleHover     : saturate(darken($lightPurple, 5), 10) !default;
-$lightPinkHover       : saturate(darken($lightPink, 5), 10) !default;
-$lightBrownHover      : saturate(darken($lightBrown, 5), 10) !default;
-$lightGreyHover       : saturate(darken($lightGrey, 5), 10) !default;
-$lightBlackHover      : saturate(darken($fullBlack, 5), 10) !default;
-
-/*---  Emotive  ---*/
-$positiveColorHover   : saturate(darken($positiveColor, 5), 10) !default;
-$negativeColorHover   : saturate(darken($negativeColor, 5), 10) !default;
-
-/*---  Brand   ---*/
-$facebookHoverColor   : saturate(darken($facebookColor, 5), 10) !default;
-$twitterHoverColor    : saturate(darken($twitterColor, 5), 10) !default;
-$googlePlusHoverColor : saturate(darken($googlePlusColor, 5), 10) !default;
-$linkedInHoverColor   : saturate(darken($linkedInColor, 5), 10) !default;
-$youtubeHoverColor    : saturate(darken($youtubeColor, 5), 10) !default;
-$instagramHoverColor  : saturate(darken($instagramColor, 5), 10) !default;
-$pinterestHoverColor  : saturate(darken($pinterestColor, 5), 10) !default;
-$vkHoverColor         : saturate(darken($vkColor, 5), 10) !default;
-
-/*---  Dark Tones  ---*/
-$fullBlackHover       : lighten($fullBlack, 5) !default;
-$blackHover           : lighten($black, 5) !default;
-$greyHover            : lighten($grey, 5) !default;
-
-/*---  Light Tones  ---*/
-$whiteHover           : darken($white, 5) !default;
-$offWhiteHover        : darken($offWhite, 5) !default;
-$darkWhiteHover       : darken($darkWhite, 5) !default;
-
-/*-------------------
-        Focus
---------------------*/
-
-/*---  Colors  ---*/
-$primaryColorFocus    : saturate(darken($primaryColor, 8), 20) !default;
-$secondaryColorFocus  : saturate(lighten($secondaryColor, 8), 20) !default;
-
-$redFocus             : saturate(darken($red, 8), 20) !default;
-$orangeFocus          : saturate(darken($orange, 8), 20) !default;
-$yellowFocus          : saturate(darken($yellow, 8), 20) !default;
-$oliveFocus           : saturate(darken($olive, 8), 20) !default;
-$greenFocus           : saturate(darken($green, 8), 20) !default;
-$tealFocus            : saturate(darken($teal, 8), 20) !default;
-$blueFocus            : saturate(darken($blue, 8), 20) !default;
-$violetFocus          : saturate(darken($violet, 8), 20) !default;
-$purpleFocus          : saturate(darken($purple, 8), 20) !default;
-$pinkFocus            : saturate(darken($pink, 8), 20) !default;
-$brownFocus           : saturate(darken($brown, 8), 20) !default;
-
-$lightRedFocus        : saturate(darken($lightRed, 8), 20) !default;
-$lightOrangeFocus     : saturate(darken($lightOrange, 8), 20) !default;
-$lightYellowFocus     : saturate(darken($lightYellow, 8), 20) !default;
-$lightOliveFocus      : saturate(darken($lightOlive, 8), 20) !default;
-$lightGreenFocus      : saturate(darken($lightGreen, 8), 20) !default;
-$lightTealFocus       : saturate(darken($lightTeal, 8), 20) !default;
-$lightBlueFocus       : saturate(darken($lightBlue, 8), 20) !default;
-$lightVioletFocus     : saturate(darken($lightViolet, 8), 20) !default;
-$lightPurpleFocus     : saturate(darken($lightPurple, 8), 20) !default;
-$lightPinkFocus       : saturate(darken($lightPink, 8), 20) !default;
-$lightBrownFocus      : saturate(darken($lightBrown, 8), 20) !default;
-$lightGreyFocus       : saturate(darken($lightGrey, 8), 20) !default;
-$lightBlackFocus      : saturate(darken($fullBlack, 8), 20) !default;
-
-/*---  Emotive  ---*/
-$positiveColorFocus   : saturate(darken($positiveColor, 8), 20) !default;
-$negativeColorFocus   : saturate(darken($negativeColor, 8), 20) !default;
-
-/*---  Brand   ---*/
-$facebookFocusColor   : saturate(darken($facebookColor, 8), 20) !default;
-$twitterFocusColor    : saturate(darken($twitterColor, 8), 20) !default;
-$googlePlusFocusColor : saturate(darken($googlePlusColor, 8), 20) !default;
-$linkedInFocusColor   : saturate(darken($linkedInColor, 8), 20) !default;
-$youtubeFocusColor    : saturate(darken($youtubeColor, 8), 20) !default;
-$instagramFocusColor  : saturate(darken($instagramColor, 8), 20) !default;
-$pinterestFocusColor  : saturate(darken($pinterestColor, 8), 20) !default;
-$vkFocusColor         : saturate(darken($vkColor, 8), 20) !default;
-
-/*---  Dark Tones  ---*/
-$fullBlackFocus       : lighten($fullBlack, 8) !default;
-$blackFocus           : lighten($black, 8) !default;
-$greyFocus            : lighten($grey, 8) !default;
-
-/*---  Light Tones  ---*/
-$whiteFocus           : darken($white, 8) !default;
-$offWhiteFocus        : darken($offWhite, 8) !default;
-$darkWhiteFocus       : darken($darkWhite, 8) !default;
-
-
-/*-------------------
-    Down (:active)
---------------------*/
-
-/*---  Colors  ---*/
-$primaryColorDown    : darken($primaryColor, 10) !default;
-$secondaryColorDown  : lighten($secondaryColor, 10) !default;
-
-$redDown             : darken($red, 10) !default;
-$orangeDown          : darken($orange, 10) !default;
-$yellowDown          : darken($yellow, 10) !default;
-$oliveDown           : darken($olive, 10) !default;
-$greenDown           : darken($green, 10) !default;
-$tealDown            : darken($teal, 10) !default;
-$blueDown            : darken($blue, 10) !default;
-$violetDown          : darken($violet, 10) !default;
-$purpleDown          : darken($purple, 10) !default;
-$pinkDown            : darken($pink, 10) !default;
-$brownDown           : darken($brown, 10) !default;
-
-$lightRedDown        : darken($lightRed, 10) !default;
-$lightOrangeDown     : darken($lightOrange, 10) !default;
-$lightYellowDown     : darken($lightYellow, 10) !default;
-$lightOliveDown      : darken($lightOlive, 10) !default;
-$lightGreenDown      : darken($lightGreen, 10) !default;
-$lightTealDown       : darken($lightTeal, 10) !default;
-$lightBlueDown       : darken($lightBlue, 10) !default;
-$lightVioletDown     : darken($lightViolet, 10) !default;
-$lightPurpleDown     : darken($lightPurple, 10) !default;
-$lightPinkDown       : darken($lightPink, 10) !default;
-$lightBrownDown      : darken($lightBrown, 10) !default;
-$lightGreyDown       : darken($lightGrey, 10) !default;
-$lightBlackDown      : darken($fullBlack, 10) !default;
-
-/*---  Emotive  ---*/
-$positiveColorDown   : darken($positiveColor, 10) !default;
-$negativeColorDown   : darken($negativeColor, 10) !default;
-
-/*---  Brand   ---*/
-$facebookDownColor   : darken($facebookColor, 10) !default;
-$twitterDownColor    : darken($twitterColor, 10) !default;
-$googlePlusDownColor : darken($googlePlusColor, 10) !default;
-$linkedInDownColor   : darken($linkedInColor, 10) !default;
-$youtubeDownColor    : darken($youtubeColor, 10) !default;
-$instagramDownColor  : darken($instagramColor, 10) !default;
-$pinterestDownColor  : darken($pinterestColor, 10) !default;
-$vkDownColor         : darken($vkColor, 10) !default;
-
-/*---  Dark Tones  ---*/
-$fullBlackDown       : lighten($fullBlack, 10) !default;
-$blackDown           : lighten($black, 10) !default;
-$greyDown            : lighten($grey, 10) !default;
-
-/*---  Light Tones  ---*/
-$whiteDown           : darken($white, 10) !default;
-$offWhiteDown        : darken($offWhite, 10) !default;
-$darkWhiteDown       : darken($darkWhite, 10) !default;
-
-
-/*-------------------
-        Active
---------------------*/
-
-/*---  Colors  ---*/
-$primaryColorActive    : saturate(darken($primaryColor, 5), 15) !default;
-$secondaryColorActive  : saturate(lighten($secondaryColor, 5), 15) !default;
-
-$redActive             : saturate(darken($red, 5), 15) !default;
-$orangeActive          : saturate(darken($orange, 5), 15) !default;
-$yellowActive          : saturate(darken($yellow, 5), 15) !default;
-$oliveActive           : saturate(darken($olive, 5), 15) !default;
-$greenActive           : saturate(darken($green, 5), 15) !default;
-$tealActive            : saturate(darken($teal, 5), 15) !default;
-$blueActive            : saturate(darken($blue, 5), 15) !default;
-$violetActive          : saturate(darken($violet, 5), 15) !default;
-$purpleActive          : saturate(darken($purple, 5), 15) !default;
-$pinkActive            : saturate(darken($pink, 5), 15) !default;
-$brownActive           : saturate(darken($brown, 5), 15) !default;
-
-$lightRedActive        : saturate(darken($lightRed, 5), 15) !default;
-$lightOrangeActive     : saturate(darken($lightOrange, 5), 15) !default;
-$lightYellowActive     : saturate(darken($lightYellow, 5), 15) !default;
-$lightOliveActive      : saturate(darken($lightOlive, 5), 15) !default;
-$lightGreenActive      : saturate(darken($lightGreen, 5), 15) !default;
-$lightTealActive       : saturate(darken($lightTeal, 5), 15) !default;
-$lightBlueActive       : saturate(darken($lightBlue, 5), 15) !default;
-$lightVioletActive     : saturate(darken($lightViolet, 5), 15) !default;
-$lightPurpleActive     : saturate(darken($lightPurple, 5), 15) !default;
-$lightPinkActive       : saturate(darken($lightPink, 5), 15) !default;
-$lightBrownActive      : saturate(darken($lightBrown, 5), 15) !default;
-$lightGreyActive       : saturate(darken($lightGrey, 5), 15) !default;
-$lightBlackActive      : saturate(darken($fullBlack, 5), 15) !default;
-
-/*---  Emotive  ---*/
-$positiveColorActive   : saturate(darken($positiveColor, 5), 15) !default;
-$negativeColorActive   : saturate(darken($negativeColor, 5), 15) !default;
-
-/*---  Brand   ---*/
-$facebookActiveColor   : saturate(darken($facebookColor, 5), 15) !default;
-$twitterActiveColor    : saturate(darken($twitterColor, 5), 15) !default;
-$googlePlusActiveColor : saturate(darken($googlePlusColor, 5), 15) !default;
-$linkedInActiveColor   : saturate(darken($linkedInColor, 5), 15) !default;
-$youtubeActiveColor    : saturate(darken($youtubeColor, 5), 15) !default;
-$instagramActiveColor  : saturate(darken($instagramColor, 5), 15) !default;
-$pinterestActiveColor  : saturate(darken($pinterestColor, 5), 15) !default;
-$vkActiveColor         : saturate(darken($vkColor, 5), 15) !default;
-
-/*---  Dark Tones  ---*/
-$fullBlackActive       : darken($fullBlack, 5) !default;
-$blackActive           : darken($black, 5) !default;
-$greyActive            : darken($grey, 5) !default;
-
-/*---  Light Tones  ---*/
-$whiteActive           : darken($white, 5) !default;
-$offWhiteActive        : darken($offWhite, 5) !default;
-$darkWhiteActive       : darken($darkWhite, 5) !default;
diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/semantic-ui/variables_table.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/semantic-ui/variables_table.scss
deleted file mode 100644
index ab244453a5..0000000000
--- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/semantic-ui/variables_table.scss
+++ /dev/null
@@ -1,247 +0,0 @@
-@import "variables.scss";
-
-/*******************************
-             Table
-*******************************/
-
-/*-------------------
-       Element
---------------------*/
-
-$verticalMargin: 1em !default;
-$horizontalMargin: 0em !default;
-$margin: $verticalMargin $horizontalMargin !default;
-$borderCollapse: separate !default;
-$borderSpacing: 0px !default;
-$borderRadius: $defaultBorderRadius !default;
-$transition:
-  background $defaultDuration $defaultEasing,
-  color $defaultDuration $defaultEasing !default;
-$background: $white !default;
-$color: $textColor !default;
-$borderWidth: 1px !default;
-$border: $borderWidth solid $borderColor !default;
-$boxShadow: none !default;
-$textAlign: left !default;
-
-/*--------------
-     Parts
----------------*/
-
-/* Table Row */
-$rowBorder: 1px solid $internalBorderColor !default;
-
-/* Table Cell */
-$cellVerticalPadding: $relativeMini !default;
-$cellHorizontalPadding: $relativeMini !default;
-$cellVerticalAlign: inherit !default;
-$cellTextAlign: inherit !default;
-$cellBorder: 1px solid $internalBorderColor !default;
-
-/* Table Header */
-$headerBorder: 1px solid $internalBorderColor !default;
-$headerDivider: none !default;
-$headerBackground: $offWhite !default;
-$headerAlign: inherit !default;
-$headerVerticalAlign: inherit !default;
-$headerColor: $textColor !default;
-$headerVerticalPadding: $relativeSmall !default;
-$headerHorizontalPadding: $cellHorizontalPadding !default;
-$headerFontStyle: none !default;
-$headerFontWeight: bold !default;
-$headerTextTransform: none !default;
-$headerBoxShadow: none !default;
-
-/* Table Footer */
-$footerBoxShadow: none !default;
-$footerBorder: 1px solid $borderColor !default;
-$footerDivider: none !default;
-$footerBackground: $offWhite !default;
-$footerAlign: inherit !default;
-$footerVerticalAlign: middle !default;
-$footerColor: $textColor !default;
-$footerVerticalPadding: $cellVerticalPadding !default;
-$footerHorizontalPadding: $cellHorizontalPadding !default;
-$footerFontStyle: normal !default;
-$footerFontWeight: normal !default;
-$footerTextTransform: none !default;
-
-/* Responsive Size */
-$responsiveHeaderDisplay: block !default;
-$responsiveFooterDisplay: block !default;
-$responsiveRowVerticalPadding: 1em !default;
-$responsiveRowBoxShadow: 0px -1px 0px 0px rgba(0, 0, 0, 0.1) inset !important !default;
-$responsiveCellVerticalPadding: 0.25em !default;
-$responsiveCellHorizontalPadding: 0.75em !default;
-$responsiveCellBoxShadow: none !important !default;
-
-/*-------------------
-       Types
---------------------*/
-
-/* Definition */
-$definitionPageBackground: $white !default;
-
-$definitionHeaderBackground: transparent !default;
-$definitionHeaderColor: $unselectedTextColor !default;
-$definitionHeaderFontWeight: normal !default;
-
-$definitionFooterBackground: $definitionHeaderBackground !default;
-$definitionFooterColor: $definitionHeaderColor !default;
-$definitionFooterFontWeight: $definitionHeaderFontWeight !default;
-
-$definitionColumnBackground: $subtleTransparentBlack !default;
-$definitionColumnFontWeight: bold !default;
-$definitionColumnColor: $selectedTextColor !default;
-$definitionColumnFontSize: $relativeMedium !default;
-$definitionColumnTextTransform: '' !default;
-$definitionColumnBoxShadow: '' !default;
-$definitionColumnTextAlign: '' !default;
-$definitionColumnHorizontalPadding: '' !default;
-
-
-/*--------------
-    Couplings
----------------*/
-
-$iconVerticalAlign: baseline !default;
-
-/*--------------
-     States
----------------*/
-
-$stateMarkerWidth: 0px !default;
-
-/* Positive */
-$positiveColor: $positiveTextColor !default;
-$positiveBoxShadow: $stateMarkerWidth 0px 0px $positiveBorderColor inset !default;
-$positiveBackgroundHover: darken($positiveBackgroundColor, 3) !default;
-$positiveColorHover: darken($positiveColor, 3) !default;
-
-/* Negative */
-$negativeColor: $negativeTextColor !default;
-$negativeBoxShadow: $stateMarkerWidth 0px 0px $negativeBorderColor inset !default;
-$negativeBackgroundHover: darken($negativeBackgroundColor, 3) !default;
-$negativeColorHover: darken($negativeColor, 3) !default;
-
-/* Error */
-$errorColor: $errorTextColor !default;
-$errorBoxShadow: $stateMarkerWidth 0px 0px $errorBorderColor inset !default;
-$errorBackgroundHover: darken($errorBackgroundColor, 3) !default;
-$errorColorHover: darken($errorColor, 3) !default;
-
-/* Warning */
-$warningColor: $warningTextColor !default;
-$warningBoxShadow: $stateMarkerWidth 0px 0px $warningBorderColor inset !default;
-$warningBackgroundHover: darken($warningBackgroundColor, 3) !default;
-$warningColorHover: darken($warningColor, 3) !default;
-
-/* Active */
-$activeColor: $textColor !default;
-$activeBackgroundColor: #E0E0E0 !default;
-$activeBoxShadow: $stateMarkerWidth 0px 0px $activeColor inset !default;
-
-$activeBackgroundHover: #EFEFEF !default;
-$activeColorHover: $selectedTextColor !default;
-
-/*--------------
-     Types
----------------*/
-
-/* Attached */
-$attachedTopOffset: 0px !default;
-$attachedBottomOffset: 0px !default;
-$attachedHorizontalOffset: -$borderWidth !default;
-$attachedWidth: calc(100% + #{$attachedHorizontalOffset * -2}) !default;
-$attachedBoxShadow: none !default;
-$attachedBorder: $borderWidth solid $solidBorderColor !default;
-$attachedBottomBoxShadow:
-  $boxShadow,
-  $attachedBoxShadow
- !default;
-
-/* Striped */
-$stripedBackground: rgba(0, 0, 50, 0.02) !default;
-$invertedStripedBackground: rgba(255, 255, 255, 0.05) !default;
-
-/* Selectable */
-$selectableBackground: $transparentBlack !default;
-$selectableTextColor: $selectedTextColor !default;
-$selectableInvertedBackground: $transparentWhite !default;
-$selectableInvertedTextColor: $invertedSelectedTextColor !default;
-
-/* Sortable */
-$sortableBackground: '' !default;
-$sortableColor: $textColor !default;
-
-$sortableBorder: 1px solid $borderColor !default;
-$sortableIconWidth: auto !default;
-$sortableIconDistance: 0.5em !default;
-$sortableIconOpacity: 0.8 !default;
-$sortableIconFont: 'Icons' !default;
-$sortableIconAscending: '\f0d8' !default;
-$sortableIconDescending: '\f0d7' !default;
-$sortableDisabledColor: $disabledTextColor !default;
-
-$sortableHoverBackground: $transparentBlack !default;
-$sortableHoverColor: $hoveredTextColor !default;
-
-$sortableActiveBackground: $transparentBlack !default;
-$sortableActiveColor: $selectedTextColor !default;
-
-$sortableActiveHoverBackground: $transparentBlack !default;
-$sortableActiveHoverColor: $selectedTextColor !default;
-
-$sortableInvertedBorderColor: transparent !default;
-$sortableInvertedHoverBackground: $transparentWhite $subtleGradient !default;
-$sortableInvertedHoverColor: $invertedHoveredTextColor !default;
-$sortableInvertedActiveBackground: $strongTransparentWhite $subtleGradient !default;
-$sortableInvertedActiveColor: $invertedSelectedTextColor !default;
-
-/* Colors */
-$coloredBorderSize: 0.2em !default;
-$coloredBorderRadius: 0em 0em $borderRadius $borderRadius !default;
-
-/* Inverted */
-$invertedBackground: #333333 !default;
-$invertedBorder: none !default;
-$invertedCellBorderColor: $whiteBorderColor !default;
-$invertedCellColor: $invertedTextColor !default;
-
-$invertedHeaderBackground: $veryStrongTransparentBlack !default;
-$invertedHeaderColor: $invertedTextColor !default;
-$invertedHeaderBorderColor: $invertedCellBorderColor !default;
-
-$invertedDefinitionColumnBackground: $subtleTransparentWhite !default;
-$invertedDefinitionColumnColor: $invertedSelectedTextColor !default;
-$invertedDefinitionColumnFontWeight: bold !default;
-
-/* Basic */
-$basicTableBackground: transparent !default;
-$basicTableBorder: $borderWidth solid $borderColor !default;
-$basicBoxShadow: none !default;
-
-$basicTableHeaderBackground: transparent !default;
-$basicTableCellBackground: transparent !default;
-$basicTableHeaderDivider: none !default;
-$basicTableCellBorder: 1px solid rgba(0, 0, 0, 0.1) !default;
-$basicTableCellPadding: '' !default;
-$basicTableStripedBackground: $transparentBlack !default;
-
-/* Padded */
-$paddedVerticalPadding: 1em !default;
-$paddedHorizontalPadding: 1em !default;
-$veryPaddedVerticalPadding: 1.5em !default;
-$veryPaddedHorizontalPadding: 1.5em !default;
-
-/* Compact */
-$compactVerticalPadding: 0.5em !default;
-$compactHorizontalPadding: 0.7em !default;
-$veryCompactVerticalPadding: 0.4em !default;
-$veryCompactHorizontalPadding: 0.6em !default;
-
-
-/* Sizes */
-$small: 0.9em !default;
-$medium: 1em !default;
-$large: 1.1em !default;
diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator.scss
deleted file mode 100644
index 644d7b50c0..0000000000
--- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator.scss
+++ /dev/null
@@ -1,961 +0,0 @@
-
-//Main Theme Variables
-$backgroundColor: #888 !default; //background color of tabulator
-$borderColor:#999 !default; //border to tabulator
-$textSize:14px !default; //table text size
-
-//header themeing
-$headerBackgroundColor:#e6e6e6 !default; //border to tabulator
-$headerTextColor:#555 !default; //header text colour
-$headerBorderColor:#aaa !default;  //header border color
-$headerSeperatorColor:#999 !default; //header bottom seperator color
-$headerMargin:4px !default; //padding round header
-
-//column header arrows
-$sortArrowActive: #666 !default;
-$sortArrowInactive: #bbb !default;
-
-//row themeing
-$rowBackgroundColor:#fff !default; //table row background color
-$rowAltBackgroundColor:#EFEFEF !default; //table row background color
-$rowBorderColor:#aaa !default; //table border color
-$rowTextColor:#333 !default; //table text color
-$rowHoverBackground:#bbb !default; //row background color on hover
-
-$rowSelectedBackground: #9ABCEA !default; //row background color when selected
-$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered
-
-$editBoxColor:#1D68CD !default; //border color for edit boxes
-$errorColor:#dd0000 !default; //error indication
-
-//footer themeing
-$footerBackgroundColor:#e6e6e6 !default; //border to tabulator
-$footerTextColor:#555 !default; //footer text colour
-$footerBorderColor:#aaa !default; //footer border color
-$footerSeperatorColor:#999 !default; //footer bottom seperator color
-$footerActiveColor:#d00 !default; //footer bottom active text color
-
-
-
-//Tabulator Containing Element
-.tabulator{
-	position: relative;
-
-	border: 1px solid $borderColor;
-
-	background-color: $backgroundColor;
-
-	font-size:$textSize;
-	text-align: left;
-	overflow:hidden;
-
-	-webkit-transform: translatez(0);
-	-moz-transform: translatez(0);
-	-ms-transform: translatez(0);
-	-o-transform: translatez(0);
-	transform: translatez(0);
-
-	&[tabulator-layout="fitDataFill"]{
-		.tabulator-tableHolder{
-			.tabulator-table{
-				min-width:100%;
-			}
-		}
-	}
-
-	&.tabulator-block-select{
-		user-select: none;
-	}
-
-	//column header containing element
-	.tabulator-header{
-		position:relative;
-		box-sizing: border-box;
-
-		width:100%;
-
-		border-bottom:1px solid $headerSeperatorColor;
-		background-color: $headerBackgroundColor;
-		color: $headerTextColor;
-		font-weight:bold;
-
-		white-space: nowrap;
-		overflow:hidden;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		//individual column header element
-		.tabulator-col{
-			display:inline-block;
-			position:relative;
-			box-sizing:border-box;
-			border-right:1px solid $headerBorderColor;
-			background:$headerBackgroundColor;
-			text-align:left;
-			vertical-align: bottom;
-			overflow: hidden;
-
-			&.tabulator-moving{
-				position: absolute;
-				border:1px solid  $headerSeperatorColor;
-				background:darken($headerBackgroundColor, 10%);
-				pointer-events: none;
-			}
-
-			//hold content of column header
-			.tabulator-col-content{
-				box-sizing:border-box;
-				position: relative;
-				padding:4px;
-
-				//hold title of column header
-				.tabulator-col-title{
-					box-sizing:border-box;
-					width: 100%;
-
-					white-space: nowrap;
-					overflow: hidden;
-					text-overflow: ellipsis;
-					vertical-align:bottom;
-
-					//element to hold title editor
-					.tabulator-title-editor{
-						box-sizing: border-box;
-						width: 100%;
-
-						border:1px solid #999;
-
-						padding:1px;
-
-						background: #fff;
-					}
-				}
-
-				//column sorter arrow
-				.tabulator-arrow{
-					display: inline-block;
-					position: absolute;
-					top:9px;
-					right:8px;
-					width: 0;
-					height: 0;
-					border-left: 6px solid transparent;
-					border-right: 6px solid transparent;
-					border-bottom: 6px solid $sortArrowInactive;
-				}
-
-			}
-
-			//complex header column group
-			&.tabulator-col-group{
-
-				//gelement to hold sub columns in column group
-				.tabulator-col-group-cols{
-					position:relative;
-					display: flex;
-
-					border-top:1px solid $headerBorderColor;
-					overflow: hidden;
-
-					.tabulator-col:last-child{
-						margin-right:-1px;
-					}
-				}
-			}
-
-			//hide left resize handle on first column
-			&:first-child{
-				.tabulator-col-resize-handle.prev{
-					display: none;
-				}
-			}
-
-			//placeholder element for sortable columns
-			&.ui-sortable-helper{
-				position: absolute;
-				background-color: $headerBackgroundColor !important;
-				border:1px solid $headerBorderColor;
-			}
-
-			//header filter containing element
-			.tabulator-header-filter{
-				position: relative;
-				box-sizing: border-box;
-				margin-top:2px;
-				width:100%;
-				text-align: center;
-
-				//styling adjustment for inbuilt editors
-				textarea{
-					height:auto !important;
-				}
-
-				svg{
-					margin-top: 3px;
-				}
-
-				input{
-					&::-ms-clear {
-						width : 0;
-						height: 0;
-					}
-				}
-			}
-
-			//styling child elements for sortable columns
-			&.tabulator-sortable{
-				.tabulator-col-title{
-					padding-right:25px;
-				}
-
-				&:hover{
-					cursor:pointer;
-					background-color:darken($headerBackgroundColor, 10%);
-				}
-
-				&[aria-sort="none"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowInactive;
-					}
-				}
-
-				&[aria-sort="asc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowActive;
-					}
-				}
-
-				&[aria-sort="desc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: 6px solid $sortArrowActive;
-						border-bottom: none;
-					}
-				}
-			}
-
-
-			&.tabulator-col-vertical{
-				.tabulator-col-content{
-					.tabulator-col-title{
-						writing-mode: vertical-rl;
-						text-orientation: mixed;
-
-						display:flex;
-						align-items:center;
-						justify-content:center;
-					}
-				}
-
-				&.tabulator-col-vertical-flip{
-					.tabulator-col-title{
-						transform: rotate(180deg);
-					}
-				}
-
-				&.tabulator-sortable{
-					.tabulator-col-title{
-						padding-right:0;
-						padding-top:20px;
-					}
-
-					&.tabulator-col-vertical-flip{
-						.tabulator-col-title{
-							padding-right:0;
-							padding-bottom:20px;
-						}
-
-					}
-
-					.tabulator-arrow{
-						right:calc(50% - 6px);
-					}
-				}
-			}
-		}
-
-		.tabulator-frozen{
-			display: inline-block;
-			position: absolute;
-
-			// background-color: inherit;
-
-			z-index: 10;
-
-			&.tabulator-frozen-left{
-				border-right:2px solid $rowBorderColor;
-			}
-
-			&.tabulator-frozen-right{
-				border-left:2px solid $rowBorderColor;
-			}
-		}
-
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			min-width:400%;
-
-			background:lighten($headerBackgroundColor, 5%) !important;
-
-			.tabulator-row{
-				background:lighten($headerBackgroundColor, 5%) !important;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-			}
-
-			border-top:1px solid $rowBorderColor;
-			border-bottom:1px solid $headerBorderColor;
-
-			overflow: hidden;
-		}
-
-		.tabulator-frozen-rows-holder{
-			min-width:400%;
-
-			&:empty{
-				display: none;
-			}
-		}
-	}
-
-	//scrolling element to hold table
-	.tabulator-tableHolder{
-		position:relative;
-		width:100%;
-		white-space: nowrap;
-		overflow:auto;
-		-webkit-overflow-scrolling: touch;
-
-		&:focus{
-			outline: none;
-		}
-
-		//default placeholder element
-		.tabulator-placeholder{
-			box-sizing:border-box;
-			display: flex;
-			align-items:center;
-
-			&[tabulator-render-mode="virtual"]{
-				position: absolute;
-				top:0;
-				left:0;
-				height:100%;
-			}
-
-			width:100%;
-
-			span{
-				display: inline-block;
-
-				margin:0 auto;
-				padding:10px;
-
-				color:#ccc;
-				font-weight: bold;
-				font-size: 20px;
-			}
-		}
-
-		//element to hold table rows
-		.tabulator-table{
-			position:relative;
-			display:inline-block;
-			background-color:$rowBackgroundColor;
-			white-space: nowrap;
-			overflow:visible;
-			color:$rowTextColor;
-
-			//row element
-			.tabulator-row{
-				&.tabulator-calcs{
-					font-weight: bold;
-					background:darken($rowAltBackgroundColor, 5%) !important;
-
-					&.tabulator-calcs-top{
-						border-bottom:2px solid $rowBorderColor;
-					}
-
-					&.tabulator-calcs-bottom{
-						border-top:2px solid $rowBorderColor;
-					}
-				}
-			}
-
-		}
-	}
-
-
-
-	//footer element
-	.tabulator-footer{
-		padding:5px 10px;
-		border-top:1px solid $footerSeperatorColor;
-		background-color: $footerBackgroundColor;
-		text-align: right;
-		color: $footerTextColor;
-		font-weight:bold;
-		white-space:nowrap;
-		user-select:none;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			width:calc(100% + 20px);
-			margin:-5px -10px 5px -10px;
-
-			text-align: left;
-
-			background:lighten($footerBackgroundColor, 5%) !important;
-
-			.tabulator-row{
-				background:lighten($footerBackgroundColor, 5%) !important;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-			}
-
-			border-bottom:1px solid $rowBorderColor;
-			border-top:1px solid $rowBorderColor;
-
-			overflow: hidden;
-
-			&:only-child{
-				margin-bottom:-5px;
-				border-bottom:none;
-			}
-		}
-
-		//pagination container element
-		.tabulator-pages{
-			margin:0 7px;
-		}
-
-		//pagination button
-		.tabulator-page{
-			display:inline-block;
-
-			margin:0 2px;
-			padding:2px 5px;
-
-			border:1px solid $footerBorderColor;
-			border-radius:3px;
-
-			background:rgba(255,255,255,.2);
-
-			color: $footerTextColor;
-			font-family:inherit;
-			font-weight:inherit;
-			font-size:inherit;
-
-			&.active{
-				color:$footerActiveColor;
-			}
-
-			&:disabled{
-				opacity:.5;
-			}
-
-			&:not(.disabled){
-				&:hover{
-					cursor:pointer;
-					background:rgba(0,0,0,.2);
-					color:#fff;
-				}
-			}
-		}
-	}
-
-	//column resize handles
-	.tabulator-col-resize-handle{
-		position:absolute;
-		right:0;
-		top:0;
-		bottom:0;
-		width:5px;
-
-		&.prev{
-			left:0;
-			right:auto;
-		}
-
-		&:hover{
-			cursor:ew-resize;
-		}
-	}
-
-
-	//holding div that contains loader and covers tabulator element to prevent interaction
-	.tabulator-loader{
-		position:absolute;
-		display: flex;
-		align-items:center;
-
-		top:0;
-		left:0;
-		z-index:100;
-
-		height:100%;
-		width:100%;
-		background:rgba(0,0,0,.4);
-		text-align:center;
-
-		//loading message element
-		.tabulator-loader-msg{
-			display:inline-block;
-
-			margin:0 auto;
-			padding:10px 20px;
-
-			border-radius:10px;
-
-			background:#fff;
-			font-weight:bold;
-			font-size:16px;
-
-			//loading message
-			&.tabulator-loading{
-				border:4px solid #333;
-				color:#000;
-			}
-
-			//error message
-			&.tabulator-error{
-				border:4px solid #D00;
-				color:#590000;
-			}
-		}
-	}
-}
-
-//row element
-.tabulator-row{
-	position: relative;
-	box-sizing: border-box;
-	min-height:$textSize + ($headerMargin * 2);
-	background-color: $rowBackgroundColor;
-
-
-	&.tabulator-row-even{
-		background-color: $rowAltBackgroundColor;
-	}
-
-	&.tabulator-selectable:hover{
-		background-color:$rowHoverBackground;
-		cursor: pointer;
-	}
-
-	&.tabulator-selected{
-		background-color:$rowSelectedBackground;
-	}
-
-	&.tabulator-selected:hover{
-		background-color:$rowSelectedBackgroundHover;
-		cursor: pointer;
-	}
-
-	&.tabulator-row-moving{
-		border:1px solid #000;
-		background:#fff;
-	}
-
-	&.tabulator-moving{
-		position: absolute;
-
-		border-top:1px solid  $rowBorderColor;
-		border-bottom:1px solid  $rowBorderColor;
-
-		pointer-events: none;
-		z-index:15;
-	}
-
-	//row resize handles
-	.tabulator-row-resize-handle{
-		position:absolute;
-		right:0;
-		bottom:0;
-		left:0;
-		height:5px;
-
-		&.prev{
-			top:0;
-			bottom:auto;
-		}
-
-		&:hover{
-			cursor:ns-resize;
-		}
-	}
-
-	.tabulator-frozen{
-		display: inline-block;
-		position: absolute;
-
-		background-color: inherit;
-
-		z-index: 10;
-
-		&.tabulator-frozen-left{
-			border-right:2px solid $rowBorderColor;
-		}
-
-		&.tabulator-frozen-right{
-			border-left:2px solid $rowBorderColor;
-		}
-	}
-
-	.tabulator-responsive-collapse{
-		box-sizing:border-box;
-
-		padding:5px;
-
-		border-top:1px solid $rowBorderColor;
-		border-bottom:1px solid $rowBorderColor;
-
-		&:empty{
-			display:none;
-		}
-
-		table{
-			font-size:$textSize;
-
-			tr{
-				td{
-					position: relative;
-
-					&:first-of-type{
-						padding-right:10px;
-					}
-				}
-			}
-		}
-	}
-
-	//cell element
-	.tabulator-cell{
-		display:inline-block;
-		position: relative;
-		box-sizing:border-box;
-		padding:4px;
-		border-right:1px solid $rowBorderColor;
-		vertical-align:middle;
-		white-space:nowrap;
-		overflow:hidden;
-		text-overflow:ellipsis;
-
-
-		&.tabulator-editing{
-			border:1px solid  $editBoxColor;
-			padding: 0;
-
-			input, select{
-				border:1px;
-				background:transparent;
-			}
-		}
-
-		&.tabulator-validation-fail{
-			border:1px solid $errorColor;
-			input, select{
-				border:1px;
-				background:transparent;
-
-				color: $errorColor;
-			}
-		}
-
-		//hide left resize handle on first column
-		&:first-child{
-			.tabulator-col-resize-handle.prev{
-				display: none;
-			}
-		}
-
-		//movable row handle
-		&.tabulator-row-handle{
-			display: inline-flex;
-			align-items:center;
-			justify-content:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			//handle holder
-			.tabulator-row-handle-box{
-				width:80%;
-
-				//Hamburger element
-				.tabulator-row-handle-bar{
-					width:100%;
-					height:3px;
-					margin-top:2px;
-					background:#666;
-				}
-			}
-		}
-
-		.tabulator-data-tree-branch{
-			display:inline-block;
-			vertical-align:middle;
-
-			height:9px;
-			width:7px;
-
-			margin-top:-9px;
-			margin-right:5px;
-
-			border-bottom-left-radius:1px;
-
-			border-left:2px solid $rowBorderColor;
-			border-bottom:2px solid $rowBorderColor;
-		}
-
-		.tabulator-data-tree-control{
-
-			display:inline-flex;
-			justify-content:center;
-			align-items:center;
-			vertical-align:middle;
-
-			height:11px;
-			width:11px;
-
-			margin-right:5px;
-
-			border:1px solid $rowTextColor;
-			border-radius:2px;
-			background:rgba(0, 0, 0, .1);
-
-			overflow:hidden;
-
-			&:hover{
-				cursor:pointer;
-				background:rgba(0, 0, 0, .2);
-			}
-
-			.tabulator-data-tree-control-collapse{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: transparent;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-			.tabulator-data-tree-control-expand{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: $rowTextColor;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-		}
-
-		.tabulator-responsive-collapse-toggle{
-			display: inline-flex;
-			align-items:center;
-			justify-content:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			height:15px;
-			width:15px;
-
-			border-radius:20px;
-			background:#666;
-
-			color:$rowBackgroundColor;
-			font-weight:bold;
-			font-size:1.1em;
-
-			&:hover{
-				opacity:.7;
-			}
-
-			&.open{
-				.tabulator-responsive-collapse-toggle-close{
-					display:initial;
-				}
-
-				.tabulator-responsive-collapse-toggle-open{
-					display:none;
-				}
-			}
-
-			.tabulator-responsive-collapse-toggle-close{
-				display:none;
-			}
-		}
-	}
-
-	//row grouping element
-	&.tabulator-group{
-		box-sizing:border-box;
-		border-bottom:1px solid #999;
-		border-right:1px solid $rowBorderColor;
-		border-top:1px solid #999;
-		padding:5px;
-		padding-left:10px;
-		background:#ccc;
-		font-weight:bold;
-
-		min-width: 100%;
-
-		&:hover{
-			cursor:pointer;
-			background-color:rgba(0,0,0,.1);
-		}
-
-		&.tabulator-group-visible{
-
-			.tabulator-arrow{
-				margin-right:10px;
-				border-left: 6px solid transparent;
-				border-right: 6px solid transparent;
-				border-top: 6px solid $sortArrowActive;
-				border-bottom: 0;
-			}
-
-		}
-
-		&.tabulator-group-level-1{
-			.tabulator-arrow{
-				margin-left:20px;
-			}
-		}
-
-		&.tabulator-group-level-2{
-			.tabulator-arrow{
-				margin-left:40px;
-			}
-		}
-
-		&.tabulator-group-level-3{
-			.tabulator-arrow{
-				margin-left:60px;
-			}
-		}
-
-		&.tabulator-group-level-4{
-			.tabulator-arrow{
-				margin-left:80px;
-			}
-		}
-
-		&.tabulator-group-level-5{
-			.tabulator-arrow{
-				margin-left:100px;
-			}
-		}
-
-		//sorting arrow
-		.tabulator-arrow{
-			display: inline-block;
-			width: 0;
-			height: 0;
-			margin-right:16px;
-			border-top: 6px solid transparent;
-			border-bottom: 6px solid transparent;
-			border-right: 0;
-			border-left: 6px solid $sortArrowActive;
-			vertical-align:middle;
-		}
-
-		span{
-			margin-left:10px;
-			color:#d00;
-		}
-	}
-
-}
-
-.tabulator-edit-select-list{
-	position: absolute;
-	display:inline-block;
-	box-sizing:border-box;
-
-	max-height:200px;
-
-	background:$rowBackgroundColor;
-	border:1px solid $rowBorderColor;
-
-	font-size:$textSize;
-
-	overflow-y:auto;
-	-webkit-overflow-scrolling: touch;
-
-	z-index: 10000;
-
-	.tabulator-edit-select-list-item{
-		padding:4px;
-
-		color:$rowTextColor;
-
-		&.active{
-			color:$rowBackgroundColor;
-			background:$editBoxColor;
-		}
-
-		&:hover{
-			cursor:pointer;
-
-			color:$rowBackgroundColor;
-			background:$editBoxColor;
-		}
-	}
-
-	.tabulator-edit-select-list-group{
-		border-bottom:1px solid $rowBorderColor;
-
-		padding:4px;
-		padding-top:6px;
-
-		color:$rowTextColor;
-		font-weight:bold;
-	}
-}
\ No newline at end of file
diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_midnight.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_midnight.scss
deleted file mode 100644
index 1eee0bcb08..0000000000
--- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_midnight.scss
+++ /dev/null
@@ -1,956 +0,0 @@
-
-//Main Theme Variables
-$backgroundColor: #222 !default; //background color of tabulator
-$borderColor:#333 !default; //border to tabulator
-$textSize:14px !default; //table text size
-
-//header themeing
-$headerBackgroundColor:#333 !default; //border to tabulator
-$headerTextColor:#fff !default; //header text colour
-$headerBorderColor:#aaa !default;  //header border color
-$headerSeperatorColor:#999 !default; //header bottom seperator color
-$headerMargin:4px !default; //padding round header
-
-//column header arrows
-$sortArrowActive: #666 !default;
-$sortArrowInactive: #bbb !default;
-
-//row themeing
-$rowBackgroundColor:#666 !default; //table row background color
-$rowAltBackgroundColor:#444 !default; //table row background color
-$rowBorderColor:#888 !default; //table border color
-$rowTextColor:#fff !default; //table text color
-$rowHoverBackground:#999 !default; //row background color on hover
-
-$rowSelectedBackground: #000 !default; //row background color when selected
-$rowSelectedBackgroundHover: #888 !default;//row background color when selected and hovered
-
-$editBoxColor:#999 !default; //border color for edit boxes
-$errorColor:#dd0000 !default; //error indication
-
-//footer themeing
-$footerBackgroundColor:#333 !default; //border to tabulator
-$footerTextColor:#333 !default; //footer text colour
-$footerBorderColor:#aaa !default; //footer border color
-$footerSeperatorColor:#999 !default; //footer bottom seperator color
-$footerActiveColor:#fff !default; //footer bottom active text color
-
-
-//Tabulator Containing Element
-.tabulator{
-	position: relative;
-	border: 1px solid $borderColor;
-	background-color: $backgroundColor;
-	overflow:hidden;
-	font-size:$textSize;
-	text-align: left;
-
-	-webkit-transform: translatez(0);
-	-moz-transform: translatez(0);
-	-ms-transform: translatez(0);
-	-o-transform: translatez(0);
-	transform: translatez(0);
-
-	&[tabulator-layout="fitDataFill"]{
-		.tabulator-tableHolder{
-			.tabulator-table{
-				min-width:100%;
-			}
-		}
-	}
-
-	&.tabulator-block-select{
-		user-select: none;
-	}
-
-	//column header containing element
-	.tabulator-header{
-		position:relative;
-		box-sizing: border-box;
-
-		width:100%;
-
-		border-bottom:1px solid $headerSeperatorColor;
-		background-color: $headerBackgroundColor;
-		color: $headerTextColor;
-		font-weight:bold;
-
-		white-space: nowrap;
-		overflow:hidden;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		//individual column header element
-		.tabulator-col{
-			display:inline-block;
-			position:relative;
-			box-sizing:border-box;
-			border-right:1px solid $headerBorderColor;
-			background-color: $headerBackgroundColor;
-			text-align:left;
-			vertical-align: bottom;
-			overflow: hidden;
-
-			&.tabulator-moving{
-				position: absolute;
-				border:1px solid  $headerSeperatorColor;
-				background:darken($headerBackgroundColor, 10%);
-				pointer-events: none;
-			}
-
-			//hold content of column header
-			.tabulator-col-content{
-				box-sizing:border-box;
-				position: relative;
-				padding:4px;
-
-				//hold title of column header
-				.tabulator-col-title{
-					box-sizing:border-box;
-					width: 100%;
-
-					white-space: nowrap;
-					overflow: hidden;
-					text-overflow: ellipsis;
-					vertical-align:bottom;
-
-					//element to hold title editor
-					.tabulator-title-editor{
-						box-sizing: border-box;
-						width: 100%;
-
-						border:1px solid #999;
-
-						padding:1px;
-
-						background: #444;
-						color: #fff;
-					}
-
-				}
-
-				//column sorter arrow
-				.tabulator-arrow{
-					display: inline-block;
-					position: absolute;
-					top:9px;
-					right:8px;
-					width: 0;
-					height: 0;
-					border-left: 6px solid transparent;
-					border-right: 6px solid transparent;
-					border-bottom: 6px solid $sortArrowInactive;
-				}
-
-			}
-
-			//complex header column group
-			&.tabulator-col-group{
-
-				//gelement to hold sub columns in column group
-				.tabulator-col-group-cols{
-					position:relative;
-					display: flex;
-
-					border-top:1px solid $headerBorderColor;
-					overflow: hidden;
-
-					.tabulator-col:last-child{
-						margin-right:-1px;
-					}
-				}
-			}
-
-			//hide left resize handle on first column
-			&:first-child{
-				.tabulator-col-resize-handle.prev{
-					display: none;
-				}
-			}
-
-			//placeholder element for sortable columns
-			&.ui-sortable-helper{
-				position: absolute;
-				background-color: darken($headerBackgroundColor, 10%) !important;
-				border:1px solid $headerBorderColor;
-			}
-
-			//header filter containing element
-			.tabulator-header-filter{
-				position: relative;
-				box-sizing: border-box;
-				margin-top:2px;
-				width:100%;
-				text-align: center;
-
-				//styling adjustment for inbuilt editors
-				textarea{
-					height:auto !important;
-				}
-
-				svg{
-					margin-top: 3px;
-				}
-
-				input, select{
-					border:1px solid #999;
-					background: #444;
-					color: #fff;
-				}
-
-				input{
-					&::-ms-clear {
-					  width : 0;
-					  height: 0;
-					}
-				}
-			}
-
-			//styling child elements for sortable columns
-			&.tabulator-sortable{
-				.tabulator-col-title{
-					padding-right:25px;
-				}
-
-				&:hover{
-					cursor:pointer;
-					background-color:darken($headerBackgroundColor, 10%);
-				}
-
-
-				&[aria-sort="none"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowInactive;
-					}
-				}
-
-				&[aria-sort="asc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowActive;
-					}
-				}
-
-				&[aria-sort="desc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: 6px solid $sortArrowActive;
-						border-bottom: none;
-					}
-				}
-			}
-
-			&.tabulator-col-vertical{
-				.tabulator-col-content{
-					.tabulator-col-title{
-						writing-mode: vertical-rl;
-						text-orientation: mixed;
-
-						display:flex;
-						align-items:center;
-						justify-content:center;
-					}
-				}
-
-				&.tabulator-col-vertical-flip{
-					.tabulator-col-title{
-						transform: rotate(180deg);
-					}
-				}
-
-				&.tabulator-sortable{
-					.tabulator-col-title{
-						padding-right:0;
-						padding-top:20px;
-					}
-
-					&.tabulator-col-vertical-flip{
-						.tabulator-col-title{
-							padding-right:0;
-							padding-bottom:20px;
-						}
-
-					}
-
-					.tabulator-arrow{
-						right:calc(50% - 6px);
-					}
-				}
-			}
-
-		}
-
-		.tabulator-frozen{
-			display: inline-block;
-			position: absolute;
-
-			// background-color: inherit;
-
-			z-index: 10;
-
-			&.tabulator-frozen-left{
-				border-right:2px solid $rowBorderColor;
-			}
-
-			&.tabulator-frozen-right{
-				border-left:2px solid $rowBorderColor;
-			}
-		}
-
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			min-width:400%;
-
-			background:darken($headerBackgroundColor, 10%) !important;
-
-			.tabulator-row{
-				background:darken($headerBackgroundColor, 10%) !important;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-			}
-
-			border-top:1px solid $rowBorderColor;
-			border-bottom:1px solid $headerBorderColor;
-
-			overflow: hidden;
-		}
-
-		.tabulator-frozen-rows-holder{
-			min-width:400%;
-
-			&:empty{
-				display: none;
-			}
-		}
-
-	}
-
-	//scrolling element to hold table
-	.tabulator-tableHolder{
-		position:relative;
-		width:100%;
-		white-space: nowrap;
-		overflow:auto;
-		-webkit-overflow-scrolling: touch;
-
-		&:focus{
-			outline: none;
-		}
-
-		//default placeholder element
-		.tabulator-placeholder{
-			box-sizing:border-box;
-			display: flex;
-			align-items:center;
-
-			&[tabulator-render-mode="virtual"]{
-				position: absolute;
-				top:0;
-				left:0;
-				height:100%;
-			}
-
-			width:100%;
-
-			span{
-				display: inline-block;
-
-				margin:0 auto;
-				padding:10px;
-
-				color:#eee;
-				font-weight: bold;
-				font-size: 20px;
-			}
-		}
-
-		//element to hold table rows
-		.tabulator-table{
-			position:relative;
-			display:inline-block;
-			background-color:$rowBackgroundColor;
-			white-space: nowrap;
-			overflow:visible;
-			color:$rowTextColor;
-
-			.tabulator-row{
-				&.tabulator-calcs{
-					font-weight: bold;
-					background:darken($rowAltBackgroundColor, 5%) !important;
-
-					&.tabulator-calcs-top{
-						border-bottom:2px solid $rowBorderColor;
-					}
-
-					&.tabulator-calcs-bottom{
-						border-top:2px solid $rowBorderColor;
-					}
-				}
-			}
-		}
-	}
-
-	//column resize handles
-	.tabulator-col-resize-handle{
-		position:absolute;
-		right:0;
-		top:0;
-		bottom:0;
-		width:5px;
-
-		&.prev{
-			left:0;
-			right:auto;
-		}
-
-		&:hover{
-			cursor:ew-resize;
-		}
-	}
-
-
-	//footer element
-	.tabulator-footer{
-		padding:5px 10px;
-		border-top:1px solid $footerSeperatorColor;
-		background-color: $footerBackgroundColor;
-		text-align:right;
-		color: $footerTextColor;
-		font-weight:bold;
-		white-space:nowrap;
-		user-select:none;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			width:calc(100% + 20px);
-			margin:-5px -10px 5px -10px;
-
-			text-align: left;
-
-			background:darken($footerBackgroundColor, 5%) !important;
-
-			.tabulator-row{
-				background:darken($footerBackgroundColor, 5%) !important;
-				color:$headerTextColor;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-			}
-
-			border-bottom:1px solid $rowBorderColor;
-			border-top:1px solid $rowBorderColor;
-
-			overflow: hidden;
-
-			&:only-child{
-				margin-bottom:-5px;
-				border-bottom:none;
-			}
-		}
-
-		//pagination container element
-		.tabulator-pages{
-			margin:0 7px;
-		}
-
-		//pagination button
-		.tabulator-page{
-			display:inline-block;
-			margin:0 2px;
-			border:1px solid $footerBorderColor;
-			border-radius:3px;
-			padding:2px 5px;
-			background:rgba(255,255,255,.2);
-			color: $footerTextColor;
-			font-family:inherit;
-			font-weight:inherit;
-			font-size:inherit;
-
-			&.active{
-				color:$footerActiveColor;
-			}
-
-			&:disabled{
-				opacity:.5;
-			}
-
-			&:not(.disabled){
-				&:hover{
-					cursor:pointer;
-					background:rgba(0,0,0,.2);
-					color:#fff;
-				}
-			}
-		}
-	}
-
-	//holding div that contains loader and covers tabulator element to prevent interaction
-	.tabulator-loader{
-		position:absolute;
-		display: flex;
-		align-items:center;
-
-		top:0;
-		left:0;
-		z-index:100;
-
-		height:100%;
-		width:100%;
-		background:rgba(0,0,0,.4);
-		text-align:center;
-
-		//loading message element
-		.tabulator-loader-msg{
-			display:inline-block;
-
-			margin:0 auto;
-			padding:10px 20px;
-
-			border-radius:10px;
-
-			background:#fff;
-			font-weight:bold;
-			font-size:16px;
-
-			//loading message
-			&.tabulator-loading{
-				border:4px solid #333;
-				color:#000;
-			}
-
-			//error message
-			&.tabulator-error{
-				border:4px solid #D00;
-				color:#590000;
-			}
-		}
-	}
-}
-
-//row element
-.tabulator-row{
-	position: relative;
-	box-sizing: border-box;
-
-	min-height:$textSize + ($headerMargin * 2);
-	background-color: $rowBackgroundColor;
-
-	&:nth-child(even){
-		background-color: $rowAltBackgroundColor;
-	}
-
-	&.tabulator-selectable:hover{
-		background-color:$rowHoverBackground;
-		cursor: pointer;
-	}
-
-	&.tabulator-selected{
-		background-color:$rowSelectedBackground;
-	}
-
-	&.tabulator-selected:hover{
-		background-color:$rowSelectedBackgroundHover;
-		cursor: pointer;
-	}
-
-	&.tabulator-moving{
-		position: absolute;
-
-		border-top:1px solid  $rowBorderColor;
-		border-bottom:1px solid  $rowBorderColor;
-
-		pointer-events: none !important;
-		z-index:15;
-	}
-
-	//row resize handles
-	.tabulator-row-resize-handle{
-		position:absolute;
-		right:0;
-		bottom:0;
-		left:0;
-		height:5px;
-
-		&.prev{
-			top:0;
-			bottom:auto;
-		}
-
-		&:hover{
-			cursor:ns-resize;
-		}
-	}
-
-	.tabulator-frozen{
-		display: inline-block;
-		position: absolute;
-
-		background-color: inherit;
-
-		z-index: 10;
-
-		&.tabulator-frozen-left{
-			border-right:2px solid $rowBorderColor;
-		}
-
-		&.tabulator-frozen-right{
-			border-left:2px solid $rowBorderColor;
-		}
-	}
-
-	.tabulator-responsive-collapse{
-		box-sizing:border-box;
-
-		padding:5px;
-
-		border-top:1px solid $rowBorderColor;
-		border-bottom:1px solid $rowBorderColor;
-
-		&:empty{
-			display:none;
-		}
-
-		table{
-			font-size:$textSize;
-
-			tr{
-				td{
-					position: relative;
-
-					&:first-of-type{
-						padding-right:10px;
-					}
-				}
-			}
-		}
-	}
-
-
-	//cell element
-	.tabulator-cell{
-		display:inline-block;
-		position: relative;
-		box-sizing:border-box;
-		padding:4px;
-		border-right:1px solid $rowBorderColor;
-		vertical-align:middle;
-		white-space:nowrap;
-		overflow:hidden;
-		text-overflow:ellipsis;
-
-
-		&.tabulator-editing{
-			border:1px solid  $editBoxColor;
-			padding: 0;
-
-			input, select{
-				border:1px;
-				background:transparent;
-			}
-		}
-
-		&.tabulator-validation-fail{
-			border:1px solid $errorColor;
-			input, select{
-				border:1px;
-				background:transparent;
-
-				color: $errorColor;
-			}
-		}
-
-		//hide left resize handle on first column
-		&:first-child{
-			.tabulator-col-resize-handle.prev{
-				display: none;
-			}
-		}
-
-		//movable row handle
-		&.tabulator-row-handle{
-
-			display: inline-flex;
-			align-items:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			//handle holder
-			.tabulator-row-handle-box{
-				width:80%;
-
-				//Hamburger element
-				.tabulator-row-handle-bar{
-					width:100%;
-					height:3px;
-					margin-top:2px;
-					background:#666;
-				}
-			}
-		}
-
-		.tabulator-data-tree-branch{
-			display:inline-block;
-			vertical-align:middle;
-
-			height:9px;
-			width:7px;
-
-			margin-top:-9px;
-			margin-right:5px;
-
-			border-bottom-left-radius:1px;
-
-			border-left:2px solid $rowBorderColor;
-			border-bottom:2px solid $rowBorderColor;
-		}
-
-		.tabulator-data-tree-control{
-
-			display:inline-flex;
-			justify-content:center;
-			align-items:center;
-			vertical-align:middle;
-
-			height:11px;
-			width:11px;
-
-			margin-right:5px;
-
-			border:1px solid $rowTextColor;
-			border-radius:2px;
-			background:rgba(0, 0, 0, .1);
-
-			overflow:hidden;
-
-			&:hover{
-				cursor:pointer;
-				background:rgba(0, 0, 0, .2);
-			}
-
-			.tabulator-data-tree-control-collapse{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: transparent;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-			.tabulator-data-tree-control-expand{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: $rowTextColor;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-		}
-
-		.tabulator-responsive-collapse-toggle{
-			display: inline-flex;
-			align-items:center;
-			justify-content:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			height:15px;
-			width:15px;
-
-			border-radius:20px;
-			background:#fff;
-
-			color:$rowBackgroundColor;
-			font-weight:bold;
-			font-size:1.1em;
-
-			&:hover{
-				opacity:.7;
-			}
-
-			&.open{
-				.tabulator-responsive-collapse-toggle-close{
-					display:initial;
-				}
-
-				.tabulator-responsive-collapse-toggle-open{
-					display:none;
-				}
-			}
-
-			.tabulator-responsive-collapse-toggle-close{
-				display:none;
-			}
-		}
-	}
-
-
-	//row grouping element
-	&.tabulator-group{
-
-		box-sizing:border-box;
-		border-bottom:1px solid #999;
-		border-right:1px solid $rowBorderColor;
-		border-top:1px solid #999;
-		padding:5px;
-		padding-left:10px;
-		background:#ccc;
-		font-weight:bold;
-		color:#333;
-
-		min-width: 100%;
-
-		&:hover{
-			cursor:pointer;
-			background-color:rgba(0,0,0,.1);
-		}
-
-		&.tabulator-group-visible{
-			.tabulator-arrow{
-				margin-right:10px;
-				border-left: 6px solid transparent;
-				border-right: 6px solid transparent;
-				border-top: 6px solid $sortArrowActive;
-				border-bottom: 0;
-			}
-		}
-
-		&.tabulator-group-level-1{
-			.tabulator-arrow{
-				margin-left:20px;
-			}
-		}
-
-		&.tabulator-group-level-2{
-			.tabulator-arrow{
-				margin-left:40px;
-			}
-		}
-
-		&.tabulator-group-level-3{
-			.tabulator-arrow{
-				margin-left:60px;
-			}
-		}
-
-		&.tabulator-group-level-4{
-			.tabulator-arrow{
-				margin-left:80px;
-			}
-		}
-
-		&.tabulator-group-level-5{
-			.tabulator-arrow{
-				margin-left:100px;
-			}
-		}
-
-		//sorting arrow
-		.tabulator-arrow{
-			display: inline-block;
-			width: 0;
-			height: 0;
-			margin-right:16px;
-			border-top: 6px solid transparent;
-			border-bottom: 6px solid transparent;
-			border-right: 0;
-			border-left: 6px solid $sortArrowActive;
-			vertical-align:middle;
-		}
-
-		span{
-			margin-left:10px;
-			color:#666;
-		}
-	}
-}
-
-.tabulator-edit-select-list{
-	position: absolute;
-	display:inline-block;
-	box-sizing:border-box;
-
-	max-height:200px;
-
-	background:$rowBackgroundColor;
-	border:1px solid $rowBorderColor;
-
-	font-size:$textSize;
-
-	overflow-y:auto;
-	-webkit-overflow-scrolling: touch;
-
-	z-index: 10000;
-
-	.tabulator-edit-select-list-item{
-		padding:4px;
-
-		color:$rowTextColor;
-
-		&.active{
-			color:$rowBackgroundColor;
-			background:$editBoxColor;
-		}
-
-		&:hover{
-			cursor:pointer;
-
-			color:$rowBackgroundColor;
-			background:$editBoxColor;
-		}
-	}
-
-	.tabulator-edit-select-list-group{
-		border-bottom:1px solid $rowBorderColor;
-
-		padding:4px;
-		padding-top:6px;
-
-		color:$rowTextColor;
-		font-weight:bold;
-	}
-}
\ No newline at end of file
diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_modern.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_modern.scss
deleted file mode 100644
index 48ba110a2e..0000000000
--- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_modern.scss
+++ /dev/null
@@ -1,997 +0,0 @@
-
-$primary: #3759D7 !default; //the base text color from which the rest of the theme derives
-
-//Main Theme Variables
-$backgroundColor: #fff !default; //background color of tabulator
-$borderColor:#fff !default; //border to tabulator
-$textSize:16px !default; //table text size
-
-//header themeing
-$headerBackgroundColor:#fff !default; //border to tabulator
-$headerTextColor:$primary !default; //header text colour
-$headerBorderColor:#fff !default;  //header border color
-$headerSeperatorColor:$primary !default; //header bottom seperator color
-$headerMargin:4px !default; //padding round header
-
-//column header arrows
-$sortArrowActive: $primary !default;
-$sortArrowInactive: lighten($primary, 30%) !default;
-
-//row themeing
-$rowBackgroundColor:#f3f3f3 !default; //table row background color
-$rowAltBackgroundColor:#fff !default; //table row background color
-$rowBorderColor:#fff !default; //table border color
-$rowTextColor:#333 !default; //table text color
-$rowHoverBackground:#bbb !default; //row background color on hover
-
-$rowSelectedBackground: #9ABCEA !default; //row background color when selected
-$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered
-
-$editBoxColor:#1D68CD !default; //border color for edit boxes
-$errorColor:#dd0000 !default; //error indication
-
-//footer themeing
-$footerBackgroundColor:#fff !default; //border to tabulator
-$footerTextColor:$primary !default; //footer text colour
-$footerBorderColor:#aaa !default; //footer border color
-$footerSeperatorColor:#999 !default; //footer bottom seperator color
-$footerActiveColor:$primary !default; //footer bottom active text color
-
-$handleWidth:10px !default; //width of the row handle
-$handleColor: $primary !default; //color for odd numbered rows
-$handleColorAlt: lighten($primary, 10%) !default; //color for even numbered rows
-
-
-//Tabulator Containing Element
-.tabulator{
-	position: relative;
-	border: 1px solid $borderColor;
-	background-color: $backgroundColor;
-	overflow:hidden;
-	font-size:$textSize;
-	text-align: left;
-
-	-webkit-transform: translatez(0);
-	-moz-transform: translatez(0);
-	-ms-transform: translatez(0);
-	-o-transform: translatez(0);
-	transform: translatez(0);
-
-	&[tabulator-layout="fitDataFill"]{
-		.tabulator-tableHolder{
-			.tabulator-table{
-				min-width:100%;
-			}
-		}
-	}
-
-	&.tabulator-block-select{
-		user-select: none;
-	}
-
-	//column header containing element
-	.tabulator-header{
-		position:relative;
-		box-sizing: border-box;
-
-		width:100%;
-
-		border-bottom:3px solid $headerSeperatorColor;
-		margin-bottom:4px;
-		background-color: $headerBackgroundColor;
-		color: $headerTextColor;
-		font-weight:bold;
-
-		white-space: nowrap;
-		overflow:hidden;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		padding-left:$handleWidth;
-
-		font-size: 1.1em;
-
-		//individual column header element
-		.tabulator-col{
-			display:inline-block;
-			position:relative;
-			box-sizing:border-box;
-			border-right:2px solid $headerBorderColor;
-			background-color: $headerBackgroundColor;
-			text-align:left;
-			vertical-align: bottom;
-			overflow: hidden;
-
-			&.tabulator-moving{
-				position: absolute;
-				border:1px solid  $headerSeperatorColor;
-				background:darken($headerBackgroundColor, 10%);
-				pointer-events: none;
-			}
-
-			//hold content of column header
-			.tabulator-col-content{
-				box-sizing:border-box;
-				position: relative;
-				padding:4px;
-
-				//hold title of column header
-				.tabulator-col-title{
-					box-sizing:border-box;
-					width: 100%;
-
-					white-space: nowrap;
-					overflow: hidden;
-					text-overflow: ellipsis;
-					vertical-align:bottom;
-
-					//element to hold title editor
-					.tabulator-title-editor{
-						box-sizing: border-box;
-						width: 100%;
-
-						border:1px solid $primary;
-
-						padding:1px;
-
-						background: #fff;
-
-						font-size: 1em;
-						color: $primary;
-					}
-				}
-
-				//column sorter arrow
-				.tabulator-arrow{
-					display: inline-block;
-					position: absolute;
-					top:9px;
-					right:8px;
-					width: 0;
-					height: 0;
-					border-left: 6px solid transparent;
-					border-right: 6px solid transparent;
-					border-bottom: 6px solid $sortArrowInactive;
-				}
-
-			}
-
-			//complex header column group
-			&.tabulator-col-group{
-
-				//gelement to hold sub columns in column group
-				.tabulator-col-group-cols{
-					position:relative;
-					display: flex;
-
-					border-top:2px solid $headerSeperatorColor;
-					overflow: hidden;
-
-					.tabulator-col:last-child{
-						margin-right:-1px;
-					}
-				}
-			}
-
-
-			//hide left resize handle on first column
-			&:first-child{
-				.tabulator-col-resize-handle.prev{
-					display: none;
-				}
-			}
-
-			//placeholder element for sortable columns
-			&.ui-sortable-helper{
-				position: absolute;
-				background-color: darken($headerBackgroundColor, 10%) !important;
-				border:1px solid $headerBorderColor;
-			}
-
-			//header filter containing element
-			.tabulator-header-filter{
-				position: relative;
-				box-sizing: border-box;
-				margin-top:2px;
-				width:100%;
-				text-align: center;
-
-				//styling adjustment for inbuilt editors
-				textarea{
-					height:auto !important;
-				}
-
-				svg{
-					margin-top: 3px;
-				}
-
-				input{
-					&::-ms-clear {
-					  width : 0;
-					  height: 0;
-					}
-				}
-			}
-
-			//styling child elements for sortable columns
-			&.tabulator-sortable{
-				.tabulator-col-title{
-					padding-right:25px;
-				}
-
-				&:hover{
-					cursor:pointer;
-					background-color:darken($headerBackgroundColor, 10%);
-				}
-
-
-				&[aria-sort="none"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowInactive;
-					}
-				}
-
-				&[aria-sort="asc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowActive;
-					}
-				}
-
-				&[aria-sort="desc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: 6px solid $sortArrowActive;
-						border-bottom: none;
-					}
-				}
-			}
-
-			&.tabulator-col-vertical{
-				.tabulator-col-content{
-					.tabulator-col-title{
-						writing-mode: vertical-rl;
-						text-orientation: mixed;
-
-						display:flex;
-						align-items:center;
-						justify-content:center;
-					}
-				}
-
-				&.tabulator-col-vertical-flip{
-					.tabulator-col-title{
-						transform: rotate(180deg);
-					}
-				}
-
-				&.tabulator-sortable{
-					.tabulator-col-title{
-						padding-right:0;
-						padding-top:20px;
-					}
-
-					&.tabulator-col-vertical-flip{
-						.tabulator-col-title{
-							padding-right:0;
-							padding-bottom:20px;
-						}
-
-					}
-
-					.tabulator-arrow{
-						right:calc(50% - 6px);
-					}
-				}
-			}
-
-		}
-
-		.tabulator-frozen{
-			display: inline-block;
-			position: absolute;
-
-			// background-color: inherit;
-
-			z-index: 10;
-
-			&.tabulator-frozen-left{
-				padding-left: $handleWidth;
-
-				border-right:2px solid $rowBorderColor;
-			}
-
-			&.tabulator-frozen-right{
-				border-left:2px solid $rowBorderColor;
-			}
-		}
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			min-width:400%;
-
-			border-top:2px solid $headerSeperatorColor !important;
-
-			background:lighten($headerBackgroundColor, 5%) !important;
-
-			.tabulator-row{
-				padding-left: 0 !important;
-
-				background:lighten($headerBackgroundColor, 5%) !important;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-
-				.tabulator-cell{
-					background:none;
-				}
-			}
-
-			border-top:1px solid $rowBorderColor;
-			border-bottom:1px solid $headerBorderColor;
-
-			overflow: hidden;
-		}
-
-		.tabulator-frozen-rows-holder{
-			min-width:400%;
-
-			&:empty{
-				display: none;
-			}
-		}
-	}
-
-	//scrolling element to hold table
-	.tabulator-tableHolder{
-		position:relative;
-		width:100%;
-		white-space: nowrap;
-		overflow:auto;
-		-webkit-overflow-scrolling: touch;
-
-		&:focus{
-			outline: none;
-		}
-
-		//default placeholder element
-		.tabulator-placeholder{
-			box-sizing:border-box;
-			display: flex;
-			align-items:center;
-
-			&[tabulator-render-mode="virtual"]{
-				position: absolute;
-				top:0;
-				left:0;
-				height:100%;
-			}
-
-			width:100%;
-
-			span{
-				display: inline-block;
-
-				margin:0 auto;
-				padding:10px;
-
-				color:$primary;
-				font-weight: bold;
-				font-size: 20px;
-			}
-		}
-
-		//element to hold table rows
-		.tabulator-table{
-			position:relative;
-			display:inline-block;
-			background-color:$rowBackgroundColor;
-			white-space: nowrap;
-			overflow:visible;
-			color:$rowTextColor;
-
-			.tabulator-row{
-				&.tabulator-calcs{
-					font-weight: bold;
-					background:darken($rowAltBackgroundColor, 5%) !important;
-
-					&.tabulator-calcs-top{
-						border-bottom:2px solid $headerSeperatorColor;
-					}
-
-					&.tabulator-calcs-bottom{
-						border-top:2px solid $headerSeperatorColor;
-					}
-				}
-			}
-		}
-	}
-
-
-	//column resize handles
-	.tabulator-col-resize-handle{
-		position:absolute;
-		right:0;
-		top:0;
-		bottom:0;
-		width:5px;
-
-		&.prev{
-			left:0;
-			right:auto;
-		}
-
-		&:hover{
-			cursor:ew-resize;
-		}
-	}
-
-
-	//footer element
-	.tabulator-footer{
-		padding:5px 10px;
-		border-top:1px solid $footerSeperatorColor;
-		background-color: $footerBackgroundColor;
-		text-align:right;
-		color: $footerTextColor;
-		font-weight:bold;
-		white-space:nowrap;
-		user-select:none;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			width:calc(100% + 20px);
-			margin:-5px -10px 5px -10px;
-
-			text-align: left;
-
-			background:lighten($footerBackgroundColor, 5%) !important;
-
-			border-top:3px solid $headerSeperatorColor !important;
-			border-bottom:2px solid $headerSeperatorColor !important;
-
-			.tabulator-row{
-				background:lighten($footerBackgroundColor, 5%) !important;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-
-				.tabulator-cell{
-					background:none;
-				}
-			}
-
-			border-bottom:1px solid $rowBorderColor;
-			border-top:1px solid $rowBorderColor;
-
-			overflow: hidden;
-
-			&:only-child{
-				margin-bottom:-5px;
-				border-bottom:none;
-				border-bottom:none !important;
-			}
-		}
-
-		//pagination container element
-		.tabulator-pages{
-			margin:0 7px;
-		}
-
-		//pagination button
-		.tabulator-page{
-			display:inline-block;
-			margin:0 2px;
-			border:1px solid $footerBorderColor;
-			border-radius:3px;
-			padding:2px 5px;
-			background:rgba(255,255,255,.2);
-			color: $footerTextColor;
-			font-family:inherit;
-			font-weight:inherit;
-			font-size:inherit;
-
-			&.active{
-				color:$footerActiveColor;
-			}
-
-			&:disabled{
-				opacity:.5;
-			}
-
-			&:not(.disabled){
-				&:hover{
-					cursor:pointer;
-					background:rgba(0,0,0,.2);
-					color:#fff;
-				}
-			}
-		}
-	}
-
-	//holding div that contains loader and covers tabulator element to prevent interaction
-	.tabulator-loader{
-		position:absolute;
-		display: flex;
-		align-items:center;
-
-		top:0;
-		left:0;
-		z-index:100;
-
-		height:100%;
-		width:100%;
-		background:rgba(0,0,0,.4);
-		text-align:center;
-
-		//loading message element
-		.tabulator-loader-msg{
-			display:inline-block;
-
-			margin:0 auto;
-			padding:10px 20px;
-
-			border-radius:10px;
-
-			background:#fff;
-			font-weight:bold;
-			font-size:16px;
-
-			//loading message
-			&.tabulator-loading{
-				border:4px solid #333;
-				color:#000;
-			}
-
-			//error message
-			&.tabulator-error{
-				border:4px solid #D00;
-				color:#590000;
-			}
-		}
-	}
-}
-
-//row element
-.tabulator-row{
-	position: relative;
-	box-sizing: border-box;
-
-	box-sizing: border-box;
-	min-height:$textSize + ($headerMargin * 2);
-
-	background-color: $handleColor;
-
-	padding-left: $handleWidth !important;
-
-	margin-bottom: 2px;
-
-	&:nth-child(even){
-		background-color: $handleColorAlt;
-
-		.tabulator-cell{
-			background-color: $rowAltBackgroundColor;
-		}
-	}
-
-	&.tabulator-selectable:hover{
-		cursor: pointer;
-
-		.tabulator-cell{
-			background-color:$rowHoverBackground;
-		}
-	}
-
-	&.tabulator-selected{
-		.tabulator-cell{
-			background-color:$rowSelectedBackground;
-		}
-	}
-
-	&.tabulator-selected:hover{
-		.tabulator-cell{
-			background-color:$rowSelectedBackgroundHover;
-			cursor: pointer;
-		}
-	}
-
-	&.tabulator-moving{
-		position: absolute;
-
-		border-top:1px solid  $rowBorderColor;
-		border-bottom:1px solid  $rowBorderColor;
-
-		pointer-events: none !important;
-		z-index:15;
-	}
-
-	//row resize handles
-	.tabulator-row-resize-handle{
-		position:absolute;
-		right:0;
-		bottom:0;
-		left:0;
-		height:5px;
-
-		&.prev{
-			top:0;
-			bottom:auto;
-		}
-
-		&:hover{
-			cursor:ns-resize;
-		}
-	}
-
-	.tabulator-frozen{
-		display: inline-block;
-		position: absolute;
-
-		background-color: inherit;
-
-		z-index: 10;
-
-		&.tabulator-frozen-left{
-			padding-left: $handleWidth;
-			border-right:2px solid $rowBorderColor;
-		}
-
-		&.tabulator-frozen-right{
-			border-left:2px solid $rowBorderColor;
-		}
-	}
-
-	.tabulator-responsive-collapse{
-		box-sizing:border-box;
-
-		padding:5px;
-
-		border-top:1px solid $rowBorderColor;
-		border-bottom:1px solid $rowBorderColor;
-
-		&:empty{
-			display:none;
-		}
-
-		table{
-			font-size:$textSize;
-
-			tr{
-				td{
-					position: relative;
-
-					&:first-of-type{
-						padding-right:10px;
-					}
-				}
-			}
-		}
-	}
-
-	//cell element
-	.tabulator-cell{
-		display:inline-block;
-		position: relative;
-		box-sizing:border-box;
-		padding:6px 4px;
-		border-right:2px solid $rowBorderColor;
-		vertical-align:middle;
-		white-space:nowrap;
-		overflow:hidden;
-		text-overflow:ellipsis;
-
-		background-color: $rowBackgroundColor;
-
-		&.tabulator-editing{
-			border:1px solid  $editBoxColor;
-			padding: 0;
-
-			input, select{
-				border:1px;
-				background:transparent;
-			}
-		}
-
-		&.tabulator-validation-fail{
-			border:1px solid $errorColor;
-			input, select{
-				border:1px;
-				background:transparent;
-
-				color: $errorColor;
-			}
-		}
-
-		//hide left resize handle on first column
-		&:first-child{
-			.tabulator-col-resize-handle.prev{
-				display: none;
-			}
-		}
-
-		//movable row handle
-		&.tabulator-row-handle{
-
-			display: inline-flex;
-			align-items:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			//handle holder
-			.tabulator-row-handle-box{
-				width:80%;
-
-				//Hamburger element
-				.tabulator-row-handle-bar{
-					width:100%;
-					height:3px;
-					margin-top:2px;
-					background:#666;
-				}
-			}
-		}
-
-		.tabulator-data-tree-branch{
-			display:inline-block;
-			vertical-align:middle;
-
-			height:9px;
-			width:7px;
-
-			margin-top:-9px;
-			margin-right:5px;
-
-			border-bottom-left-radius:1px;
-
-			border-left:2px solid $rowBorderColor;
-			border-bottom:2px solid $rowBorderColor;
-		}
-
-		.tabulator-data-tree-control{
-
-			display:inline-flex;
-			justify-content:center;
-			align-items:center;
-			vertical-align:middle;
-
-			height:11px;
-			width:11px;
-
-			margin-right:5px;
-
-			border:1px solid $rowTextColor;
-			border-radius:2px;
-			background:rgba(0, 0, 0, .1);
-
-			overflow:hidden;
-
-			&:hover{
-				cursor:pointer;
-				background:rgba(0, 0, 0, .2);
-			}
-
-			.tabulator-data-tree-control-collapse{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: transparent;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-			.tabulator-data-tree-control-expand{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: $rowTextColor;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-		}
-
-		.tabulator-responsive-collapse-toggle{
-			display: inline-flex;
-			align-items:center;
-			justify-content:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			height:15px;
-			width:15px;
-
-			border-radius:20px;
-			background:#666;
-
-			color:$rowBackgroundColor;
-			font-weight:bold;
-			font-size:1.1em;
-
-			&:hover{
-				opacity:.7;
-			}
-
-			&.open{
-				.tabulator-responsive-collapse-toggle-close{
-					display:initial;
-				}
-
-				.tabulator-responsive-collapse-toggle-open{
-					display:none;
-				}
-			}
-
-			.tabulator-responsive-collapse-toggle-close{
-				display:none;
-			}
-		}
-	}
-
-	//row grouping element
-	&.tabulator-group{
-
-		box-sizing:border-box;
-		border-bottom:2px solid $primary;
-		border-top:2px solid $primary;
-		padding:5px;
-		padding-left:10px;
-		background:lighten($primary, 20%);
-		font-weight:bold;
-		color:fff;
-		margin-bottom: 2px;
-
-		min-width: 100%;
-
-		&:hover{
-			cursor:pointer;
-			background-color:rgba(0,0,0,.1);
-		}
-
-
-		&.tabulator-group-visible{
-			.tabulator-arrow{
-				margin-right:10px;
-				border-left: 6px solid transparent;
-				border-right: 6px solid transparent;
-				border-top: 6px solid $sortArrowActive;
-				border-bottom: 0;
-			}
-		}
-
-		&.tabulator-group-level-1{
-			.tabulator-arrow{
-				margin-left:20px;
-			}
-		}
-
-		&.tabulator-group-level-2{
-			.tabulator-arrow{
-				margin-left:40px;
-			}
-		}
-
-		&.tabulator-group-level-3{
-			.tabulator-arrow{
-				margin-left:60px;
-			}
-		}
-
-		&.tabulator-group-level-4{
-			.tabulator-arrow{
-				margin-left:80px;
-			}
-		}
-
-		&.tabulator-group-level-5{
-			.tabulator-arrow{
-				margin-left:100px;
-			}
-		}
-
-		//sorting arrow
-		.tabulator-arrow{
-			display: inline-block;
-			width: 0;
-			height: 0;
-			margin-right:16px;
-			border-top: 6px solid transparent;
-			border-bottom: 6px solid transparent;
-			border-right: 0;
-			border-left: 6px solid $sortArrowActive;
-			vertical-align:middle;
-		}
-
-		span{
-			margin-left:10px;
-			color:$primary;
-		}
-	}
-}
-
-.tabulator-edit-select-list{
-	position: absolute;
-	display:inline-block;
-	box-sizing:border-box;
-
-	max-height:200px;
-
-	background:$rowBackgroundColor;
-	border:1px solid $rowBorderColor;
-
-	font-size:$textSize;
-
-	overflow-y:auto;
-	-webkit-overflow-scrolling: touch;
-
-	z-index: 10000;
-
-	.tabulator-edit-select-list-item{
-		padding:4px;
-
-		color:$rowTextColor;
-
-		&.active{
-			color:$rowBackgroundColor;
-			background:$editBoxColor;
-		}
-
-		&:hover{
-			cursor:pointer;
-
-			color:$rowBackgroundColor;
-			background:$editBoxColor;
-		}
-	}
-
-	.tabulator-edit-select-list-group{
-		border-bottom:1px solid $rowBorderColor;
-
-		padding:4px;
-		padding-top:6px;
-
-		color:$rowTextColor;
-		font-weight:bold;
-	}
-}
\ No newline at end of file
diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_simple.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_simple.scss
deleted file mode 100644
index 1174074f58..0000000000
--- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_simple.scss
+++ /dev/null
@@ -1,951 +0,0 @@
-
-//Main Theme Variables
-$backgroundColor: #fff !default; //background color of tabulator
-$borderColor:#999 !default; //border to tabulator
-$textSize:14px !default; //table text size
-
-//header themeing
-$headerBackgroundColor:#fff !default; //border to tabulator
-$headerTextColor:#555 !default; //header text colour
-$headerBorderColor:#ddd !default;  //header border color
-$headerSeperatorColor:#999 !default; //header bottom seperator color
-$headerMargin:4px !default; //padding round header
-
-//column header arrows
-$sortArrowActive: #666 !default;
-$sortArrowInactive: #bbb !default;
-
-//row themeing
-$rowBackgroundColor:#fff !default; //table row background color
-$rowAltBackgroundColor:#fff !default; //table row background color
-$rowBorderColor:#ddd !default; //table border color
-$rowTextColor:#333 !default; //table text color
-$rowHoverBackground:#bbb !default; //row background color on hover
-
-$rowSelectedBackground: #9ABCEA !default; //row background color when selected
-$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered
-
-
-$editBoxColor:#1D68CD !default; //border color for edit boxes
-$errorColor:#dd0000 !default; //error indication
-
-//footer themeing
-$footerBackgroundColor:#fff !default; //border to tabulator
-$footerTextColor:#555 !default; //footer text colour
-$footerBorderColor:#aaa !default; //footer border color
-$footerSeperatorColor:#999 !default; //footer bottom seperator color
-$footerActiveColor:#d00 !default; //footer bottom active text color
-
-
-//Tabulator Containing Element
-.tabulator{
-	position: relative;
-	background-color: $backgroundColor;
-	overflow:hidden;
-	font-size:$textSize;
-	text-align: left;
-
-	-webkit-transform: translatez(0);
-	-moz-transform: translatez(0);
-	-ms-transform: translatez(0);
-	-o-transform: translatez(0);
-	transform: translatez(0);
-
-	&[tabulator-layout="fitDataFill"]{
-		.tabulator-tableHolder{
-			.tabulator-table{
-				min-width:100%;
-			}
-		}
-	}
-
-	&.tabulator-block-select{
-		user-select: none;
-	}
-
-	//column header containing element
-	.tabulator-header{
-		position:relative;
-		box-sizing: border-box;
-
-		width:100%;
-
-		border-bottom:1px solid $headerSeperatorColor;
-		background-color: $headerBackgroundColor;
-		color: $headerTextColor;
-		font-weight:bold;
-
-		white-space: nowrap;
-		overflow:hidden;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		//individual column header element
-		.tabulator-col{
-			display:inline-block;
-			position:relative;
-			box-sizing:border-box;
-			border-right:1px solid $headerBorderColor;
-			background-color: $headerBackgroundColor;
-			text-align:left;
-			vertical-align: bottom;
-			overflow: hidden;
-
-			&.tabulator-moving{
-				position: absolute;
-				border:1px solid  $headerSeperatorColor;
-				background:darken($headerBackgroundColor, 10%);
-				pointer-events: none;
-			}
-
-			//hold content of column header
-			.tabulator-col-content{
-				box-sizing:border-box;
-				position: relative;
-				padding:4px;
-
-				//hold title of column header
-				.tabulator-col-title{
-					box-sizing:border-box;
-					width: 100%;
-
-					white-space: nowrap;
-					overflow: hidden;
-					text-overflow: ellipsis;
-					vertical-align:bottom;
-
-					//element to hold title editor
-					.tabulator-title-editor{
-						box-sizing: border-box;
-						width: 100%;
-
-						border:1px solid #999;
-
-						padding:1px;
-
-						background: #fff;
-					}
-				}
-
-				//column sorter arrow
-				.tabulator-arrow{
-					display: inline-block;
-					position: absolute;
-					top:9px;
-					right:8px;
-					width: 0;
-					height: 0;
-					border-left: 6px solid transparent;
-					border-right: 6px solid transparent;
-					border-bottom: 6px solid $sortArrowInactive;
-				}
-
-			}
-
-			//complex header column group
-			&.tabulator-col-group{
-
-				//gelement to hold sub columns in column group
-				.tabulator-col-group-cols{
-					position:relative;
-					display: flex;
-
-					border-top:1px solid $headerBorderColor;
-					overflow: hidden;
-
-					.tabulator-col:last-child{
-						margin-right:-1px;
-					}
-				}
-			}
-
-
-			//hide left resize handle on first column
-			&:first-child{
-				.tabulator-col-resize-handle.prev{
-					display: none;
-				}
-			}
-
-			//placeholder element for sortable columns
-			&.ui-sortable-helper{
-				position: absolute;
-				background-color:darken($headerBackgroundColor, 10%) !important;
-				border:1px solid $headerBorderColor;
-			}
-
-			//header filter containing element
-			.tabulator-header-filter{
-				position: relative;
-				box-sizing: border-box;
-				margin-top:2px;
-				width:100%;
-				text-align: center;
-
-				//styling adjustment for inbuilt editors
-				textarea{
-					height:auto !important;
-				}
-
-				svg{
-					margin-top: 3px;
-				}
-
-				input{
-					&::-ms-clear {
-					  width : 0;
-					  height: 0;
-					}
-				}
-			}
-
-
-			//styling child elements for sortable columns
-			&.tabulator-sortable{
-				.tabulator-col-title{
-					padding-right:25px;
-				}
-
-				&:hover{
-					cursor:pointer;
-					background-color:darken($headerBackgroundColor, 10%);
-				}
-
-
-				&[aria-sort="none"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowInactive;
-					}
-				}
-
-				&[aria-sort="asc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowActive;
-					}
-				}
-
-				&[aria-sort="desc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: 6px solid $sortArrowActive;
-						border-bottom: none;
-					}
-				}
-			}
-
-			&.tabulator-col-vertical{
-				.tabulator-col-content{
-					.tabulator-col-title{
-						writing-mode: vertical-rl;
-						text-orientation: mixed;
-
-						display:flex;
-						align-items:center;
-						justify-content:center;
-					}
-				}
-
-				&.tabulator-col-vertical-flip{
-					.tabulator-col-title{
-						transform: rotate(180deg);
-					}
-				}
-
-				&.tabulator-sortable{
-					.tabulator-col-title{
-						padding-right:0;
-						padding-top:20px;
-					}
-
-					&.tabulator-col-vertical-flip{
-						.tabulator-col-title{
-							padding-right:0;
-							padding-bottom:20px;
-						}
-
-					}
-
-					.tabulator-arrow{
-						right:calc(50% - 6px);
-					}
-				}
-			}
-
-		}
-
-		.tabulator-frozen{
-			display: inline-block;
-			position: absolute;
-
-			// background-color: inherit;
-
-			z-index: 10;
-
-			&.tabulator-frozen-left{
-				border-right:2px solid $rowBorderColor;
-			}
-
-			&.tabulator-frozen-right{
-				border-left:2px solid $rowBorderColor;
-			}
-		}
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			min-width:400%;
-
-			background:darken($headerBackgroundColor, 5%) !important;
-
-			.tabulator-row{
-				background:darken($headerBackgroundColor, 5%) !important;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-			}
-
-			border-top:1px solid $rowBorderColor;
-			border-bottom:1px solid $headerSeperatorColor;
-
-			overflow: hidden;
-		}
-
-		.tabulator-frozen-rows-holder{
-			min-width:400%;
-
-			&:empty{
-				display: none;
-			}
-		}
-	}
-
-
-
-	//scrolling element to hold table
-	.tabulator-tableHolder{
-		position:relative;
-		width:100%;
-		white-space: nowrap;
-		overflow:auto;
-		-webkit-overflow-scrolling: touch;
-
-		&:focus{
-			outline: none;
-		}
-
-		//default placeholder element
-		.tabulator-placeholder{
-			box-sizing:border-box;
-			display: flex;
-			align-items:center;
-
-			&[tabulator-render-mode="virtual"]{
-				position: absolute;
-				top:0;
-				left:0;
-				height:100%;
-			}
-
-			width:100%;
-
-			span{
-				display: inline-block;
-
-				margin:0 auto;
-				padding:10px;
-
-				color:#000;
-				font-weight: bold;
-				font-size: 20px;
-			}
-		}
-
-		//element to hold table rows
-		.tabulator-table{
-			position:relative;
-			display:inline-block;
-			background-color:$rowBackgroundColor;
-			white-space: nowrap;
-			overflow:visible;
-			color:$rowTextColor;
-
-			.tabulator-row{
-				&.tabulator-calcs{
-					font-weight: bold;
-					background:darken($rowAltBackgroundColor, 5%) !important;
-
-					&.tabulator-calcs-top{
-						border-bottom:2px solid $rowBorderColor;
-					}
-
-					&.tabulator-calcs-bottom{
-						border-top:2px solid $rowBorderColor;
-					}
-				}
-			}
-
-		}
-	}
-
-	//column resize handles
-	.tabulator-col-resize-handle{
-		position:absolute;
-		right:0;
-		top:0;
-		bottom:0;
-		width:5px;
-
-		&.prev{
-			left:0;
-			right:auto;
-		}
-
-		&:hover{
-			cursor:ew-resize;
-		}
-	}
-
-
-	//footer element
-	.tabulator-footer{
-		padding:5px 10px;
-		border-top:1px solid $footerSeperatorColor;
-		background-color: $footerBackgroundColor;
-		text-align:right;
-		color: $footerTextColor;
-		font-weight:bold;
-		white-space:nowrap;
-		user-select:none;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			width:calc(100% + 20px);
-			margin:-5px -10px 5px -10px;
-
-			text-align: left;
-
-			background:darken($footerBackgroundColor, 5%) !important;
-
-			.tabulator-row{
-				background:darken($footerBackgroundColor, 5%) !important;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-			}
-
-			border-bottom:1px solid $footerBackgroundColor;
-			border-top:1px solid $rowBorderColor;
-
-			overflow: hidden;
-
-			&:only-child{
-				margin-bottom:-5px;
-				border-bottom:none;
-			}
-		}
-
-		//pagination container element
-		.tabulator-pages{
-			margin:0 7px;
-		}
-
-		//pagination button
-		.tabulator-page{
-			display:inline-block;
-			margin:0 2px;
-			border:1px solid $footerBorderColor;
-			border-radius:3px;
-			padding:2px 5px;
-			background:rgba(255,255,255,.2);
-			color: $footerTextColor;
-			font-family:inherit;
-			font-weight:inherit;
-			font-size:inherit;
-
-			&.active{
-				color:$footerActiveColor;
-			}
-
-			&:disabled{
-				opacity:.5;
-			}
-
-			&:not(.disabled){
-				&:hover{
-					cursor:pointer;
-					background:rgba(0,0,0,.2);
-					color:#fff;
-				}
-			}
-		}
-	}
-
-	//holding div that contains loader and covers tabulator element to prevent interaction
-	.tabulator-loader{
-		position:absolute;
-		display: flex;
-		align-items:center;
-
-		top:0;
-		left:0;
-		z-index:100;
-
-		height:100%;
-		width:100%;
-		background:rgba(0,0,0,.4);
-		text-align:center;
-
-		//loading message element
-		.tabulator-loader-msg{
-			display:inline-block;
-
-			margin:0 auto;
-			padding:10px 20px;
-
-			border-radius:10px;
-
-			background:#fff;
-			font-weight:bold;
-			font-size:16px;
-
-			//loading message
-			&.tabulator-loading{
-				border:4px solid #333;
-				color:#000;
-			}
-
-			//error message
-			&.tabulator-error{
-				border:4px solid #D00;
-				color:#590000;
-			}
-		}
-	}
-}
-
-//row element
-.tabulator-row{
-	position: relative;
-	box-sizing: border-box;
-
-	min-height:$textSize + ($headerMargin * 2);
-	background-color: $rowBackgroundColor;
-	border-bottom:1px solid $rowBorderColor;
-
-	&:nth-child(even){
-		background-color: $rowAltBackgroundColor;
-	}
-
-	&.tabulator-selectable:hover{
-		background-color:$rowHoverBackground;
-		cursor: pointer;
-	}
-
-	&.tabulator-selected{
-		background-color:$rowSelectedBackground;
-	}
-
-	&.tabulator-selected:hover{
-		background-color:$rowSelectedBackgroundHover;
-		cursor: pointer;
-	}
-
-	&.tabulator-moving{
-		position: absolute;
-
-		border-top:1px solid  $rowBorderColor;
-		border-bottom:1px solid  $rowBorderColor;
-
-		pointer-events: none !important;
-		z-index:15;
-	}
-
-	//row resize handles
-	.tabulator-row-resize-handle{
-		position:absolute;
-		right:0;
-		bottom:0;
-		left:0;
-		height:5px;
-
-		&.prev{
-			top:0;
-			bottom:auto;
-		}
-
-		&:hover{
-			cursor:ns-resize;
-		}
-	}
-
-	.tabulator-frozen{
-		display: inline-block;
-		position: absolute;
-
-		background-color: inherit;
-
-		z-index: 10;
-
-		&.tabulator-frozen-left{
-			border-right:2px solid $rowBorderColor;
-		}
-
-		&.tabulator-frozen-right{
-			border-left:2px solid $rowBorderColor;
-		}
-	}
-
-	.tabulator-responsive-collapse{
-		box-sizing:border-box;
-
-		padding:5px;
-
-		border-top:1px solid $rowBorderColor;
-		border-bottom:1px solid $rowBorderColor;
-
-		&:empty{
-			display:none;
-		}
-
-		table{
-			font-size:$textSize;
-
-			tr{
-				td{
-					position: relative;
-
-					&:first-of-type{
-						padding-right:10px;
-					}
-				}
-			}
-		}
-	}
-
-	//cell element
-	.tabulator-cell{
-		display:inline-block;
-		position: relative;
-		box-sizing:border-box;
-		padding:4px;
-		border-right:1px solid $rowBorderColor;
-		vertical-align:middle;
-		white-space:nowrap;
-		overflow:hidden;
-		text-overflow:ellipsis;
-
-		&:last-of-type{
-			border-right: none;
-		}
-
-		&.tabulator-editing{
-			border:1px solid  $editBoxColor;
-			padding: 0;
-
-			input, select{
-				border:1px;
-				background:transparent;
-			}
-		}
-
-		&.tabulator-validation-fail{
-			border:1px solid $errorColor;
-			input, select{
-				border:1px;
-				background:transparent;
-
-				color: $errorColor;
-			}
-		}
-
-		//hide left resize handle on first column
-		&:first-child{
-			.tabulator-col-resize-handle.prev{
-				display: none;
-			}
-		}
-
-		//movable row handle
-		&.tabulator-row-handle{
-
-			display: inline-flex;
-			align-items:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			//handle holder
-			.tabulator-row-handle-box{
-				width:80%;
-
-				//Hamburger element
-				.tabulator-row-handle-bar{
-					width:100%;
-					height:3px;
-					margin-top:2px;
-					background:#666;
-				}
-			}
-		}
-
-		.tabulator-data-tree-branch{
-			display:inline-block;
-			vertical-align:middle;
-
-			height:9px;
-			width:7px;
-
-			margin-top:-9px;
-			margin-right:5px;
-
-			border-bottom-left-radius:1px;
-
-			border-left:2px solid $rowBorderColor;
-			border-bottom:2px solid $rowBorderColor;
-		}
-
-		.tabulator-data-tree-control{
-
-			display:inline-flex;
-			justify-content:center;
-			align-items:center;
-			vertical-align:middle;
-
-			height:11px;
-			width:11px;
-
-			margin-right:5px;
-
-			border:1px solid $rowTextColor;
-			border-radius:2px;
-			background:rgba(0, 0, 0, .1);
-
-			overflow:hidden;
-
-			&:hover{
-				cursor:pointer;
-				background:rgba(0, 0, 0, .2);
-			}
-
-			.tabulator-data-tree-control-collapse{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: transparent;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-			.tabulator-data-tree-control-expand{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: $rowTextColor;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-		}
-
-		.tabulator-responsive-collapse-toggle{
-			display: inline-flex;
-			align-items:center;
-			justify-content:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			height:15px;
-			width:15px;
-
-			border-radius:20px;
-			background:#666;
-
-			color:$rowBackgroundColor;
-			font-weight:bold;
-			font-size:1.1em;
-
-			&:hover{
-				opacity:.7;
-			}
-
-			&.open{
-				.tabulator-responsive-collapse-toggle-close{
-					display:initial;
-				}
-
-				.tabulator-responsive-collapse-toggle-open{
-					display:none;
-				}
-			}
-
-			.tabulator-responsive-collapse-toggle-close{
-				display:none;
-			}
-		}
-	}
-
-	//row grouping element
-	&.tabulator-group{
-
-		box-sizing:border-box;
-		border-bottom:1px solid #999;
-		border-right:1px solid $rowBorderColor;
-		border-top:1px solid #999;
-		padding:5px;
-		padding-left:10px;
-		background:#fafafa;
-		font-weight:bold;
-
-		min-width: 100%;
-
-		&:hover{
-			cursor:pointer;
-			background-color:rgba(0,0,0,.1);
-		}
-
-		&.tabulator-group-visible{
-			.tabulator-arrow{
-				margin-right:10px;
-				border-left: 6px solid transparent;
-				border-right: 6px solid transparent;
-				border-top: 6px solid $sortArrowActive;
-				border-bottom: 0;
-			}
-		}
-
-		&.tabulator-group-level-1{
-			.tabulator-arrow{
-				margin-left:20px;
-			}
-		}
-
-		&.tabulator-group-level-2{
-			.tabulator-arrow{
-				margin-left:40px;
-			}
-		}
-
-		&.tabulator-group-level-3{
-			.tabulator-arrow{
-				margin-left:60px;
-			}
-		}
-
-		&.tabulator-group-level-4{
-			.tabulator-arrow{
-				margin-left:80px;
-			}
-		}
-
-		&.tabulator-group-level-5{
-			.tabulator-arrow{
-				margin-left:100px;
-			}
-		}
-
-		//sorting arrow
-		.tabulator-arrow{
-			display: inline-block;
-			width: 0;
-			height: 0;
-			margin-right:16px;
-			border-top: 6px solid transparent;
-			border-bottom: 6px solid transparent;
-			border-right: 0;
-			border-left: 6px solid $sortArrowActive;
-			vertical-align:middle;
-		}
-
-		span{
-			margin-left:10px;
-			color:#666;
-		}
-	}
-}
-
-.tabulator-edit-select-list{
-	position: absolute;
-	display:inline-block;
-	box-sizing:border-box;
-
-	max-height:200px;
-
-	background:$rowBackgroundColor;
-	border:1px solid $rowBorderColor;
-
-	font-size:$textSize;
-
-	overflow-y:auto;
-	-webkit-overflow-scrolling: touch;
-
-	z-index: 10000;
-
-	.tabulator-edit-select-list-item{
-		padding:4px;
-
-		color:$rowTextColor;
-
-		&.active{
-			color:$rowBackgroundColor;
-			background:$editBoxColor;
-		}
-
-		&:hover{
-			cursor:pointer;
-
-			color:$rowBackgroundColor;
-			background:$editBoxColor;
-		}
-	}
-
-	.tabulator-edit-select-list-group{
-		border-bottom:1px solid $rowBorderColor;
-
-		padding:4px;
-		padding-top:6px;
-
-		color:$rowTextColor;
-		font-weight:bold;
-	}
-}
\ No newline at end of file
diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_site.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_site.scss
deleted file mode 100644
index cdf30ccae7..0000000000
--- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_site.scss
+++ /dev/null
@@ -1,962 +0,0 @@
-
-//Main Theme Variables
-$backgroundColor: #fff !default; //background color of tabulator
-$borderColor:#222 !default; //border to tabulator
-$textSize:14px !default; //table text size
-
-//header themeing
-$headerBackgroundColor:#222 !default; //border to tabulator
-$headerTextColor:#fff !default; //header text colour
-$headerBorderColor:#aaa !default;  //header border color
-$headerSeperatorColor:#3FB449 !default; //header bottom seperator color
-$headerMargin:4px !default; //padding round header
-
-//column header arrows
-$sortArrowActive: #3FB449 !default;
-$sortArrowInactive: #bbb !default;
-
-//row themeing
-$rowBackgroundColor:#fff !default; //table row background color
-$rowAltBackgroundColor:#EFEFEF !default; //table row background color
-$rowBorderColor:#aaa !default; //table border color
-$rowTextColor:#333 !default; //table text color
-$rowHoverBackground:#bbb !default; //row background color on hover
-
-$rowSelectedBackground: #9ABCEA !default; //row background color when selected
-$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered
-
-$editBoxColor:#1D68CD !default; //border color for edit boxes
-$errorColor:#dd0000 !default; //error indication
-
-//footer themeing
-$footerBackgroundColor:#222 !default; //border to tabulator
-$footerTextColor:#222 !default; //footer text colour
-$footerBorderColor:#aaa !default; //footer border color
-$footerSeperatorColor:#3FB449 !default; //footer bottom seperator color
-$footerActiveColor:$footerSeperatorColor !default; //footer bottom active text color
-
-
-//Tabulator Containing Element
-.tabulator{
-	position: relative;
-
-	border-bottom: 5px solid $borderColor;
-
-	background-color: $backgroundColor;
-
-	font-size:$textSize;
-	text-align: left;
-	overflow:hidden;
-
-	-webkit-transform: translatez(0);
-	-moz-transform: translatez(0);
-	-ms-transform: translatez(0);
-	-o-transform: translatez(0);
-	transform: translatez(0);
-
-	&[tabulator-layout="fitDataFill"]{
-		.tabulator-tableHolder{
-			.tabulator-table{
-				min-width:100%;
-			}
-		}
-	}
-
-	&[tabulator-layout="fitColumns"]{
-		.tabulator-row{
-			.tabulator-cell{
-				&:last-of-type{
-					border-right: none;
-				}
-			}
-		}
-	}
-
-
-	&.tabulator-block-select{
-		user-select: none;
-	}
-
-	//column header containing element
-	.tabulator-header{
-		position:relative;
-		box-sizing: border-box;
-
-		width:100%;
-
-		border-bottom:3px solid $headerSeperatorColor;
-		background-color: $headerBackgroundColor;
-		color: $headerTextColor;
-		font-weight:bold;
-
-		white-space: nowrap;
-		overflow:hidden;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		//individual column header element
-		.tabulator-col{
-			display:inline-block;
-
-			position:relative;
-			box-sizing:border-box;
-			border-right:1px solid $headerBorderColor;
-			background-color: $headerBackgroundColor;
-			text-align:left;
-			vertical-align: bottom;
-			overflow: hidden;
-
-			&.tabulator-moving{
-				position: absolute;
-				border:1px solid  $headerSeperatorColor;
-				background:darken($headerBackgroundColor, 10%);
-				pointer-events: none;
-			}
-
-			//hold content of column header
-			.tabulator-col-content{
-				box-sizing:border-box;
-				position: relative;
-				padding:8px;
-
-				//hold title of column header
-				.tabulator-col-title{
-					box-sizing:border-box;
-					width: 100%;
-
-					white-space: nowrap;
-					overflow: hidden;
-					text-overflow: ellipsis;
-					vertical-align:bottom;
-
-					//element to hold title editor
-					.tabulator-title-editor{
-						box-sizing: border-box;
-						width: 100%;
-
-						border:1px solid #999;
-
-						padding:1px;
-
-						background: #fff;
-					}
-				}
-
-				//column sorter arrow
-				.tabulator-arrow{
-					display: inline-block;
-					position: absolute;
-					top:14px;
-					right:8px;
-					width: 0;
-					height: 0;
-					border-left: 6px solid transparent;
-					border-right: 6px solid transparent;
-					border-bottom: 6px solid $sortArrowInactive;
-				}
-
-			}
-
-			//complex header column group
-			&.tabulator-col-group{
-
-				//gelement to hold sub columns in column group
-				.tabulator-col-group-cols{
-					position:relative;
-					display: flex;
-
-					border-top:1px solid $headerBorderColor;
-					overflow: hidden;
-
-					.tabulator-col:last-child{
-						margin-right:-1px;
-					}
-				}
-			}
-
-			//hide left resize handle on first column
-			&:first-child{
-				.tabulator-col-resize-handle.prev{
-					display: none;
-				}
-			}
-
-			//placeholder element for sortable columns
-			&.ui-sortable-helper{
-				position: absolute;
-				background-color: $headerBackgroundColor !important;
-				border:1px solid $headerBorderColor;
-			}
-
-			//header filter containing element
-			.tabulator-header-filter{
-				position: relative;
-				box-sizing: border-box;
-				margin-top:2px;
-				width:100%;
-				text-align: center;
-
-				//styling adjustment for inbuilt editors
-				textarea{
-					height:auto !important;
-				}
-
-				svg{
-					margin-top: 3px;
-				}
-
-				input{
-					&::-ms-clear {
-					  width : 0;
-					  height: 0;
-					}
-				}
-			}
-
-			//styling child elements for sortable columns
-			&.tabulator-sortable{
-				.tabulator-col-title{
-					padding-right:25px;
-				}
-
-				&:hover{
-					cursor:pointer;
-					background-color:darken($headerBackgroundColor, 10%);
-				}
-
-				&[aria-sort="none"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowInactive;
-					}
-				}
-
-				&[aria-sort="asc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowActive;
-					}
-				}
-
-				&[aria-sort="desc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: 6px solid $sortArrowActive;
-						border-bottom: none;
-					}
-				}
-			}
-
-			&.tabulator-col-vertical{
-				.tabulator-col-content{
-					.tabulator-col-title{
-						writing-mode: vertical-rl;
-						text-orientation: mixed;
-
-						display:flex;
-						align-items:center;
-						justify-content:center;
-					}
-				}
-
-				&.tabulator-col-vertical-flip{
-					.tabulator-col-title{
-						transform: rotate(180deg);
-					}
-				}
-
-				&.tabulator-sortable{
-					.tabulator-col-title{
-						padding-right:0;
-						padding-top:20px;
-					}
-
-					&.tabulator-col-vertical-flip{
-						.tabulator-col-title{
-							padding-right:0;
-							padding-bottom:20px;
-						}
-
-					}
-
-					.tabulator-arrow{
-						right:calc(50% - 6px);
-					}
-				}
-			}
-
-		}
-
-		.tabulator-frozen{
-			display: inline-block;
-			position: absolute;
-
-			// background-color: inherit;
-
-			z-index: 10;
-
-			&.tabulator-frozen-left{
-				border-right:2px solid $rowBorderColor;
-			}
-
-			&.tabulator-frozen-right{
-				border-left:2px solid $rowBorderColor;
-			}
-		}
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			min-width:400%;
-
-			background:lighten($headerBackgroundColor, 10%) !important;
-
-			.tabulator-row{
-				background:lighten($headerBackgroundColor, 10%) !important;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-			}
-
-			border-top:1px solid $rowBorderColor;
-			// border-bottom:1px solid $headerBorderColor;
-
-			overflow: hidden;
-		}
-
-		.tabulator-frozen-rows-holder{
-			min-width:400%;
-
-			&:empty{
-				display: none;
-			}
-		}
-	}
-
-	//scrolling element to hold table
-	.tabulator-tableHolder{
-		position:relative;
-		width:100%;
-		white-space: nowrap;
-		overflow:auto;
-		-webkit-overflow-scrolling: touch;
-
-		&:focus{
-			outline: none;
-		}
-
-		//default placeholder element
-		.tabulator-placeholder{
-			box-sizing:border-box;
-			display: flex;
-			align-items:center;
-
-			&[tabulator-render-mode="virtual"]{
-				position: absolute;
-				top:0;
-				left:0;
-				height:100%;
-			}
-
-			width:100%;
-
-			span{
-				display: inline-block;
-
-				margin:0 auto;
-				padding:10px;
-
-				color:$headerSeperatorColor;
-				font-weight: bold;
-				font-size: 20px;
-			}
-		}
-
-		//element to hold table rows
-		.tabulator-table{
-			position:relative;
-			display:inline-block;
-			background-color:$rowBackgroundColor;
-			white-space: nowrap;
-			overflow:visible;
-			color:$rowTextColor;
-
-			.tabulator-row{
-				&.tabulator-calcs{
-					font-weight: bold;
-					background:lighten($headerBackgroundColor, 15%) !important;
-					color:$headerTextColor;
-				}
-			}
-		}
-	}
-
-
-	//footer element
-	.tabulator-footer{
-		padding:5px 10px;
-		padding-top:8px;
-		border-top:3px solid $footerSeperatorColor;
-		background-color: $footerBackgroundColor;
-		text-align:right;
-		color: $footerTextColor;
-		font-weight:bold;
-		white-space:nowrap;
-		user-select:none;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			width:calc(100% + 20px);
-			margin:-8px -10px 8px -10px;
-
-			text-align: left;
-
-			background:lighten($footerBackgroundColor, 10%) !important;
-
-			.tabulator-row{
-				background:lighten($footerBackgroundColor, 10%) !important;
-				color:$headerTextColor !important;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-			}
-
-			// border-top:1px solid $rowBorderColor;
-			border-bottom:1px solid $rowBorderColor;
-
-			overflow: hidden;
-
-			&:only-child{
-				margin-bottom:-5px;
-				border-bottom:none;
-			}
-		}
-
-		//pagination container element
-		.tabulator-pages{
-			margin:0 7px;
-		}
-
-		//pagination button
-		.tabulator-page{
-			display:inline-block;
-
-			margin:0 2px;
-			padding:2px 5px;
-
-			border:1px solid $footerBorderColor;
-			border-radius:3px;
-
-			background:#fff;
-
-			color: $footerTextColor;
-			font-family:inherit;
-			font-weight:inherit;
-			font-size:inherit;
-
-			&.active{
-				color:$footerActiveColor;
-			}
-
-			&:disabled{
-				opacity:.5;
-			}
-
-			&:not(.disabled){
-				&:hover{
-					cursor:pointer;
-					background:rgba(0,0,0,.2);
-					color:#fff;
-				}
-			}
-		}
-	}
-
-	//column resize handles
-	.tabulator-col-resize-handle{
-		position:absolute;
-		right:0;
-		top:0;
-		bottom:0;
-		width:5px;
-
-		&.prev{
-			left:0;
-			right:auto;
-		}
-
-		&:hover{
-			cursor:ew-resize;
-		}
-	}
-
-
-	//holding div that contains loader and covers tabulator element to prevent interaction
-	.tabulator-loader{
-		position:absolute;
-		display: flex;
-		align-items:center;
-
-		top:0;
-		left:0;
-		z-index:100;
-
-		height:100%;
-		width:100%;
-		background:rgba(0,0,0,.4);
-		text-align:center;
-
-		//loading message element
-		.tabulator-loader-msg{
-			display:inline-block;
-
-			margin:0 auto;
-			padding:10px 20px;
-
-			border-radius:10px;
-
-			background:#fff;
-			font-weight:bold;
-			font-size:16px;
-
-			//loading message
-			&.tabulator-loading{
-				border:4px solid #333;
-				color:#000;
-			}
-
-			//error message
-			&.tabulator-error{
-				border:4px solid #D00;
-				color:#590000;
-			}
-		}
-	}
-}
-
-//row element
-.tabulator-row{
-	position: relative;
-	box-sizing: border-box;
-	min-height:$textSize + ($headerMargin * 2);
-	background-color: $rowBackgroundColor;
-
-
-	&.tabulator-row-even{
-		background-color: $rowAltBackgroundColor;
-	}
-
-	&.tabulator-selectable:hover{
-		background-color:$rowHoverBackground;
-		cursor: pointer;
-	}
-
-	&.tabulator-selected{
-		background-color:$rowSelectedBackground;
-	}
-
-	&.tabulator-selected:hover{
-		background-color:$rowSelectedBackgroundHover;
-		cursor: pointer;
-	}
-
-	&.tabulator-row-moving{
-		border:1px solid #000;
-		background:#fff;
-	}
-
-	&.tabulator-moving{
-		position: absolute;
-
-		border-top:1px solid  $rowBorderColor;
-		border-bottom:1px solid  $rowBorderColor;
-
-		pointer-events: none !important;
-		z-index:15;
-	}
-
-	//row resize handles
-	.tabulator-row-resize-handle{
-		position:absolute;
-		right:0;
-		bottom:0;
-		left:0;
-		height:5px;
-
-		&.prev{
-			top:0;
-			bottom:auto;
-		}
-
-		&:hover{
-			cursor:ns-resize;
-		}
-	}
-
-	.tabulator-frozen{
-		display: inline-block;
-		position: absolute;
-
-		background-color: inherit;
-
-		z-index: 10;
-
-		&.tabulator-frozen-left{
-			border-right:2px solid $rowBorderColor;
-		}
-
-		&.tabulator-frozen-right{
-			border-left:2px solid $rowBorderColor;
-		}
-	}
-
-	.tabulator-responsive-collapse{
-		box-sizing:border-box;
-
-		padding:5px;
-
-		border-top:1px solid $rowBorderColor;
-		border-bottom:1px solid $rowBorderColor;
-
-		&:empty{
-			display:none;
-		}
-
-		table{
-			font-size:$textSize;
-
-			tr{
-				td{
-					position: relative;
-
-					&:first-of-type{
-						padding-right:10px;
-					}
-				}
-			}
-		}
-	}
-
-	//cell element
-	.tabulator-cell{
-		display:inline-block;
-		position: relative;
-		box-sizing:border-box;
-		padding:6px;
-		border-right:1px solid $rowBorderColor;
-		vertical-align:middle;
-		white-space:nowrap;
-		overflow:hidden;
-		text-overflow:ellipsis;
-
-
-		&.tabulator-editing{
-			border:1px solid  $editBoxColor;
-			padding: 0;
-
-			input, select{
-				border:1px;
-				background:transparent;
-			}
-		}
-
-		&.tabulator-validation-fail{
-			border:1px solid $errorColor;
-			input, select{
-				border:1px;
-				background:transparent;
-
-				color: $errorColor;
-			}
-		}
-
-		//hide left resize handle on first column
-		&:first-child{
-			.tabulator-col-resize-handle.prev{
-				display: none;
-			}
-		}
-
-		//movable row handle
-		&.tabulator-row-handle{
-
-			display: inline-flex;
-			align-items:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			//handle holder
-			.tabulator-row-handle-box{
-				width:80%;
-
-				//Hamburger element
-				.tabulator-row-handle-bar{
-					width:100%;
-					height:3px;
-					margin-top:2px;
-					background:$sortArrowActive;
-				}
-			}
-		}
-
-		.tabulator-data-tree-branch{
-			display:inline-block;
-			vertical-align:middle;
-
-			height:9px;
-			width:7px;
-
-			margin-top:-9px;
-			margin-right:5px;
-
-			border-bottom-left-radius:1px;
-
-			border-left:2px solid $rowBorderColor;
-			border-bottom:2px solid $rowBorderColor;
-		}
-
-		.tabulator-data-tree-control{
-
-			display:inline-flex;
-			justify-content:center;
-			align-items:center;
-			vertical-align:middle;
-
-			height:11px;
-			width:11px;
-
-			margin-right:5px;
-
-			border:1px solid $rowTextColor;
-			border-radius:2px;
-			background:rgba(0, 0, 0, .1);
-
-			overflow:hidden;
-
-			&:hover{
-				cursor:pointer;
-				background:rgba(0, 0, 0, .2);
-			}
-
-			.tabulator-data-tree-control-collapse{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: transparent;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-			.tabulator-data-tree-control-expand{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: $rowTextColor;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-		}
-
-		.tabulator-responsive-collapse-toggle{
-			display: inline-flex;
-			align-items:center;
-			justify-content:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			height:15px;
-			width:15px;
-
-			border-radius:20px;
-			background:#666;
-
-			color:$rowBackgroundColor;
-			font-weight:bold;
-			font-size:1.1em;
-
-			&:hover{
-				opacity:.7;
-			}
-
-			&.open{
-				.tabulator-responsive-collapse-toggle-close{
-					display:initial;
-				}
-
-				.tabulator-responsive-collapse-toggle-open{
-					display:none;
-				}
-			}
-
-			.tabulator-responsive-collapse-toggle-close{
-				display:none;
-			}
-		}
-	}
-
-	//row grouping element
-	&.tabulator-group{
-		box-sizing:border-box;
-		border-right:1px solid $rowBorderColor;
-		border-top:1px solid #000;
-		border-bottom:2px solid $headerSeperatorColor;
-		padding:5px;
-		padding-left:10px;
-		background:$headerBackgroundColor;
-		color:$headerTextColor;
-		font-weight:bold;
-
-		min-width: 100%;
-
-		&:hover{
-			cursor:pointer;
-			background-color:darken($headerBackgroundColor, 10%);
-		}
-
-		&.tabulator-group-visible{
-			.tabulator-arrow{
-				margin-right:10px;
-				border-left: 6px solid transparent;
-				border-right: 6px solid transparent;
-				border-top: 6px solid $sortArrowActive;
-				border-bottom: 0;
-			}
-		}
-
-		&.tabulator-group-level-1{
-			.tabulator-arrow{
-				margin-left:20px;
-			}
-		}
-
-		&.tabulator-group-level-2{
-			.tabulator-arrow{
-				margin-left:40px;
-			}
-		}
-
-		&.tabulator-group-level-3{
-			.tabulator-arrow{
-				margin-left:60px;
-			}
-		}
-
-		&.tabulator-group-level-4{
-			.tabulator-arrow{
-				margin-left:80px;
-			}
-		}
-
-		&.tabulator-group-level-5{
-			.tabulator-arrow{
-				margin-left:100px;
-			}
-		}
-
-		//sorting arrow
-		.tabulator-arrow{
-			display: inline-block;
-			width: 0;
-			height: 0;
-			margin-right:16px;
-			border-top: 6px solid transparent;
-			border-bottom: 6px solid transparent;
-			border-right: 0;
-			border-left: 6px solid $sortArrowActive;
-			vertical-align:middle;
-		}
-
-		span{
-			margin-left:10px;
-			color:$headerSeperatorColor;
-		}
-	}
-
-}
-
-.tabulator-edit-select-list{
-	position: absolute;
-	display:inline-block;
-	box-sizing:border-box;
-
-	max-height:200px;
-
-	background:$rowBackgroundColor;
-	border:1px solid $rowBorderColor;
-
-	font-size:$textSize;
-
-	overflow-y:auto;
-	-webkit-overflow-scrolling: touch;
-
-	z-index: 10000;
-
-	.tabulator-edit-select-list-item{
-		padding:4px;
-
-		color:$rowTextColor;
-
-		&.active{
-			color:$rowBackgroundColor;
-			background:$editBoxColor;
-		}
-
-		&:hover{
-			cursor:pointer;
-
-			color:$rowBackgroundColor;
-			background:$editBoxColor;
-		}
-	}
-
-	.tabulator-edit-select-list-group{
-		border-bottom:1px solid $rowBorderColor;
-
-		padding:4px;
-		padding-top:6px;
-
-		color:$rowTextColor;
-		font-weight:bold;
-	}
-}
\ No newline at end of file
diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/yarn.lock b/Gems/AssetMemoryAnalyzer/External/tabulator-master/yarn.lock
deleted file mode 100644
index 01198bc3c7..0000000000
--- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/yarn.lock
+++ /dev/null
@@ -1,5974 +0,0 @@
-# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
-# yarn lockfile v1
-
-
-"@gulp-sourcemaps/identity-map@1.X":
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/identity-map/-/identity-map-1.0.2.tgz#1e6fe5d8027b1f285dc0d31762f566bccd73d5a9"
-  dependencies:
-    acorn "^5.0.3"
-    css "^2.2.1"
-    normalize-path "^2.1.1"
-    source-map "^0.6.0"
-    through2 "^2.0.3"
-
-"@gulp-sourcemaps/map-sources@1.X":
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz#890ae7c5d8c877f6d384860215ace9d7ec945bda"
-  dependencies:
-    normalize-path "^2.0.1"
-    through2 "^2.0.3"
-
-abbrev@1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
-
-acorn@5.X, acorn@^5.0.3:
-  version "5.7.3"
-  resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279"
-
-ajv@^5.1.0, ajv@^5.3.0:
-  version "5.5.2"
-  resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965"
-  dependencies:
-    co "^4.6.0"
-    fast-deep-equal "^1.0.0"
-    fast-json-stable-stringify "^2.0.0"
-    json-schema-traverse "^0.3.0"
-
-align-text@^0.1.1, align-text@^0.1.3:
-  version "0.1.4"
-  resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
-  dependencies:
-    kind-of "^3.0.2"
-    longest "^1.0.1"
-    repeat-string "^1.5.2"
-
-alphanum-sort@^1.0.1, alphanum-sort@^1.0.2:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3"
-
-amdefine@>=0.0.4:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
-
-ansi-colors@^1.0.1:
-  version "1.1.0"
-  resolved "http://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz#6374b4dd5d4718ff3ce27a671a3b1cad077132a9"
-  dependencies:
-    ansi-wrap "^0.1.0"
-
-ansi-cyan@^0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/ansi-cyan/-/ansi-cyan-0.1.1.tgz#538ae528af8982f28ae30d86f2f17456d2609873"
-  dependencies:
-    ansi-wrap "0.1.0"
-
-ansi-gray@^0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/ansi-gray/-/ansi-gray-0.1.1.tgz#2962cf54ec9792c48510a3deb524436861ef7251"
-  dependencies:
-    ansi-wrap "0.1.0"
-
-ansi-red@^0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/ansi-red/-/ansi-red-0.1.1.tgz#8c638f9d1080800a353c9c28c8a81ca4705d946c"
-  dependencies:
-    ansi-wrap "0.1.0"
-
-ansi-regex@^0.2.0, ansi-regex@^0.2.1:
-  version "0.2.1"
-  resolved "http://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz#0d8e946967a3d8143f93e24e298525fc1b2235f9"
-
-ansi-regex@^2.0.0:
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
-
-ansi-regex@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
-
-ansi-styles@^1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.1.0.tgz#eaecbf66cd706882760b2f4691582b8f55d7a7de"
-
-ansi-styles@^2.2.1:
-  version "2.2.1"
-  resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
-
-ansi-styles@^3.2.1:
-  version "3.2.1"
-  resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
-  dependencies:
-    color-convert "^1.9.0"
-
-ansi-wrap@0.1.0, ansi-wrap@^0.1.0:
-  version "0.1.0"
-  resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf"
-
-aproba@^1.0.3:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
-
-archive-type@^3.0.0, archive-type@^3.0.1:
-  version "3.2.0"
-  resolved "https://registry.yarnpkg.com/archive-type/-/archive-type-3.2.0.tgz#9cd9c006957ebe95fadad5bd6098942a813737f6"
-  dependencies:
-    file-type "^3.1.0"
-
-archy@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40"
-
-are-we-there-yet@~1.1.2:
-  version "1.1.5"
-  resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21"
-  dependencies:
-    delegates "^1.0.0"
-    readable-stream "^2.0.6"
-
-argparse@^1.0.7:
-  version "1.0.10"
-  resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
-  dependencies:
-    sprintf-js "~1.0.2"
-
-arr-diff@^1.0.1:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-1.1.0.tgz#687c32758163588fef7de7b36fabe495eb1a399a"
-  dependencies:
-    arr-flatten "^1.0.1"
-    array-slice "^0.2.3"
-
-arr-diff@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
-  dependencies:
-    arr-flatten "^1.0.1"
-
-arr-diff@^4.0.0:
-  version "4.0.0"
-  resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
-
-arr-flatten@^1.0.1, arr-flatten@^1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
-
-arr-union@^2.0.1:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-2.1.0.tgz#20f9eab5ec70f5c7d215b1077b1c39161d292c7d"
-
-arr-union@^3.1.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
-
-array-differ@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031"
-
-array-each@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f"
-
-array-find-index@^1.0.1:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1"
-
-array-slice@^0.2.3:
-  version "0.2.3"
-  resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-0.2.3.tgz#dd3cfb80ed7973a75117cdac69b0b99ec86186f5"
-
-array-slice@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.1.0.tgz#e368ea15f89bc7069f7ffb89aec3a6c7d4ac22d4"
-
-array-union@^1.0.1:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
-  dependencies:
-    array-uniq "^1.0.1"
-
-array-uniq@^1.0.0, array-uniq@^1.0.1, array-uniq@^1.0.2:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
-
-array-unique@^0.2.1:
-  version "0.2.1"
-  resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53"
-
-array-unique@^0.3.2:
-  version "0.3.2"
-  resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
-
-arrify@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
-
-asn1@~0.2.3:
-  version "0.2.4"
-  resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136"
-  dependencies:
-    safer-buffer "~2.1.0"
-
-assert-plus@1.0.0, assert-plus@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
-
-assign-symbols@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
-
-async-each-series@^1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/async-each-series/-/async-each-series-1.1.0.tgz#f42fd8155d38f21a5b8ea07c28e063ed1700b138"
-
-async-foreach@^0.1.3:
-  version "0.1.3"
-  resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542"
-
-async@~1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/async/-/async-1.0.0.tgz#f8fc04ca3a13784ade9e1641af98578cfbd647a9"
-
-asynckit@^0.4.0:
-  version "0.4.0"
-  resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
-
-atob@^2.1.1:
-  version "2.1.2"
-  resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
-
-autoprefixer@^6.0.0, autoprefixer@^6.3.1:
-  version "6.7.7"
-  resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014"
-  dependencies:
-    browserslist "^1.7.6"
-    caniuse-db "^1.0.30000634"
-    normalize-range "^0.1.2"
-    num2fraction "^1.2.2"
-    postcss "^5.2.16"
-    postcss-value-parser "^3.2.3"
-
-aws-sign2@~0.7.0:
-  version "0.7.0"
-  resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
-
-aws4@^1.6.0, aws4@^1.8.0:
-  version "1.8.0"
-  resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f"
-
-babel-code-frame@^6.26.0:
-  version "6.26.0"
-  resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
-  dependencies:
-    chalk "^1.1.3"
-    esutils "^2.0.2"
-    js-tokens "^3.0.2"
-
-babel-core@^6.23.1, babel-core@^6.26.0:
-  version "6.26.3"
-  resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207"
-  dependencies:
-    babel-code-frame "^6.26.0"
-    babel-generator "^6.26.0"
-    babel-helpers "^6.24.1"
-    babel-messages "^6.23.0"
-    babel-register "^6.26.0"
-    babel-runtime "^6.26.0"
-    babel-template "^6.26.0"
-    babel-traverse "^6.26.0"
-    babel-types "^6.26.0"
-    babylon "^6.18.0"
-    convert-source-map "^1.5.1"
-    debug "^2.6.9"
-    json5 "^0.5.1"
-    lodash "^4.17.4"
-    minimatch "^3.0.4"
-    path-is-absolute "^1.0.1"
-    private "^0.1.8"
-    slash "^1.0.0"
-    source-map "^0.5.7"
-
-babel-generator@^6.26.0:
-  version "6.26.1"
-  resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90"
-  dependencies:
-    babel-messages "^6.23.0"
-    babel-runtime "^6.26.0"
-    babel-types "^6.26.0"
-    detect-indent "^4.0.0"
-    jsesc "^1.3.0"
-    lodash "^4.17.4"
-    source-map "^0.5.7"
-    trim-right "^1.0.1"
-
-babel-helper-bindify-decorators@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz#14c19e5f142d7b47f19a52431e52b1ccbc40a330"
-  dependencies:
-    babel-runtime "^6.22.0"
-    babel-traverse "^6.24.1"
-    babel-types "^6.24.1"
-
-babel-helper-builder-binary-assignment-operator-visitor@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664"
-  dependencies:
-    babel-helper-explode-assignable-expression "^6.24.1"
-    babel-runtime "^6.22.0"
-    babel-types "^6.24.1"
-
-babel-helper-call-delegate@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d"
-  dependencies:
-    babel-helper-hoist-variables "^6.24.1"
-    babel-runtime "^6.22.0"
-    babel-traverse "^6.24.1"
-    babel-types "^6.24.1"
-
-babel-helper-define-map@^6.24.1:
-  version "6.26.0"
-  resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f"
-  dependencies:
-    babel-helper-function-name "^6.24.1"
-    babel-runtime "^6.26.0"
-    babel-types "^6.26.0"
-    lodash "^4.17.4"
-
-babel-helper-explode-assignable-expression@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa"
-  dependencies:
-    babel-runtime "^6.22.0"
-    babel-traverse "^6.24.1"
-    babel-types "^6.24.1"
-
-babel-helper-explode-class@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz#7dc2a3910dee007056e1e31d640ced3d54eaa9eb"
-  dependencies:
-    babel-helper-bindify-decorators "^6.24.1"
-    babel-runtime "^6.22.0"
-    babel-traverse "^6.24.1"
-    babel-types "^6.24.1"
-
-babel-helper-function-name@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9"
-  dependencies:
-    babel-helper-get-function-arity "^6.24.1"
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-    babel-traverse "^6.24.1"
-    babel-types "^6.24.1"
-
-babel-helper-get-function-arity@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d"
-  dependencies:
-    babel-runtime "^6.22.0"
-    babel-types "^6.24.1"
-
-babel-helper-hoist-variables@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76"
-  dependencies:
-    babel-runtime "^6.22.0"
-    babel-types "^6.24.1"
-
-babel-helper-optimise-call-expression@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257"
-  dependencies:
-    babel-runtime "^6.22.0"
-    babel-types "^6.24.1"
-
-babel-helper-regex@^6.24.1:
-  version "6.26.0"
-  resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72"
-  dependencies:
-    babel-runtime "^6.26.0"
-    babel-types "^6.26.0"
-    lodash "^4.17.4"
-
-babel-helper-remap-async-to-generator@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b"
-  dependencies:
-    babel-helper-function-name "^6.24.1"
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-    babel-traverse "^6.24.1"
-    babel-types "^6.24.1"
-
-babel-helper-replace-supers@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a"
-  dependencies:
-    babel-helper-optimise-call-expression "^6.24.1"
-    babel-messages "^6.23.0"
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-    babel-traverse "^6.24.1"
-    babel-types "^6.24.1"
-
-babel-helpers@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2"
-  dependencies:
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-
-babel-messages@^6.23.0:
-  version "6.23.0"
-  resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e"
-  dependencies:
-    babel-runtime "^6.22.0"
-
-babel-plugin-check-es2015-constants@^6.22.0:
-  version "6.22.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a"
-  dependencies:
-    babel-runtime "^6.22.0"
-
-babel-plugin-syntax-async-functions@^6.8.0:
-  version "6.13.0"
-  resolved "http://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95"
-
-babel-plugin-syntax-async-generators@^6.5.0:
-  version "6.13.0"
-  resolved "http://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz#6bc963ebb16eccbae6b92b596eb7f35c342a8b9a"
-
-babel-plugin-syntax-class-properties@^6.8.0:
-  version "6.13.0"
-  resolved "http://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de"
-
-babel-plugin-syntax-decorators@^6.13.0:
-  version "6.13.0"
-  resolved "http://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz#312563b4dbde3cc806cee3e416cceeaddd11ac0b"
-
-babel-plugin-syntax-dynamic-import@^6.18.0:
-  version "6.18.0"
-  resolved "http://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da"
-
-babel-plugin-syntax-exponentiation-operator@^6.8.0:
-  version "6.13.0"
-  resolved "http://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de"
-
-babel-plugin-syntax-object-rest-spread@^6.8.0:
-  version "6.13.0"
-  resolved "http://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5"
-
-babel-plugin-syntax-trailing-function-commas@^6.22.0:
-  version "6.22.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3"
-
-babel-plugin-transform-async-generator-functions@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz#f058900145fd3e9907a6ddf28da59f215258a5db"
-  dependencies:
-    babel-helper-remap-async-to-generator "^6.24.1"
-    babel-plugin-syntax-async-generators "^6.5.0"
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-async-to-generator@^6.22.0, babel-plugin-transform-async-to-generator@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761"
-  dependencies:
-    babel-helper-remap-async-to-generator "^6.24.1"
-    babel-plugin-syntax-async-functions "^6.8.0"
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-class-properties@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac"
-  dependencies:
-    babel-helper-function-name "^6.24.1"
-    babel-plugin-syntax-class-properties "^6.8.0"
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-
-babel-plugin-transform-decorators@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz#788013d8f8c6b5222bdf7b344390dfd77569e24d"
-  dependencies:
-    babel-helper-explode-class "^6.24.1"
-    babel-plugin-syntax-decorators "^6.13.0"
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-    babel-types "^6.24.1"
-
-babel-plugin-transform-es2015-arrow-functions@^6.22.0:
-  version "6.22.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221"
-  dependencies:
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-es2015-block-scoped-functions@^6.22.0:
-  version "6.22.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141"
-  dependencies:
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-es2015-block-scoping@^6.23.0, babel-plugin-transform-es2015-block-scoping@^6.24.1:
-  version "6.26.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f"
-  dependencies:
-    babel-runtime "^6.26.0"
-    babel-template "^6.26.0"
-    babel-traverse "^6.26.0"
-    babel-types "^6.26.0"
-    lodash "^4.17.4"
-
-babel-plugin-transform-es2015-classes@^6.23.0, babel-plugin-transform-es2015-classes@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db"
-  dependencies:
-    babel-helper-define-map "^6.24.1"
-    babel-helper-function-name "^6.24.1"
-    babel-helper-optimise-call-expression "^6.24.1"
-    babel-helper-replace-supers "^6.24.1"
-    babel-messages "^6.23.0"
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-    babel-traverse "^6.24.1"
-    babel-types "^6.24.1"
-
-babel-plugin-transform-es2015-computed-properties@^6.22.0, babel-plugin-transform-es2015-computed-properties@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3"
-  dependencies:
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-
-babel-plugin-transform-es2015-destructuring@^6.22.0, babel-plugin-transform-es2015-destructuring@^6.23.0:
-  version "6.23.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d"
-  dependencies:
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-es2015-duplicate-keys@^6.22.0, babel-plugin-transform-es2015-duplicate-keys@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e"
-  dependencies:
-    babel-runtime "^6.22.0"
-    babel-types "^6.24.1"
-
-babel-plugin-transform-es2015-for-of@^6.22.0, babel-plugin-transform-es2015-for-of@^6.23.0:
-  version "6.23.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691"
-  dependencies:
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-es2015-function-name@^6.22.0, babel-plugin-transform-es2015-function-name@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b"
-  dependencies:
-    babel-helper-function-name "^6.24.1"
-    babel-runtime "^6.22.0"
-    babel-types "^6.24.1"
-
-babel-plugin-transform-es2015-literals@^6.22.0:
-  version "6.22.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e"
-  dependencies:
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154"
-  dependencies:
-    babel-plugin-transform-es2015-modules-commonjs "^6.24.1"
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-
-babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1:
-  version "6.26.2"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz#58a793863a9e7ca870bdc5a881117ffac27db6f3"
-  dependencies:
-    babel-plugin-transform-strict-mode "^6.24.1"
-    babel-runtime "^6.26.0"
-    babel-template "^6.26.0"
-    babel-types "^6.26.0"
-
-babel-plugin-transform-es2015-modules-systemjs@^6.23.0, babel-plugin-transform-es2015-modules-systemjs@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23"
-  dependencies:
-    babel-helper-hoist-variables "^6.24.1"
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-
-babel-plugin-transform-es2015-modules-umd@^6.23.0, babel-plugin-transform-es2015-modules-umd@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468"
-  dependencies:
-    babel-plugin-transform-es2015-modules-amd "^6.24.1"
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-
-babel-plugin-transform-es2015-object-super@^6.22.0, babel-plugin-transform-es2015-object-super@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d"
-  dependencies:
-    babel-helper-replace-supers "^6.24.1"
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-es2015-parameters@^6.23.0, babel-plugin-transform-es2015-parameters@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b"
-  dependencies:
-    babel-helper-call-delegate "^6.24.1"
-    babel-helper-get-function-arity "^6.24.1"
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-    babel-traverse "^6.24.1"
-    babel-types "^6.24.1"
-
-babel-plugin-transform-es2015-shorthand-properties@^6.22.0, babel-plugin-transform-es2015-shorthand-properties@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0"
-  dependencies:
-    babel-runtime "^6.22.0"
-    babel-types "^6.24.1"
-
-babel-plugin-transform-es2015-spread@^6.22.0:
-  version "6.22.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1"
-  dependencies:
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-es2015-sticky-regex@^6.22.0, babel-plugin-transform-es2015-sticky-regex@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc"
-  dependencies:
-    babel-helper-regex "^6.24.1"
-    babel-runtime "^6.22.0"
-    babel-types "^6.24.1"
-
-babel-plugin-transform-es2015-template-literals@^6.22.0:
-  version "6.22.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d"
-  dependencies:
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-es2015-typeof-symbol@^6.22.0, babel-plugin-transform-es2015-typeof-symbol@^6.23.0:
-  version "6.23.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372"
-  dependencies:
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-es2015-unicode-regex@^6.22.0, babel-plugin-transform-es2015-unicode-regex@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9"
-  dependencies:
-    babel-helper-regex "^6.24.1"
-    babel-runtime "^6.22.0"
-    regexpu-core "^2.0.0"
-
-babel-plugin-transform-exponentiation-operator@^6.22.0, babel-plugin-transform-exponentiation-operator@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e"
-  dependencies:
-    babel-helper-builder-binary-assignment-operator-visitor "^6.24.1"
-    babel-plugin-syntax-exponentiation-operator "^6.8.0"
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-object-rest-spread@^6.22.0:
-  version "6.26.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06"
-  dependencies:
-    babel-plugin-syntax-object-rest-spread "^6.8.0"
-    babel-runtime "^6.26.0"
-
-babel-plugin-transform-regenerator@^6.22.0, babel-plugin-transform-regenerator@^6.24.1:
-  version "6.26.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f"
-  dependencies:
-    regenerator-transform "^0.10.0"
-
-babel-plugin-transform-strict-mode@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758"
-  dependencies:
-    babel-runtime "^6.22.0"
-    babel-types "^6.24.1"
-
-babel-preset-env@^1.4.0:
-  version "1.7.0"
-  resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.7.0.tgz#dea79fa4ebeb883cd35dab07e260c1c9c04df77a"
-  dependencies:
-    babel-plugin-check-es2015-constants "^6.22.0"
-    babel-plugin-syntax-trailing-function-commas "^6.22.0"
-    babel-plugin-transform-async-to-generator "^6.22.0"
-    babel-plugin-transform-es2015-arrow-functions "^6.22.0"
-    babel-plugin-transform-es2015-block-scoped-functions "^6.22.0"
-    babel-plugin-transform-es2015-block-scoping "^6.23.0"
-    babel-plugin-transform-es2015-classes "^6.23.0"
-    babel-plugin-transform-es2015-computed-properties "^6.22.0"
-    babel-plugin-transform-es2015-destructuring "^6.23.0"
-    babel-plugin-transform-es2015-duplicate-keys "^6.22.0"
-    babel-plugin-transform-es2015-for-of "^6.23.0"
-    babel-plugin-transform-es2015-function-name "^6.22.0"
-    babel-plugin-transform-es2015-literals "^6.22.0"
-    babel-plugin-transform-es2015-modules-amd "^6.22.0"
-    babel-plugin-transform-es2015-modules-commonjs "^6.23.0"
-    babel-plugin-transform-es2015-modules-systemjs "^6.23.0"
-    babel-plugin-transform-es2015-modules-umd "^6.23.0"
-    babel-plugin-transform-es2015-object-super "^6.22.0"
-    babel-plugin-transform-es2015-parameters "^6.23.0"
-    babel-plugin-transform-es2015-shorthand-properties "^6.22.0"
-    babel-plugin-transform-es2015-spread "^6.22.0"
-    babel-plugin-transform-es2015-sticky-regex "^6.22.0"
-    babel-plugin-transform-es2015-template-literals "^6.22.0"
-    babel-plugin-transform-es2015-typeof-symbol "^6.23.0"
-    babel-plugin-transform-es2015-unicode-regex "^6.22.0"
-    babel-plugin-transform-exponentiation-operator "^6.22.0"
-    babel-plugin-transform-regenerator "^6.22.0"
-    browserslist "^3.2.6"
-    invariant "^2.2.2"
-    semver "^5.3.0"
-
-babel-preset-es2015@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939"
-  dependencies:
-    babel-plugin-check-es2015-constants "^6.22.0"
-    babel-plugin-transform-es2015-arrow-functions "^6.22.0"
-    babel-plugin-transform-es2015-block-scoped-functions "^6.22.0"
-    babel-plugin-transform-es2015-block-scoping "^6.24.1"
-    babel-plugin-transform-es2015-classes "^6.24.1"
-    babel-plugin-transform-es2015-computed-properties "^6.24.1"
-    babel-plugin-transform-es2015-destructuring "^6.22.0"
-    babel-plugin-transform-es2015-duplicate-keys "^6.24.1"
-    babel-plugin-transform-es2015-for-of "^6.22.0"
-    babel-plugin-transform-es2015-function-name "^6.24.1"
-    babel-plugin-transform-es2015-literals "^6.22.0"
-    babel-plugin-transform-es2015-modules-amd "^6.24.1"
-    babel-plugin-transform-es2015-modules-commonjs "^6.24.1"
-    babel-plugin-transform-es2015-modules-systemjs "^6.24.1"
-    babel-plugin-transform-es2015-modules-umd "^6.24.1"
-    babel-plugin-transform-es2015-object-super "^6.24.1"
-    babel-plugin-transform-es2015-parameters "^6.24.1"
-    babel-plugin-transform-es2015-shorthand-properties "^6.24.1"
-    babel-plugin-transform-es2015-spread "^6.22.0"
-    babel-plugin-transform-es2015-sticky-regex "^6.24.1"
-    babel-plugin-transform-es2015-template-literals "^6.22.0"
-    babel-plugin-transform-es2015-typeof-symbol "^6.22.0"
-    babel-plugin-transform-es2015-unicode-regex "^6.24.1"
-    babel-plugin-transform-regenerator "^6.24.1"
-
-babel-preset-stage-2@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz#d9e2960fb3d71187f0e64eec62bc07767219bdc1"
-  dependencies:
-    babel-plugin-syntax-dynamic-import "^6.18.0"
-    babel-plugin-transform-class-properties "^6.24.1"
-    babel-plugin-transform-decorators "^6.24.1"
-    babel-preset-stage-3 "^6.24.1"
-
-babel-preset-stage-3@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz#836ada0a9e7a7fa37cb138fb9326f87934a48395"
-  dependencies:
-    babel-plugin-syntax-trailing-function-commas "^6.22.0"
-    babel-plugin-transform-async-generator-functions "^6.24.1"
-    babel-plugin-transform-async-to-generator "^6.24.1"
-    babel-plugin-transform-exponentiation-operator "^6.24.1"
-    babel-plugin-transform-object-rest-spread "^6.22.0"
-
-babel-register@^6.26.0:
-  version "6.26.0"
-  resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071"
-  dependencies:
-    babel-core "^6.26.0"
-    babel-runtime "^6.26.0"
-    core-js "^2.5.0"
-    home-or-tmp "^2.0.0"
-    lodash "^4.17.4"
-    mkdirp "^0.5.1"
-    source-map-support "^0.4.15"
-
-babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0:
-  version "6.26.0"
-  resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
-  dependencies:
-    core-js "^2.4.0"
-    regenerator-runtime "^0.11.0"
-
-babel-template@^6.24.1, babel-template@^6.26.0:
-  version "6.26.0"
-  resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02"
-  dependencies:
-    babel-runtime "^6.26.0"
-    babel-traverse "^6.26.0"
-    babel-types "^6.26.0"
-    babylon "^6.18.0"
-    lodash "^4.17.4"
-
-babel-traverse@^6.24.1, babel-traverse@^6.26.0:
-  version "6.26.0"
-  resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee"
-  dependencies:
-    babel-code-frame "^6.26.0"
-    babel-messages "^6.23.0"
-    babel-runtime "^6.26.0"
-    babel-types "^6.26.0"
-    babylon "^6.18.0"
-    debug "^2.6.8"
-    globals "^9.18.0"
-    invariant "^2.2.2"
-    lodash "^4.17.4"
-
-babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0:
-  version "6.26.0"
-  resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497"
-  dependencies:
-    babel-runtime "^6.26.0"
-    esutils "^2.0.2"
-    lodash "^4.17.4"
-    to-fast-properties "^1.0.3"
-
-babylon@^6.18.0:
-  version "6.18.0"
-  resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3"
-
-balanced-match@^0.4.2:
-  version "0.4.2"
-  resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
-
-balanced-match@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
-
-base@^0.11.1:
-  version "0.11.2"
-  resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f"
-  dependencies:
-    cache-base "^1.0.1"
-    class-utils "^0.3.5"
-    component-emitter "^1.2.1"
-    define-property "^1.0.0"
-    isobject "^3.0.1"
-    mixin-deep "^1.2.0"
-    pascalcase "^0.1.1"
-
-bcrypt-pbkdf@^1.0.0:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e"
-  dependencies:
-    tweetnacl "^0.14.3"
-
-beeper@^1.0.0:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809"
-
-bin-build@^2.0.0:
-  version "2.2.0"
-  resolved "https://registry.yarnpkg.com/bin-build/-/bin-build-2.2.0.tgz#11f8dd61f70ffcfa2bdcaa5b46f5e8fedd4221cc"
-  dependencies:
-    archive-type "^3.0.1"
-    decompress "^3.0.0"
-    download "^4.1.2"
-    exec-series "^1.0.0"
-    rimraf "^2.2.6"
-    tempfile "^1.0.0"
-    url-regex "^3.0.0"
-
-bin-check@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/bin-check/-/bin-check-2.0.0.tgz#86f8e6f4253893df60dc316957f5af02acb05930"
-  dependencies:
-    executable "^1.0.0"
-
-bin-version-check@^2.1.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/bin-version-check/-/bin-version-check-2.1.0.tgz#e4e5df290b9069f7d111324031efc13fdd11a5b0"
-  dependencies:
-    bin-version "^1.0.0"
-    minimist "^1.1.0"
-    semver "^4.0.3"
-    semver-truncate "^1.0.0"
-
-bin-version@^1.0.0:
-  version "1.0.4"
-  resolved "https://registry.yarnpkg.com/bin-version/-/bin-version-1.0.4.tgz#9eb498ee6fd76f7ab9a7c160436f89579435d78e"
-  dependencies:
-    find-versions "^1.0.0"
-
-bin-wrapper@^3.0.0:
-  version "3.0.2"
-  resolved "https://registry.yarnpkg.com/bin-wrapper/-/bin-wrapper-3.0.2.tgz#67d3306262e4b1a5f2f88ee23464f6a655677aeb"
-  dependencies:
-    bin-check "^2.0.0"
-    bin-version-check "^2.1.0"
-    download "^4.0.0"
-    each-async "^1.1.1"
-    lazy-req "^1.0.0"
-    os-filter-obj "^1.0.0"
-
-bl@^1.0.0:
-  version "1.2.2"
-  resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.2.tgz#a160911717103c07410cef63ef51b397c025af9c"
-  dependencies:
-    readable-stream "^2.3.5"
-    safe-buffer "^5.1.1"
-
-block-stream@*:
-  version "0.0.9"
-  resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a"
-  dependencies:
-    inherits "~2.0.0"
-
-bluebird@^3.0.5:
-  version "3.5.2"
-  resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.2.tgz#1be0908e054a751754549c270489c1505d4ab15a"
-
-body-parser@~1.14.0:
-  version "1.14.2"
-  resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.14.2.tgz#1015cb1fe2c443858259581db53332f8d0cf50f9"
-  dependencies:
-    bytes "2.2.0"
-    content-type "~1.0.1"
-    debug "~2.2.0"
-    depd "~1.1.0"
-    http-errors "~1.3.1"
-    iconv-lite "0.4.13"
-    on-finished "~2.3.0"
-    qs "5.2.0"
-    raw-body "~2.1.5"
-    type-is "~1.6.10"
-
-brace-expansion@^1.0.0, brace-expansion@^1.1.7:
-  version "1.1.11"
-  resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
-  dependencies:
-    balanced-match "^1.0.0"
-    concat-map "0.0.1"
-
-braces@^1.8.2:
-  version "1.8.5"
-  resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7"
-  dependencies:
-    expand-range "^1.8.1"
-    preserve "^0.2.0"
-    repeat-element "^1.1.2"
-
-braces@^2.3.1:
-  version "2.3.2"
-  resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729"
-  dependencies:
-    arr-flatten "^1.1.0"
-    array-unique "^0.3.2"
-    extend-shallow "^2.0.1"
-    fill-range "^4.0.0"
-    isobject "^3.0.1"
-    repeat-element "^1.1.2"
-    snapdragon "^0.8.1"
-    snapdragon-node "^2.0.1"
-    split-string "^3.0.2"
-    to-regex "^3.0.1"
-
-browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6:
-  version "1.7.7"
-  resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9"
-  dependencies:
-    caniuse-db "^1.0.30000639"
-    electron-to-chromium "^1.2.7"
-
-browserslist@^3.2.6:
-  version "3.2.8"
-  resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.8.tgz#b0005361d6471f0f5952797a76fc985f1f978fc6"
-  dependencies:
-    caniuse-lite "^1.0.30000844"
-    electron-to-chromium "^1.3.47"
-
-buffer-alloc-unsafe@^1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0"
-
-buffer-alloc@^1.2.0:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec"
-  dependencies:
-    buffer-alloc-unsafe "^1.1.0"
-    buffer-fill "^1.0.0"
-
-buffer-crc32@~0.2.3:
-  version "0.2.13"
-  resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
-
-buffer-fill@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c"
-
-buffer-from@^1.0.0:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
-
-buffer-to-vinyl@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/buffer-to-vinyl/-/buffer-to-vinyl-1.1.0.tgz#00f15faee3ab7a1dda2cde6d9121bffdd07b2262"
-  dependencies:
-    file-type "^3.1.0"
-    readable-stream "^2.0.2"
-    uuid "^2.0.1"
-    vinyl "^1.0.0"
-
-builtin-modules@^1.0.0:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
-
-bytes@2.2.0:
-  version "2.2.0"
-  resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.2.0.tgz#fd35464a403f6f9117c2de3609ecff9cae000588"
-
-bytes@2.4.0:
-  version "2.4.0"
-  resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.4.0.tgz#7d97196f9d5baf7f6935e25985549edd2a6c2339"
-
-cache-base@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
-  dependencies:
-    collection-visit "^1.0.0"
-    component-emitter "^1.2.1"
-    get-value "^2.0.6"
-    has-value "^1.0.0"
-    isobject "^3.0.1"
-    set-value "^2.0.0"
-    to-object-path "^0.3.0"
-    union-value "^1.0.0"
-    unset-value "^1.0.0"
-
-cache-swap@^0.3.0:
-  version "0.3.0"
-  resolved "https://registry.yarnpkg.com/cache-swap/-/cache-swap-0.3.0.tgz#1c541aa108a50106f630bdd98fe1dec8ba133f51"
-  dependencies:
-    graceful-fs "^4.1.2"
-    mkdirp "^0.5.1"
-    object-assign "^4.0.1"
-    rimraf "^2.4.0"
-
-camelcase-keys@^2.0.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7"
-  dependencies:
-    camelcase "^2.0.0"
-    map-obj "^1.0.0"
-
-camelcase@^1.0.2:
-  version "1.2.1"
-  resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
-
-camelcase@^2.0.0:
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f"
-
-camelcase@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a"
-
-caniuse-api@^1.5.2:
-  version "1.6.1"
-  resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c"
-  dependencies:
-    browserslist "^1.3.6"
-    caniuse-db "^1.0.30000529"
-    lodash.memoize "^4.1.2"
-    lodash.uniq "^4.5.0"
-
-caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639:
-  version "1.0.30000887"
-  resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000887.tgz#9abf538610e3349870ed525f7062de649cc3c570"
-
-caniuse-lite@^1.0.30000844:
-  version "1.0.30000887"
-  resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000887.tgz#1769458c27bbdcf61b0cb6b5072bb6cd11fd9c23"
-
-capture-stack-trace@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz#a6c0bbe1f38f3aa0b92238ecb6ff42c344d4135d"
-
-caseless@~0.12.0:
-  version "0.12.0"
-  resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
-
-caw@^1.0.1:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/caw/-/caw-1.2.0.tgz#ffb226fe7efc547288dc62ee3e97073c212d1034"
-  dependencies:
-    get-proxy "^1.0.1"
-    is-obj "^1.0.0"
-    object-assign "^3.0.0"
-    tunnel-agent "^0.4.0"
-
-center-align@^0.1.1:
-  version "0.1.3"
-  resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad"
-  dependencies:
-    align-text "^0.1.3"
-    lazy-cache "^1.0.3"
-
-chalk@^0.5.0, chalk@^0.5.1:
-  version "0.5.1"
-  resolved "http://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz#663b3a648b68b55d04690d49167aa837858f2174"
-  dependencies:
-    ansi-styles "^1.1.0"
-    escape-string-regexp "^1.0.0"
-    has-ansi "^0.1.0"
-    strip-ansi "^0.3.0"
-    supports-color "^0.2.0"
-
-chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3:
-  version "1.1.3"
-  resolved "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
-  dependencies:
-    ansi-styles "^2.2.1"
-    escape-string-regexp "^1.0.2"
-    has-ansi "^2.0.0"
-    strip-ansi "^3.0.0"
-    supports-color "^2.0.0"
-
-chalk@^2.1.0:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e"
-  dependencies:
-    ansi-styles "^3.2.1"
-    escape-string-regexp "^1.0.5"
-    supports-color "^5.3.0"
-
-clap@^1.0.9:
-  version "1.2.3"
-  resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.3.tgz#4f36745b32008492557f46412d66d50cb99bce51"
-  dependencies:
-    chalk "^1.1.3"
-
-class-utils@^0.3.5:
-  version "0.3.6"
-  resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
-  dependencies:
-    arr-union "^3.1.0"
-    define-property "^0.2.5"
-    isobject "^3.0.0"
-    static-extend "^0.1.1"
-
-cli@~1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/cli/-/cli-1.0.1.tgz#22817534f24bfa4950c34d532d48ecbc621b8c14"
-  dependencies:
-    exit "0.1.2"
-    glob "^7.1.1"
-
-cliui@^2.1.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
-  dependencies:
-    center-align "^0.1.1"
-    right-align "^0.1.1"
-    wordwrap "0.0.2"
-
-cliui@^3.2.0:
-  version "3.2.0"
-  resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d"
-  dependencies:
-    string-width "^1.0.1"
-    strip-ansi "^3.0.1"
-    wrap-ansi "^2.0.0"
-
-clone-buffer@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58"
-
-clone-stats@^0.0.1, clone-stats@~0.0.1:
-  version "0.0.1"
-  resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1"
-
-clone-stats@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680"
-
-clone@^0.2.0:
-  version "0.2.0"
-  resolved "https://registry.yarnpkg.com/clone/-/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f"
-
-clone@^1.0.0, clone@^1.0.2:
-  version "1.0.4"
-  resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e"
-
-clone@^2.1.1:
-  version "2.1.2"
-  resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f"
-
-cloneable-readable@^1.0.0:
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.1.2.tgz#d591dee4a8f8bc15da43ce97dceeba13d43e2a65"
-  dependencies:
-    inherits "^2.0.1"
-    process-nextick-args "^2.0.0"
-    readable-stream "^2.3.5"
-
-co@3.1.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/co/-/co-3.1.0.tgz#4ea54ea5a08938153185e15210c68d9092bc1b78"
-
-co@^4.6.0:
-  version "4.6.0"
-  resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
-
-coa@~1.0.1:
-  version "1.0.4"
-  resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.4.tgz#a9ef153660d6a86a8bdec0289a5c684d217432fd"
-  dependencies:
-    q "^1.1.2"
-
-code-point-at@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
-
-collection-visit@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0"
-  dependencies:
-    map-visit "^1.0.0"
-    object-visit "^1.0.0"
-
-color-convert@^1.3.0, color-convert@^1.9.0:
-  version "1.9.3"
-  resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
-  dependencies:
-    color-name "1.1.3"
-
-color-name@1.1.3:
-  version "1.1.3"
-  resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
-
-color-name@^1.0.0:
-  version "1.1.4"
-  resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
-
-color-string@^0.3.0:
-  version "0.3.0"
-  resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991"
-  dependencies:
-    color-name "^1.0.0"
-
-color-support@^1.1.3:
-  version "1.1.3"
-  resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2"
-
-color@^0.11.0:
-  version "0.11.4"
-  resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764"
-  dependencies:
-    clone "^1.0.2"
-    color-convert "^1.3.0"
-    color-string "^0.3.0"
-
-colormin@^1.0.5:
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/colormin/-/colormin-1.1.2.tgz#ea2f7420a72b96881a38aae59ec124a6f7298133"
-  dependencies:
-    color "^0.11.0"
-    css-color-names "0.0.4"
-    has "^1.0.1"
-
-colors@1.0.x:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b"
-
-colors@~1.1.2:
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63"
-
-combined-stream@1.0.6:
-  version "1.0.6"
-  resolved "http://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818"
-  dependencies:
-    delayed-stream "~1.0.0"
-
-combined-stream@~1.0.5, combined-stream@~1.0.6:
-  version "1.0.7"
-  resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828"
-  dependencies:
-    delayed-stream "~1.0.0"
-
-commander@~2.8.1:
-  version "2.8.1"
-  resolved "http://registry.npmjs.org/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4"
-  dependencies:
-    graceful-readlink ">= 1.0.0"
-
-component-emitter@^1.2.1:
-  version "1.2.1"
-  resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6"
-
-concat-map@0.0.1:
-  version "0.0.1"
-  resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
-
-concat-stream@1.6.2, concat-stream@^1.4.6, concat-stream@^1.4.7:
-  version "1.6.2"
-  resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34"
-  dependencies:
-    buffer-from "^1.0.0"
-    inherits "^2.0.3"
-    readable-stream "^2.2.2"
-    typedarray "^0.0.6"
-
-concat-with-sourcemaps@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e"
-  dependencies:
-    source-map "^0.6.1"
-
-console-browserify@1.1.x:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10"
-  dependencies:
-    date-now "^0.1.4"
-
-console-control-strings@^1.0.0, console-control-strings@~1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
-
-console-stream@^0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/console-stream/-/console-stream-0.1.1.tgz#a095fe07b20465955f2fafd28b5d72bccd949d44"
-
-content-type@~1.0.1:
-  version "1.0.4"
-  resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
-
-convert-source-map@1.X, convert-source-map@^1.1.1, convert-source-map@^1.5.1:
-  version "1.6.0"
-  resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20"
-  dependencies:
-    safe-buffer "~5.1.1"
-
-copy-descriptor@^0.1.0:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
-
-core-js@^2.4.0, core-js@^2.5.0:
-  version "2.5.7"
-  resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e"
-
-core-util-is@1.0.2, core-util-is@~1.0.0:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
-
-create-error-class@^3.0.1:
-  version "3.0.2"
-  resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6"
-  dependencies:
-    capture-stack-trace "^1.0.0"
-
-cross-spawn@^3.0.0:
-  version "3.0.1"
-  resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982"
-  dependencies:
-    lru-cache "^4.0.1"
-    which "^1.2.9"
-
-cross-spawn@^5.0.1:
-  version "5.1.0"
-  resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
-  dependencies:
-    lru-cache "^4.0.1"
-    shebang-command "^1.2.0"
-    which "^1.2.9"
-
-css-color-names@0.0.4:
-  version "0.0.4"
-  resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0"
-
-css@2.X, css@^2.2.1:
-  version "2.2.4"
-  resolved "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929"
-  dependencies:
-    inherits "^2.0.3"
-    source-map "^0.6.1"
-    source-map-resolve "^0.5.2"
-    urix "^0.1.0"
-
-cssnano@^3.0.0:
-  version "3.10.0"
-  resolved "http://registry.npmjs.org/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38"
-  dependencies:
-    autoprefixer "^6.3.1"
-    decamelize "^1.1.2"
-    defined "^1.0.0"
-    has "^1.0.1"
-    object-assign "^4.0.1"
-    postcss "^5.0.14"
-    postcss-calc "^5.2.0"
-    postcss-colormin "^2.1.8"
-    postcss-convert-values "^2.3.4"
-    postcss-discard-comments "^2.0.4"
-    postcss-discard-duplicates "^2.0.1"
-    postcss-discard-empty "^2.0.1"
-    postcss-discard-overridden "^0.1.1"
-    postcss-discard-unused "^2.2.1"
-    postcss-filter-plugins "^2.0.0"
-    postcss-merge-idents "^2.1.5"
-    postcss-merge-longhand "^2.0.1"
-    postcss-merge-rules "^2.0.3"
-    postcss-minify-font-values "^1.0.2"
-    postcss-minify-gradients "^1.0.1"
-    postcss-minify-params "^1.0.4"
-    postcss-minify-selectors "^2.0.4"
-    postcss-normalize-charset "^1.1.0"
-    postcss-normalize-url "^3.0.7"
-    postcss-ordered-values "^2.1.0"
-    postcss-reduce-idents "^2.2.2"
-    postcss-reduce-initial "^1.0.0"
-    postcss-reduce-transforms "^1.0.3"
-    postcss-svgo "^2.1.1"
-    postcss-unique-selectors "^2.0.2"
-    postcss-value-parser "^3.2.3"
-    postcss-zindex "^2.0.1"
-
-csso@~2.3.1:
-  version "2.3.2"
-  resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85"
-  dependencies:
-    clap "^1.0.9"
-    source-map "^0.5.3"
-
-currently-unhandled@^0.4.1:
-  version "0.4.1"
-  resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea"
-  dependencies:
-    array-find-index "^1.0.1"
-
-cycle@1.0.x:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2"
-
-d@1:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f"
-  dependencies:
-    es5-ext "^0.10.9"
-
-dashdash@^1.12.0:
-  version "1.14.1"
-  resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
-  dependencies:
-    assert-plus "^1.0.0"
-
-date-now@^0.1.4:
-  version "0.1.4"
-  resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b"
-
-dateformat@^1.0.7-1.2.3:
-  version "1.0.12"
-  resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9"
-  dependencies:
-    get-stdin "^4.0.1"
-    meow "^3.3.0"
-
-dateformat@^2.0.0:
-  version "2.2.0"
-  resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.2.0.tgz#4065e2013cf9fb916ddfd82efb506ad4c6769062"
-
-debug-fabulous@1.X:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/debug-fabulous/-/debug-fabulous-1.1.0.tgz#af8a08632465224ef4174a9f06308c3c2a1ebc8e"
-  dependencies:
-    debug "3.X"
-    memoizee "0.4.X"
-    object-assign "4.X"
-
-debug@2.6.9, debug@^2.1.0, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9:
-  version "2.6.9"
-  resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
-  dependencies:
-    ms "2.0.0"
-
-debug@3.X:
-  version "3.2.5"
-  resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.5.tgz#c2418fbfd7a29f4d4f70ff4cea604d4b64c46407"
-  dependencies:
-    ms "^2.1.1"
-
-debug@~2.2.0:
-  version "2.2.0"
-  resolved "http://registry.npmjs.org/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da"
-  dependencies:
-    ms "0.7.1"
-
-decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
-
-decode-uri-component@^0.2.0:
-  version "0.2.0"
-  resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
-
-decompress-tar@^3.0.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/decompress-tar/-/decompress-tar-3.1.0.tgz#217c789f9b94450efaadc5c5e537978fc333c466"
-  dependencies:
-    is-tar "^1.0.0"
-    object-assign "^2.0.0"
-    strip-dirs "^1.0.0"
-    tar-stream "^1.1.1"
-    through2 "^0.6.1"
-    vinyl "^0.4.3"
-
-decompress-tarbz2@^3.0.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/decompress-tarbz2/-/decompress-tarbz2-3.1.0.tgz#8b23935681355f9f189d87256a0f8bdd96d9666d"
-  dependencies:
-    is-bzip2 "^1.0.0"
-    object-assign "^2.0.0"
-    seek-bzip "^1.0.3"
-    strip-dirs "^1.0.0"
-    tar-stream "^1.1.1"
-    through2 "^0.6.1"
-    vinyl "^0.4.3"
-
-decompress-targz@^3.0.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/decompress-targz/-/decompress-targz-3.1.0.tgz#b2c13df98166268991b715d6447f642e9696f5a0"
-  dependencies:
-    is-gzip "^1.0.0"
-    object-assign "^2.0.0"
-    strip-dirs "^1.0.0"
-    tar-stream "^1.1.1"
-    through2 "^0.6.1"
-    vinyl "^0.4.3"
-
-decompress-unzip@^3.0.0:
-  version "3.4.0"
-  resolved "https://registry.yarnpkg.com/decompress-unzip/-/decompress-unzip-3.4.0.tgz#61475b4152066bbe3fee12f9d629d15fe6478eeb"
-  dependencies:
-    is-zip "^1.0.0"
-    read-all-stream "^3.0.0"
-    stat-mode "^0.2.0"
-    strip-dirs "^1.0.0"
-    through2 "^2.0.0"
-    vinyl "^1.0.0"
-    yauzl "^2.2.1"
-
-decompress@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/decompress/-/decompress-3.0.0.tgz#af1dd50d06e3bfc432461d37de11b38c0d991bed"
-  dependencies:
-    buffer-to-vinyl "^1.0.0"
-    concat-stream "^1.4.6"
-    decompress-tar "^3.0.0"
-    decompress-tarbz2 "^3.0.0"
-    decompress-targz "^3.0.0"
-    decompress-unzip "^3.0.0"
-    stream-combiner2 "^1.1.1"
-    vinyl-assign "^1.0.1"
-    vinyl-fs "^2.2.0"
-
-deep-extend@^0.6.0:
-  version "0.6.0"
-  resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
-
-defaults@^1.0.0:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d"
-  dependencies:
-    clone "^1.0.2"
-
-define-property@^0.2.5:
-  version "0.2.5"
-  resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116"
-  dependencies:
-    is-descriptor "^0.1.0"
-
-define-property@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6"
-  dependencies:
-    is-descriptor "^1.0.0"
-
-define-property@^2.0.2:
-  version "2.0.2"
-  resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d"
-  dependencies:
-    is-descriptor "^1.0.2"
-    isobject "^3.0.1"
-
-defined@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693"
-
-del@^2.2.2:
-  version "2.2.2"
-  resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8"
-  dependencies:
-    globby "^5.0.0"
-    is-path-cwd "^1.0.0"
-    is-path-in-cwd "^1.0.0"
-    object-assign "^4.0.1"
-    pify "^2.0.0"
-    pinkie-promise "^2.0.0"
-    rimraf "^2.2.8"
-
-delayed-stream@~1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
-
-delegates@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
-
-depd@~1.1.0:
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
-
-deprecated@^0.0.1:
-  version "0.0.1"
-  resolved "https://registry.yarnpkg.com/deprecated/-/deprecated-0.0.1.tgz#f9c9af5464afa1e7a971458a8bdef2aa94d5bb19"
-
-detect-file@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7"
-
-detect-indent@^4.0.0:
-  version "4.0.0"
-  resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208"
-  dependencies:
-    repeating "^2.0.0"
-
-detect-newline@2.X:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2"
-
-dom-serializer@0:
-  version "0.1.0"
-  resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82"
-  dependencies:
-    domelementtype "~1.1.1"
-    entities "~1.1.1"
-
-domelementtype@1:
-  version "1.3.0"
-  resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2"
-
-domelementtype@~1.1.1:
-  version "1.1.3"
-  resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b"
-
-domhandler@2.3:
-  version "2.3.0"
-  resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.3.0.tgz#2de59a0822d5027fabff6f032c2b25a2a8abe738"
-  dependencies:
-    domelementtype "1"
-
-domutils@1.5:
-  version "1.5.1"
-  resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf"
-  dependencies:
-    dom-serializer "0"
-    domelementtype "1"
-
-download@^4.0.0, download@^4.1.2:
-  version "4.4.3"
-  resolved "https://registry.yarnpkg.com/download/-/download-4.4.3.tgz#aa55fdad392d95d4b68e8c2be03e0c2aa21ba9ac"
-  dependencies:
-    caw "^1.0.1"
-    concat-stream "^1.4.7"
-    each-async "^1.0.0"
-    filenamify "^1.0.1"
-    got "^5.0.0"
-    gulp-decompress "^1.2.0"
-    gulp-rename "^1.2.0"
-    is-url "^1.2.0"
-    object-assign "^4.0.1"
-    read-all-stream "^3.0.0"
-    readable-stream "^2.0.2"
-    stream-combiner2 "^1.1.1"
-    vinyl "^1.0.0"
-    vinyl-fs "^2.2.0"
-    ware "^1.2.0"
-
-duplexer2@0.0.2:
-  version "0.0.2"
-  resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db"
-  dependencies:
-    readable-stream "~1.1.9"
-
-duplexer2@^0.1.4, duplexer2@~0.1.0:
-  version "0.1.4"
-  resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1"
-  dependencies:
-    readable-stream "^2.0.2"
-
-duplexer@^0.1.1, duplexer@~0.1.1:
-  version "0.1.1"
-  resolved "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1"
-
-duplexify@^3.2.0:
-  version "3.6.0"
-  resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.6.0.tgz#592903f5d80b38d037220541264d69a198fb3410"
-  dependencies:
-    end-of-stream "^1.0.0"
-    inherits "^2.0.1"
-    readable-stream "^2.0.0"
-    stream-shift "^1.0.0"
-
-each-async@^1.0.0, each-async@^1.1.1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/each-async/-/each-async-1.1.1.tgz#dee5229bdf0ab6ba2012a395e1b869abf8813473"
-  dependencies:
-    onetime "^1.0.0"
-    set-immediate-shim "^1.0.0"
-
-ecc-jsbn@~0.1.1:
-  version "0.1.2"
-  resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"
-  dependencies:
-    jsbn "~0.1.0"
-    safer-buffer "^2.1.0"
-
-ee-first@1.1.1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
-
-electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.47:
-  version "1.3.71"
-  resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.71.tgz#baecb282e8b27247bbfcf2f3e0254d6fe9a76789"
-
-end-of-stream@^1.0.0:
-  version "1.4.1"
-  resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43"
-  dependencies:
-    once "^1.4.0"
-
-end-of-stream@~0.1.5:
-  version "0.1.5"
-  resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-0.1.5.tgz#8e177206c3c80837d85632e8b9359dfe8b2f6eaf"
-  dependencies:
-    once "~1.3.0"
-
-entities@1.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/entities/-/entities-1.0.0.tgz#b2987aa3821347fcde642b24fdfc9e4fb712bf26"
-
-entities@~1.1.1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0"
-
-error-ex@^1.2.0:
-  version "1.3.2"
-  resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
-  dependencies:
-    is-arrayish "^0.2.1"
-
-es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.45, es5-ext@^0.10.9, es5-ext@~0.10.14, es5-ext@~0.10.2:
-  version "0.10.46"
-  resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.46.tgz#efd99f67c5a7ec789baa3daa7f79870388f7f572"
-  dependencies:
-    es6-iterator "~2.0.3"
-    es6-symbol "~3.1.1"
-    next-tick "1"
-
-es6-iterator@^2.0.1, es6-iterator@~2.0.3:
-  version "2.0.3"
-  resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7"
-  dependencies:
-    d "1"
-    es5-ext "^0.10.35"
-    es6-symbol "^3.1.1"
-
-es6-promise@^4.0.3:
-  version "4.2.5"
-  resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.5.tgz#da6d0d5692efb461e082c14817fe2427d8f5d054"
-
-es6-symbol@^3.1.1, es6-symbol@~3.1.1:
-  version "3.1.1"
-  resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77"
-  dependencies:
-    d "1"
-    es5-ext "~0.10.14"
-
-es6-weak-map@^2.0.2:
-  version "2.0.2"
-  resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f"
-  dependencies:
-    d "1"
-    es5-ext "^0.10.14"
-    es6-iterator "^2.0.1"
-    es6-symbol "^3.1.1"
-
-escape-string-regexp@^1.0.0, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
-  version "1.0.5"
-  resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
-
-esprima@^2.6.0:
-  version "2.7.3"
-  resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"
-
-esutils@^2.0.2:
-  version "2.0.2"
-  resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
-
-event-emitter@^0.3.5:
-  version "0.3.5"
-  resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39"
-  dependencies:
-    d "1"
-    es5-ext "~0.10.14"
-
-event-stream@^3.1.7:
-  version "3.3.6"
-  resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.6.tgz#cac1230890e07e73ec9cacd038f60a5b66173eef"
-  dependencies:
-    duplexer "^0.1.1"
-    flatmap-stream "^0.1.0"
-    from "^0.1.7"
-    map-stream "0.0.7"
-    pause-stream "^0.0.11"
-    split "^1.0.1"
-    stream-combiner "^0.2.2"
-    through "^2.3.8"
-
-event-stream@~3.1.0:
-  version "3.1.7"
-  resolved "http://registry.npmjs.org/event-stream/-/event-stream-3.1.7.tgz#b4c540012d0fe1498420f3d8946008db6393c37a"
-  dependencies:
-    duplexer "~0.1.1"
-    from "~0"
-    map-stream "~0.1.0"
-    pause-stream "0.0.11"
-    split "0.2"
-    stream-combiner "~0.0.4"
-    through "~2.3.1"
-
-exec-buffer@^3.0.0:
-  version "3.2.0"
-  resolved "https://registry.yarnpkg.com/exec-buffer/-/exec-buffer-3.2.0.tgz#b1686dbd904c7cf982e652c1f5a79b1e5573082b"
-  dependencies:
-    execa "^0.7.0"
-    p-finally "^1.0.0"
-    pify "^3.0.0"
-    rimraf "^2.5.4"
-    tempfile "^2.0.0"
-
-exec-series@^1.0.0:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/exec-series/-/exec-series-1.0.3.tgz#6d257a9beac482a872c7783bc8615839fc77143a"
-  dependencies:
-    async-each-series "^1.1.0"
-    object-assign "^4.1.0"
-
-execa@^0.7.0:
-  version "0.7.0"
-  resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777"
-  dependencies:
-    cross-spawn "^5.0.1"
-    get-stream "^3.0.0"
-    is-stream "^1.1.0"
-    npm-run-path "^2.0.0"
-    p-finally "^1.0.0"
-    signal-exit "^3.0.0"
-    strip-eof "^1.0.0"
-
-executable@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/executable/-/executable-1.1.0.tgz#877980e9112f3391066da37265de7ad8434ab4d9"
-  dependencies:
-    meow "^3.1.0"
-
-exit@0.1.2, exit@0.1.x:
-  version "0.1.2"
-  resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
-
-expand-brackets@^0.1.4:
-  version "0.1.5"
-  resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
-  dependencies:
-    is-posix-bracket "^0.1.0"
-
-expand-brackets@^2.1.4:
-  version "2.1.4"
-  resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622"
-  dependencies:
-    debug "^2.3.3"
-    define-property "^0.2.5"
-    extend-shallow "^2.0.1"
-    posix-character-classes "^0.1.0"
-    regex-not "^1.0.0"
-    snapdragon "^0.8.1"
-    to-regex "^3.0.1"
-
-expand-range@^1.8.1:
-  version "1.8.2"
-  resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337"
-  dependencies:
-    fill-range "^2.1.0"
-
-expand-tilde@^2.0.0, expand-tilde@^2.0.2:
-  version "2.0.2"
-  resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502"
-  dependencies:
-    homedir-polyfill "^1.0.1"
-
-extend-shallow@^1.1.2:
-  version "1.1.4"
-  resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-1.1.4.tgz#19d6bf94dfc09d76ba711f39b872d21ff4dd9071"
-  dependencies:
-    kind-of "^1.1.0"
-
-extend-shallow@^2.0.1:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f"
-  dependencies:
-    is-extendable "^0.1.0"
-
-extend-shallow@^3.0.0, extend-shallow@^3.0.2:
-  version "3.0.2"
-  resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8"
-  dependencies:
-    assign-symbols "^1.0.0"
-    is-extendable "^1.0.1"
-
-extend@^3.0.0, extend@~3.0.1, extend@~3.0.2:
-  version "3.0.2"
-  resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
-
-extglob@^0.3.1:
-  version "0.3.2"
-  resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1"
-  dependencies:
-    is-extglob "^1.0.0"
-
-extglob@^2.0.4:
-  version "2.0.4"
-  resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543"
-  dependencies:
-    array-unique "^0.3.2"
-    define-property "^1.0.0"
-    expand-brackets "^2.1.4"
-    extend-shallow "^2.0.1"
-    fragment-cache "^0.2.1"
-    regex-not "^1.0.0"
-    snapdragon "^0.8.1"
-    to-regex "^3.0.1"
-
-extract-zip@^1.6.5:
-  version "1.6.7"
-  resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.6.7.tgz#a840b4b8af6403264c8db57f4f1a74333ef81fe9"
-  dependencies:
-    concat-stream "1.6.2"
-    debug "2.6.9"
-    mkdirp "0.5.1"
-    yauzl "2.4.1"
-
-extsprintf@1.3.0:
-  version "1.3.0"
-  resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
-
-extsprintf@^1.2.0:
-  version "1.4.0"
-  resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
-
-eyes@0.1.x:
-  version "0.1.8"
-  resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0"
-
-fancy-log@^1.1.0, fancy-log@^1.3.2:
-  version "1.3.2"
-  resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.2.tgz#f41125e3d84f2e7d89a43d06d958c8f78be16be1"
-  dependencies:
-    ansi-gray "^0.1.1"
-    color-support "^1.1.3"
-    time-stamp "^1.0.0"
-
-fast-deep-equal@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"
-
-fast-json-stable-stringify@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
-
-faye-websocket@~0.7.2:
-  version "0.7.3"
-  resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.7.3.tgz#cc4074c7f4a4dfd03af54dd65c354b135132ce11"
-  dependencies:
-    websocket-driver ">=0.3.6"
-
-fd-slicer@~1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65"
-  dependencies:
-    pend "~1.2.0"
-
-fd-slicer@~1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e"
-  dependencies:
-    pend "~1.2.0"
-
-figures@^1.3.5:
-  version "1.7.0"
-  resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e"
-  dependencies:
-    escape-string-regexp "^1.0.5"
-    object-assign "^4.1.0"
-
-file-type@^3.1.0:
-  version "3.9.0"
-  resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9"
-
-file-type@^4.1.0:
-  version "4.4.0"
-  resolved "https://registry.yarnpkg.com/file-type/-/file-type-4.4.0.tgz#1b600e5fca1fbdc6e80c0a70c71c8dba5f7906c5"
-
-filename-regex@^2.0.0:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
-
-filename-reserved-regex@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz#e61cf805f0de1c984567d0386dc5df50ee5af7e4"
-
-filenamify@^1.0.1:
-  version "1.2.1"
-  resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-1.2.1.tgz#a9f2ffd11c503bed300015029272378f1f1365a5"
-  dependencies:
-    filename-reserved-regex "^1.0.0"
-    strip-outer "^1.0.0"
-    trim-repeated "^1.0.0"
-
-fill-range@^2.1.0:
-  version "2.2.4"
-  resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565"
-  dependencies:
-    is-number "^2.1.0"
-    isobject "^2.0.0"
-    randomatic "^3.0.0"
-    repeat-element "^1.1.2"
-    repeat-string "^1.5.2"
-
-fill-range@^4.0.0:
-  version "4.0.0"
-  resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7"
-  dependencies:
-    extend-shallow "^2.0.1"
-    is-number "^3.0.0"
-    repeat-string "^1.6.1"
-    to-regex-range "^2.1.0"
-
-find-index@^0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/find-index/-/find-index-0.1.1.tgz#675d358b2ca3892d795a1ab47232f8b6e2e0dde4"
-
-find-up@^1.0.0:
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
-  dependencies:
-    path-exists "^2.0.0"
-    pinkie-promise "^2.0.0"
-
-find-versions@^1.0.0:
-  version "1.2.1"
-  resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-1.2.1.tgz#cbde9f12e38575a0af1be1b9a2c5d5fd8f186b62"
-  dependencies:
-    array-uniq "^1.0.0"
-    get-stdin "^4.0.1"
-    meow "^3.5.0"
-    semver-regex "^1.0.0"
-
-findup-sync@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-2.0.0.tgz#9326b1488c22d1a6088650a86901b2d9a90a2cbc"
-  dependencies:
-    detect-file "^1.0.0"
-    is-glob "^3.1.0"
-    micromatch "^3.0.4"
-    resolve-dir "^1.0.1"
-
-fined@^1.0.1:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/fined/-/fined-1.1.0.tgz#b37dc844b76a2f5e7081e884f7c0ae344f153476"
-  dependencies:
-    expand-tilde "^2.0.2"
-    is-plain-object "^2.0.3"
-    object.defaults "^1.1.0"
-    object.pick "^1.2.0"
-    parse-filepath "^1.0.1"
-
-first-chunk-stream@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz#59bfb50cd905f60d7c394cd3d9acaab4e6ad934e"
-
-flagged-respawn@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.0.tgz#4e79ae9b2eb38bf86b3bb56bf3e0a56aa5fcabd7"
-
-flatmap-stream@^0.1.0:
-  version "0.1.0"
-  resolved "https://registry.yarnpkg.com/flatmap-stream/-/flatmap-stream-0.1.0.tgz#ed54e01422cd29281800914fcb968d58b685d5f1"
-
-flatten@^1.0.2:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782"
-
-for-in@^1.0.1, for-in@^1.0.2:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
-
-for-own@^0.1.4:
-  version "0.1.5"
-  resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce"
-  dependencies:
-    for-in "^1.0.1"
-
-for-own@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b"
-  dependencies:
-    for-in "^1.0.1"
-
-forever-agent@~0.6.1:
-  version "0.6.1"
-  resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
-
-form-data@~2.3.1, form-data@~2.3.2:
-  version "2.3.2"
-  resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099"
-  dependencies:
-    asynckit "^0.4.0"
-    combined-stream "1.0.6"
-    mime-types "^2.1.12"
-
-fragment-cache@^0.2.1:
-  version "0.2.1"
-  resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19"
-  dependencies:
-    map-cache "^0.2.2"
-
-from@^0.1.7, from@~0:
-  version "0.1.7"
-  resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe"
-
-fs-constants@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad"
-
-fs-extra@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950"
-  dependencies:
-    graceful-fs "^4.1.2"
-    jsonfile "^2.1.0"
-    klaw "^1.0.0"
-
-fs.realpath@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
-
-fstream@^1.0.0, fstream@^1.0.2:
-  version "1.0.11"
-  resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171"
-  dependencies:
-    graceful-fs "^4.1.2"
-    inherits "~2.0.0"
-    mkdirp ">=0.5 0"
-    rimraf "2"
-
-function-bind@^1.1.1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
-
-gauge@~2.7.3:
-  version "2.7.4"
-  resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
-  dependencies:
-    aproba "^1.0.3"
-    console-control-strings "^1.0.0"
-    has-unicode "^2.0.0"
-    object-assign "^4.1.0"
-    signal-exit "^3.0.0"
-    string-width "^1.0.1"
-    strip-ansi "^3.0.1"
-    wide-align "^1.1.0"
-
-gaze@^0.5.1:
-  version "0.5.2"
-  resolved "https://registry.yarnpkg.com/gaze/-/gaze-0.5.2.tgz#40b709537d24d1d45767db5a908689dfe69ac44f"
-  dependencies:
-    globule "~0.1.0"
-
-gaze@^1.0.0:
-  version "1.1.3"
-  resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.3.tgz#c441733e13b927ac8c0ff0b4c3b033f28812924a"
-  dependencies:
-    globule "^1.0.0"
-
-get-caller-file@^1.0.1:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a"
-
-get-proxy@^1.0.1:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/get-proxy/-/get-proxy-1.1.0.tgz#894854491bc591b0f147d7ae570f5c678b7256eb"
-  dependencies:
-    rc "^1.1.2"
-
-get-stdin@^4.0.1:
-  version "4.0.1"
-  resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"
-
-get-stream@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
-
-get-value@^2.0.3, get-value@^2.0.6:
-  version "2.0.6"
-  resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
-
-getpass@^0.1.1:
-  version "0.1.7"
-  resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
-  dependencies:
-    assert-plus "^1.0.0"
-
-gifsicle@^3.0.0:
-  version "3.0.4"
-  resolved "https://registry.yarnpkg.com/gifsicle/-/gifsicle-3.0.4.tgz#f45cb5ed10165b665dc929e0e9328b6c821dfa3b"
-  dependencies:
-    bin-build "^2.0.0"
-    bin-wrapper "^3.0.0"
-    logalot "^2.0.0"
-
-glob-base@^0.3.0:
-  version "0.3.0"
-  resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"
-  dependencies:
-    glob-parent "^2.0.0"
-    is-glob "^2.0.0"
-
-glob-parent@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28"
-  dependencies:
-    is-glob "^2.0.0"
-
-glob-parent@^3.0.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae"
-  dependencies:
-    is-glob "^3.1.0"
-    path-dirname "^1.0.0"
-
-glob-stream@^3.1.5:
-  version "3.1.18"
-  resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-3.1.18.tgz#9170a5f12b790306fdfe598f313f8f7954fd143b"
-  dependencies:
-    glob "^4.3.1"
-    glob2base "^0.0.12"
-    minimatch "^2.0.1"
-    ordered-read-streams "^0.1.0"
-    through2 "^0.6.1"
-    unique-stream "^1.0.0"
-
-glob-stream@^5.3.2:
-  version "5.3.5"
-  resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-5.3.5.tgz#a55665a9a8ccdc41915a87c701e32d4e016fad22"
-  dependencies:
-    extend "^3.0.0"
-    glob "^5.0.3"
-    glob-parent "^3.0.0"
-    micromatch "^2.3.7"
-    ordered-read-streams "^0.3.0"
-    through2 "^0.6.0"
-    to-absolute-glob "^0.1.1"
-    unique-stream "^2.0.2"
-
-glob-watcher@^0.0.6:
-  version "0.0.6"
-  resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-0.0.6.tgz#b95b4a8df74b39c83298b0c05c978b4d9a3b710b"
-  dependencies:
-    gaze "^0.5.1"
-
-glob2base@^0.0.12:
-  version "0.0.12"
-  resolved "https://registry.yarnpkg.com/glob2base/-/glob2base-0.0.12.tgz#9d419b3e28f12e83a362164a277055922c9c0d56"
-  dependencies:
-    find-index "^0.1.1"
-
-glob@^4.3.1:
-  version "4.5.3"
-  resolved "https://registry.yarnpkg.com/glob/-/glob-4.5.3.tgz#c6cb73d3226c1efef04de3c56d012f03377ee15f"
-  dependencies:
-    inflight "^1.0.4"
-    inherits "2"
-    minimatch "^2.0.1"
-    once "^1.3.0"
-
-glob@^5.0.12, glob@^5.0.3:
-  version "5.0.15"
-  resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
-  dependencies:
-    inflight "^1.0.4"
-    inherits "2"
-    minimatch "2 || 3"
-    once "^1.3.0"
-    path-is-absolute "^1.0.0"
-
-glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@~7.1.1:
-  version "7.1.3"
-  resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
-  dependencies:
-    fs.realpath "^1.0.0"
-    inflight "^1.0.4"
-    inherits "2"
-    minimatch "^3.0.4"
-    once "^1.3.0"
-    path-is-absolute "^1.0.0"
-
-glob@~3.1.21:
-  version "3.1.21"
-  resolved "https://registry.yarnpkg.com/glob/-/glob-3.1.21.tgz#d29e0a055dea5138f4d07ed40e8982e83c2066cd"
-  dependencies:
-    graceful-fs "~1.2.0"
-    inherits "1"
-    minimatch "~0.2.11"
-
-global-modules@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea"
-  dependencies:
-    global-prefix "^1.0.1"
-    is-windows "^1.0.1"
-    resolve-dir "^1.0.0"
-
-global-prefix@^1.0.1:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe"
-  dependencies:
-    expand-tilde "^2.0.2"
-    homedir-polyfill "^1.0.1"
-    ini "^1.3.4"
-    is-windows "^1.0.1"
-    which "^1.2.14"
-
-globals@^9.18.0:
-  version "9.18.0"
-  resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"
-
-globby@^5.0.0:
-  version "5.0.0"
-  resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d"
-  dependencies:
-    array-union "^1.0.1"
-    arrify "^1.0.0"
-    glob "^7.0.3"
-    object-assign "^4.0.1"
-    pify "^2.0.0"
-    pinkie-promise "^2.0.0"
-
-globby@^6.1.0:
-  version "6.1.0"
-  resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c"
-  dependencies:
-    array-union "^1.0.1"
-    glob "^7.0.3"
-    object-assign "^4.0.1"
-    pify "^2.0.0"
-    pinkie-promise "^2.0.0"
-
-globule@^1.0.0:
-  version "1.2.1"
-  resolved "https://registry.yarnpkg.com/globule/-/globule-1.2.1.tgz#5dffb1b191f22d20797a9369b49eab4e9839696d"
-  dependencies:
-    glob "~7.1.1"
-    lodash "~4.17.10"
-    minimatch "~3.0.2"
-
-globule@~0.1.0:
-  version "0.1.0"
-  resolved "https://registry.yarnpkg.com/globule/-/globule-0.1.0.tgz#d9c8edde1da79d125a151b79533b978676346ae5"
-  dependencies:
-    glob "~3.1.21"
-    lodash "~1.0.1"
-    minimatch "~0.2.11"
-
-glogg@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.1.tgz#dcf758e44789cc3f3d32c1f3562a3676e6a34810"
-  dependencies:
-    sparkles "^1.0.0"
-
-got@^5.0.0:
-  version "5.7.1"
-  resolved "http://registry.npmjs.org/got/-/got-5.7.1.tgz#5f81635a61e4a6589f180569ea4e381680a51f35"
-  dependencies:
-    create-error-class "^3.0.1"
-    duplexer2 "^0.1.4"
-    is-redirect "^1.0.0"
-    is-retry-allowed "^1.0.0"
-    is-stream "^1.0.0"
-    lowercase-keys "^1.0.0"
-    node-status-codes "^1.0.0"
-    object-assign "^4.0.1"
-    parse-json "^2.1.0"
-    pinkie-promise "^2.0.0"
-    read-all-stream "^3.0.0"
-    readable-stream "^2.0.5"
-    timed-out "^3.0.0"
-    unzip-response "^1.0.2"
-    url-parse-lax "^1.0.0"
-
-graceful-fs@4.X, graceful-fs@^4.0.0, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9:
-  version "4.1.11"
-  resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
-
-graceful-fs@^3.0.0:
-  version "3.0.11"
-  resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-3.0.11.tgz#7613c778a1afea62f25c630a086d7f3acbbdd818"
-  dependencies:
-    natives "^1.1.0"
-
-graceful-fs@~1.2.0:
-  version "1.2.3"
-  resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-1.2.3.tgz#15a4806a57547cb2d2dbf27f42e89a8c3451b364"
-
-"graceful-readlink@>= 1.0.0":
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
-
-growly@^1.3.0:
-  version "1.3.0"
-  resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081"
-
-gulp-autoprefixer@^3.1.1:
-  version "3.1.1"
-  resolved "https://registry.yarnpkg.com/gulp-autoprefixer/-/gulp-autoprefixer-3.1.1.tgz#75230051cd0d171343d783b7e9b5d1120eeef9b0"
-  dependencies:
-    autoprefixer "^6.0.0"
-    gulp-util "^3.0.0"
-    postcss "^5.0.4"
-    through2 "^2.0.0"
-    vinyl-sourcemaps-apply "^0.2.0"
-
-gulp-babel@^6.1.2:
-  version "6.1.3"
-  resolved "https://registry.yarnpkg.com/gulp-babel/-/gulp-babel-6.1.3.tgz#5aad8acb0db6b7f2f0be19eeee9528f2064df631"
-  dependencies:
-    babel-core "^6.23.1"
-    object-assign "^4.0.1"
-    plugin-error "^1.0.1"
-    replace-ext "0.0.1"
-    through2 "^2.0.0"
-    vinyl-sourcemaps-apply "^0.2.0"
-
-gulp-cache@^0.4.6:
-  version "0.4.6"
-  resolved "https://registry.yarnpkg.com/gulp-cache/-/gulp-cache-0.4.6.tgz#2d03b52db4f6a553ae1d5bef01e483e907e9f796"
-  dependencies:
-    bluebird "^3.0.5"
-    cache-swap "^0.3.0"
-    gulp-util "^3.0.7"
-    object-assign "^4.0.1"
-    object.omit "^2.0.0"
-    object.pick "^1.1.1"
-    readable-stream "^2.0.4"
-    try-json-parse "^0.1.1"
-    vinyl "^1.1.0"
-
-gulp-concat@^2.6.1:
-  version "2.6.1"
-  resolved "https://registry.yarnpkg.com/gulp-concat/-/gulp-concat-2.6.1.tgz#633d16c95d88504628ad02665663cee5a4793353"
-  dependencies:
-    concat-with-sourcemaps "^1.0.0"
-    through2 "^2.0.0"
-    vinyl "^2.0.0"
-
-gulp-cssnano@^2.1.2:
-  version "2.1.3"
-  resolved "https://registry.yarnpkg.com/gulp-cssnano/-/gulp-cssnano-2.1.3.tgz#02007e2817af09b3688482b430ad7db807aebf72"
-  dependencies:
-    buffer-from "^1.0.0"
-    cssnano "^3.0.0"
-    object-assign "^4.0.1"
-    plugin-error "^1.0.1"
-    vinyl-sourcemaps-apply "^0.2.1"
-
-gulp-decompress@^1.2.0:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/gulp-decompress/-/gulp-decompress-1.2.0.tgz#8eeb65a5e015f8ed8532cafe28454960626f0dc7"
-  dependencies:
-    archive-type "^3.0.0"
-    decompress "^3.0.0"
-    gulp-util "^3.0.1"
-    readable-stream "^2.0.2"
-
-gulp-imagemin@^3.2.0:
-  version "3.4.0"
-  resolved "https://registry.yarnpkg.com/gulp-imagemin/-/gulp-imagemin-3.4.0.tgz#23a8d4c5133f50a2a708aca87ca4b2d6eb7c4403"
-  dependencies:
-    chalk "^2.1.0"
-    gulp-util "^3.0.8"
-    imagemin "^5.3.1"
-    plur "^2.1.2"
-    pretty-bytes "^4.0.2"
-    through2-concurrent "^1.1.1"
-  optionalDependencies:
-    imagemin-gifsicle "^5.2.0"
-    imagemin-jpegtran "^5.0.2"
-    imagemin-optipng "^5.2.1"
-    imagemin-svgo "^5.2.2"
-
-gulp-include@^2.3.1:
-  version "2.3.1"
-  resolved "https://registry.yarnpkg.com/gulp-include/-/gulp-include-2.3.1.tgz#f1e0ed3f0fd074c347c7e59f9cf038d3dbdb3e30"
-  dependencies:
-    event-stream "~3.1.0"
-    glob "^5.0.12"
-    gulp-util "~2.2.10"
-    source-map "^0.5.1"
-    strip-bom "^2.0.0"
-    vinyl-sourcemaps-apply "^0.2.0"
-
-gulp-insert@^0.5.0:
-  version "0.5.0"
-  resolved "https://registry.yarnpkg.com/gulp-insert/-/gulp-insert-0.5.0.tgz#32313f13e4a23cf5acca5ce5f0c080923c778602"
-  dependencies:
-    readable-stream "^1.0.26-4"
-    streamqueue "0.0.6"
-
-gulp-jshint@^2.0.4:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/gulp-jshint/-/gulp-jshint-2.1.0.tgz#bfaf927f78eee263c5bbac5f63e314d44a7bd41e"
-  dependencies:
-    lodash "^4.12.0"
-    minimatch "^3.0.3"
-    plugin-error "^0.1.2"
-    rcloader "^0.2.2"
-    through2 "^2.0.0"
-
-gulp-livereload@^3.8.1:
-  version "3.8.1"
-  resolved "https://registry.yarnpkg.com/gulp-livereload/-/gulp-livereload-3.8.1.tgz#00f744b2d749d3e9e3746589c8a44acac779b50f"
-  dependencies:
-    chalk "^0.5.1"
-    debug "^2.1.0"
-    event-stream "^3.1.7"
-    gulp-util "^3.0.2"
-    lodash.assign "^3.0.0"
-    mini-lr "^0.1.8"
-
-gulp-notify@^3.0.0:
-  version "3.2.0"
-  resolved "https://registry.yarnpkg.com/gulp-notify/-/gulp-notify-3.2.0.tgz#2ae8225009df881eef59be5dd5a2f1337387764e"
-  dependencies:
-    ansi-colors "^1.0.1"
-    fancy-log "^1.3.2"
-    lodash.template "^4.4.0"
-    node-notifier "^5.2.1"
-    node.extend "^2.0.0"
-    plugin-error "^0.1.2"
-    through2 "^2.0.3"
-
-gulp-plumber@^1.1.0:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/gulp-plumber/-/gulp-plumber-1.2.0.tgz#18ea03912c9ee483f8a5499973b5954cd90f6ad8"
-  dependencies:
-    chalk "^1.1.3"
-    fancy-log "^1.3.2"
-    plugin-error "^0.1.2"
-    through2 "^2.0.3"
-
-gulp-rename@^1.2.0, gulp-rename@^1.2.2:
-  version "1.4.0"
-  resolved "https://registry.yarnpkg.com/gulp-rename/-/gulp-rename-1.4.0.tgz#de1c718e7c4095ae861f7296ef4f3248648240bd"
-
-gulp-sass@^3.1.0:
-  version "3.2.1"
-  resolved "https://registry.yarnpkg.com/gulp-sass/-/gulp-sass-3.2.1.tgz#2e3688a96fd8be1c0c01340750c191b2e79fab94"
-  dependencies:
-    gulp-util "^3.0"
-    lodash.clonedeep "^4.3.2"
-    node-sass "^4.8.3"
-    through2 "^2.0.0"
-    vinyl-sourcemaps-apply "^0.2.0"
-
-gulp-sourcemaps@1.6.0:
-  version "1.6.0"
-  resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz#b86ff349d801ceb56e1d9e7dc7bbcb4b7dee600c"
-  dependencies:
-    convert-source-map "^1.1.1"
-    graceful-fs "^4.1.2"
-    strip-bom "^2.0.0"
-    through2 "^2.0.0"
-    vinyl "^1.0.0"
-
-gulp-sourcemaps@^2.6.0:
-  version "2.6.4"
-  resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-2.6.4.tgz#cbb2008450b1bcce6cd23bf98337be751bf6e30a"
-  dependencies:
-    "@gulp-sourcemaps/identity-map" "1.X"
-    "@gulp-sourcemaps/map-sources" "1.X"
-    acorn "5.X"
-    convert-source-map "1.X"
-    css "2.X"
-    debug-fabulous "1.X"
-    detect-newline "2.X"
-    graceful-fs "4.X"
-    source-map "~0.6.0"
-    strip-bom-string "1.X"
-    through2 "2.X"
-
-gulp-uglify@^2.1.2:
-  version "2.1.2"
-  resolved "https://registry.yarnpkg.com/gulp-uglify/-/gulp-uglify-2.1.2.tgz#6db85b1d0ee63d18058592b658649d65c2ec4541"
-  dependencies:
-    gulplog "^1.0.0"
-    has-gulplog "^0.1.0"
-    lodash "^4.13.1"
-    make-error-cause "^1.1.1"
-    through2 "^2.0.0"
-    uglify-js "~2.8.10"
-    uglify-save-license "^0.4.1"
-    vinyl-sourcemaps-apply "^0.2.0"
-
-gulp-util@^3.0, gulp-util@^3.0.0, gulp-util@^3.0.1, gulp-util@^3.0.2, gulp-util@^3.0.7, gulp-util@^3.0.8:
-  version "3.0.8"
-  resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f"
-  dependencies:
-    array-differ "^1.0.0"
-    array-uniq "^1.0.2"
-    beeper "^1.0.0"
-    chalk "^1.0.0"
-    dateformat "^2.0.0"
-    fancy-log "^1.1.0"
-    gulplog "^1.0.0"
-    has-gulplog "^0.1.0"
-    lodash._reescape "^3.0.0"
-    lodash._reevaluate "^3.0.0"
-    lodash._reinterpolate "^3.0.0"
-    lodash.template "^3.0.0"
-    minimist "^1.1.0"
-    multipipe "^0.1.2"
-    object-assign "^3.0.0"
-    replace-ext "0.0.1"
-    through2 "^2.0.0"
-    vinyl "^0.5.0"
-
-gulp-util@~2.2.10:
-  version "2.2.20"
-  resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-2.2.20.tgz#d7146e5728910bd8f047a6b0b1e549bc22dbd64c"
-  dependencies:
-    chalk "^0.5.0"
-    dateformat "^1.0.7-1.2.3"
-    lodash._reinterpolate "^2.4.1"
-    lodash.template "^2.4.1"
-    minimist "^0.2.0"
-    multipipe "^0.1.0"
-    through2 "^0.5.0"
-    vinyl "^0.2.1"
-
-gulp@^3.9.1:
-  version "3.9.1"
-  resolved "https://registry.yarnpkg.com/gulp/-/gulp-3.9.1.tgz#571ce45928dd40af6514fc4011866016c13845b4"
-  dependencies:
-    archy "^1.0.0"
-    chalk "^1.0.0"
-    deprecated "^0.0.1"
-    gulp-util "^3.0.0"
-    interpret "^1.0.0"
-    liftoff "^2.1.0"
-    minimist "^1.1.0"
-    orchestrator "^0.3.0"
-    pretty-hrtime "^1.0.0"
-    semver "^4.1.0"
-    tildify "^1.0.0"
-    v8flags "^2.0.2"
-    vinyl-fs "^0.3.0"
-
-gulplog@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5"
-  dependencies:
-    glogg "^1.0.0"
-
-har-schema@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
-
-har-validator@~5.0.3:
-  version "5.0.3"
-  resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd"
-  dependencies:
-    ajv "^5.1.0"
-    har-schema "^2.0.0"
-
-har-validator@~5.1.0:
-  version "5.1.0"
-  resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.0.tgz#44657f5688a22cfd4b72486e81b3a3fb11742c29"
-  dependencies:
-    ajv "^5.3.0"
-    har-schema "^2.0.0"
-
-has-ansi@^0.1.0:
-  version "0.1.0"
-  resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-0.1.0.tgz#84f265aae8c0e6a88a12d7022894b7568894c62e"
-  dependencies:
-    ansi-regex "^0.2.0"
-
-has-ansi@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
-  dependencies:
-    ansi-regex "^2.0.0"
-
-has-flag@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
-
-has-flag@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
-
-has-gulplog@^0.1.0:
-  version "0.1.0"
-  resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce"
-  dependencies:
-    sparkles "^1.0.0"
-
-has-unicode@^2.0.0:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
-
-has-value@^0.3.1:
-  version "0.3.1"
-  resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f"
-  dependencies:
-    get-value "^2.0.3"
-    has-values "^0.1.4"
-    isobject "^2.0.0"
-
-has-value@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177"
-  dependencies:
-    get-value "^2.0.6"
-    has-values "^1.0.0"
-    isobject "^3.0.0"
-
-has-values@^0.1.4:
-  version "0.1.4"
-  resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771"
-
-has-values@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f"
-  dependencies:
-    is-number "^3.0.0"
-    kind-of "^4.0.0"
-
-has@^1.0.1:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
-  dependencies:
-    function-bind "^1.1.1"
-
-hasha@^2.2.0:
-  version "2.2.0"
-  resolved "https://registry.yarnpkg.com/hasha/-/hasha-2.2.0.tgz#78d7cbfc1e6d66303fe79837365984517b2f6ee1"
-  dependencies:
-    is-stream "^1.0.1"
-    pinkie-promise "^2.0.0"
-
-home-or-tmp@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8"
-  dependencies:
-    os-homedir "^1.0.0"
-    os-tmpdir "^1.0.1"
-
-homedir-polyfill@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc"
-  dependencies:
-    parse-passwd "^1.0.0"
-
-hosted-git-info@^2.1.4:
-  version "2.7.1"
-  resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047"
-
-html-comment-regex@^1.1.0:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e"
-
-htmlparser2@3.8.x:
-  version "3.8.3"
-  resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.8.3.tgz#996c28b191516a8be86501a7d79757e5c70c1068"
-  dependencies:
-    domelementtype "1"
-    domhandler "2.3"
-    domutils "1.5"
-    entities "1.0"
-    readable-stream "1.1"
-
-http-errors@~1.3.1:
-  version "1.3.1"
-  resolved "http://registry.npmjs.org/http-errors/-/http-errors-1.3.1.tgz#197e22cdebd4198585e8694ef6786197b91ed942"
-  dependencies:
-    inherits "~2.0.1"
-    statuses "1"
-
-http-parser-js@>=0.4.0:
-  version "0.4.13"
-  resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.13.tgz#3bd6d6fde6e3172c9334c3b33b6c193d80fe1137"
-
-http-signature@~1.2.0:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
-  dependencies:
-    assert-plus "^1.0.0"
-    jsprim "^1.2.2"
-    sshpk "^1.7.0"
-
-iconv-lite@0.4.13:
-  version "0.4.13"
-  resolved "http://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2"
-
-imagemin-gifsicle@^5.2.0:
-  version "5.2.0"
-  resolved "https://registry.yarnpkg.com/imagemin-gifsicle/-/imagemin-gifsicle-5.2.0.tgz#3781524c457612ef04916af34241a2b42bfcb40a"
-  dependencies:
-    exec-buffer "^3.0.0"
-    gifsicle "^3.0.0"
-    is-gif "^1.0.0"
-
-imagemin-jpegtran@^5.0.2:
-  version "5.0.2"
-  resolved "https://registry.yarnpkg.com/imagemin-jpegtran/-/imagemin-jpegtran-5.0.2.tgz#e6882263b8f7916fddb800640cf75d2e970d2ad6"
-  dependencies:
-    exec-buffer "^3.0.0"
-    is-jpg "^1.0.0"
-    jpegtran-bin "^3.0.0"
-
-imagemin-optipng@^5.2.1:
-  version "5.2.1"
-  resolved "https://registry.yarnpkg.com/imagemin-optipng/-/imagemin-optipng-5.2.1.tgz#d22da412c09f5ff00a4339960b98a88b1dbe8695"
-  dependencies:
-    exec-buffer "^3.0.0"
-    is-png "^1.0.0"
-    optipng-bin "^3.0.0"
-
-imagemin-svgo@^5.2.2:
-  version "5.2.4"
-  resolved "https://registry.yarnpkg.com/imagemin-svgo/-/imagemin-svgo-5.2.4.tgz#6cd5d342cae4bcd8b483594e5315695df02b9e9b"
-  dependencies:
-    is-svg "^2.0.0"
-    svgo "^0.7.0"
-
-imagemin@^5.3.1:
-  version "5.3.1"
-  resolved "https://registry.yarnpkg.com/imagemin/-/imagemin-5.3.1.tgz#f19c2eee1e71ba6c6558c515f9fc96680189a6d4"
-  dependencies:
-    file-type "^4.1.0"
-    globby "^6.1.0"
-    make-dir "^1.0.0"
-    p-pipe "^1.1.0"
-    pify "^2.3.0"
-    replace-ext "^1.0.0"
-
-in-publish@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51"
-
-indent-string@^2.1.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80"
-  dependencies:
-    repeating "^2.0.0"
-
-indexes-of@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607"
-
-inflight@^1.0.4:
-  version "1.0.6"
-  resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
-  dependencies:
-    once "^1.3.0"
-    wrappy "1"
-
-inherits@1:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/inherits/-/inherits-1.0.2.tgz#ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b"
-
-inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3:
-  version "2.0.3"
-  resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
-
-ini@^1.3.4, ini@~1.3.0:
-  version "1.3.5"
-  resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
-
-interpret@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614"
-
-invariant@^2.2.2:
-  version "2.2.4"
-  resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
-  dependencies:
-    loose-envify "^1.0.0"
-
-invert-kv@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6"
-
-ip-regex@^1.0.1:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-1.0.3.tgz#dc589076f659f419c222039a33316f1c7387effd"
-
-irregular-plurals@^1.0.0:
-  version "1.4.0"
-  resolved "https://registry.yarnpkg.com/irregular-plurals/-/irregular-plurals-1.4.0.tgz#2ca9b033651111855412f16be5d77c62a458a766"
-
-is-absolute-url@^2.0.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6"
-
-is-absolute@^0.1.5:
-  version "0.1.7"
-  resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-0.1.7.tgz#847491119fccb5fb436217cc737f7faad50f603f"
-  dependencies:
-    is-relative "^0.1.0"
-
-is-absolute@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576"
-  dependencies:
-    is-relative "^1.0.0"
-    is-windows "^1.0.1"
-
-is-accessor-descriptor@^0.1.6:
-  version "0.1.6"
-  resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6"
-  dependencies:
-    kind-of "^3.0.2"
-
-is-accessor-descriptor@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656"
-  dependencies:
-    kind-of "^6.0.0"
-
-is-arrayish@^0.2.1:
-  version "0.2.1"
-  resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
-
-is-buffer@^1.1.5:
-  version "1.1.6"
-  resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
-
-is-builtin-module@^1.0.0:
-  version "1.0.0"
-  resolved "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe"
-  dependencies:
-    builtin-modules "^1.0.0"
-
-is-bzip2@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-bzip2/-/is-bzip2-1.0.0.tgz#5ee58eaa5a2e9c80e21407bedf23ae5ac091b3fc"
-
-is-data-descriptor@^0.1.4:
-  version "0.1.4"
-  resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
-  dependencies:
-    kind-of "^3.0.2"
-
-is-data-descriptor@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7"
-  dependencies:
-    kind-of "^6.0.0"
-
-is-descriptor@^0.1.0:
-  version "0.1.6"
-  resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca"
-  dependencies:
-    is-accessor-descriptor "^0.1.6"
-    is-data-descriptor "^0.1.4"
-    kind-of "^5.0.0"
-
-is-descriptor@^1.0.0, is-descriptor@^1.0.2:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec"
-  dependencies:
-    is-accessor-descriptor "^1.0.0"
-    is-data-descriptor "^1.0.0"
-    kind-of "^6.0.2"
-
-is-dotfile@^1.0.0:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1"
-
-is-equal-shallow@^0.1.3:
-  version "0.1.3"
-  resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534"
-  dependencies:
-    is-primitive "^2.0.0"
-
-is-extendable@^0.1.0, is-extendable@^0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
-
-is-extendable@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4"
-  dependencies:
-    is-plain-object "^2.0.4"
-
-is-extglob@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
-
-is-extglob@^2.1.0:
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
-
-is-finite@^1.0.0:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa"
-  dependencies:
-    number-is-nan "^1.0.0"
-
-is-fullwidth-code-point@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb"
-  dependencies:
-    number-is-nan "^1.0.0"
-
-is-fullwidth-code-point@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
-
-is-gif@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-gif/-/is-gif-1.0.0.tgz#a6d2ae98893007bffa97a1d8c01d63205832097e"
-
-is-glob@^2.0.0, is-glob@^2.0.1:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
-  dependencies:
-    is-extglob "^1.0.0"
-
-is-glob@^3.1.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a"
-  dependencies:
-    is-extglob "^2.1.0"
-
-is-gzip@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-gzip/-/is-gzip-1.0.0.tgz#6ca8b07b99c77998025900e555ced8ed80879a83"
-
-is-jpg@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/is-jpg/-/is-jpg-1.0.1.tgz#296d57fdd99ce010434a7283e346ab9a1035e975"
-
-is-natural-number@^2.0.0:
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-2.1.1.tgz#7d4c5728377ef386c3e194a9911bf57c6dc335e7"
-
-is-number@^2.1.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
-  dependencies:
-    kind-of "^3.0.2"
-
-is-number@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
-  dependencies:
-    kind-of "^3.0.2"
-
-is-number@^4.0.0:
-  version "4.0.0"
-  resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff"
-
-is-obj@^1.0.0:
-  version "1.0.1"
-  resolved "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f"
-
-is-path-cwd@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d"
-
-is-path-in-cwd@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52"
-  dependencies:
-    is-path-inside "^1.0.0"
-
-is-path-inside@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036"
-  dependencies:
-    path-is-inside "^1.0.1"
-
-is-plain-obj@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
-
-is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4:
-  version "2.0.4"
-  resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
-  dependencies:
-    isobject "^3.0.1"
-
-is-png@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/is-png/-/is-png-1.1.0.tgz#d574b12bf275c0350455570b0e5b57ab062077ce"
-
-is-posix-bracket@^0.1.0:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
-
-is-primitive@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575"
-
-is-promise@^2.1:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa"
-
-is-redirect@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24"
-
-is-relative@^0.1.0:
-  version "0.1.3"
-  resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-0.1.3.tgz#905fee8ae86f45b3ec614bc3c15c869df0876e82"
-
-is-relative@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d"
-  dependencies:
-    is-unc-path "^1.0.0"
-
-is-retry-allowed@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34"
-
-is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
-
-is-svg@^2.0.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9"
-  dependencies:
-    html-comment-regex "^1.1.0"
-
-is-tar@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-tar/-/is-tar-1.0.0.tgz#2f6b2e1792c1f5bb36519acaa9d65c0d26fe853d"
-
-is-typedarray@~1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
-
-is-unc-path@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz#d731e8898ed090a12c352ad2eaed5095ad322c9d"
-  dependencies:
-    unc-path-regex "^0.1.2"
-
-is-url@^1.2.0:
-  version "1.2.4"
-  resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52"
-
-is-utf8@^0.2.0:
-  version "0.2.1"
-  resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
-
-is-valid-glob@^0.3.0:
-  version "0.3.0"
-  resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-0.3.0.tgz#d4b55c69f51886f9b65c70d6c2622d37e29f48fe"
-
-is-windows@^1.0.1, is-windows@^1.0.2:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
-
-is-zip@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-zip/-/is-zip-1.0.0.tgz#47b0a8ff4d38a76431ccfd99a8e15a4c86ba2325"
-
-is@^3.2.1:
-  version "3.2.1"
-  resolved "https://registry.yarnpkg.com/is/-/is-3.2.1.tgz#d0ac2ad55eb7b0bec926a5266f6c662aaa83dca5"
-
-isarray@0.0.1:
-  version "0.0.1"
-  resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
-
-isarray@1.0.0, isarray@~1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
-
-isexe@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
-
-isobject@^2.0.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
-  dependencies:
-    isarray "1.0.0"
-
-isobject@^3.0.0, isobject@^3.0.1:
-  version "3.0.1"
-  resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
-
-isstream@0.1.x, isstream@~0.1.2:
-  version "0.1.2"
-  resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
-
-jpegtran-bin@^3.0.0:
-  version "3.2.0"
-  resolved "https://registry.yarnpkg.com/jpegtran-bin/-/jpegtran-bin-3.2.0.tgz#f60ecf4ae999c0bdad2e9fbcdf2b6f0981e7a29b"
-  dependencies:
-    bin-build "^2.0.0"
-    bin-wrapper "^3.0.0"
-    logalot "^2.0.0"
-
-js-base64@^2.1.8, js-base64@^2.1.9:
-  version "2.4.9"
-  resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.9.tgz#748911fb04f48a60c4771b375cac45a80df11c03"
-
-"js-tokens@^3.0.0 || ^4.0.0":
-  version "4.0.0"
-  resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
-
-js-tokens@^3.0.2:
-  version "3.0.2"
-  resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
-
-js-yaml@~3.7.0:
-  version "3.7.0"
-  resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80"
-  dependencies:
-    argparse "^1.0.7"
-    esprima "^2.6.0"
-
-jsbn@~0.1.0:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
-
-jsesc@^1.3.0:
-  version "1.3.0"
-  resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b"
-
-jsesc@~0.5.0:
-  version "0.5.0"
-  resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
-
-jshint@^2.9.4:
-  version "2.9.6"
-  resolved "https://registry.yarnpkg.com/jshint/-/jshint-2.9.6.tgz#19b34e578095a34928fe006135a6cb70137b9c08"
-  dependencies:
-    cli "~1.0.0"
-    console-browserify "1.1.x"
-    exit "0.1.x"
-    htmlparser2 "3.8.x"
-    lodash "~4.17.10"
-    minimatch "~3.0.2"
-    shelljs "0.3.x"
-    strip-json-comments "1.0.x"
-    unicode-5.2.0 "^0.7.5"
-  optionalDependencies:
-    phantom "~4.0.1"
-    phantomjs-prebuilt "~2.1.7"
-
-json-schema-traverse@^0.3.0:
-  version "0.3.1"
-  resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340"
-
-json-schema@0.2.3:
-  version "0.2.3"
-  resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
-
-json-stable-stringify@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af"
-  dependencies:
-    jsonify "~0.0.0"
-
-json-stringify-safe@~5.0.1:
-  version "5.0.1"
-  resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
-
-json5@^0.5.1:
-  version "0.5.1"
-  resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821"
-
-jsonfile@^2.1.0:
-  version "2.4.0"
-  resolved "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8"
-  optionalDependencies:
-    graceful-fs "^4.1.6"
-
-jsonify@~0.0.0:
-  version "0.0.0"
-  resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
-
-jsprim@^1.2.2:
-  version "1.4.1"
-  resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
-  dependencies:
-    assert-plus "1.0.0"
-    extsprintf "1.3.0"
-    json-schema "0.2.3"
-    verror "1.10.0"
-
-kew@^0.7.0:
-  version "0.7.0"
-  resolved "https://registry.yarnpkg.com/kew/-/kew-0.7.0.tgz#79d93d2d33363d6fdd2970b335d9141ad591d79b"
-
-kind-of@^1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-1.1.0.tgz#140a3d2d41a36d2efcfa9377b62c24f8495a5c44"
-
-kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
-  version "3.2.2"
-  resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
-  dependencies:
-    is-buffer "^1.1.5"
-
-kind-of@^4.0.0:
-  version "4.0.0"
-  resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57"
-  dependencies:
-    is-buffer "^1.1.5"
-
-kind-of@^5.0.0:
-  version "5.1.0"
-  resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d"
-
-kind-of@^6.0.0, kind-of@^6.0.2:
-  version "6.0.2"
-  resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051"
-
-klaw@^1.0.0:
-  version "1.3.1"
-  resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439"
-  optionalDependencies:
-    graceful-fs "^4.1.9"
-
-lazy-cache@^1.0.3:
-  version "1.0.4"
-  resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"
-
-lazy-req@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/lazy-req/-/lazy-req-1.1.0.tgz#bdaebead30f8d824039ce0ce149d4daa07ba1fac"
-
-lazystream@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4"
-  dependencies:
-    readable-stream "^2.0.5"
-
-lcid@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835"
-  dependencies:
-    invert-kv "^1.0.0"
-
-liftoff@^2.1.0:
-  version "2.5.0"
-  resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-2.5.0.tgz#2009291bb31cea861bbf10a7c15a28caf75c31ec"
-  dependencies:
-    extend "^3.0.0"
-    findup-sync "^2.0.0"
-    fined "^1.0.1"
-    flagged-respawn "^1.0.0"
-    is-plain-object "^2.0.4"
-    object.map "^1.0.0"
-    rechoir "^0.6.2"
-    resolve "^1.1.7"
-
-livereload-js@^2.2.0:
-  version "2.3.0"
-  resolved "https://registry.yarnpkg.com/livereload-js/-/livereload-js-2.3.0.tgz#c3ab22e8aaf5bf3505d80d098cbad67726548c9a"
-
-load-json-file@^1.0.0:
-  version "1.1.0"
-  resolved "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
-  dependencies:
-    graceful-fs "^4.1.2"
-    parse-json "^2.2.0"
-    pify "^2.0.0"
-    pinkie-promise "^2.0.0"
-    strip-bom "^2.0.0"
-
-lodash._baseassign@^3.0.0:
-  version "3.2.0"
-  resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e"
-  dependencies:
-    lodash._basecopy "^3.0.0"
-    lodash.keys "^3.0.0"
-
-lodash._basecopy@^3.0.0:
-  version "3.0.1"
-  resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36"
-
-lodash._basetostring@^3.0.0:
-  version "3.0.1"
-  resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5"
-
-lodash._basevalues@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7"
-
-lodash._bindcallback@^3.0.0:
-  version "3.0.1"
-  resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
-
-lodash._createassigner@^3.0.0:
-  version "3.1.1"
-  resolved "https://registry.yarnpkg.com/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz#838a5bae2fdaca63ac22dee8e19fa4e6d6970b11"
-  dependencies:
-    lodash._bindcallback "^3.0.0"
-    lodash._isiterateecall "^3.0.0"
-    lodash.restparam "^3.0.0"
-
-lodash._escapehtmlchar@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash._escapehtmlchar/-/lodash._escapehtmlchar-2.4.1.tgz#df67c3bb6b7e8e1e831ab48bfa0795b92afe899d"
-  dependencies:
-    lodash._htmlescapes "~2.4.1"
-
-lodash._escapestringchar@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash._escapestringchar/-/lodash._escapestringchar-2.4.1.tgz#ecfe22618a2ade50bfeea43937e51df66f0edb72"
-
-lodash._getnative@^3.0.0:
-  version "3.9.1"
-  resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
-
-lodash._htmlescapes@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz#32d14bf0844b6de6f8b62a051b4f67c228b624cb"
-
-lodash._isiterateecall@^3.0.0:
-  version "3.0.9"
-  resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c"
-
-lodash._isnative@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash._isnative/-/lodash._isnative-2.4.1.tgz#3ea6404b784a7be836c7b57580e1cdf79b14832c"
-
-lodash._objecttypes@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz#7c0b7f69d98a1f76529f890b0cdb1b4dfec11c11"
-
-lodash._reescape@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/lodash._reescape/-/lodash._reescape-3.0.0.tgz#2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a"
-
-lodash._reevaluate@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed"
-
-lodash._reinterpolate@^2.4.1, lodash._reinterpolate@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-2.4.1.tgz#4f1227aa5a8711fc632f5b07a1f4607aab8b3222"
-
-lodash._reinterpolate@^3.0.0, lodash._reinterpolate@~3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
-
-lodash._reunescapedhtml@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash._reunescapedhtml/-/lodash._reunescapedhtml-2.4.1.tgz#747c4fc40103eb3bb8a0976e571f7a2659e93ba7"
-  dependencies:
-    lodash._htmlescapes "~2.4.1"
-    lodash.keys "~2.4.1"
-
-lodash._root@^3.0.0:
-  version "3.0.1"
-  resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692"
-
-lodash._shimkeys@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz#6e9cc9666ff081f0b5a6c978b83e242e6949d203"
-  dependencies:
-    lodash._objecttypes "~2.4.1"
-
-lodash.assign@^3.0.0:
-  version "3.2.0"
-  resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-3.2.0.tgz#3ce9f0234b4b2223e296b8fa0ac1fee8ebca64fa"
-  dependencies:
-    lodash._baseassign "^3.0.0"
-    lodash._createassigner "^3.0.0"
-    lodash.keys "^3.0.0"
-
-lodash.assign@^4.2.0:
-  version "4.2.0"
-  resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7"
-
-lodash.clonedeep@^4.3.2:
-  version "4.5.0"
-  resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
-
-lodash.defaults@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-2.4.1.tgz#a7e8885f05e68851144b6e12a8f3678026bc4c54"
-  dependencies:
-    lodash._objecttypes "~2.4.1"
-    lodash.keys "~2.4.1"
-
-lodash.escape@^3.0.0:
-  version "3.2.0"
-  resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698"
-  dependencies:
-    lodash._root "^3.0.0"
-
-lodash.escape@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-2.4.1.tgz#2ce12c5e084db0a57dda5e5d1eeeb9f5d175a3b4"
-  dependencies:
-    lodash._escapehtmlchar "~2.4.1"
-    lodash._reunescapedhtml "~2.4.1"
-    lodash.keys "~2.4.1"
-
-lodash.isarguments@^3.0.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a"
-
-lodash.isarray@^3.0.0:
-  version "3.0.4"
-  resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55"
-
-lodash.isequal@^4.0.0:
-  version "4.5.0"
-  resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"
-
-lodash.isobject@^3.0.2:
-  version "3.0.2"
-  resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-3.0.2.tgz#3c8fb8d5b5bf4bf90ae06e14f2a530a4ed935e1d"
-
-lodash.isobject@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-2.4.1.tgz#5a2e47fe69953f1ee631a7eba1fe64d2d06558f5"
-  dependencies:
-    lodash._objecttypes "~2.4.1"
-
-lodash.keys@^3.0.0:
-  version "3.1.2"
-  resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a"
-  dependencies:
-    lodash._getnative "^3.0.0"
-    lodash.isarguments "^3.0.0"
-    lodash.isarray "^3.0.0"
-
-lodash.keys@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-2.4.1.tgz#48dea46df8ff7632b10d706b8acb26591e2b3727"
-  dependencies:
-    lodash._isnative "~2.4.1"
-    lodash._shimkeys "~2.4.1"
-    lodash.isobject "~2.4.1"
-
-lodash.memoize@^4.1.2:
-  version "4.1.2"
-  resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
-
-lodash.merge@^4.6.0:
-  version "4.6.1"
-  resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.1.tgz#adc25d9cb99b9391c59624f379fbba60d7111d54"
-
-lodash.mergewith@^4.6.0:
-  version "4.6.1"
-  resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz#639057e726c3afbdb3e7d42741caa8d6e4335927"
-
-lodash.restparam@^3.0.0:
-  version "3.6.1"
-  resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
-
-lodash.template@^2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-2.4.1.tgz#9e611007edf629129a974ab3c48b817b3e1cf20d"
-  dependencies:
-    lodash._escapestringchar "~2.4.1"
-    lodash._reinterpolate "~2.4.1"
-    lodash.defaults "~2.4.1"
-    lodash.escape "~2.4.1"
-    lodash.keys "~2.4.1"
-    lodash.templatesettings "~2.4.1"
-    lodash.values "~2.4.1"
-
-lodash.template@^3.0.0:
-  version "3.6.2"
-  resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f"
-  dependencies:
-    lodash._basecopy "^3.0.0"
-    lodash._basetostring "^3.0.0"
-    lodash._basevalues "^3.0.0"
-    lodash._isiterateecall "^3.0.0"
-    lodash._reinterpolate "^3.0.0"
-    lodash.escape "^3.0.0"
-    lodash.keys "^3.0.0"
-    lodash.restparam "^3.0.0"
-    lodash.templatesettings "^3.0.0"
-
-lodash.template@^4.4.0:
-  version "4.4.0"
-  resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0"
-  dependencies:
-    lodash._reinterpolate "~3.0.0"
-    lodash.templatesettings "^4.0.0"
-
-lodash.templatesettings@^3.0.0:
-  version "3.1.1"
-  resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5"
-  dependencies:
-    lodash._reinterpolate "^3.0.0"
-    lodash.escape "^3.0.0"
-
-lodash.templatesettings@^4.0.0:
-  version "4.1.0"
-  resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316"
-  dependencies:
-    lodash._reinterpolate "~3.0.0"
-
-lodash.templatesettings@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz#ea76c75d11eb86d4dbe89a83893bb861929ac699"
-  dependencies:
-    lodash._reinterpolate "~2.4.1"
-    lodash.escape "~2.4.1"
-
-lodash.uniq@^4.5.0:
-  version "4.5.0"
-  resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
-
-lodash.values@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash.values/-/lodash.values-2.4.1.tgz#abf514436b3cb705001627978cbcf30b1280eea4"
-  dependencies:
-    lodash.keys "~2.4.1"
-
-lodash@^4.0.0, lodash@^4.12.0, lodash@^4.13.1, lodash@^4.17.4, lodash@~4.17.10:
-  version "4.17.11"
-  resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
-
-lodash@~1.0.1:
-  version "1.0.2"
-  resolved "http://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz#8f57560c83b59fc270bd3d561b690043430e2551"
-
-logalot@^2.0.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/logalot/-/logalot-2.1.0.tgz#5f8e8c90d304edf12530951a5554abb8c5e3f552"
-  dependencies:
-    figures "^1.3.5"
-    squeak "^1.0.0"
-
-longest@^1.0.0, longest@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
-
-loose-envify@^1.0.0:
-  version "1.4.0"
-  resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
-  dependencies:
-    js-tokens "^3.0.0 || ^4.0.0"
-
-loud-rejection@^1.0.0:
-  version "1.6.0"
-  resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f"
-  dependencies:
-    currently-unhandled "^0.4.1"
-    signal-exit "^3.0.0"
-
-lowercase-keys@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f"
-
-lpad-align@^1.0.1:
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/lpad-align/-/lpad-align-1.1.2.tgz#21f600ac1c3095c3c6e497ee67271ee08481fe9e"
-  dependencies:
-    get-stdin "^4.0.1"
-    indent-string "^2.1.0"
-    longest "^1.0.0"
-    meow "^3.3.0"
-
-lru-cache@2:
-  version "2.7.3"
-  resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952"
-
-lru-cache@^4.0.1:
-  version "4.1.3"
-  resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c"
-  dependencies:
-    pseudomap "^1.0.2"
-    yallist "^2.1.2"
-
-lru-queue@0.1:
-  version "0.1.0"
-  resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3"
-  dependencies:
-    es5-ext "~0.10.2"
-
-make-dir@^1.0.0:
-  version "1.3.0"
-  resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c"
-  dependencies:
-    pify "^3.0.0"
-
-make-error-cause@^1.1.1:
-  version "1.2.2"
-  resolved "https://registry.yarnpkg.com/make-error-cause/-/make-error-cause-1.2.2.tgz#df0388fcd0b37816dff0a5fb8108939777dcbc9d"
-  dependencies:
-    make-error "^1.2.0"
-
-make-error@^1.2.0:
-  version "1.3.5"
-  resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8"
-
-make-iterator@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6"
-  dependencies:
-    kind-of "^6.0.2"
-
-map-cache@^0.2.0, map-cache@^0.2.2:
-  version "0.2.2"
-  resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
-
-map-obj@^1.0.0, map-obj@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d"
-
-map-stream@0.0.7:
-  version "0.0.7"
-  resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.0.7.tgz#8a1f07896d82b10926bd3744a2420009f88974a8"
-
-map-stream@~0.1.0:
-  version "0.1.0"
-  resolved "http://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194"
-
-map-visit@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f"
-  dependencies:
-    object-visit "^1.0.0"
-
-math-expression-evaluator@^1.2.14:
-  version "1.2.17"
-  resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac"
-
-math-random@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac"
-
-media-typer@0.3.0:
-  version "0.3.0"
-  resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
-
-memoizee@0.4.X:
-  version "0.4.14"
-  resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.14.tgz#07a00f204699f9a95c2d9e77218271c7cd610d57"
-  dependencies:
-    d "1"
-    es5-ext "^0.10.45"
-    es6-weak-map "^2.0.2"
-    event-emitter "^0.3.5"
-    is-promise "^2.1"
-    lru-queue "0.1"
-    next-tick "1"
-    timers-ext "^0.1.5"
-
-meow@^3.1.0, meow@^3.3.0, meow@^3.5.0, meow@^3.7.0:
-  version "3.7.0"
-  resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb"
-  dependencies:
-    camelcase-keys "^2.0.0"
-    decamelize "^1.1.2"
-    loud-rejection "^1.0.0"
-    map-obj "^1.0.1"
-    minimist "^1.1.3"
-    normalize-package-data "^2.3.4"
-    object-assign "^4.0.1"
-    read-pkg-up "^1.0.1"
-    redent "^1.0.0"
-    trim-newlines "^1.0.0"
-
-merge-stream@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1"
-  dependencies:
-    readable-stream "^2.0.1"
-
-micromatch@^2.3.7:
-  version "2.3.11"
-  resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565"
-  dependencies:
-    arr-diff "^2.0.0"
-    array-unique "^0.2.1"
-    braces "^1.8.2"
-    expand-brackets "^0.1.4"
-    extglob "^0.3.1"
-    filename-regex "^2.0.0"
-    is-extglob "^1.0.0"
-    is-glob "^2.0.1"
-    kind-of "^3.0.2"
-    normalize-path "^2.0.1"
-    object.omit "^2.0.0"
-    parse-glob "^3.0.4"
-    regex-cache "^0.4.2"
-
-micromatch@^3.0.4:
-  version "3.1.10"
-  resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
-  dependencies:
-    arr-diff "^4.0.0"
-    array-unique "^0.3.2"
-    braces "^2.3.1"
-    define-property "^2.0.2"
-    extend-shallow "^3.0.2"
-    extglob "^2.0.4"
-    fragment-cache "^0.2.1"
-    kind-of "^6.0.2"
-    nanomatch "^1.2.9"
-    object.pick "^1.3.0"
-    regex-not "^1.0.0"
-    snapdragon "^0.8.1"
-    to-regex "^3.0.2"
-
-mime-db@~1.36.0:
-  version "1.36.0"
-  resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.36.0.tgz#5020478db3c7fe93aad7bbcc4dcf869c43363397"
-
-mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.19:
-  version "2.1.20"
-  resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.20.tgz#930cb719d571e903738520f8470911548ca2cc19"
-  dependencies:
-    mime-db "~1.36.0"
-
-mini-lr@^0.1.8:
-  version "0.1.9"
-  resolved "https://registry.yarnpkg.com/mini-lr/-/mini-lr-0.1.9.tgz#02199d27347953d1fd1d6dbded4261f187b2d0f6"
-  dependencies:
-    body-parser "~1.14.0"
-    debug "^2.2.0"
-    faye-websocket "~0.7.2"
-    livereload-js "^2.2.0"
-    parseurl "~1.3.0"
-    qs "~2.2.3"
-
-"minimatch@2 || 3", minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2:
-  version "3.0.4"
-  resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
-  dependencies:
-    brace-expansion "^1.1.7"
-
-minimatch@^2.0.1:
-  version "2.0.10"
-  resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7"
-  dependencies:
-    brace-expansion "^1.0.0"
-
-minimatch@~0.2.11:
-  version "0.2.14"
-  resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.2.14.tgz#c74e780574f63c6f9a090e90efbe6ef53a6a756a"
-  dependencies:
-    lru-cache "2"
-    sigmund "~1.0.0"
-
-minimist@0.0.8:
-  version "0.0.8"
-  resolved "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
-
-minimist@^0.2.0:
-  version "0.2.0"
-  resolved "http://registry.npmjs.org/minimist/-/minimist-0.2.0.tgz#4dffe525dae2b864c66c2e23c6271d7afdecefce"
-
-minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0:
-  version "1.2.0"
-  resolved "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
-
-mixin-deep@^1.2.0:
-  version "1.3.1"
-  resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe"
-  dependencies:
-    for-in "^1.0.2"
-    is-extendable "^1.0.1"
-
-mkdirp@0.5.1, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1:
-  version "0.5.1"
-  resolved "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
-  dependencies:
-    minimist "0.0.8"
-
-ms@0.7.1:
-  version "0.7.1"
-  resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098"
-
-ms@2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
-
-ms@^2.1.1:
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
-
-multipipe@^0.1.0, multipipe@^0.1.2:
-  version "0.1.2"
-  resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b"
-  dependencies:
-    duplexer2 "0.0.2"
-
-nan@^2.10.0:
-  version "2.11.0"
-  resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.0.tgz#574e360e4d954ab16966ec102c0c049fd961a099"
-
-nanomatch@^1.2.9:
-  version "1.2.13"
-  resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
-  dependencies:
-    arr-diff "^4.0.0"
-    array-unique "^0.3.2"
-    define-property "^2.0.2"
-    extend-shallow "^3.0.2"
-    fragment-cache "^0.2.1"
-    is-windows "^1.0.2"
-    kind-of "^6.0.2"
-    object.pick "^1.3.0"
-    regex-not "^1.0.0"
-    snapdragon "^0.8.1"
-    to-regex "^3.0.1"
-
-natives@^1.1.0:
-  version "1.1.5"
-  resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.5.tgz#3bdbdb4104023e5dd239b56fc7ef3d9a17acc6aa"
-
-next-tick@1:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c"
-
-node-gyp@^3.8.0:
-  version "3.8.0"
-  resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.8.0.tgz#540304261c330e80d0d5edce253a68cb3964218c"
-  dependencies:
-    fstream "^1.0.0"
-    glob "^7.0.3"
-    graceful-fs "^4.1.2"
-    mkdirp "^0.5.0"
-    nopt "2 || 3"
-    npmlog "0 || 1 || 2 || 3 || 4"
-    osenv "0"
-    request "^2.87.0"
-    rimraf "2"
-    semver "~5.3.0"
-    tar "^2.0.0"
-    which "1"
-
-node-notifier@^5.2.1:
-  version "5.2.1"
-  resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.2.1.tgz#fa313dd08f5517db0e2502e5758d664ac69f9dea"
-  dependencies:
-    growly "^1.3.0"
-    semver "^5.4.1"
-    shellwords "^0.1.1"
-    which "^1.3.0"
-
-node-sass@^4.8.3:
-  version "4.9.3"
-  resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.9.3.tgz#f407cf3d66f78308bb1e346b24fa428703196224"
-  dependencies:
-    async-foreach "^0.1.3"
-    chalk "^1.1.1"
-    cross-spawn "^3.0.0"
-    gaze "^1.0.0"
-    get-stdin "^4.0.1"
-    glob "^7.0.3"
-    in-publish "^2.0.0"
-    lodash.assign "^4.2.0"
-    lodash.clonedeep "^4.3.2"
-    lodash.mergewith "^4.6.0"
-    meow "^3.7.0"
-    mkdirp "^0.5.1"
-    nan "^2.10.0"
-    node-gyp "^3.8.0"
-    npmlog "^4.0.0"
-    request "2.87.0"
-    sass-graph "^2.2.4"
-    stdout-stream "^1.4.0"
-    "true-case-path" "^1.0.2"
-
-node-status-codes@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/node-status-codes/-/node-status-codes-1.0.0.tgz#5ae5541d024645d32a58fcddc9ceecea7ae3ac2f"
-
-node.extend@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/node.extend/-/node.extend-2.0.0.tgz#7525a2875677ea534784a5e10ac78956139614df"
-  dependencies:
-    is "^3.2.1"
-
-"nopt@2 || 3":
-  version "3.0.6"
-  resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9"
-  dependencies:
-    abbrev "1"
-
-normalize-package-data@^2.3.2, normalize-package-data@^2.3.4:
-  version "2.4.0"
-  resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f"
-  dependencies:
-    hosted-git-info "^2.1.4"
-    is-builtin-module "^1.0.0"
-    semver "2 || 3 || 4 || 5"
-    validate-npm-package-license "^3.0.1"
-
-normalize-path@^2.0.1, normalize-path@^2.1.1:
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
-  dependencies:
-    remove-trailing-separator "^1.0.1"
-
-normalize-range@^0.1.2:
-  version "0.1.2"
-  resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942"
-
-normalize-url@^1.4.0:
-  version "1.9.1"
-  resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c"
-  dependencies:
-    object-assign "^4.0.1"
-    prepend-http "^1.0.0"
-    query-string "^4.1.0"
-    sort-keys "^1.0.0"
-
-npm-run-path@^2.0.0:
-  version "2.0.2"
-  resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
-  dependencies:
-    path-key "^2.0.0"
-
-"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0:
-  version "4.1.2"
-  resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
-  dependencies:
-    are-we-there-yet "~1.1.2"
-    console-control-strings "~1.1.0"
-    gauge "~2.7.3"
-    set-blocking "~2.0.0"
-
-num2fraction@^1.2.2:
-  version "1.2.2"
-  resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede"
-
-number-is-nan@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
-
-oauth-sign@~0.8.2:
-  version "0.8.2"
-  resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43"
-
-oauth-sign@~0.9.0:
-  version "0.9.0"
-  resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455"
-
-object-assign@4.X, object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0:
-  version "4.1.1"
-  resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
-
-object-assign@^2.0.0:
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-2.1.1.tgz#43c36e5d569ff8e4816c4efa8be02d26967c18aa"
-
-object-assign@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2"
-
-object-copy@^0.1.0:
-  version "0.1.0"
-  resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c"
-  dependencies:
-    copy-descriptor "^0.1.0"
-    define-property "^0.2.5"
-    kind-of "^3.0.3"
-
-object-visit@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb"
-  dependencies:
-    isobject "^3.0.0"
-
-object.defaults@^1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/object.defaults/-/object.defaults-1.1.0.tgz#3a7f868334b407dea06da16d88d5cd29e435fecf"
-  dependencies:
-    array-each "^1.0.1"
-    array-slice "^1.0.0"
-    for-own "^1.0.0"
-    isobject "^3.0.0"
-
-object.map@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/object.map/-/object.map-1.0.1.tgz#cf83e59dc8fcc0ad5f4250e1f78b3b81bd801d37"
-  dependencies:
-    for-own "^1.0.0"
-    make-iterator "^1.0.0"
-
-object.omit@^2.0.0:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa"
-  dependencies:
-    for-own "^0.1.4"
-    is-extendable "^0.1.1"
-
-object.pick@^1.1.1, object.pick@^1.2.0, object.pick@^1.3.0:
-  version "1.3.0"
-  resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747"
-  dependencies:
-    isobject "^3.0.1"
-
-on-finished@~2.3.0:
-  version "2.3.0"
-  resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"
-  dependencies:
-    ee-first "1.1.1"
-
-once@^1.3.0, once@^1.4.0:
-  version "1.4.0"
-  resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
-  dependencies:
-    wrappy "1"
-
-once@~1.3.0:
-  version "1.3.3"
-  resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20"
-  dependencies:
-    wrappy "1"
-
-onetime@^1.0.0:
-  version "1.1.0"
-  resolved "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789"
-
-optipng-bin@^3.0.0:
-  version "3.1.4"
-  resolved "https://registry.yarnpkg.com/optipng-bin/-/optipng-bin-3.1.4.tgz#95d34f2c488704f6fd70606bfea0c659f1d95d84"
-  dependencies:
-    bin-build "^2.0.0"
-    bin-wrapper "^3.0.0"
-    logalot "^2.0.0"
-
-orchestrator@^0.3.0:
-  version "0.3.8"
-  resolved "https://registry.yarnpkg.com/orchestrator/-/orchestrator-0.3.8.tgz#14e7e9e2764f7315fbac184e506c7aa6df94ad7e"
-  dependencies:
-    end-of-stream "~0.1.5"
-    sequencify "~0.0.7"
-    stream-consume "~0.1.0"
-
-ordered-read-streams@^0.1.0:
-  version "0.1.0"
-  resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz#fd565a9af8eb4473ba69b6ed8a34352cb552f126"
-
-ordered-read-streams@^0.3.0:
-  version "0.3.0"
-  resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz#7137e69b3298bb342247a1bbee3881c80e2fd78b"
-  dependencies:
-    is-stream "^1.0.1"
-    readable-stream "^2.0.1"
-
-os-filter-obj@^1.0.0:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/os-filter-obj/-/os-filter-obj-1.0.3.tgz#5915330d90eced557d2d938a31c6dd214d9c63ad"
-
-os-homedir@^1.0.0:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
-
-os-locale@^1.4.0:
-  version "1.4.0"
-  resolved "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9"
-  dependencies:
-    lcid "^1.0.0"
-
-os-tmpdir@^1.0.0, os-tmpdir@^1.0.1:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
-
-osenv@0:
-  version "0.1.5"
-  resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410"
-  dependencies:
-    os-homedir "^1.0.0"
-    os-tmpdir "^1.0.0"
-
-p-finally@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
-
-p-pipe@^1.1.0:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-1.2.0.tgz#4b1a11399a11520a67790ee5a0c1d5881d6befe9"
-
-parse-filepath@^1.0.1:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.2.tgz#a632127f53aaf3d15876f5872f3ffac763d6c891"
-  dependencies:
-    is-absolute "^1.0.0"
-    map-cache "^0.2.0"
-    path-root "^0.1.1"
-
-parse-glob@^3.0.4:
-  version "3.0.4"
-  resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
-  dependencies:
-    glob-base "^0.3.0"
-    is-dotfile "^1.0.0"
-    is-extglob "^1.0.0"
-    is-glob "^2.0.0"
-
-parse-json@^2.1.0, parse-json@^2.2.0:
-  version "2.2.0"
-  resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9"
-  dependencies:
-    error-ex "^1.2.0"
-
-parse-passwd@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6"
-
-parseurl@~1.3.0:
-  version "1.3.2"
-  resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3"
-
-pascalcase@^0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14"
-
-path-dirname@^1.0.0:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0"
-
-path-exists@^2.0.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b"
-  dependencies:
-    pinkie-promise "^2.0.0"
-
-path-is-absolute@^1.0.0, path-is-absolute@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
-
-path-is-inside@^1.0.1:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53"
-
-path-key@^2.0.0:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
-
-path-parse@^1.0.5:
-  version "1.0.6"
-  resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
-
-path-root-regex@^0.1.0:
-  version "0.1.2"
-  resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d"
-
-path-root@^0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7"
-  dependencies:
-    path-root-regex "^0.1.0"
-
-path-type@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441"
-  dependencies:
-    graceful-fs "^4.1.2"
-    pify "^2.0.0"
-    pinkie-promise "^2.0.0"
-
-pause-stream@0.0.11, pause-stream@^0.0.11:
-  version "0.0.11"
-  resolved "http://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445"
-  dependencies:
-    through "~2.3"
-
-pend@~1.2.0:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
-
-performance-now@^2.1.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
-
-phantom@~4.0.1:
-  version "4.0.12"
-  resolved "https://registry.yarnpkg.com/phantom/-/phantom-4.0.12.tgz#78d18cf3f2a76fea4909f6160fcabf2742d7dbf0"
-  dependencies:
-    phantomjs-prebuilt "^2.1.16"
-    split "^1.0.1"
-    winston "^2.4.0"
-
-phantomjs-prebuilt@^2.1.16, phantomjs-prebuilt@~2.1.7:
-  version "2.1.16"
-  resolved "https://registry.yarnpkg.com/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.16.tgz#efd212a4a3966d3647684ea8ba788549be2aefef"
-  dependencies:
-    es6-promise "^4.0.3"
-    extract-zip "^1.6.5"
-    fs-extra "^1.0.0"
-    hasha "^2.2.0"
-    kew "^0.7.0"
-    progress "^1.1.8"
-    request "^2.81.0"
-    request-progress "^2.0.1"
-    which "^1.2.10"
-
-pify@^2.0.0, pify@^2.3.0:
-  version "2.3.0"
-  resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
-
-pify@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
-
-pinkie-promise@^2.0.0:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
-  dependencies:
-    pinkie "^2.0.0"
-
-pinkie@^2.0.0:
-  version "2.0.4"
-  resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
-
-plugin-error@^0.1.2:
-  version "0.1.2"
-  resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-0.1.2.tgz#3b9bb3335ccf00f425e07437e19276967da47ace"
-  dependencies:
-    ansi-cyan "^0.1.1"
-    ansi-red "^0.1.1"
-    arr-diff "^1.0.1"
-    arr-union "^2.0.1"
-    extend-shallow "^1.1.2"
-
-plugin-error@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-1.0.1.tgz#77016bd8919d0ac377fdcdd0322328953ca5781c"
-  dependencies:
-    ansi-colors "^1.0.1"
-    arr-diff "^4.0.0"
-    arr-union "^3.1.0"
-    extend-shallow "^3.0.2"
-
-plur@^2.1.2:
-  version "2.1.2"
-  resolved "https://registry.yarnpkg.com/plur/-/plur-2.1.2.tgz#7482452c1a0f508e3e344eaec312c91c29dc655a"
-  dependencies:
-    irregular-plurals "^1.0.0"
-
-posix-character-classes@^0.1.0:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
-
-postcss-calc@^5.2.0:
-  version "5.3.1"
-  resolved "http://registry.npmjs.org/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e"
-  dependencies:
-    postcss "^5.0.2"
-    postcss-message-helpers "^2.0.0"
-    reduce-css-calc "^1.2.6"
-
-postcss-colormin@^2.1.8:
-  version "2.2.2"
-  resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-2.2.2.tgz#6631417d5f0e909a3d7ec26b24c8a8d1e4f96e4b"
-  dependencies:
-    colormin "^1.0.5"
-    postcss "^5.0.13"
-    postcss-value-parser "^3.2.3"
-
-postcss-convert-values@^2.3.4:
-  version "2.6.1"
-  resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz#bbd8593c5c1fd2e3d1c322bb925dcae8dae4d62d"
-  dependencies:
-    postcss "^5.0.11"
-    postcss-value-parser "^3.1.2"
-
-postcss-discard-comments@^2.0.4:
-  version "2.0.4"
-  resolved "http://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d"
-  dependencies:
-    postcss "^5.0.14"
-
-postcss-discard-duplicates@^2.0.1:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz#b9abf27b88ac188158a5eb12abcae20263b91932"
-  dependencies:
-    postcss "^5.0.4"
-
-postcss-discard-empty@^2.0.1:
-  version "2.1.0"
-  resolved "http://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz#d2b4bd9d5ced5ebd8dcade7640c7d7cd7f4f92b5"
-  dependencies:
-    postcss "^5.0.14"
-
-postcss-discard-overridden@^0.1.1:
-  version "0.1.1"
-  resolved "http://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz#8b1eaf554f686fb288cd874c55667b0aa3668d58"
-  dependencies:
-    postcss "^5.0.16"
-
-postcss-discard-unused@^2.2.1:
-  version "2.2.3"
-  resolved "http://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz#bce30b2cc591ffc634322b5fb3464b6d934f4433"
-  dependencies:
-    postcss "^5.0.14"
-    uniqs "^2.0.0"
-
-postcss-filter-plugins@^2.0.0:
-  version "2.0.3"
-  resolved "https://registry.yarnpkg.com/postcss-filter-plugins/-/postcss-filter-plugins-2.0.3.tgz#82245fdf82337041645e477114d8e593aa18b8ec"
-  dependencies:
-    postcss "^5.0.4"
-
-postcss-merge-idents@^2.1.5:
-  version "2.1.7"
-  resolved "http://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270"
-  dependencies:
-    has "^1.0.1"
-    postcss "^5.0.10"
-    postcss-value-parser "^3.1.1"
-
-postcss-merge-longhand@^2.0.1:
-  version "2.0.2"
-  resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz#23d90cd127b0a77994915332739034a1a4f3d658"
-  dependencies:
-    postcss "^5.0.4"
-
-postcss-merge-rules@^2.0.3:
-  version "2.1.2"
-  resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz#d1df5dfaa7b1acc3be553f0e9e10e87c61b5f721"
-  dependencies:
-    browserslist "^1.5.2"
-    caniuse-api "^1.5.2"
-    postcss "^5.0.4"
-    postcss-selector-parser "^2.2.2"
-    vendors "^1.0.0"
-
-postcss-message-helpers@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e"
-
-postcss-minify-font-values@^1.0.2:
-  version "1.0.5"
-  resolved "http://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz#4b58edb56641eba7c8474ab3526cafd7bbdecb69"
-  dependencies:
-    object-assign "^4.0.1"
-    postcss "^5.0.4"
-    postcss-value-parser "^3.0.2"
-
-postcss-minify-gradients@^1.0.1:
-  version "1.0.5"
-  resolved "http://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz#5dbda11373703f83cfb4a3ea3881d8d75ff5e6e1"
-  dependencies:
-    postcss "^5.0.12"
-    postcss-value-parser "^3.3.0"
-
-postcss-minify-params@^1.0.4:
-  version "1.2.2"
-  resolved "http://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz#ad2ce071373b943b3d930a3fa59a358c28d6f1f3"
-  dependencies:
-    alphanum-sort "^1.0.1"
-    postcss "^5.0.2"
-    postcss-value-parser "^3.0.2"
-    uniqs "^2.0.0"
-
-postcss-minify-selectors@^2.0.4:
-  version "2.1.1"
-  resolved "http://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz#b2c6a98c0072cf91b932d1a496508114311735bf"
-  dependencies:
-    alphanum-sort "^1.0.2"
-    has "^1.0.1"
-    postcss "^5.0.14"
-    postcss-selector-parser "^2.0.0"
-
-postcss-normalize-charset@^1.1.0:
-  version "1.1.1"
-  resolved "http://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1"
-  dependencies:
-    postcss "^5.0.5"
-
-postcss-normalize-url@^3.0.7:
-  version "3.0.8"
-  resolved "http://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz#108f74b3f2fcdaf891a2ffa3ea4592279fc78222"
-  dependencies:
-    is-absolute-url "^2.0.0"
-    normalize-url "^1.4.0"
-    postcss "^5.0.14"
-    postcss-value-parser "^3.2.3"
-
-postcss-ordered-values@^2.1.0:
-  version "2.2.3"
-  resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz#eec6c2a67b6c412a8db2042e77fe8da43f95c11d"
-  dependencies:
-    postcss "^5.0.4"
-    postcss-value-parser "^3.0.1"
-
-postcss-reduce-idents@^2.2.2:
-  version "2.4.0"
-  resolved "http://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz#c2c6d20cc958284f6abfbe63f7609bf409059ad3"
-  dependencies:
-    postcss "^5.0.4"
-    postcss-value-parser "^3.0.2"
-
-postcss-reduce-initial@^1.0.0:
-  version "1.0.1"
-  resolved "http://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz#68f80695f045d08263a879ad240df8dd64f644ea"
-  dependencies:
-    postcss "^5.0.4"
-
-postcss-reduce-transforms@^1.0.3:
-  version "1.0.4"
-  resolved "http://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz#ff76f4d8212437b31c298a42d2e1444025771ae1"
-  dependencies:
-    has "^1.0.1"
-    postcss "^5.0.8"
-    postcss-value-parser "^3.0.1"
-
-postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2:
-  version "2.2.3"
-  resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90"
-  dependencies:
-    flatten "^1.0.2"
-    indexes-of "^1.0.1"
-    uniq "^1.0.1"
-
-postcss-svgo@^2.1.1:
-  version "2.1.6"
-  resolved "http://registry.npmjs.org/postcss-svgo/-/postcss-svgo-2.1.6.tgz#b6df18aa613b666e133f08adb5219c2684ac108d"
-  dependencies:
-    is-svg "^2.0.0"
-    postcss "^5.0.14"
-    postcss-value-parser "^3.2.3"
-    svgo "^0.7.0"
-
-postcss-unique-selectors@^2.0.2:
-  version "2.0.2"
-  resolved "http://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz#981d57d29ddcb33e7b1dfe1fd43b8649f933ca1d"
-  dependencies:
-    alphanum-sort "^1.0.1"
-    postcss "^5.0.4"
-    uniqs "^2.0.0"
-
-postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^3.1.1, postcss-value-parser@^3.1.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0:
-  version "3.3.0"
-  resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15"
-
-postcss-zindex@^2.0.1:
-  version "2.2.0"
-  resolved "http://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22"
-  dependencies:
-    has "^1.0.1"
-    postcss "^5.0.4"
-    uniqs "^2.0.0"
-
-postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.8, postcss@^5.2.16:
-  version "5.2.18"
-  resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.18.tgz#badfa1497d46244f6390f58b319830d9107853c5"
-  dependencies:
-    chalk "^1.1.3"
-    js-base64 "^2.1.9"
-    source-map "^0.5.6"
-    supports-color "^3.2.3"
-
-prepend-http@^1.0.0, prepend-http@^1.0.1:
-  version "1.0.4"
-  resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
-
-preserve@^0.2.0:
-  version "0.2.0"
-  resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
-
-pretty-bytes@^4.0.2:
-  version "4.0.2"
-  resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"
-
-pretty-hrtime@^1.0.0:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1"
-
-private@^0.1.6, private@^0.1.8:
-  version "0.1.8"
-  resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
-
-process-nextick-args@^2.0.0, process-nextick-args@~2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"
-
-progress@^1.1.8:
-  version "1.1.8"
-  resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be"
-
-pseudomap@^1.0.2:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
-
-psl@^1.1.24:
-  version "1.1.29"
-  resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67"
-
-punycode@^1.4.1:
-  version "1.4.1"
-  resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
-
-q@^1.1.2:
-  version "1.5.1"
-  resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
-
-qs@5.2.0:
-  version "5.2.0"
-  resolved "https://registry.yarnpkg.com/qs/-/qs-5.2.0.tgz#a9f31142af468cb72b25b30136ba2456834916be"
-
-qs@~2.2.3:
-  version "2.2.5"
-  resolved "https://registry.yarnpkg.com/qs/-/qs-2.2.5.tgz#1088abaf9dcc0ae5ae45b709e6c6b5888b23923c"
-
-qs@~6.5.1, qs@~6.5.2:
-  version "6.5.2"
-  resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
-
-query-string@^4.1.0:
-  version "4.3.4"
-  resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb"
-  dependencies:
-    object-assign "^4.1.0"
-    strict-uri-encode "^1.0.0"
-
-randomatic@^3.0.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.0.tgz#36f2ca708e9e567f5ed2ec01949026d50aa10116"
-  dependencies:
-    is-number "^4.0.0"
-    kind-of "^6.0.0"
-    math-random "^1.0.1"
-
-raw-body@~2.1.5:
-  version "2.1.7"
-  resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.1.7.tgz#adfeace2e4fb3098058014d08c072dcc59758774"
-  dependencies:
-    bytes "2.4.0"
-    iconv-lite "0.4.13"
-    unpipe "1.0.0"
-
-rc@^1.1.2:
-  version "1.2.8"
-  resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
-  dependencies:
-    deep-extend "^0.6.0"
-    ini "~1.3.0"
-    minimist "^1.2.0"
-    strip-json-comments "~2.0.1"
-
-rcfinder@^0.1.6:
-  version "0.1.9"
-  resolved "https://registry.yarnpkg.com/rcfinder/-/rcfinder-0.1.9.tgz#f3e80f387ddf9ae80ae30a4100329642eae81115"
-  dependencies:
-    lodash.clonedeep "^4.3.2"
-
-rcloader@^0.2.2:
-  version "0.2.2"
-  resolved "https://registry.yarnpkg.com/rcloader/-/rcloader-0.2.2.tgz#58d2298b462d0b9bfd2133d2a1ec74fbd705c717"
-  dependencies:
-    lodash.assign "^4.2.0"
-    lodash.isobject "^3.0.2"
-    lodash.merge "^4.6.0"
-    rcfinder "^0.1.6"
-
-read-all-stream@^3.0.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/read-all-stream/-/read-all-stream-3.1.0.tgz#35c3e177f2078ef789ee4bfafa4373074eaef4fa"
-  dependencies:
-    pinkie-promise "^2.0.0"
-    readable-stream "^2.0.0"
-
-read-pkg-up@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
-  dependencies:
-    find-up "^1.0.0"
-    read-pkg "^1.0.0"
-
-read-pkg@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28"
-  dependencies:
-    load-json-file "^1.0.0"
-    normalize-package-data "^2.3.2"
-    path-type "^1.0.0"
-
-readable-stream@1.1:
-  version "1.1.13"
-  resolved "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz#f6eef764f514c89e2b9e23146a75ba106756d23e"
-  dependencies:
-    core-util-is "~1.0.0"
-    inherits "~2.0.1"
-    isarray "0.0.1"
-    string_decoder "~0.10.x"
-
-"readable-stream@>=1.0.33-1 <1.1.0-0", readable-stream@~1.0.17:
-  version "1.0.34"
-  resolved "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c"
-  dependencies:
-    core-util-is "~1.0.0"
-    inherits "~2.0.1"
-    isarray "0.0.1"
-    string_decoder "~0.10.x"
-
-readable-stream@^1.0.26-2, readable-stream@^1.0.26-4, readable-stream@~1.1.9:
-  version "1.1.14"
-  resolved "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"
-  dependencies:
-    core-util-is "~1.0.0"
-    inherits "~2.0.1"
-    isarray "0.0.1"
-    string_decoder "~0.10.x"
-
-readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5:
-  version "2.3.6"
-  resolved "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
-  dependencies:
-    core-util-is "~1.0.0"
-    inherits "~2.0.3"
-    isarray "~1.0.0"
-    process-nextick-args "~2.0.0"
-    safe-buffer "~5.1.1"
-    string_decoder "~1.1.1"
-    util-deprecate "~1.0.1"
-
-rechoir@^0.6.2:
-  version "0.6.2"
-  resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
-  dependencies:
-    resolve "^1.1.6"
-
-redent@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde"
-  dependencies:
-    indent-string "^2.1.0"
-    strip-indent "^1.0.1"
-
-reduce-css-calc@^1.2.6:
-  version "1.3.0"
-  resolved "http://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716"
-  dependencies:
-    balanced-match "^0.4.2"
-    math-expression-evaluator "^1.2.14"
-    reduce-function-call "^1.0.1"
-
-reduce-function-call@^1.0.1:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.2.tgz#5a200bf92e0e37751752fe45b0ab330fd4b6be99"
-  dependencies:
-    balanced-match "^0.4.2"
-
-regenerate@^1.2.1:
-  version "1.4.0"
-  resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11"
-
-regenerator-runtime@^0.11.0:
-  version "0.11.1"
-  resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
-
-regenerator-transform@^0.10.0:
-  version "0.10.1"
-  resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd"
-  dependencies:
-    babel-runtime "^6.18.0"
-    babel-types "^6.19.0"
-    private "^0.1.6"
-
-regex-cache@^0.4.2:
-  version "0.4.4"
-  resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd"
-  dependencies:
-    is-equal-shallow "^0.1.3"
-
-regex-not@^1.0.0, regex-not@^1.0.2:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c"
-  dependencies:
-    extend-shallow "^3.0.2"
-    safe-regex "^1.1.0"
-
-regexpu-core@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240"
-  dependencies:
-    regenerate "^1.2.1"
-    regjsgen "^0.2.0"
-    regjsparser "^0.1.4"
-
-regjsgen@^0.2.0:
-  version "0.2.0"
-  resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7"
-
-regjsparser@^0.1.4:
-  version "0.1.5"
-  resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c"
-  dependencies:
-    jsesc "~0.5.0"
-
-remove-trailing-separator@^1.0.1:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
-
-repeat-element@^1.1.2:
-  version "1.1.3"
-  resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce"
-
-repeat-string@^1.5.2, repeat-string@^1.6.1:
-  version "1.6.1"
-  resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
-
-repeating@^2.0.0:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda"
-  dependencies:
-    is-finite "^1.0.0"
-
-replace-ext@0.0.1:
-  version "0.0.1"
-  resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924"
-
-replace-ext@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb"
-
-request-progress@^2.0.1:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-2.0.1.tgz#5d36bb57961c673aa5b788dbc8141fdf23b44e08"
-  dependencies:
-    throttleit "^1.0.0"
-
-request@2.87.0:
-  version "2.87.0"
-  resolved "https://registry.yarnpkg.com/request/-/request-2.87.0.tgz#32f00235cd08d482b4d0d68db93a829c0ed5756e"
-  dependencies:
-    aws-sign2 "~0.7.0"
-    aws4 "^1.6.0"
-    caseless "~0.12.0"
-    combined-stream "~1.0.5"
-    extend "~3.0.1"
-    forever-agent "~0.6.1"
-    form-data "~2.3.1"
-    har-validator "~5.0.3"
-    http-signature "~1.2.0"
-    is-typedarray "~1.0.0"
-    isstream "~0.1.2"
-    json-stringify-safe "~5.0.1"
-    mime-types "~2.1.17"
-    oauth-sign "~0.8.2"
-    performance-now "^2.1.0"
-    qs "~6.5.1"
-    safe-buffer "^5.1.1"
-    tough-cookie "~2.3.3"
-    tunnel-agent "^0.6.0"
-    uuid "^3.1.0"
-
-request@^2.81.0, request@^2.87.0:
-  version "2.88.0"
-  resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef"
-  dependencies:
-    aws-sign2 "~0.7.0"
-    aws4 "^1.8.0"
-    caseless "~0.12.0"
-    combined-stream "~1.0.6"
-    extend "~3.0.2"
-    forever-agent "~0.6.1"
-    form-data "~2.3.2"
-    har-validator "~5.1.0"
-    http-signature "~1.2.0"
-    is-typedarray "~1.0.0"
-    isstream "~0.1.2"
-    json-stringify-safe "~5.0.1"
-    mime-types "~2.1.19"
-    oauth-sign "~0.9.0"
-    performance-now "^2.1.0"
-    qs "~6.5.2"
-    safe-buffer "^5.1.2"
-    tough-cookie "~2.4.3"
-    tunnel-agent "^0.6.0"
-    uuid "^3.3.2"
-
-require-directory@^2.1.1:
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
-
-require-main-filename@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1"
-
-resolve-dir@^1.0.0, resolve-dir@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43"
-  dependencies:
-    expand-tilde "^2.0.0"
-    global-modules "^1.0.0"
-
-resolve-url@^0.2.1:
-  version "0.2.1"
-  resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
-
-resolve@^1.1.6, resolve@^1.1.7:
-  version "1.8.1"
-  resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26"
-  dependencies:
-    path-parse "^1.0.5"
-
-ret@~0.1.10:
-  version "0.1.15"
-  resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
-
-right-align@^0.1.1:
-  version "0.1.3"
-  resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
-  dependencies:
-    align-text "^0.1.1"
-
-rimraf@2, rimraf@^2.2.6, rimraf@^2.2.8, rimraf@^2.4.0, rimraf@^2.5.4:
-  version "2.6.2"
-  resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
-  dependencies:
-    glob "^7.0.5"
-
-safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
-  version "5.1.2"
-  resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
-
-safe-regex@^1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"
-  dependencies:
-    ret "~0.1.10"
-
-safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
-  version "2.1.2"
-  resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
-
-sass-graph@^2.2.4:
-  version "2.2.4"
-  resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.4.tgz#13fbd63cd1caf0908b9fd93476ad43a51d1e0b49"
-  dependencies:
-    glob "^7.0.0"
-    lodash "^4.0.0"
-    scss-tokenizer "^0.2.3"
-    yargs "^7.0.0"
-
-sax@~1.2.1:
-  version "1.2.4"
-  resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
-
-scss-tokenizer@^0.2.3:
-  version "0.2.3"
-  resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1"
-  dependencies:
-    js-base64 "^2.1.8"
-    source-map "^0.4.2"
-
-seek-bzip@^1.0.3:
-  version "1.0.5"
-  resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.5.tgz#cfe917cb3d274bcffac792758af53173eb1fabdc"
-  dependencies:
-    commander "~2.8.1"
-
-semver-regex@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-1.0.0.tgz#92a4969065f9c70c694753d55248fc68f8f652c9"
-
-semver-truncate@^1.0.0:
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/semver-truncate/-/semver-truncate-1.1.2.tgz#57f41de69707a62709a7e0104ba2117109ea47e8"
-  dependencies:
-    semver "^5.3.0"
-
-"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1:
-  version "5.5.1"
-  resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477"
-
-semver@^4.0.3, semver@^4.1.0:
-  version "4.3.6"
-  resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da"
-
-semver@~5.3.0:
-  version "5.3.0"
-  resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
-
-sequencify@~0.0.7:
-  version "0.0.7"
-  resolved "https://registry.yarnpkg.com/sequencify/-/sequencify-0.0.7.tgz#90cff19d02e07027fd767f5ead3e7b95d1e7380c"
-
-set-blocking@^2.0.0, set-blocking@~2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
-
-set-immediate-shim@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61"
-
-set-value@^0.4.3:
-  version "0.4.3"
-  resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1"
-  dependencies:
-    extend-shallow "^2.0.1"
-    is-extendable "^0.1.1"
-    is-plain-object "^2.0.1"
-    to-object-path "^0.3.0"
-
-set-value@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274"
-  dependencies:
-    extend-shallow "^2.0.1"
-    is-extendable "^0.1.1"
-    is-plain-object "^2.0.3"
-    split-string "^3.0.1"
-
-shebang-command@^1.2.0:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
-  dependencies:
-    shebang-regex "^1.0.0"
-
-shebang-regex@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
-
-shelljs@0.3.x:
-  version "0.3.0"
-  resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.3.0.tgz#3596e6307a781544f591f37da618360f31db57b1"
-
-shellwords@^0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
-
-sigmund@~1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590"
-
-signal-exit@^3.0.0:
-  version "3.0.2"
-  resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
-
-slash@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
-
-snapdragon-node@^2.0.1:
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"
-  dependencies:
-    define-property "^1.0.0"
-    isobject "^3.0.0"
-    snapdragon-util "^3.0.1"
-
-snapdragon-util@^3.0.1:
-  version "3.0.1"
-  resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2"
-  dependencies:
-    kind-of "^3.2.0"
-
-snapdragon@^0.8.1:
-  version "0.8.2"
-  resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d"
-  dependencies:
-    base "^0.11.1"
-    debug "^2.2.0"
-    define-property "^0.2.5"
-    extend-shallow "^2.0.1"
-    map-cache "^0.2.2"
-    source-map "^0.5.6"
-    source-map-resolve "^0.5.0"
-    use "^3.1.0"
-
-sort-keys@^1.0.0:
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad"
-  dependencies:
-    is-plain-obj "^1.0.0"
-
-source-map-resolve@^0.5.0, source-map-resolve@^0.5.2:
-  version "0.5.2"
-  resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259"
-  dependencies:
-    atob "^2.1.1"
-    decode-uri-component "^0.2.0"
-    resolve-url "^0.2.1"
-    source-map-url "^0.4.0"
-    urix "^0.1.0"
-
-source-map-support@^0.4.15:
-  version "0.4.18"
-  resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f"
-  dependencies:
-    source-map "^0.5.6"
-
-source-map-url@^0.4.0:
-  version "0.4.0"
-  resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
-
-source-map@^0.4.2:
-  version "0.4.4"
-  resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
-  dependencies:
-    amdefine ">=0.0.4"
-
-source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1:
-  version "0.5.7"
-  resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
-
-source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0:
-  version "0.6.1"
-  resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
-
-sparkles@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.1.tgz#008db65edce6c50eec0c5e228e1945061dd0437c"
-
-spdx-correct@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82"
-  dependencies:
-    spdx-expression-parse "^3.0.0"
-    spdx-license-ids "^3.0.0"
-
-spdx-exceptions@^2.1.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz#2c7ae61056c714a5b9b9b2b2af7d311ef5c78fe9"
-
-spdx-expression-parse@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0"
-  dependencies:
-    spdx-exceptions "^2.1.0"
-    spdx-license-ids "^3.0.0"
-
-spdx-license-ids@^3.0.0:
-  version "3.0.1"
-  resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz#e2a303236cac54b04031fa7a5a79c7e701df852f"
-
-split-string@^3.0.1, split-string@^3.0.2:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2"
-  dependencies:
-    extend-shallow "^3.0.0"
-
-split@0.2:
-  version "0.2.10"
-  resolved "http://registry.npmjs.org/split/-/split-0.2.10.tgz#67097c601d697ce1368f418f06cd201cf0521a57"
-  dependencies:
-    through "2"
-
-split@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9"
-  dependencies:
-    through "2"
-
-sprintf-js@~1.0.2:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
-
-squeak@^1.0.0:
-  version "1.3.0"
-  resolved "https://registry.yarnpkg.com/squeak/-/squeak-1.3.0.tgz#33045037b64388b567674b84322a6521073916c3"
-  dependencies:
-    chalk "^1.0.0"
-    console-stream "^0.1.1"
-    lpad-align "^1.0.1"
-
-sshpk@^1.7.0:
-  version "1.14.2"
-  resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98"
-  dependencies:
-    asn1 "~0.2.3"
-    assert-plus "^1.0.0"
-    dashdash "^1.12.0"
-    getpass "^0.1.1"
-    safer-buffer "^2.0.2"
-  optionalDependencies:
-    bcrypt-pbkdf "^1.0.0"
-    ecc-jsbn "~0.1.1"
-    jsbn "~0.1.0"
-    tweetnacl "~0.14.0"
-
-stack-trace@0.0.x:
-  version "0.0.10"
-  resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0"
-
-stat-mode@^0.2.0:
-  version "0.2.2"
-  resolved "https://registry.yarnpkg.com/stat-mode/-/stat-mode-0.2.2.tgz#e6c80b623123d7d80cf132ce538f346289072502"
-
-static-extend@^0.1.1:
-  version "0.1.2"
-  resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6"
-  dependencies:
-    define-property "^0.2.5"
-    object-copy "^0.1.0"
-
-statuses@1:
-  version "1.5.0"
-  resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
-
-stdout-stream@^1.4.0:
-  version "1.4.1"
-  resolved "https://registry.yarnpkg.com/stdout-stream/-/stdout-stream-1.4.1.tgz#5ac174cdd5cd726104aa0c0b2bd83815d8d535de"
-  dependencies:
-    readable-stream "^2.0.1"
-
-stream-combiner2@^1.1.1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe"
-  dependencies:
-    duplexer2 "~0.1.0"
-    readable-stream "^2.0.2"
-
-stream-combiner@^0.2.2:
-  version "0.2.2"
-  resolved "http://registry.npmjs.org/stream-combiner/-/stream-combiner-0.2.2.tgz#aec8cbac177b56b6f4fa479ced8c1912cee52858"
-  dependencies:
-    duplexer "~0.1.1"
-    through "~2.3.4"
-
-stream-combiner@~0.0.4:
-  version "0.0.4"
-  resolved "http://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14"
-  dependencies:
-    duplexer "~0.1.1"
-
-stream-consume@~0.1.0:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/stream-consume/-/stream-consume-0.1.1.tgz#d3bdb598c2bd0ae82b8cac7ac50b1107a7996c48"
-
-stream-shift@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952"
-
-streamqueue@0.0.6:
-  version "0.0.6"
-  resolved "https://registry.yarnpkg.com/streamqueue/-/streamqueue-0.0.6.tgz#66f5f5ec94e9b8af249e4aec2dd1f741bfe94de3"
-  dependencies:
-    readable-stream "^1.0.26-2"
-
-strict-uri-encode@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713"
-
-string-width@^1.0.1, string-width@^1.0.2:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
-  dependencies:
-    code-point-at "^1.0.0"
-    is-fullwidth-code-point "^1.0.0"
-    strip-ansi "^3.0.0"
-
-"string-width@^1.0.2 || 2":
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
-  dependencies:
-    is-fullwidth-code-point "^2.0.0"
-    strip-ansi "^4.0.0"
-
-string_decoder@~0.10.x:
-  version "0.10.31"
-  resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
-
-string_decoder@~1.1.1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
-  dependencies:
-    safe-buffer "~5.1.0"
-
-strip-ansi@^0.3.0:
-  version "0.3.0"
-  resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.3.0.tgz#25f48ea22ca79187f3174a4db8759347bb126220"
-  dependencies:
-    ansi-regex "^0.2.1"
-
-strip-ansi@^3.0.0, strip-ansi@^3.0.1:
-  version "3.0.1"
-  resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
-  dependencies:
-    ansi-regex "^2.0.0"
-
-strip-ansi@^4.0.0:
-  version "4.0.0"
-  resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
-  dependencies:
-    ansi-regex "^3.0.0"
-
-strip-bom-stream@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz#e7144398577d51a6bed0fa1994fa05f43fd988ee"
-  dependencies:
-    first-chunk-stream "^1.0.0"
-    strip-bom "^2.0.0"
-
-strip-bom-string@1.X:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/strip-bom-string/-/strip-bom-string-1.0.0.tgz#e5211e9224369fbb81d633a2f00044dc8cedad92"
-
-strip-bom@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-1.0.0.tgz#85b8862f3844b5a6d5ec8467a93598173a36f794"
-  dependencies:
-    first-chunk-stream "^1.0.0"
-    is-utf8 "^0.2.0"
-
-strip-bom@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e"
-  dependencies:
-    is-utf8 "^0.2.0"
-
-strip-dirs@^1.0.0:
-  version "1.1.1"
-  resolved "http://registry.npmjs.org/strip-dirs/-/strip-dirs-1.1.1.tgz#960bbd1287844f3975a4558aa103a8255e2456a0"
-  dependencies:
-    chalk "^1.0.0"
-    get-stdin "^4.0.1"
-    is-absolute "^0.1.5"
-    is-natural-number "^2.0.0"
-    minimist "^1.1.0"
-    sum-up "^1.0.1"
-
-strip-eof@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
-
-strip-indent@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2"
-  dependencies:
-    get-stdin "^4.0.1"
-
-strip-json-comments@1.0.x:
-  version "1.0.4"
-  resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91"
-
-strip-json-comments@~2.0.1:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
-
-strip-outer@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631"
-  dependencies:
-    escape-string-regexp "^1.0.2"
-
-sum-up@^1.0.1:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/sum-up/-/sum-up-1.0.3.tgz#1c661f667057f63bcb7875aa1438bc162525156e"
-  dependencies:
-    chalk "^1.0.0"
-
-supports-color@^0.2.0:
-  version "0.2.0"
-  resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-0.2.0.tgz#d92de2694eb3f67323973d7ae3d8b55b4c22190a"
-
-supports-color@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
-
-supports-color@^3.2.3:
-  version "3.2.3"
-  resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6"
-  dependencies:
-    has-flag "^1.0.0"
-
-supports-color@^5.3.0:
-  version "5.5.0"
-  resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
-  dependencies:
-    has-flag "^3.0.0"
-
-svgo@^0.7.0:
-  version "0.7.2"
-  resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5"
-  dependencies:
-    coa "~1.0.1"
-    colors "~1.1.2"
-    csso "~2.3.1"
-    js-yaml "~3.7.0"
-    mkdirp "~0.5.1"
-    sax "~1.2.1"
-    whet.extend "~0.9.9"
-
-tar-stream@^1.1.1:
-  version "1.6.2"
-  resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555"
-  dependencies:
-    bl "^1.0.0"
-    buffer-alloc "^1.2.0"
-    end-of-stream "^1.0.0"
-    fs-constants "^1.0.0"
-    readable-stream "^2.3.0"
-    to-buffer "^1.1.1"
-    xtend "^4.0.0"
-
-tar@^2.0.0:
-  version "2.2.1"
-  resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1"
-  dependencies:
-    block-stream "*"
-    fstream "^1.0.2"
-    inherits "2"
-
-temp-dir@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d"
-
-tempfile@^1.0.0:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-1.1.1.tgz#5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2"
-  dependencies:
-    os-tmpdir "^1.0.0"
-    uuid "^2.0.1"
-
-tempfile@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-2.0.0.tgz#6b0446856a9b1114d1856ffcbe509cccb0977265"
-  dependencies:
-    temp-dir "^1.0.0"
-    uuid "^3.0.1"
-
-throttleit@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c"
-
-through2-concurrent@^1.1.1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/through2-concurrent/-/through2-concurrent-1.1.1.tgz#11cb4ea4c9e31bca6e4c1e6dba48d1c728c3524b"
-  dependencies:
-    through2 "^2.0.0"
-
-through2-filter@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-2.0.0.tgz#60bc55a0dacb76085db1f9dae99ab43f83d622ec"
-  dependencies:
-    through2 "~2.0.0"
-    xtend "~4.0.0"
-
-through2@2.X, through2@^2.0.0, through2@^2.0.3, through2@~2.0.0:
-  version "2.0.3"
-  resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be"
-  dependencies:
-    readable-stream "^2.1.5"
-    xtend "~4.0.1"
-
-through2@^0.5.0:
-  version "0.5.1"
-  resolved "https://registry.yarnpkg.com/through2/-/through2-0.5.1.tgz#dfdd012eb9c700e2323fd334f38ac622ab372da7"
-  dependencies:
-    readable-stream "~1.0.17"
-    xtend "~3.0.0"
-
-through2@^0.6.0, through2@^0.6.1:
-  version "0.6.5"
-  resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48"
-  dependencies:
-    readable-stream ">=1.0.33-1 <1.1.0-0"
-    xtend ">=4.0.0 <4.1.0-0"
-
-through@2, through@^2.3.8, through@~2.3, through@~2.3.1, through@~2.3.4:
-  version "2.3.8"
-  resolved "http://registry.npmjs.org/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
-
-tildify@^1.0.0:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/tildify/-/tildify-1.2.0.tgz#dcec03f55dca9b7aa3e5b04f21817eb56e63588a"
-  dependencies:
-    os-homedir "^1.0.0"
-
-time-stamp@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3"
-
-timed-out@^3.0.0:
-  version "3.1.3"
-  resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-3.1.3.tgz#95860bfcc5c76c277f8f8326fd0f5b2e20eba217"
-
-timers-ext@^0.1.5:
-  version "0.1.5"
-  resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.5.tgz#77147dd4e76b660c2abb8785db96574cbbd12922"
-  dependencies:
-    es5-ext "~0.10.14"
-    next-tick "1"
-
-to-absolute-glob@^0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz#1cdfa472a9ef50c239ee66999b662ca0eb39937f"
-  dependencies:
-    extend-shallow "^2.0.1"
-
-to-buffer@^1.1.1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80"
-
-to-fast-properties@^1.0.3:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47"
-
-to-object-path@^0.3.0:
-  version "0.3.0"
-  resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
-  dependencies:
-    kind-of "^3.0.2"
-
-to-regex-range@^2.1.0:
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38"
-  dependencies:
-    is-number "^3.0.0"
-    repeat-string "^1.6.1"
-
-to-regex@^3.0.1, to-regex@^3.0.2:
-  version "3.0.2"
-  resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce"
-  dependencies:
-    define-property "^2.0.2"
-    extend-shallow "^3.0.2"
-    regex-not "^1.0.2"
-    safe-regex "^1.1.0"
-
-tough-cookie@~2.3.3:
-  version "2.3.4"
-  resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655"
-  dependencies:
-    punycode "^1.4.1"
-
-tough-cookie@~2.4.3:
-  version "2.4.3"
-  resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781"
-  dependencies:
-    psl "^1.1.24"
-    punycode "^1.4.1"
-
-trim-newlines@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613"
-
-trim-repeated@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/trim-repeated/-/trim-repeated-1.0.0.tgz#e3646a2ea4e891312bf7eace6cfb05380bc01c21"
-  dependencies:
-    escape-string-regexp "^1.0.2"
-
-trim-right@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003"
-
-"true-case-path@^1.0.2":
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/true-case-path/-/true-case-path-1.0.3.tgz#f813b5a8c86b40da59606722b144e3225799f47d"
-  dependencies:
-    glob "^7.1.2"
-
-try-json-parse@^0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/try-json-parse/-/try-json-parse-0.1.1.tgz#8db01622e877e51b83140caee7c80864ad390c82"
-
-tunnel-agent@^0.4.0:
-  version "0.4.3"
-  resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb"
-
-tunnel-agent@^0.6.0:
-  version "0.6.0"
-  resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
-  dependencies:
-    safe-buffer "^5.0.1"
-
-tweetnacl@^0.14.3, tweetnacl@~0.14.0:
-  version "0.14.5"
-  resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
-
-type-is@~1.6.10:
-  version "1.6.16"
-  resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194"
-  dependencies:
-    media-typer "0.3.0"
-    mime-types "~2.1.18"
-
-typedarray@^0.0.6:
-  version "0.0.6"
-  resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
-
-uglify-js@~2.8.10:
-  version "2.8.29"
-  resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
-  dependencies:
-    source-map "~0.5.1"
-    yargs "~3.10.0"
-  optionalDependencies:
-    uglify-to-browserify "~1.0.0"
-
-uglify-save-license@^0.4.1:
-  version "0.4.1"
-  resolved "https://registry.yarnpkg.com/uglify-save-license/-/uglify-save-license-0.4.1.tgz#95726c17cc6fd171c3617e3bf4d8d82aa8c4cce1"
-
-uglify-to-browserify@~1.0.0:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
-
-unc-path-regex@^0.1.2:
-  version "0.1.2"
-  resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa"
-
-unicode-5.2.0@^0.7.5:
-  version "0.7.5"
-  resolved "https://registry.yarnpkg.com/unicode-5.2.0/-/unicode-5.2.0-0.7.5.tgz#e0df129431a28a95263d8c480fb5e9ab2b0973f0"
-
-union-value@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4"
-  dependencies:
-    arr-union "^3.1.0"
-    get-value "^2.0.6"
-    is-extendable "^0.1.1"
-    set-value "^0.4.3"
-
-uniq@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff"
-
-uniqs@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02"
-
-unique-stream@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-1.0.0.tgz#d59a4a75427447d9aa6c91e70263f8d26a4b104b"
-
-unique-stream@^2.0.2:
-  version "2.2.1"
-  resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.2.1.tgz#5aa003cfbe94c5ff866c4e7d668bb1c4dbadb369"
-  dependencies:
-    json-stable-stringify "^1.0.0"
-    through2-filter "^2.0.0"
-
-unpipe@1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
-
-unset-value@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559"
-  dependencies:
-    has-value "^0.3.1"
-    isobject "^3.0.0"
-
-unzip-response@^1.0.2:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-1.0.2.tgz#b984f0877fc0a89c2c773cc1ef7b5b232b5b06fe"
-
-urix@^0.1.0:
-  version "0.1.0"
-  resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
-
-url-parse-lax@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73"
-  dependencies:
-    prepend-http "^1.0.1"
-
-url-regex@^3.0.0:
-  version "3.2.0"
-  resolved "https://registry.yarnpkg.com/url-regex/-/url-regex-3.2.0.tgz#dbad1e0c9e29e105dd0b1f09f6862f7fdb482724"
-  dependencies:
-    ip-regex "^1.0.1"
-
-use@^3.1.0:
-  version "3.1.1"
-  resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"
-
-user-home@^1.1.1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190"
-
-util-deprecate@~1.0.1:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
-
-uuid@^2.0.1:
-  version "2.0.3"
-  resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a"
-
-uuid@^3.0.1, uuid@^3.1.0, uuid@^3.3.2:
-  version "3.3.2"
-  resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
-
-v8flags@^2.0.2:
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4"
-  dependencies:
-    user-home "^1.1.1"
-
-vali-date@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/vali-date/-/vali-date-1.0.0.tgz#1b904a59609fb328ef078138420934f6b86709a6"
-
-validate-npm-package-license@^3.0.1:
-  version "3.0.4"
-  resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a"
-  dependencies:
-    spdx-correct "^3.0.0"
-    spdx-expression-parse "^3.0.0"
-
-vendors@^1.0.0:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.2.tgz#7fcb5eef9f5623b156bcea89ec37d63676f21801"
-
-verror@1.10.0:
-  version "1.10.0"
-  resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
-  dependencies:
-    assert-plus "^1.0.0"
-    core-util-is "1.0.2"
-    extsprintf "^1.2.0"
-
-vinyl-assign@^1.0.1:
-  version "1.2.1"
-  resolved "https://registry.yarnpkg.com/vinyl-assign/-/vinyl-assign-1.2.1.tgz#4d198891b5515911d771a8cd9c5480a46a074a45"
-  dependencies:
-    object-assign "^4.0.1"
-    readable-stream "^2.0.0"
-
-vinyl-fs@^0.3.0:
-  version "0.3.14"
-  resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-0.3.14.tgz#9a6851ce1cac1c1cea5fe86c0931d620c2cfa9e6"
-  dependencies:
-    defaults "^1.0.0"
-    glob-stream "^3.1.5"
-    glob-watcher "^0.0.6"
-    graceful-fs "^3.0.0"
-    mkdirp "^0.5.0"
-    strip-bom "^1.0.0"
-    through2 "^0.6.1"
-    vinyl "^0.4.0"
-
-vinyl-fs@^2.2.0:
-  version "2.4.4"
-  resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-2.4.4.tgz#be6ff3270cb55dfd7d3063640de81f25d7532239"
-  dependencies:
-    duplexify "^3.2.0"
-    glob-stream "^5.3.2"
-    graceful-fs "^4.0.0"
-    gulp-sourcemaps "1.6.0"
-    is-valid-glob "^0.3.0"
-    lazystream "^1.0.0"
-    lodash.isequal "^4.0.0"
-    merge-stream "^1.0.0"
-    mkdirp "^0.5.0"
-    object-assign "^4.0.0"
-    readable-stream "^2.0.4"
-    strip-bom "^2.0.0"
-    strip-bom-stream "^1.0.0"
-    through2 "^2.0.0"
-    through2-filter "^2.0.0"
-    vali-date "^1.0.0"
-    vinyl "^1.0.0"
-
-vinyl-sourcemaps-apply@^0.2.0, vinyl-sourcemaps-apply@^0.2.1:
-  version "0.2.1"
-  resolved "https://registry.yarnpkg.com/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz#ab6549d61d172c2b1b87be5c508d239c8ef87705"
-  dependencies:
-    source-map "^0.5.1"
-
-vinyl@^0.2.1:
-  version "0.2.3"
-  resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.2.3.tgz#bca938209582ec5a49ad538a00fa1f125e513252"
-  dependencies:
-    clone-stats "~0.0.1"
-
-vinyl@^0.4.0, vinyl@^0.4.3:
-  version "0.4.6"
-  resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.4.6.tgz#2f356c87a550a255461f36bbeb2a5ba8bf784847"
-  dependencies:
-    clone "^0.2.0"
-    clone-stats "^0.0.1"
-
-vinyl@^0.5.0:
-  version "0.5.3"
-  resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.5.3.tgz#b0455b38fc5e0cf30d4325132e461970c2091cde"
-  dependencies:
-    clone "^1.0.0"
-    clone-stats "^0.0.1"
-    replace-ext "0.0.1"
-
-vinyl@^1.0.0, vinyl@^1.1.0:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884"
-  dependencies:
-    clone "^1.0.0"
-    clone-stats "^0.0.1"
-    replace-ext "0.0.1"
-
-vinyl@^2.0.0:
-  version "2.2.0"
-  resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.0.tgz#d85b07da96e458d25b2ffe19fece9f2caa13ed86"
-  dependencies:
-    clone "^2.1.1"
-    clone-buffer "^1.0.0"
-    clone-stats "^1.0.0"
-    cloneable-readable "^1.0.0"
-    remove-trailing-separator "^1.0.1"
-    replace-ext "^1.0.0"
-
-ware@^1.2.0:
-  version "1.3.0"
-  resolved "https://registry.yarnpkg.com/ware/-/ware-1.3.0.tgz#d1b14f39d2e2cb4ab8c4098f756fe4b164e473d4"
-  dependencies:
-    wrap-fn "^0.1.0"
-
-websocket-driver@>=0.3.6:
-  version "0.7.0"
-  resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.0.tgz#0caf9d2d755d93aee049d4bdd0d3fe2cca2a24eb"
-  dependencies:
-    http-parser-js ">=0.4.0"
-    websocket-extensions ">=0.1.1"
-
-websocket-extensions@>=0.1.1:
-  version "0.1.3"
-  resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29"
-
-whet.extend@~0.9.9:
-  version "0.9.9"
-  resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1"
-
-which-module@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f"
-
-which@1, which@^1.2.10, which@^1.2.14, which@^1.2.9, which@^1.3.0:
-  version "1.3.1"
-  resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
-  dependencies:
-    isexe "^2.0.0"
-
-wide-align@^1.1.0:
-  version "1.1.3"
-  resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"
-  dependencies:
-    string-width "^1.0.2 || 2"
-
-window-size@0.1.0:
-  version "0.1.0"
-  resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
-
-winston@^2.4.0:
-  version "2.4.4"
-  resolved "https://registry.yarnpkg.com/winston/-/winston-2.4.4.tgz#a01e4d1d0a103cf4eada6fc1f886b3110d71c34b"
-  dependencies:
-    async "~1.0.0"
-    colors "1.0.x"
-    cycle "1.0.x"
-    eyes "0.1.x"
-    isstream "0.1.x"
-    stack-trace "0.0.x"
-
-wordwrap@0.0.2:
-  version "0.0.2"
-  resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
-
-wrap-ansi@^2.0.0:
-  version "2.1.0"
-  resolved "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"
-  dependencies:
-    string-width "^1.0.1"
-    strip-ansi "^3.0.1"
-
-wrap-fn@^0.1.0:
-  version "0.1.5"
-  resolved "https://registry.yarnpkg.com/wrap-fn/-/wrap-fn-0.1.5.tgz#f21b6e41016ff4a7e31720dbc63a09016bdf9845"
-  dependencies:
-    co "3.1.0"
-
-wrappy@1:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
-
-"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1:
-  version "4.0.1"
-  resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
-
-xtend@~3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/xtend/-/xtend-3.0.0.tgz#5cce7407baf642cba7becda568111c493f59665a"
-
-y18n@^3.2.1:
-  version "3.2.1"
-  resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
-
-yallist@^2.1.2:
-  version "2.1.2"
-  resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
-
-yargs-parser@^5.0.0:
-  version "5.0.0"
-  resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a"
-  dependencies:
-    camelcase "^3.0.0"
-
-yargs@^7.0.0:
-  version "7.1.0"
-  resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8"
-  dependencies:
-    camelcase "^3.0.0"
-    cliui "^3.2.0"
-    decamelize "^1.1.1"
-    get-caller-file "^1.0.1"
-    os-locale "^1.4.0"
-    read-pkg-up "^1.0.1"
-    require-directory "^2.1.1"
-    require-main-filename "^1.0.1"
-    set-blocking "^2.0.0"
-    string-width "^1.0.2"
-    which-module "^1.0.0"
-    y18n "^3.2.1"
-    yargs-parser "^5.0.0"
-
-yargs@~3.10.0:
-  version "3.10.0"
-  resolved "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
-  dependencies:
-    camelcase "^1.0.2"
-    cliui "^2.1.0"
-    decamelize "^1.0.0"
-    window-size "0.1.0"
-
-yauzl@2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005"
-  dependencies:
-    fd-slicer "~1.0.1"
-
-yauzl@^2.2.1:
-  version "2.10.0"
-  resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9"
-  dependencies:
-    buffer-crc32 "~0.2.3"
-    fd-slicer "~1.1.0"
diff --git a/Gems/AssetMemoryAnalyzer/gem.json b/Gems/AssetMemoryAnalyzer/gem.json
deleted file mode 100644
index 443eeced18..0000000000
--- a/Gems/AssetMemoryAnalyzer/gem.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
-    "gem_name": "AssetMemoryAnalyzer",
-    "display_name": "Asset Memory Analyzer",
-    "license": "Apache-2.0 Or MIT",
-    "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt",
-    "origin": "Open 3D Engine - o3de.org",
-    "type": "Code",
-    "summary": "The Asset Memory Analyzer Gem provides tools to profile asset memory usage in Open 3D Engine through ImGUI (Immediate Mode Graphical User Interface).",
-    "canonical_tags": [
-        "Gem"
-    ],
-    "user_tags": [
-        "Debug",
-        "Utility",
-        "Tools"
-    ],
-    "icon_path": "preview.png",
-    "requirements": "",
-    "documentation_url": "https://o3de.org/docs/user-guide/gems/reference/debug/asset-memory-analyzer/",
-    "dependencies": [
-        "ImGui"
-    ]
-}
diff --git a/Gems/AssetMemoryAnalyzer/preview.png b/Gems/AssetMemoryAnalyzer/preview.png
deleted file mode 100644
index 2f1ed47754..0000000000
--- a/Gems/AssetMemoryAnalyzer/preview.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:6d6204c6730e5675791765ca194e9b1cbec282208e280507de830afc2805e5fa
-size 41127
diff --git a/Gems/AssetMemoryAnalyzer/www/AssetMemoryViewer/index.html b/Gems/AssetMemoryAnalyzer/www/AssetMemoryViewer/index.html
deleted file mode 100644
index 85a4e47db8..0000000000
--- a/Gems/AssetMemoryAnalyzer/www/AssetMemoryViewer/index.html
+++ /dev/null
@@ -1,268 +0,0 @@
-
-
-Lumberyard Asset Memory Viewer
-
-
-
-
-
-
-
-
-
-
-
- Drop your assetmem JSON file here, or click to browse to it. -
- - - - -
- -
-
- - - - diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant.material index d49ca5dfe8..070c275b51 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "metallic": { "useTexture": false @@ -18,4 +18,4 @@ "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant_tex.material index 49014ae2b1..191073e26a 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant_tex.material @@ -1,11 +1,12 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { - "textureMap": "Materials/Presets/MacBeth/00_illuminant_sRGB.tif" + "textureBlendMode": "Lerp", + "textureMap": "00_illuminant_sRGB.tif" } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin.material index 0fcedddf9d..46666228bf 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin.material @@ -1,18 +1,17 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ - 0.17143511772155763, + 0.17143511772155762, 0.08227664977312088, - 0.056122682988643649, + 0.056122682988643646, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/01_dark_skin_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin_tex.material index 7b10a3b5f5..487ef2c279 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\01_dark_skin.material", - "propertyLayoutVersion": 3, + "parentMaterial": "01_dark_skin.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "01_dark_skin_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin.material index 2ca339cadc..bd6f235f51 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,7 @@ 0.21953155100345612, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/02_light_skin_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin_tex.material index b2f9c271b9..f452446dad 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\02_light_skin.material", - "propertyLayoutVersion": 3, + "parentMaterial": "02_light_skin.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "02_light_skin_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky.material index 6432314ff2..fad628e885 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky.material @@ -1,18 +1,17 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.10946822166442871, - 0.19806210696697236, - 0.33716335892677309, + 0.19806210696697235, + 0.33716335892677307, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/03_blue_sky_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky_tex.material index 606d958818..9a64b15f79 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\03_blue_sky.material", - "propertyLayoutVersion": 3, + "parentMaterial": "03_blue_sky.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "03_blue_sky_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage.material index 6b43cabedb..2f833f57ee 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage.material @@ -1,16 +1,16 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.10223544389009476, - 0.14996567368507386, - 0.052857253700494769, + 0.14996567368507385, + 0.052857253700494766, 1.0 ] } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage_tex.material index 5ea1a31afc..406508701d 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\04_foliage.material", - "propertyLayoutVersion": 3, + "parentMaterial": "04_foliage.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,8 @@ 1.0, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/04_foliage_sRGB.tif" + "textureBlendMode": "Lerp", + "textureMap": "04_foliage_sRGB.tif" } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower.material index fa8302b859..bf6ee703da 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower.material @@ -1,16 +1,16 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.2232242375612259, 0.21953155100345612, - 0.43414968252182009, + 0.43414968252182007, 1.0 ] } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower_tex.material index 2d3ecdea6f..5e9085f53f 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\05_blue_flower.material", - "propertyLayoutVersion": 3, + "parentMaterial": "05_blue_flower.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,8 @@ 1.0, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/05_blue_flower_sRGB.tif" + "textureBlendMode": "Lerp", + "textureMap": "05_blue_flower_sRGB.tif" } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green.material index 86e4fcb19d..a8e411ddcd 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green.material @@ -1,18 +1,17 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.12477302551269531, 0.5209887623786926, - 0.40723279118537905, + 0.40723279118537903, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/06_bluish_green_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green_tex.material index 13b3cf293d..63392a2ced 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\06_bluish_green.material", - "propertyLayoutVersion": 3, + "parentMaterial": "06_bluish_green.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "06_bluish_green_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange.material index f60f82f16c..c1c76e8eaf 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange.material @@ -1,16 +1,16 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.7156938910484314, - 0.19806210696697236, - 0.026245517656207086, + 0.19806210696697235, + 0.026245517656207085, 1.0 ] } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange_tex.material index 8db258d41f..c39a5283f5 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\07_orange.material", - "propertyLayoutVersion": 3, + "parentMaterial": "07_orange.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,8 @@ 1.0, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/07_orange_sRGB.tif" + "textureBlendMode": "Lerp", + "textureMap": "07_orange_sRGB.tif" } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue.material index 5e978ea495..4abdf60285 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue.material @@ -1,18 +1,17 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.06480506807565689, 0.10702677816152573, - 0.39157700538635256, + 0.39157700538635254, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/08_purplish_blue_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue_tex.material index 0ae7ea5e92..867065b3c8 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\08_purplish_blue.material", - "propertyLayoutVersion": 3, + "parentMaterial": "08_purplish_blue.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "08_purplish_blue_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red.material index 86d9714b41..0e38da555b 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,7 @@ 0.12213321030139923, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/09_moderate_red_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red_tex.material index a738a10dfd..5beb254b70 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\09_moderate_red.material", - "propertyLayoutVersion": 3, + "parentMaterial": "09_moderate_red.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "09_moderate_red_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple.material index cf9d9c2f03..98ba44f372 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple.material @@ -1,18 +1,17 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.10461585223674774, - 0.043732356280088428, + 0.043732356280088425, 0.1412680298089981, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/10_purple_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple_tex.material index f0deb97c0c..0e2b397bbf 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\10_purple.material", - "propertyLayoutVersion": 3, + "parentMaterial": "10_purple.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "10_purple_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green.material index 11b67ee518..e31941cea0 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,7 @@ 0.0481727309525013, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/11_yellow_green_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green_tex.material index e7c081c496..ff46c8d451 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\11_yellow_green.material", - "propertyLayoutVersion": 3, + "parentMaterial": "11_yellow_green.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "11_yellow_green_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow.material index eb194f7990..101fadbe5d 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow.material @@ -1,18 +1,17 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.7835355401039124, - 0.35640496015548708, + 0.35640496015548706, 0.02217135950922966, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/12_orange_yellow_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow_tex.material index 392c99b0ba..96d112c42b 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\12_orange_yellow.material", - "propertyLayoutVersion": 3, + "parentMaterial": "12_orange_yellow.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "12_orange_yellow_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue.material index 0403aff6fe..cc607f8812 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue.material @@ -1,18 +1,17 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ - 0.024155031889677049, + 0.024155031889677048, 0.0481727309525013, - 0.29176774621009829, + 0.29176774621009827, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/13_blue_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue_tex.material index fe9929f7d4..51ffbee6ed 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\13_blue.material", - "propertyLayoutVersion": 3, + "parentMaterial": "13_blue.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "13_blue_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green.material index f199575b58..22ea9ceb44 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,7 @@ 0.06480506807565689, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/14_green_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green_tex.material index 15adcf4788..703b755f8e 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\14_green.material", - "propertyLayoutVersion": 3, + "parentMaterial": "14_green.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "14_green_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red.material index 6489638ba6..3f689a9ee8 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red.material @@ -1,18 +1,17 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ - 0.43414968252182009, - 0.029556725174188615, - 0.03955138474702835, + 0.43244872157, + 0.0297351510059, + 0.0399429307193, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/15_red_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red_sRGB.tif b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red_sRGB.tif index eccc30b408..4c150db62f 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red_sRGB.tif +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red_sRGB.tif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:19e05a0f796d3a9de91ae56b4e802af8e6ad683b79275365c3220564f9eea05c -size 19460 +oid sha256:b53b8ca6b7062239398820aef6fb4145a0b6c8c7e3aae90c17b6b87f806d3579 +size 19426 diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red_tex.material index 79ce245674..83d2983bec 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\15_red.material", - "propertyLayoutVersion": 3, + "parentMaterial": "15_red.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "15_red_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow.material index f5d302126f..5dc609aa14 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,7 @@ 0.00802624598145485, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/16_yellow_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow_tex.material index 6daa82a310..79dc6ccdcd 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\16_yellow.material", - "propertyLayoutVersion": 3, + "parentMaterial": "16_yellow.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "16_yellow_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta.material index 7d3019913d..1401e77bd6 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,7 @@ 0.30498206615448, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/17_magenta_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta_tex.material index c346a3e29d..cfba129671 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\17_magenta.material", - "propertyLayoutVersion": 3, + "parentMaterial": "17_magenta.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "17_magenta_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan.material index 6b2ab75dbd..8a98ff95b5 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan.material @@ -1,18 +1,17 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.0, - 0.24620431661605836, + 0.24620431661605835, 0.3813229501247406, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/18_cyan_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan_tex.material index d0d5234498..a16b776687 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\18_cyan.material", - "propertyLayoutVersion": 3, + "parentMaterial": "18_cyan.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "18_cyan_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D.material index de5c5f6281..11dbd6b84d 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,7 @@ 0.8713664412498474, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/19_white_9-5_0-05D_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D_tex.material index 9fd79a1633..424366ced6 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\19_white_9-5_0-05D.material", - "propertyLayoutVersion": 3, + "parentMaterial": "19_white_9-5_0-05D.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "19_white_9-5_0-05D_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D.material index 748471138d..63ba366588 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,7 @@ 0.5840848684310913, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/20_neutral_8-0_0-23D_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D_tex.material index 3a23f07bfa..5cd5c32c7b 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\20_neutral_8-0_0-23D.material", - "propertyLayoutVersion": 3, + "parentMaterial": "20_neutral_8-0_0-23D.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "20_neutral_8-0_0-23D_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D.material index edfae0689f..4e7379e704 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D.material @@ -1,18 +1,17 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.3515373468399048, - 0.35640496015548708, - 0.35640496015548708, + 0.35640496015548706, + 0.35640496015548706, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/21_neutral_6-5_0-44D_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D_tex.material index bf4fe1218a..276177699a 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\21_neutral_6-5_0-44D.material", - "propertyLayoutVersion": 3, + "parentMaterial": "21_neutral_6-5_0-44D.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "21_neutral_6-5_0-44D_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D.material index a758b474f7..894c3826c3 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D.material @@ -1,18 +1,17 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ - 0.18782329559326173, + 0.18782329559326172, 0.191195547580719, 0.191195547580719, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/22_neutral_5-0_0-70D_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D_tex.material index 69b18cb115..b365408fae 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\22_neutral_5-0_0-70D.material", - "propertyLayoutVersion": 3, + "parentMaterial": "22_neutral_5-0_0-70D.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "22_neutral_5-0_0-70D_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D.material index 7ce60b545b..33a89bae94 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,7 @@ 0.09083695709705353, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/23_neutral_3-5_1-05D_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D_tex.material index 1b77a786c9..ddade882b3 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\23_neutral_3-5_1-05D.material", - "propertyLayoutVersion": 3, + "parentMaterial": "23_neutral_3-5_1-05D.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "23_neutral_3-5_1-05D_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D.material index f448eea265..0e7f6a7bc1 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,7 @@ 0.0318913571536541, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/24_black_2-0_1-50D_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D_tex.material index 8530dc7ffc..a3c95a8e71 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\24_black_2-0_1-50D.material", - "propertyLayoutVersion": 3, + "parentMaterial": "24_black_2-0_1-50D.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "24_black_2-0_1-50D_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/macbeth_lab_16bit_2014_sRGB.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/macbeth_lab_16bit_2014_sRGB.material index a67b484c31..f70b3538aa 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/macbeth_lab_16bit_2014_sRGB.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/macbeth_lab_16bit_2014_sRGB.material @@ -1,11 +1,11 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { - "textureMap": "Materials/Presets/MacBeth/ColorChecker_sRGB_from_Lab_16bit_AfterNov2014.tif" + "textureMap": "ColorChecker_sRGB_from_Lab_16bit_AfterNov2014.tif" } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Passes/NewDepthOfFieldComposite.pass b/Gems/Atom/Feature/Common/Assets/Passes/NewDepthOfFieldComposite.pass index 522ae78fa5..c96039f159 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/NewDepthOfFieldComposite.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/NewDepthOfFieldComposite.pass @@ -11,6 +11,11 @@ "Name": "Depth", "SlotType": "Input", "ScopeAttachmentUsage": "Shader", + "ImageViewDesc": { + "AspectFlags": [ + "Depth" + ] + }, "ShaderImageDimensionsConstant": "m_fullResDimensions" }, { diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/LightCulling/LightCullingTileIterator.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/LightCulling/LightCullingTileIterator.azsli index 9b191eb06a..69958edebe 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/LightCulling/LightCullingTileIterator.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/LightCulling/LightCullingTileIterator.azsli @@ -27,6 +27,7 @@ class LightCullingTileIterator tileLightDataTex.GetDimensions(tileWidth, tileHeight); TileLightData tileLightData = Tile_UnpackData(tileLightDataTex[tileId]); + m_overflow = tileLightData.overflow; uint bin = NVLC_GetBin(viewz, tileLightData); m_readIndex = ((tileId.y * tileWidth + tileId.x) * NVLC_MAX_BINS + bin) * NVLC_MAX_POSSIBLE_LIGHTS_PER_BIN; m_value = 0; @@ -53,6 +54,10 @@ class LightCullingTileIterator } uint m_readIndex; - uint m_value; + uint m_value; + + // true if the maximum number of lights per tile is exceeded + // lights will probably flicker if this happens + bool m_overflow; StructuredBuffer m_lightListRemapped; }; diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/LightCulling/NVLC.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/LightCulling/NVLC.azsli index 60d5bf38f2..f6dfc0aab4 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/LightCulling/NVLC.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/LightCulling/NVLC.azsli @@ -67,6 +67,8 @@ struct TileLightData // If there is a pixel of opaque geometry there, we mark a bit in this bin. uint mask; uint logMaxBins; + // true if there are too many lights or decals assigned to this tile + bool overflow; }; @@ -115,7 +117,8 @@ TileLightData Tile_UnpackData(uint4 pack) data.zFar = asfloat( pack.y | NVLC_BINS_MASK ); data.mask = pack.z; data.logMaxBins = pack.y & NVLC_BINS_MASK; - + // unpack the "lights overflowed" bit + data.overflow = pack.w >> 31; return data; } diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Math/Filter.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Math/Filter.azsli index 8271aa46fb..11dac7b81c 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Math/Filter.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Math/Filter.azsli @@ -41,97 +41,3 @@ bool IsInsideOfImageSize( return IsInsideOfImageSize(coord, inputImageSize) && IsInsideOfImageSize(coord, outputImageSize); } - -//! This returns filtered value of "source" with weights in "filterTable" in 1 direction. -//! @param coord the center coordinate (in Texture2DArray) of the filtered area. -//! the xy coordinate is in pixel, and z is array slice index. -//! @param source image resource which is used as the source of the filtering. -//! Note that it contains entire of the shadowmap atlas, not a single shadowmap. -//! @param direction either (1,0) or (0,1). -//! If (1,0), the filtering direction is horizontal, -//! and if (0,1), it is vertical. -//! @param sourceMin the minimum (left/top most) index of the shadowmap. -//! @param sourceMax the maximum (right/bottom most) index of the shadowmap. -//! @param filterTable the weight table for this table. -//! Since the weight table of a Gaussian filter is left-right symmetry, -//! the right half is omitted in this filterTable. -//! @param filterOffset the offset of the filtering parameter in filterTable. -//! @param filterCount the element count of filtering parameter in filterTable. -//! For example, the weight table has size 11 in the original meaning -//! of Gaussian filter, filterCount == 6 by omitting the right half. -float FilteredFloat( - uint3 coord, - Texture2DArray source, - int2 direction, - int sourceMin, - int sourceMax, - Buffer filterTable, - uint filterOffset, - uint filterCount) -{ - if (filterCount == 0) - { - return 0.; // if no filtering info, early return. - } - - const int centerIndex = (int)dot(coord.xy, direction); - float result = 0.; - int index = 0; - - // This function summarizes the values stored in "source" - // from minIndex to maxIndex with weight in "filterTable". - // In the case that some point in [minIndex, maxIndex] go outside of - // the shadowmap (indicated by sourceMin and sourceMax), - // the edge value of the shadowmap is used. - - // 1. littler index side (left/up side) - const int minIndex = centerIndex - ((int)filterCount - 1); - - // 1-1. outside of shadowmap (littler) - // Assuming outside values are equal to the edge value, - // it first summarize the weights for outside of shadowmap - // then multiply it by the edge value. - float weight = 0.; // summation of weights of outside of shadowmap - for (index = minIndex; index < sourceMin; ++index) - { - weight += filterTable[filterOffset + index - minIndex]; - } - int2 edgeOffset = direction * (sourceMin - centerIndex); - int3 edgeCoord = coord + int3(edgeOffset, 0); - result += weight * source[edgeCoord]; - - // 1-2. inside of shadowmap (littler) - for (index = max(sourceMin, minIndex); index < centerIndex; ++index) - { - const int2 offset = direction * (index - centerIndex); - result += filterTable[filterOffset + index - minIndex] * - source[coord + int3(offset, 0)]; - } - - // 2. greater index side (right/down side) - const int maxIndex = centerIndex + ((int)filterCount - 1); - - // 2-1. outside of shadowmap (greater) - // This is similar to 1-1 above. - weight = 0.; // summation of weights of outside of shadowmap - for (index = maxIndex; index > sourceMax; --index) - { - weight += filterTable[filterOffset + maxIndex - index]; - } - edgeOffset = direction * (sourceMax - centerIndex); - edgeCoord = coord + int3(edgeOffset, 0); - result += weight * source[edgeCoord]; - - // 2-2. inside of shadowmap (greater) - for (index = min(sourceMax, maxIndex); index > centerIndex; --index) - { - const int2 offset = direction * (index - centerIndex); - result += filterTable[filterOffset + maxIndex - index] * - source[coord + int3(offset, 0)]; - } - - // 3. center - result += filterTable[filterOffset + filterCount - 1] * source[coord]; - - return result; -} diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/BackLighting.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/BackLighting.azsli index 83cf79ed61..dfd5522f5c 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/BackLighting.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/BackLighting.azsli @@ -23,6 +23,16 @@ float3 TransmissionKernel(float t, float3 s) return 0.25 * (1.0 / exp(exponent) + 3.0 / exp(exponent / 3.0)); } +float ThinObjectFalloff(const float3 surfaceNormal, const float3 dirToLight) +{ + const float ndl = saturate(dot(-surfaceNormal, dirToLight)); + + // ndl works decently well but it can produce a harsh discontinuity in the area just before + // the shadow starts appearing on objects like cylinder and tubes. + // Smoothing out ndl does a decent enough job of removing this artifact. + return smoothstep(0, 1, ndl * ndl); +} + float3 GetBackLighting(Surface surface, LightingData lightingData, float3 lightIntensity, float3 dirToLight, float shadowRatio) { float3 result = float3(0.0, 0.0, 0.0); @@ -53,8 +63,10 @@ float3 GetBackLighting(Surface surface, LightingData lightingData, float3 lightI float litRatio = 1.0 - shadowRatio; if (litRatio) { - result = TransmissionKernel(surface.transmission.thickness * transmissionParams.w, rcp(transmissionParams.xyz)) * - saturate(dot(-surface.normal, dirToLight)) * lightIntensity * litRatio; + const float thickness = surface.transmission.thickness * transmissionParams.w; + const float3 invScattering = rcp(transmissionParams.xyz); + const float falloff = ThinObjectFalloff(surface.normal, dirToLight); + result = TransmissionKernel(thickness, invScattering) * falloff * lightIntensity * litRatio; } break; diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Decals.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Decals.azsli index f9ead72ce4..aecb89eb92 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Decals.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Decals.azsli @@ -76,23 +76,23 @@ void ApplyDecal(uint currDecalIndex, inout Surface surface) { case 0: baseMap = ViewSrg::m_decalTextureArrayDiffuse0.Sample(PassSrg::LinearSampler, decalUV); - normalMap = ViewSrg::m_decalTextureArrayNormalMaps0.Sample(PassSrg::LinearSampler, decalUV); + normalMap = ViewSrg::m_decalTextureArrayNormalMaps0.Sample(PassSrg::LinearSampler, decalUV).rg; break; case 1: baseMap = ViewSrg::m_decalTextureArrayDiffuse1.Sample(PassSrg::LinearSampler, decalUV); - normalMap = ViewSrg::m_decalTextureArrayNormalMaps1.Sample(PassSrg::LinearSampler, decalUV); + normalMap = ViewSrg::m_decalTextureArrayNormalMaps1.Sample(PassSrg::LinearSampler, decalUV).rg; break; case 2: baseMap = ViewSrg::m_decalTextureArrayDiffuse2.Sample(PassSrg::LinearSampler, decalUV); - normalMap = ViewSrg::m_decalTextureArrayNormalMaps2.Sample(PassSrg::LinearSampler, decalUV); + normalMap = ViewSrg::m_decalTextureArrayNormalMaps2.Sample(PassSrg::LinearSampler, decalUV).rg; break; case 3: baseMap = ViewSrg::m_decalTextureArrayDiffuse3.Sample(PassSrg::LinearSampler, decalUV); - normalMap = ViewSrg::m_decalTextureArrayNormalMaps3.Sample(PassSrg::LinearSampler, decalUV); + normalMap = ViewSrg::m_decalTextureArrayNormalMaps3.Sample(PassSrg::LinearSampler, decalUV).rg; break; case 4: baseMap = ViewSrg::m_decalTextureArrayDiffuse4.Sample(PassSrg::LinearSampler, decalUV); - normalMap = ViewSrg::m_decalTextureArrayNormalMaps4.Sample(PassSrg::LinearSampler, decalUV); + normalMap = ViewSrg::m_decalTextureArrayNormalMaps4.Sample(PassSrg::LinearSampler, decalUV).rg; break; } diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lighting/StandardLighting.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lighting/StandardLighting.azsli index 94d6c199a5..773c86ff0f 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lighting/StandardLighting.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lighting/StandardLighting.azsli @@ -48,9 +48,9 @@ float3 GetSpecularLighting(Surface surface, LightingData lightingData, const flo // HdotV = HdotL due to the definition of half vector float3 clearCoatF = FresnelSchlick(HdotL, 0.04) * surface.clearCoat.factor; float clearCoatRoughness = max(surface.clearCoat.roughness * surface.clearCoat.roughness, 0.0005f); - float3 clearCoatSpecular = ClearCoatGGX(NdotH, HdotL, NdotL, surface.clearCoat.normal, clearCoatRoughness, clearCoatF ); + float3 clearCoatSpecular = ClearCoatGGX(NdotH, HdotL, NdotL, surface.clearCoat.normal, clearCoatRoughness, clearCoatF); - specular = specular * (1.0 - clearCoatF) * (1.0 - clearCoatF) + clearCoatSpecular; + specular = specular * (1.0 - clearCoatF) + clearCoatSpecular; } specular *= lightIntensity; @@ -95,7 +95,7 @@ PbrLightingOutput DebugOutput(float3 color) { PbrLightingOutput output = (PbrLightingOutput)0; - float defaultNormal = float3(0.0f, 0.0f, 1.0f); + float3 defaultNormal = float3(0.0f, 0.0f, 1.0f); output.m_diffuseColor = float4(color.rgb, 1.0f); output.m_normal.rgb = EncodeNormalSignedOctahedron(defaultNormal); diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/LightingUtils.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/LightingUtils.azsli index 3248fc83eb..b26b81a7c8 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/LightingUtils.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/LightingUtils.azsli @@ -67,6 +67,6 @@ float3 ApplyParallaxCorrectionAABB(float3 aabbMin, float3 aabbMax, float3 aabbPo // compute parallax corrected reflection vector, OBB version float3 ApplyParallaxCorrectionOBB(float4x4 obbTransformInverse, float3 obbHalfExtents, float3 positionWS, float3 reflectDir) { - float4 p = mul(obbTransformInverse, float4(positionWS, 1.0f)); + float3 p = mul(obbTransformInverse, float4(positionWS, 1.0f)).xyz; return ApplyParallaxCorrectionAABB(-obbHalfExtents, obbHalfExtents, float3(0.0f, 0.0f, 0.0f), p, reflectDir); } diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ibl.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ibl.azsli index 3254b8e4ed..abc2d3d3bd 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ibl.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ibl.azsli @@ -60,7 +60,7 @@ float3 GetIblSpecular( // compute blend amount based on world position in the reflection probe volume float blendAmount = ComputeLerpBetweenInnerOuterOBBs( - ObjectSrg::GetReflectionProbeWorldMatrixInverse(), + (float3x4)ObjectSrg::GetReflectionProbeWorldMatrixInverse(), ObjectSrg::m_reflectionProbeData.m_innerObbHalfLengths, ObjectSrg::m_reflectionProbeData.m_outerObbHalfLengths, position); @@ -121,4 +121,3 @@ void ApplyIBL(Surface surface, inout LightingData lightingData) } } } - diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli index 6e45cf30c8..a98221f60c 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli @@ -256,15 +256,16 @@ void NormalizeQuadPoints(inout float3 p[5], in int vertexCount) } // Transforms the 4 points of a quad into the hemisphere of the normal -void TransformQuadToOrthonormalBasis(in float3 normal, in float3 dirToView, inout float3 p[4]) +void TransformQuadToOrthonormalBasis(in float3 normal, in float3 dirToView, in float3 p[4], out float3 tp[5]) { float3x3 orthoNormalBasis = BuildViewAlignedOrthonormalBasis(normal, dirToView); // Transform points into orthonormal space - p[0] = mul(orthoNormalBasis, p[0]); - p[1] = mul(orthoNormalBasis, p[1]); - p[2] = mul(orthoNormalBasis, p[2]); - p[3] = mul(orthoNormalBasis, p[3]); + tp[0] = mul(orthoNormalBasis, p[0]); + tp[1] = mul(orthoNormalBasis, p[1]); + tp[2] = mul(orthoNormalBasis, p[2]); + tp[3] = mul(orthoNormalBasis, p[3]); + tp[4] = float3(0.0, 0.0, 0.0); // Extra vertex for if quad becomes a pentagon after clipping to hemisphere. } // Integrates the edges of a quad for lambertian diffuse contribution. @@ -325,28 +326,16 @@ float IntegrateQuadSpecular(in float3 v[5], in float vertexCount, in bool double return sum; } -// Evaluate linear transform cosine lighting for a 4 point quad. -// normal - The surface normal -// dirToView - Normalized direction from the surface to the view -// ltcMat - The LTC matrix for specular, or identity for diffuse. -// p[4] - The 4 light positions relative to the surface position. -// doubleSided - If the quad emits light from both sides -// diffuse - The output diffuse response for the quad light -// specular - The output specular response for the quad light -void LtcQuadEvaluate( +// Transform points p into the normal's hemisphere, then clip them to the hemisphere. Returns total number of points after clipping. +int LtcQuadTransformAndClip( in float3 normal, - in float3 dirToView, - in float3x3 ltcMat, + in float3 dirToCamera, in float3 p[4], - in bool doubleSided, - out float diffuse, - out float specular) + inout float3 polygon[5] + ) { // Transform the points of the light into the space of the normal's hemisphere. - TransformQuadToOrthonormalBasis(normal, dirToView, p); - - // Initialize quad with dummy point at end in case one corner is clipped (resulting in 5 sided polygon) - float3 v[5] = {p[0], p[1], p[2], p[3], float3(0.0, 0.0, 0.0)}; + TransformQuadToOrthonormalBasis(normal, dirToCamera, p, polygon); // Clip the light polygon to the normal hemisphere. This is done before the LTC matrix is applied to prevent // parts of the light below the horizon from impacting the surface. The number of points remaining after @@ -355,10 +344,53 @@ void LtcQuadEvaluate( // 3 - 3 points clipped, leaving only a triangular corner of the quad // 4 - 2 or 0 points clipped, leaving a quad // 5 - 1 point clipped leaving a pentagon. - int vertexCount = 0; - ClipQuadToHorizon(v, vertexCount); + ClipQuadToHorizon(polygon, vertexCount); + return vertexCount; +} +// Evaluate the LTC specular reflectance of points in polygon. Does not scale by fresnel. +float LtcEvaluateSpecularUnscaled( + in float2 ltcCoords, + in Texture2D ltcMatrix, + in float3 polygon[5], + in int vertexCount, + in bool doubleSided) +{ + // Look up the values for the LTC matrix based on the roughness and orientation. + float3x3 ltcMat = LtcMatrix(ltcMatrix, ltcCoords); + + // Transform the quad based on the LTC lookup matrix + ApplyLtcMatrixToQuad(ltcMat, polygon, vertexCount); + + // IntegrateQuadSpecular uses more accurate integration than diffuse to handle smooth surfaces correctly. + return IntegrateQuadSpecular(polygon, vertexCount, doubleSided); +} + +// Evaluate linear transform cosine lighting for a 4 point quad. +// normal - The surface normal +// dirToView - Normalized direction from the surface to the view +// ltcMat - The LTC matrix for specular, or identity for diffuse. +// p[4] - The 4 light positions relative to the surface position. +// doubleSided - If the quad emits light from both sides +// diffuse - The output diffuse response for the quad light +// specular - The output specular response for the quad light +void LtcQuadEvaluate( + in Surface surface, + in LightingData lightingData, + in Texture2D ltcMatrix, + in Texture2D ltcAmpMatrix, + in float3 p[4], + in bool doubleSided, + out float diffuseOut, + out float3 specularOut) +{ + + // Initialize quad with dummy point at end in case one corner is clipped (resulting in 5 sided polygon) + float3 polygon[5]; + + // Transform the points of the light into the space of the normal's hemisphere and clip to the hemisphere + int vertexCount = LtcQuadTransformAndClip(surface.normal, lightingData.dirToCamera, p, polygon); if (vertexCount == 0) { // Entire light is below the horizon. @@ -366,12 +398,37 @@ void LtcQuadEvaluate( } // IntegrateQuadDiffuse is a cheap approximation compared to specular. - diffuse = IntegrateQuadDiffuse(v, vertexCount, doubleSided); + float diffuse = IntegrateQuadDiffuse(polygon, vertexCount, doubleSided); - ApplyLtcMatrixToQuad(ltcMat, v, vertexCount); + float2 ltcCoords = LtcCoords(dot(surface.normal, lightingData.dirToCamera), surface.roughnessLinear); + float specular = LtcEvaluateSpecularUnscaled(ltcCoords, ltcMatrix, polygon, vertexCount, doubleSided); - // IntegrateQuadSpecular uses more accurate integration to handle smooth surfaces correctly. - specular = IntegrateQuadSpecular(v, vertexCount, doubleSided); + // Apply BRDF scale terms (BRDF magnitude and Schlick Fresnel) + float2 schlick = ltcAmpMatrix.Sample(PassSrg::LinearSampler, ltcCoords).xy; + float3 specularRgb = specular * (schlick.x * surface.specularF0 + (1.0 - surface.specularF0) * schlick.y); + + if(o_clearCoat_feature_enabled) + { + int vertexCountCc = LtcQuadTransformAndClip(surface.clearCoat.normal, lightingData.dirToCamera, p, polygon); + if (vertexCountCc > 0) + { + float2 ltcCoordsCc = LtcCoords(dot(surface.clearCoat.normal, lightingData.dirToCamera), surface.clearCoat.roughness); + float clearCoatSpecular = LtcEvaluateSpecularUnscaled(ltcCoordsCc, ltcMatrix, polygon, vertexCountCc, doubleSided); + + // Apply BRDF scale terms (BRDF magnitude and Schlick Fresnel) + const float clearCoatSpecularF0 = 0.04; + float2 schlickCc = ltcAmpMatrix.Sample(PassSrg::LinearSampler, ltcCoordsCc).xy; + float F = schlickCc.x * clearCoatSpecularF0 + (1.0 - clearCoatSpecularF0) * schlickCc.y; + F *= surface.clearCoat.factor; + + // Attenuate diffuse and specular based on how much light the clearcoat layer reflects + diffuse = diffuse * (1.0 - F); + specularRgb = (specularRgb * (1.0 - F)) + (clearCoatSpecular * F); + } + } + + diffuseOut = diffuse; + specularOut = specularRgb; } // Checks an edge against the horizon and integrates it. @@ -397,7 +454,7 @@ void LtcQuadEvaluate( // 4. Both points are below the horizon // - Do nothing. -void EvaluatePolyEdge(in float3 p0, in float3 p1, inout float3 prevClipPoint, in float3x3 ltcMat, inout float diffuse, inout float specular) +void EvaluatePolyEdge(in float3 p0, in float3 p1, in float3x3 ltcMat, inout float3 prevClipPoint, inout float diffuse, inout float specular) { if (p0.z > 0.0) { @@ -428,6 +485,74 @@ void EvaluatePolyEdge(in float3 p0, in float3 p1, inout float3 prevClipPoint, in } } +// Same as above but only evaluates specular (used for clear coat) +void EvaluatePolyEdgeSpecularOnly(in float3 p0, in float3 p1, in float3x3 ltcMat, inout float3 prevClipPoint, inout float specular) +{ + if (p0.z > 0.0) + { + if (p1.z > 0.0) + { + // Both above horizon + specular += IntegrateEdge(normalize(mul(ltcMat, p0)), normalize(mul(ltcMat, p1))); + } + else + { + // Going from above to below horizon + prevClipPoint = ClipEdge(p0, p1); + specular += IntegrateEdge(normalize(mul(ltcMat, p0)), normalize(mul(ltcMat, prevClipPoint))); + } + } + else if (p1.z > 0.0) + { + // Going from below to above horizon + float3 clipPoint = mul(ltcMat, ClipEdge(p1, p0)); + specular += IntegrateEdge(normalize(mul(ltcMat, prevClipPoint)), normalize(clipPoint)); + specular += IntegrateEdge(normalize(clipPoint), normalize(mul(ltcMat, p1))); + } +} + +// Evaluates the intial points to start looping through a polygon light. The first point in polygon may be below the surface +// so care must be taking to figure out which point to start with and what point to use to close the polygon. +void LtcPolygonEvaluateInitialPoints( + in float3 surfacePosition, + in float3x3 orthonormalMat, + in StructuredBuffer positions, + in uint startIdx, + inout float3 prevClipPoint, + inout float3 closePoint, + inout uint endIdx, + inout float3 p0) +{ + // Prepare initial values + p0 = mul(orthonormalMat, positions[startIdx].xyz - surfacePosition); // First point in polygon + + prevClipPoint = float3(0.0, 0.0, 0.0); // Used to hold previous clip point when polygon dips below horizon. + closePoint = p0; + + // Handle if the first point is below the horizon. + if (p0.z < 0.0) + { + float3 firstPoint = p0; // save the first point so it can be restored later. + + // Find the previous clip point so it can be used when the polygon goes above the horizon by + // searching backwards, updating the endIdx along the way to avoid reprocessing those points later + for ( ; endIdx > startIdx + 1; --endIdx) + { + float3 prevPoint = mul(orthonormalMat, positions[endIdx - 1].xyz - surfacePosition); + if (prevPoint.z > 0.0) + { + prevClipPoint = ClipEdge(prevPoint, p0); + closePoint = prevClipPoint; + break; + } + p0 = prevPoint; + } + + p0 = firstPoint; // Restore the original p0 + } + +} + // Evaluates the LTC result of an arbitrary polygon lighting a surface position. // pos - The surface position // normal - The surface normal @@ -445,72 +570,102 @@ void EvaluatePolyEdge(in float3 p0, in float3 p1, inout float3 prevClipPoint, in // EvaluatePolyEdge() later. During this search it also adjusts the end point index as necessary to avoid processing // those points that are below the horizon. void LtcPolygonEvaluate( - in float3 pos, - in float3 normal, - in float3 dirToView, - in float3x3 ltcMat, + in Surface surface, + in LightingData lightingData, + in Texture2D ltcMatrix, + in Texture2D ltcAmpMatrix, in StructuredBuffer positions, in uint startIdx, in uint endIdx, - out float diffuse, - out float specular + out float diffuseOut, + out float3 specularRgbOut ) { if (endIdx - startIdx < 3) { return; // Must have at least 3 points to form a polygon. } + uint originalEndIdx = endIdx; // Original endIdx may be needed for clearcoat // Rotate ltc matrix - float3x3 orthonormalMat = BuildViewAlignedOrthonormalBasis(normal, dirToView); + float3x3 orthonormalMat = BuildViewAlignedOrthonormalBasis(surface.normal, lightingData.dirToCamera); - // Prepare initial values - float3 p0 = mul(orthonormalMat, positions[startIdx].xyz - pos); // First point in polygon - diffuse = 0.0; - specular = 0.0; - - float3 prevClipPoint = float3(0.0, 0.0, 0.0); // Used to hold previous clip point when polygon dips below horizon. - float3 closePoint = p0; - - // Handle if the first point is below the horizon. - if (p0.z < 0.0) - { - float3 firstPoint = p0; // save the first point so it can be restored later. - - // Find the previous clip point so it can be used when the polygon goes above the horizon by - // searching backwards, updating the endIdx along the way to avoid reprocessing those points later - for ( ; endIdx > startIdx + 1; --endIdx) - { - float3 prevPoint = mul(orthonormalMat, positions[endIdx - 1].xyz - pos); - if (prevPoint.z > 0.0) - { - prevClipPoint = ClipEdge(prevPoint, p0); - closePoint = prevClipPoint; - break; - } - p0 = prevPoint; - } - - // Check if all points below horizon - if (endIdx == startIdx + 1) - { - return; - } + // Evaluate the starting point (p0), previous point, and point used to close the polygon + float3 p0, prevClipPoint, closePoint; + LtcPolygonEvaluateInitialPoints(surface.position, orthonormalMat, positions, startIdx, prevClipPoint, closePoint, endIdx, p0); - p0 = firstPoint; // Restore the original p0 + // Check if all points below horizon + if (endIdx == startIdx + 1) + { + return; } + float diffuse = 0.0; + float specular = 0.0; + + float2 ltcCoords = LtcCoords(dot(surface.normal, lightingData.dirToCamera), surface.roughnessLinear); + float3x3 ltcMat = LtcMatrix(ltcMatrix, ltcCoords); + // Evaluate all the points for (uint curIdx = startIdx + 1; curIdx < endIdx; ++curIdx) { - float3 p1 = mul(orthonormalMat, positions[curIdx].xyz - pos); // Current point in polygon - EvaluatePolyEdge(p0, p1, prevClipPoint, ltcMat, diffuse, specular); + float3 p1 = mul(orthonormalMat, positions[curIdx].xyz - surface.position); // Current point in polygon + EvaluatePolyEdge(p0, p1, ltcMat, prevClipPoint, diffuse, specular); p0 = p1; } - EvaluatePolyEdge(p0, closePoint, prevClipPoint, ltcMat, diffuse, specular); + EvaluatePolyEdge(p0, closePoint, ltcMat, prevClipPoint, diffuse, specular); // Note: negated due to winding order diffuse = -diffuse; specular = -specular; + + // Apply BRDF scale terms (BRDF magnitude and Schlick Fresnel) + float2 schlick = ltcAmpMatrix.Sample(PassSrg::LinearSampler, ltcCoords).xy; + float3 specularRgb = specular * ((schlick.x * surface.specularF0) + (1.0 - surface.specularF0) * schlick.y); + + if(o_clearCoat_feature_enabled) + { + // Rotate ltc matrix + float3x3 orthonormalMatCc = BuildViewAlignedOrthonormalBasis(surface.clearCoat.normal, lightingData.dirToCamera); + + // restore original endIdx and re-evaluate initial points with matrix based on the clearcoat normal. + endIdx = originalEndIdx; + LtcPolygonEvaluateInitialPoints(surface.position, orthonormalMatCc, positions, startIdx, prevClipPoint, closePoint, endIdx, p0); + + // Check if all points below horizon + if (endIdx != startIdx + 1) + { + float specularCc = 0.0; + + float2 ltcCoordsCc = LtcCoords(dot(surface.clearCoat.normal, lightingData.dirToCamera), surface.clearCoat.roughness); + float3x3 ltcMatCc = LtcMatrix(ltcMatrix, ltcCoordsCc); + + // Evaluate all the points + for (uint curIdx = startIdx + 1; curIdx < endIdx; ++curIdx) + { + float3 p1 = mul(orthonormalMatCc, positions[curIdx].xyz - surface.position); // Current point in polygon + EvaluatePolyEdgeSpecularOnly(p0, p1, ltcMatCc, prevClipPoint, specularCc); + p0 = p1; + } + + EvaluatePolyEdgeSpecularOnly(p0, closePoint, ltcMatCc, prevClipPoint, specularCc); + + // Note: negated due to winding order + specularCc = -specularCc; + + // Apply BRDF scale terms (BRDF magnitude and Schlick Fresnel) + const float clearCoatSpecularF0 = 0.04; + float2 schlickCc = ltcAmpMatrix.Sample(PassSrg::LinearSampler, ltcCoordsCc).xy; + float F = clearCoatSpecularF0 * schlickCc.x + (1.0 - clearCoatSpecularF0) * schlickCc.y; + F *= surface.clearCoat.factor; + + diffuse = diffuse * (1.0 - F); + specularRgb = (specularRgb * (1.0 - F)) + (specularCc * F); + } + } + + diffuseOut = diffuse; + specularRgbOut = specularRgb; + } diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PointLight.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PointLight.azsli index e6eea9728f..92f4065931 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PointLight.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PointLight.azsli @@ -50,6 +50,20 @@ int UnpackPointLightShadowIndex(const ViewSrg::PointLight light, const int face) return (light.m_shadowIndices[index] >> shiftAmount) & 0xFFFF; } +uint ComputeShadowIndex(const ViewSrg::PointLight light, const Surface surface) +{ + // shadow map size and bias are the same across all shadowmaps used by a specific point light, so just grab the first one + const uint lightIndex0 = UnpackPointLightShadowIndex(light, 0); + const float shadowmapSize = ViewSrg::m_projectedFilterParams[lightIndex0].m_shadowmapSize; + + // Note that the normal bias offset could potentially move the shadowed position from one map to another map inside the same point light shadow. + const float normalBias = ViewSrg::m_projectedShadows[lightIndex0].m_normalShadowBias; + const float3 biasedPosition = surface.position + ComputeNormalShadowOffset(normalBias, surface.vertexNormal, shadowmapSize); + + const int shadowCubemapFace = GetPointLightShadowCubemapFace(biasedPosition, light.m_position); + return UnpackPointLightShadowIndex(light, shadowCubemapFace); +} + void ApplyPointLight(ViewSrg::PointLight light, Surface surface, inout LightingData lightingData) { float3 posToLight = light.m_position - surface.position; @@ -74,10 +88,8 @@ void ApplyPointLight(ViewSrg::PointLight light, Surface surface, inout LightingD float backShadowRatio = 0.0; if (o_enableShadows) { - const int shadowCubemapFace = GetPointLightShadowCubemapFace(surface.position, light.m_position); - const int shadowIndex = UnpackPointLightShadowIndex(light, shadowCubemapFace); const float3 lightDir = normalize(light.m_position - surface.position); - + const uint shadowIndex = ComputeShadowIndex(light, surface); litRatio *= ProjectedShadow::GetVisibility( shadowIndex, light.m_position, diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PolygonLight.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PolygonLight.azsli index 66f21ec5d8..07fe6d4f00 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PolygonLight.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PolygonLight.azsli @@ -51,25 +51,19 @@ void ApplyPoylgonLight(ViewSrg::PolygonLight light, Surface surface, inout Light float radiusAttenuation = 1.0 - (falloff * falloff); radiusAttenuation = radiusAttenuation * radiusAttenuation; - float2 ltcCoords = LtcCoords(dot(surface.normal, lightingData.dirToCamera), surface.roughnessLinear); - float3x3 ltcMat = LtcMatrix(SceneSrg::m_ltcMatrix, ltcCoords); - float diffuse = 0.0; - float specular = 0.0; + float3 specularRgb = 0.0; - LtcPolygonEvaluate(surface.position, surface.normal, lightingData.dirToCamera, ltcMat, ViewSrg::m_polygonLightPoints, startIndex, endIndex, diffuse, specular); - diffuse = doubleSided ? abs(diffuse) : max(0.0, diffuse); - specular = doubleSided ? abs(specular) : max(0.0, specular); + LtcPolygonEvaluate(surface, lightingData, SceneSrg::m_ltcMatrix, SceneSrg::m_ltcAmplification, ViewSrg::m_polygonLightPoints, startIndex, endIndex, diffuse, specularRgb); - // Apply BRDF scale terms (BRDF magnitude and Schlick Fresnel) - float2 schlick = SceneSrg::m_ltcAmplification.Sample(PassSrg::LinearSampler, ltcCoords).xy; - float3 specularRGB = specular * (schlick.x + (1.0 - surface.specularF0) * schlick.y); + diffuse = doubleSided ? abs(diffuse) : max(0.0, diffuse); + specularRgb = doubleSided ? abs(specularRgb) : max(0.0, specularRgb); // Scale by inverse surface area of hemisphere (1/2pi), attenuation, and light intensity float3 intensity = 0.5 * INV_PI * radiusAttenuation * abs(light.m_rgbIntensityNits); lightingData.diffuseLighting += surface.albedo * diffuse * intensity; - lightingData.specularLighting += surface.specularF0 * specularRGB * intensity; + lightingData.specularLighting += specularRgb * intensity; } void ApplyPolygonLights(Surface surface, inout LightingData lightingData) diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/QuadLight.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/QuadLight.azsli index 43f5095f84..63515339d8 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/QuadLight.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/QuadLight.azsli @@ -112,22 +112,15 @@ void ApplyQuadLight(ViewSrg::QuadLight light, Surface surface, inout LightingDat { float3 p[4] = {p0, p1, p2, p3}; - float2 ltcCoords = LtcCoords(dot(surface.normal, lightingData.dirToCamera), surface.roughnessLinear); - float3x3 ltcMat = LtcMatrix(SceneSrg::m_ltcMatrix, ltcCoords); - float diffuse = 0.0; - float specular = 0.0; - LtcQuadEvaluate(surface.normal, lightingData.dirToCamera, ltcMat, p, doubleSided, diffuse, specular); - - // Apply BRDF scale terms (BRDF magnitude and Schlick Fresnel) - float2 schlick = SceneSrg::m_ltcAmplification.Sample(PassSrg::LinearSampler, ltcCoords).xy; - float3 specularRGB = specular * (schlick.x + (1.0 - surface.specularF0) * schlick.y); + float3 specular = float3(0.0, 0.0, 0.0); // specularF0 used in LtcQuadEvaluate which is a float3 + LtcQuadEvaluate(surface, lightingData, SceneSrg::m_ltcMatrix, SceneSrg::m_ltcAmplification, p, doubleSided, diffuse, specular); // Scale by inverse surface area of hemisphere (1/2pi), attenuation, and light intensity float3 intensity = 0.5 * INV_PI * radiusAttenuation * light.m_rgbIntensityNits; lightingData.diffuseLighting += surface.albedo * diffuse * intensity; - lightingData.specularLighting += surface.specularF0 * specularRGB * intensity; + lightingData.specularLighting += specular * intensity; } else { diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Microfacet/Brdf.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Microfacet/Brdf.azsli index 0f3e3c913d..e7904fefdf 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Microfacet/Brdf.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Microfacet/Brdf.azsli @@ -22,7 +22,7 @@ // ------- Diffuse Lighting ------- //! Simple Lambertian BRDF. -float3 DiffuseLambertian(float3 albedo, float3 normal, float3 dirToLight, float diffuseResponse) +float3 DiffuseLambertian(float3 albedo, float3 normal, float3 dirToLight, float3 diffuseResponse) { float NdotL = saturate(dot(normal, dirToLight)); return albedo * NdotL * INV_PI * diffuseResponse; diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ESM.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ESM.azsli new file mode 100644 index 0000000000..3a258c2f47 --- /dev/null +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ESM.azsli @@ -0,0 +1,24 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + + +float SampleESM(const Texture2DArray shadowMap, const SamplerState samp, const float3 uv, const float zReceiver, const float esmExponent) +{ + const float mipmaplevel = 0; + const float occluder = shadowMap.SampleLevel(samp,uv, mipmaplevel).r; + const float lit = exp((occluder - zReceiver) * esmExponent); + return lit; +} + +float PCFFallbackForESM(const Texture2DArray shadowMap, const float3 uv, const float zReceiver, const float esmExponent) +{ + const float result = SampleESM(shadowMap, PassSrg::LinearSampler, uv, zReceiver, esmExponent); + return saturate(result); +} diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ProjectedShadow.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ProjectedShadow.azsli index 3b8379e7fa..98ec9ea8bc 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ProjectedShadow.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ProjectedShadow.azsli @@ -15,6 +15,7 @@ #include "BicubicPcfFilters.azsli" #include "Shadow.azsli" #include "NormalOffsetShadows.azsli" +#include "ESM.azsli" // ProjectedShadow calculates shadowed area projected from a light. class ProjectedShadow @@ -190,13 +191,11 @@ float ProjectedShadow::GetVisibilityEsm() const float depth = PerspectiveDepthToLinear( m_shadowPosition.z - m_bias, coefficients); - const float occluder = shadowmap.SampleLevel( - PassSrg::LinearSampler, - float3(atlasPosition.xy * invAtlasSize, atlasPosition.z), - /*LOD=*/0).r; + + const float3 uv = float3(atlasPosition.xy * invAtlasSize, atlasPosition.z); + const float esmExponent = ViewSrg::m_projectedShadows[m_shadowIndex].m_esmExponent; + const float ratio = SampleESM(shadowmap, PassSrg::LinearSampler, uv, depth, esmExponent); - const float exponent = -ViewSrg::m_projectedShadows[m_shadowIndex].m_esmExponent * (depth - occluder); - const float ratio = exp(exponent); // pow() mitigates light bleeding to shadows from near shadow casters. return saturate( pow(ratio, 8) ); } @@ -229,21 +228,18 @@ float ProjectedShadow::GetVisibilityEsmPcf() return 1.; } const float3 atlasPosition = GetAtlasPosition(m_shadowPosition.xy); + const float3 uv = float3(atlasPosition.xy * invAtlasSize, atlasPosition.z); const float depth = PerspectiveDepthToLinear( m_shadowPosition.z - m_bias, coefficients); - const float occluder = shadowmap.SampleLevel( - PassSrg::LinearSampler, - float3(atlasPosition.xy * invAtlasSize, atlasPosition.z), - /*LOD=*/0).r; - - const float exponent = -ViewSrg::m_projectedShadows[m_shadowIndex].m_esmExponent * (depth - occluder); - float ratio = exp(exponent); + + const float esmExponent = ViewSrg::m_projectedShadows[m_shadowIndex].m_esmExponent; + float ratio = SampleESM(shadowmap, PassSrg::LinearSampler, uv, depth, esmExponent); static const float pcfFallbackThreshold = 1.04; if (ratio > pcfFallbackThreshold) { - ratio = GetVisibilityPcf(); + ratio = PCFFallbackForESM(shadowmap, uv, depth, esmExponent); } else { diff --git a/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/PostProcessing/ViewSrg.azsli b/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/PostProcessing/ViewSrg.azsli index e8501a4a2d..3eff3615f0 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/PostProcessing/ViewSrg.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/PostProcessing/ViewSrg.azsli @@ -26,6 +26,7 @@ partial ShaderResourceGroup ViewSrg // circle of confusion to screen ratio; float m_cocToScreenRatio; + [[pad_to(16)]] }; diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCullingHeatmap.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCullingHeatmap.azsl index bd51fb96bb..9e30a84330 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCullingHeatmap.azsl +++ b/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCullingHeatmap.azsl @@ -6,16 +6,17 @@ * */ -// The heatmap will change color as the light count increases up to TileCountMax, at which point and beyond it will be white. +// The heatmap will change color as the light count increases up to TileCountMax static const int TileCountMax = 75; +static const int OverflowDisplayNumber = 999; - -static const float3 BARELY_USED_COLOR = float3(0.05, 0.05, 0.20); -static const float3 LIGHTLY_USED_COLOR = float3(0.05, 0.05, 0.60); -static const float3 MODERATELY_USED_COLOR = float3(0.05, 0.60, 0.05); -static const float3 HEAVILY_USED_COLOR = float3(1.00, 1.00, 0.05); -static const float3 OVER_USED_COLOR = float3(1.00, 0.05, 0.05); +static const float3 BarelyUsedColor = float3(0.05, 0.05, 0.20); // Deep dark blue +static const float3 LightlyUsedColor = float3(0.05, 0.05, 0.60); // Deep blue +static const float3 ModeratelyUsedColor = float3(0.05, 0.60, 0.05); // Green +static const float3 HeavilyUsedColor = float3(1.00, 1.00, 0.05); // Yellow +static const float3 OverUsedColor = float3(1.00, 0.05, 0.05); // Red +static const float3 OverflowColor = float3(1.0, 1.0, 1.0); // White #include @@ -174,30 +175,33 @@ uint PrintNumbersInsideTile(uint x, uint2 origin, uint2 uv, uint scale) } -float3 ComputeTileColor(uint2 uv, uint print_me, uint maximum) +float3 ComputeTileColor(const uint2 uv, const uint print_me, const bool overflow) { int2 local_uv = int2( uv % uint2(TILE_DIM_X, TILE_DIM_Y) ); - float x = float(print_me) / float(maximum); + float x = float(print_me) / float(TileCountMax); x = sqrt(x); x = saturate(x); float3 color; - if( x <= 0.0 ) + if (overflow) + { + color = OverflowColor; + } + else if( x <= 0.0 ) { color = float3(0.0, 0.0, 0.0); } else if( x >= 1.0 ) { - color = float3(1.0, 1.0, 1.0); + color = OverUsedColor; } else { - color = lerp(BARELY_USED_COLOR, LIGHTLY_USED_COLOR, saturate((x - 0.00) * 4.0)); - color = lerp(color, MODERATELY_USED_COLOR, saturate((x - 0.25) * 4.0)); - color = lerp(color, HEAVILY_USED_COLOR, saturate((x - 0.50) * 4.0)); - color = lerp(color, OVER_USED_COLOR, saturate((x - 0.75) * 4.0)); + color = lerp(BarelyUsedColor, LightlyUsedColor, saturate((x - 0.00) * 4.0)); + color = lerp(color, ModeratelyUsedColor, saturate((x - 0.33) * 4.0)); + color = lerp(color, HeavilyUsedColor, saturate((x - 0.66) * 4.0)); } float border = (local_uv.x == TILE_DIM_X - 1 || local_uv.y == TILE_DIM_Y - 1) ? 1.0 : 0.0; @@ -226,12 +230,18 @@ ShaderResourceGroup PassSrg : SRG_PerPass PSOutput MainPS(VSOutput IN) { - uint2 tileId = ComputeTileId(IN.m_position.xy); + const uint2 tileId = ComputeTileId(IN.m_position.xy); + const uint tileLightDataW = PassSrg::m_tileLightData[tileId].w; + + // check to see if we are overflowing the number of lights per tile + // expect the lighting to flicker if this happens + const bool overflow = (tileLightDataW >> 31); + // We subtract NUM_LIGHT_TYPES because it includes termination markers - uint lightCount = PassSrg::m_tileLightData[tileId].w - NUM_LIGHT_TYPES; + const uint lightCount = overflow ? OverflowDisplayNumber : tileLightDataW - NUM_LIGHT_TYPES; - float3 tileColor = ComputeTileColor(IN.m_position.xy, lightCount, TileCountMax); + const float3 tileColor = ComputeTileColor(IN.m_position.xy, lightCount, overflow); PSOutput OUT; OUT.m_color.rgb = tileColor; diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCullingRemap.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCullingRemap.azsl index a0daa66507..37f22b034c 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCullingRemap.azsl +++ b/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCullingRemap.azsl @@ -138,17 +138,19 @@ uint CalculateNumLightsInWorstBin(uint groupIndex, uint3 groupID, uint baseBin, return lightsInWorstBin; } -void WriteTileLightData(uint groupIndex, uint3 groupID, uint lightsInWorstBin) +void WriteTileLightData(const uint groupIndex, const uint3 groupID, const uint lightsInWorstBin, const bool overflow) { if (groupIndex == 0) { uint4 tileLightData = PassSrg::m_tileLightData[groupID.xy]; - // Used for the heatmap tileLightData.w = lightsInWorstBin; + + // pack a "lights have overflowed bit" into this uint + tileLightData.w |= overflow ? (1 << 31) : 0; PassSrg::m_tileLightData[groupID.xy] = tileLightData; - } + } } void WriteEndOfList(uint groupIndex, uint writeIndices[NVLC_MAX_BINS]) @@ -193,6 +195,9 @@ void MainCS( GroupMemoryBarrierWithGroupSync(); uint totalLights = PassSrg::m_lightCount.Load(uint3(groupID.xy, 0)).x; + + // expect flickering if the max number of lights per tile is exceeded + const bool overflow = totalLights > (NVLC_MAX_POSSIBLE_LIGHTS_PER_BIN - 1); totalLights = min(totalLights, NVLC_MAX_POSSIBLE_LIGHTS_PER_BIN - 1); AssignLightsToSharedMemoryBins(groupIndex, groupID, totalLights); @@ -207,5 +212,5 @@ void MainCS( uint lightsInWorstBin = CalculateNumLightsInWorstBin(groupIndex, groupID, baseBin, writeIndices); WriteEndOfList(groupIndex, writeIndices); - WriteTileLightData(groupIndex, groupID, lightsInWorstBin); + WriteTileLightData(groupIndex, groupID, lightsInWorstBin, overflow); } diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/PostProcessing/DepthOfFieldWriteFocusDepthFromGpu.shader b/Gems/Atom/Feature/Common/Assets/Shaders/PostProcessing/DepthOfFieldWriteFocusDepthFromGpu.shader index 92243acb87..5b927869d9 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/PostProcessing/DepthOfFieldWriteFocusDepthFromGpu.shader +++ b/Gems/Atom/Feature/Common/Assets/Shaders/PostProcessing/DepthOfFieldWriteFocusDepthFromGpu.shader @@ -10,6 +10,7 @@ "type" : "Compute" } ] - } + }, + "DisabledRHIBackends": ["metal"] } diff --git a/Gems/Atom/Feature/Common/Code/Source/ACES/AcesDisplayMapperFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/ACES/AcesDisplayMapperFeatureProcessor.cpp index c6c41edb31..50fc8cafef 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ACES/AcesDisplayMapperFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ACES/AcesDisplayMapperFeatureProcessor.cpp @@ -16,7 +16,6 @@ #include #include -#include #include namespace @@ -81,7 +80,7 @@ namespace AZ::Render void AcesDisplayMapperFeatureProcessor::Simulate(const FeatureProcessor::SimulatePacket& packet) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(AzRender); AZ_UNUSED(packet); } diff --git a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomDrawQueue.cpp b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomDrawQueue.cpp index 5cc43e9013..fedbf849eb 100644 --- a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomDrawQueue.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomDrawQueue.cpp @@ -11,7 +11,6 @@ #include -#include #include #include #include @@ -671,8 +670,6 @@ namespace AZ AZ::u8 width, int32_t viewProjOverrideIndex) { - AZ_PROFILE_SCOPE(AzRender, "AuxGeomDrawQueue: DrawPrimitiveWithSharedVerticesCommon"); - // grab a mutex lock for the rest of this function so that a commit cannot happen during it and // other threads can't add geometry during it AZStd::lock_guard lock(m_buffersWriteLock); @@ -743,8 +740,6 @@ namespace AZ AZ::u8 width, int32_t viewProjOverrideIndex) { - AZ_PROFILE_SCOPE(AzRender, "AuxGeomDrawQueue: DrawPrimitiveWithSharedVerticesCommon"); - AZ_Assert(indexCount >= verticesPerPrimitiveType && (indexCount % verticesPerPrimitiveType == 0), "Index count must be at least %d and must be a multiple of %d", verticesPerPrimitiveType, verticesPerPrimitiveType); diff --git a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomFeatureProcessor.cpp index a4720ad131..8de0fdfea8 100644 --- a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomFeatureProcessor.cpp @@ -16,8 +16,6 @@ #include -#include - namespace AZ { namespace Render diff --git a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/FixedShapeProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/FixedShapeProcessor.cpp index 2e7c0759db..076c2044b5 100644 --- a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/FixedShapeProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/FixedShapeProcessor.cpp @@ -9,7 +9,6 @@ #include "FixedShapeProcessor.h" #include "AuxGeomDrawProcessorShared.h" -#include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/CapsuleLightFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/CoreLights/CapsuleLightFeatureProcessor.cpp index bbea462ac8..b279d7106f 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/CapsuleLightFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/CapsuleLightFeatureProcessor.cpp @@ -8,8 +8,6 @@ #include -#include - #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.cpp index 8a1ff95f29..ee60ff412a 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.cpp index e362ee3afc..168a7ea00a 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.cpp @@ -8,8 +8,6 @@ #include -#include - #include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/PointLightFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/CoreLights/PointLightFeatureProcessor.cpp index c5d6c3bf78..9df176f82d 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/PointLightFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/PointLightFeatureProcessor.cpp @@ -8,8 +8,6 @@ #include -#include - #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/PolygonLightFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/CoreLights/PolygonLightFeatureProcessor.cpp index f3c05eeeec..1fb22024af 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/PolygonLightFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/PolygonLightFeatureProcessor.cpp @@ -9,8 +9,6 @@ #include #include -#include - #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/QuadLightFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/CoreLights/QuadLightFeatureProcessor.cpp index 787e150646..66e22c3106 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/QuadLightFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/QuadLightFeatureProcessor.cpp @@ -9,8 +9,6 @@ #include #include -#include - #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/SimplePointLightFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/CoreLights/SimplePointLightFeatureProcessor.cpp index bc13d3d508..60cf3a0353 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/SimplePointLightFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/SimplePointLightFeatureProcessor.cpp @@ -8,8 +8,6 @@ #include -#include - #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/SimpleSpotLightFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/CoreLights/SimpleSpotLightFeatureProcessor.cpp index 49b7f7d12c..c9826761d8 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/SimpleSpotLightFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/SimpleSpotLightFeatureProcessor.cpp @@ -8,8 +8,6 @@ #include -#include - #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/Decals/DecalFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/Decals/DecalFeatureProcessor.cpp index f00c902a73..8e446435fa 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Decals/DecalFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Decals/DecalFeatureProcessor.cpp @@ -8,8 +8,6 @@ #include -#include - #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/Decals/DecalTextureArrayFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/Decals/DecalTextureArrayFeatureProcessor.cpp index e9bc1a1277..393104907a 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Decals/DecalTextureArrayFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Decals/DecalTextureArrayFeatureProcessor.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.cpp b/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.cpp index 0ff8d2c165..5dcb0dc2bb 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.cpp @@ -29,8 +29,6 @@ #include -#include - namespace AZ { namespace Render @@ -68,6 +66,8 @@ namespace AZ : Base(descriptor) , AzFramework::InputChannelEventListener(AzFramework::InputChannelEventListener::GetPriorityDebugUI() - 1) // Give ImGui manager priority over the pass , AzFramework::InputTextEventListener(AzFramework::InputTextEventListener::GetPriorityDebugUI() - 1) // Give ImGui manager priority over the pass + , m_tickHandlerFrameStart(*this) + , m_tickHandlerFrameEnd(*this) { const ImGuiPassData* imguiPassData = RPI::PassUtils::GetPassData(descriptor); @@ -102,7 +102,6 @@ namespace AZ Init(); ImGui::NewFrame(); - TickBus::Handler::BusConnect(); AzFramework::InputChannelEventListener::Connect(); AzFramework::InputTextEventListener::Connect(); } @@ -127,7 +126,6 @@ namespace AZ AzFramework::InputTextEventListener::BusDisconnect(); AzFramework::InputChannelEventListener::BusDisconnect(); - TickBus::Handler::BusDisconnect(); } ImGuiContext* ImGuiPass::GetContext() @@ -140,14 +138,61 @@ namespace AZ m_drawData.push_back(drawData); } - void ImGuiPass::OnTick(float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint timePoint) + ImGuiPass::TickHandlerFrameStart::TickHandlerFrameStart(ImGuiPass& imGuiPass) + : m_imGuiPass(imGuiPass) { - auto imguiContextScope = ImguiContextScope(m_imguiContext); + TickBus::Handler::BusConnect(); + } + + int ImGuiPass::TickHandlerFrameStart::GetTickOrder() + { + return AZ::ComponentTickBus::TICK_PRE_RENDER; + } + + void ImGuiPass::TickHandlerFrameStart::OnTick(float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint timePoint) + { + auto imguiContextScope = ImguiContextScope(m_imGuiPass.m_imguiContext); + ImGui::NewFrame(); auto& io = ImGui::GetIO(); io.DeltaTime = deltaTime; } + ImGuiPass::TickHandlerFrameEnd::TickHandlerFrameEnd(ImGuiPass& imGuiPass) + : m_imGuiPass(imGuiPass) + { + TickBus::Handler::BusConnect(); + } + + int ImGuiPass::TickHandlerFrameEnd::GetTickOrder() + { + // ImGui::NewFrame() must be called (see ImGuiPass::TickHandlerFrameStart::OnTick) after populating + // ImGui::GetIO().NavInputs (see ImGuiPass::OnInputChannelEventFiltered), and paired with a call to + // ImGui::EndFrame() (see ImGuiPass::TickHandlerFrameEnd::OnTick); if this is not called explicitly + // then it will be called from inside ImGui::Render() (see ImGuiPass::SetupFrameGraphDependencies). + // + // ImGui::Render() gets called (indirectly) from OnSystemTick, so we cannot rely on it being paired + // with a matching call to ImGui::NewFrame() that gets called from OnTick, because OnSystemTick and + // OnTick can be called at different frequencies under some circumstances (namely from the editor). + // + // To account for this we must explicitly call ImGui::EndFrame() once a frame from OnTick to ensure + // that every call to ImGui::NewFrame() has been matched with a call to ImGui::EndFrame(), but only + // after ImGui::Render() has had the chance first (if so calling ImGui::EndFrame() again is benign). + // + // Because ImGui::Render() gets called (indirectly) from OnSystemTick, which usually happens at the + // start of every frame, we give TickHandlerFrameEnd::OnTick() the order of TICK_FIRST such that it + // will be called first on the regular tick bus, which is invoked immediately after the system tick. + // + // So while returning TICK_FIRST is incredibly counter-intuitive, hopefully that all explains why. + return AZ::ComponentTickBus::TICK_FIRST; + } + + void ImGuiPass::TickHandlerFrameEnd::OnTick([[maybe_unused]] float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint timePoint) + { + auto imguiContextScope = ImguiContextScope(m_imGuiPass.m_imguiContext); + ImGui::EndFrame(); + } + bool ImGuiPass::OnInputTextEventFiltered(const AZStd::string& textUTF8) { auto imguiContextScope = ImguiContextScope(m_imguiContext); @@ -413,6 +458,7 @@ namespace AZ void ImGuiPass::Init() { + auto imguiContextScope = ImguiContextScope(m_imguiContext); auto& io = ImGui::GetIO(); // ImGui IO Setup @@ -421,7 +467,6 @@ namespace AZ { io.KeyMap[static_cast(i)] = static_cast(i); } - io.NavActive = true; // Touch input const AzFramework::InputDevice* inputDevice = nullptr; @@ -434,6 +479,17 @@ namespace AZ io.ConfigFlags |= ImGuiConfigFlags_IsTouchScreen; } + // Gamepad input + inputDevice = nullptr; + AzFramework::InputDeviceRequestBus::EventResult(inputDevice, + AzFramework::InputDeviceGamepad::IdForIndex0, + &AzFramework::InputDeviceRequests::GetInputDevice); + if (inputDevice && inputDevice->IsSupported()) + { + io.BackendFlags |= ImGuiBackendFlags_HasGamepad; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; + } + // Set initial display size to something reasonable (this will be updated in FramePrepare) io.DisplaySize.x = 1920; io.DisplaySize.y = 1080; @@ -571,7 +627,6 @@ namespace AZ auto imguiContextScope = ImguiContextScope(m_imguiContext); ImGui::GetIO().MouseWheel = m_lastFrameMouseWheel; m_lastFrameMouseWheel = 0.0; - ImGui::NewFrame(); } void ImGuiPass::BuildCommandListInternal(const RHI::FrameGraphExecuteContext& context) diff --git a/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.h b/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.h index 018d2d46b7..b774144ba3 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.h +++ b/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.h @@ -54,7 +54,6 @@ namespace AZ //! This pass owns and manages activation of an Imgui context. class ImGuiPass : public RPI::RenderPass - , private TickBus::Handler , private AzFramework::InputChannelEventListener , private AzFramework::InputTextEventListener { @@ -76,9 +75,6 @@ namespace AZ //! Allows draw data from other imgui contexts to be rendered on this context. void RenderImguiDrawData(const ImDrawData& drawData); - // TickBus::Handler overrides... - void OnTick(float deltaTime, AZ::ScriptTimePoint timePoint) override; - // AzFramework::InputTextEventListener overrides... bool OnInputTextEventFiltered(const AZStd::string& textUTF8) override; @@ -98,6 +94,35 @@ namespace AZ void BuildCommandListInternal(const RHI::FrameGraphExecuteContext& context) override; private: + //! Class which connects to the tick handler using the tick order required at the start of an ImGui frame. + class TickHandlerFrameStart : protected TickBus::Handler + { + public: + TickHandlerFrameStart(ImGuiPass& imGuiPass); + + protected: + // TickBus::Handler overrides... + int GetTickOrder() override; + void OnTick(float deltaTime, AZ::ScriptTimePoint timePoint) override; + + private: + ImGuiPass& m_imGuiPass; + }; + + //! Class which connects to the tick handler using the tick order required at the end of an ImGui frame. + class TickHandlerFrameEnd : protected TickBus::Handler + { + public: + TickHandlerFrameEnd(ImGuiPass& imGuiPass); + + protected: + // TickBus::Handler overrides... + int GetTickOrder() override; + void OnTick(float deltaTime, AZ::ScriptTimePoint timePoint) override; + + private: + ImGuiPass& m_imGuiPass; + }; struct DrawInfo { @@ -111,6 +136,8 @@ namespace AZ void Init(); ImGuiContext* m_imguiContext = nullptr; + TickHandlerFrameStart m_tickHandlerFrameStart; + TickHandlerFrameEnd m_tickHandlerFrameEnd; RHI::Ptr m_pipelineState; Data::Instance m_shader; diff --git a/Gems/Atom/Feature/Common/Code/Source/ImageBasedLights/ImageBasedLightFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/ImageBasedLights/ImageBasedLightFeatureProcessor.cpp index 6a2eda8f22..b8d6d323c3 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ImageBasedLights/ImageBasedLightFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ImageBasedLights/ImageBasedLightFeatureProcessor.cpp @@ -11,8 +11,6 @@ #include #include -#include - namespace AZ { namespace Render diff --git a/Gems/Atom/Feature/Common/Code/Source/Mesh/MeshFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/Mesh/MeshFeatureProcessor.cpp index 112eff64a8..c11d223458 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Mesh/MeshFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Mesh/MeshFeatureProcessor.cpp @@ -24,7 +24,6 @@ #include #include -#include #include #include #include @@ -77,8 +76,8 @@ namespace AZ void MeshFeatureProcessor::Simulate(const FeatureProcessor::SimulatePacket& packet) { AZ_PROFILE_SCOPE(RPI, "MeshFeatureProcessor: Simulate"); - AZ_UNUSED(packet); + AZ::Job* parentJob = packet.m_parentJob; AZStd::concurrency_check_scope scopeCheck(m_meshDataChecker); const auto iteratorRanges = m_modelData.GetParallelRanges(); @@ -87,6 +86,8 @@ namespace AZ { const auto jobLambda = [&]() -> void { + AZ_PROFILE_SCOPE(AzRender, "MeshFeatureProcessor: Simulate: Job"); + for (auto meshDataIter = iteratorRange.first; meshDataIter != iteratorRange.second; ++meshDataIter) { if (!meshDataIter->m_model) @@ -114,24 +115,22 @@ namespace AZ { meshDataIter->BuildCullable(); } + + if (meshDataIter->m_cullBoundsNeedsUpdate) + { + meshDataIter->UpdateCullBounds(m_transformService); + } } }; Job* executeGroupJob = aznew JobFunction(jobLambda, true, nullptr); // Auto-deletes - executeGroupJob->SetDependent(&jobCompletion); - executeGroupJob->Start(); + parentJob->StartAsChild(executeGroupJob); } - jobCompletion.StartAndWaitForCompletion(); - - m_forceRebuildDrawPackets = false; - - // CullingSystem::RegisterOrUpdateCullable() is not threadsafe, so need to do those updates in a single thread - for (ModelDataInstance& modelDataInstance : m_modelData) { - if (modelDataInstance.m_model && modelDataInstance.m_cullBoundsNeedsUpdate) - { - modelDataInstance.UpdateCullBounds(m_transformService); - } + AZ_PROFILE_SCOPE(AzRender, "MeshFeatureProcessor: Simulate: WaitForChildren"); + parentJob->WaitForChildren(); } + + m_forceRebuildDrawPackets = false; } void MeshFeatureProcessor::OnBeginPrepareRender() @@ -1038,7 +1037,6 @@ namespace AZ void ModelDataInstance::UpdateDrawPackets(bool forceUpdate /*= false*/) { - AZ_PROFILE_SCOPE(AzRender, "ModelDataInstance:: UpdateDrawPackets"); for (auto& drawPacketList : m_drawPacketListsByLod) { for (auto& drawPacket : drawPacketList) @@ -1053,7 +1051,6 @@ namespace AZ void ModelDataInstance::BuildCullable() { - AZ_PROFILE_SCOPE(AzRender, "ModelDataInstance: BuildCullable"); AZ_Assert(m_cullableNeedsRebuild, "This function only needs to be called if the cullable to be rebuilt"); AZ_Assert(m_model, "The model has not finished loading yet"); @@ -1130,7 +1127,6 @@ namespace AZ void ModelDataInstance::UpdateCullBounds(const TransformServiceFeatureProcessor* transformService) { - AZ_PROFILE_SCOPE(AzRender, "ModelDataInstance: UpdateCullBounds"); AZ_Assert(m_cullBoundsNeedsUpdate, "This function only needs to be called if the culling bounds need to be rebuilt"); AZ_Assert(m_model, "The model has not finished loading yet"); diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcess/Bloom/BloomSettings.cpp b/Gems/Atom/Feature/Common/Code/Source/PostProcess/Bloom/BloomSettings.cpp index ecc1683bc4..d7314bc574 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcess/Bloom/BloomSettings.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcess/Bloom/BloomSettings.cpp @@ -7,7 +7,6 @@ */ -#include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcess/DepthOfField/DepthOfFieldSettings.cpp b/Gems/Atom/Feature/Common/Code/Source/PostProcess/DepthOfField/DepthOfFieldSettings.cpp index 98b527868d..2869408080 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcess/DepthOfField/DepthOfFieldSettings.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcess/DepthOfField/DepthOfFieldSettings.cpp @@ -7,7 +7,6 @@ */ -#include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcess/ExposureControl/ExposureControlSettings.cpp b/Gems/Atom/Feature/Common/Code/Source/PostProcess/ExposureControl/ExposureControlSettings.cpp index 26c2a61d54..5f52fb02a7 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcess/ExposureControl/ExposureControlSettings.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcess/ExposureControl/ExposureControlSettings.cpp @@ -6,7 +6,6 @@ * */ -#include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcess/LookModification/LookModificationSettings.cpp b/Gems/Atom/Feature/Common/Code/Source/PostProcess/LookModification/LookModificationSettings.cpp index cbc357db61..fb56ce8c55 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcess/LookModification/LookModificationSettings.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcess/LookModification/LookModificationSettings.cpp @@ -6,7 +6,6 @@ * */ -#include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcess/PostProcessFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/PostProcess/PostProcessFeatureProcessor.cpp index c8e683e1d1..1979e56180 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcess/PostProcessFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcess/PostProcessFeatureProcessor.cpp @@ -15,8 +15,6 @@ // Using ebus as a temporary workaround #include -#include - namespace AZ { namespace Render diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcess/Ssao/SsaoSettings.cpp b/Gems/Atom/Feature/Common/Code/Source/PostProcess/Ssao/SsaoSettings.cpp index 14b50d7c88..1975b3a73f 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcess/Ssao/SsaoSettings.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcess/Ssao/SsaoSettings.cpp @@ -7,7 +7,6 @@ */ -#include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcessing/ExposureControlRenderProxy.cpp b/Gems/Atom/Feature/Common/Code/Source/PostProcessing/ExposureControlRenderProxy.cpp index 924af4ab98..49e2db810a 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcessing/ExposureControlRenderProxy.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcessing/ExposureControlRenderProxy.cpp @@ -15,7 +15,6 @@ #include -#include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcessing/SMAAFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/PostProcessing/SMAAFeatureProcessor.cpp index ad059fbec0..afe8aa0079 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcessing/SMAAFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcessing/SMAAFeatureProcessor.cpp @@ -12,8 +12,6 @@ #include #include -#include - #include #include @@ -66,7 +64,7 @@ namespace AZ void SMAAFeatureProcessor::Simulate(const FeatureProcessor::SimulatePacket& packet) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(AzRender); AZ_UNUSED(packet); } diff --git a/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.cpp index af53fc3ce1..b3bcd44d88 100644 --- a/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.cpp b/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.cpp index 4ac5782b04..77031ca3af 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbeFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbeFeatureProcessor.cpp index e9038858ad..0f9356428a 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbeFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbeFeatureProcessor.cpp @@ -17,8 +17,6 @@ #include #include #include -#include - namespace AZ { namespace Render diff --git a/Gems/Atom/Feature/Common/Code/Source/ScreenSpace/DeferredFogSettings.cpp b/Gems/Atom/Feature/Common/Code/Source/ScreenSpace/DeferredFogSettings.cpp index 4cde65b9da..fff1c41150 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ScreenSpace/DeferredFogSettings.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ScreenSpace/DeferredFogSettings.cpp @@ -6,7 +6,6 @@ * */ -#include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.cpp index c0cc93d7e0..17866cdd1c 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.cpp @@ -8,7 +8,6 @@ #include -#include #include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshFeatureProcessor.cpp index c135b017fa..37b18291dc 100644 --- a/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshFeatureProcessor.cpp @@ -25,7 +25,6 @@ #include -#include #include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshRenderProxy.cpp b/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshRenderProxy.cpp index c9bfebe25b..2f8ccc12ed 100644 --- a/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshRenderProxy.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshRenderProxy.cpp @@ -18,8 +18,6 @@ #include #include -#include - namespace AZ { namespace Render @@ -35,7 +33,7 @@ namespace AZ bool SkinnedMeshRenderProxy::Init(const RPI::Scene& scene, SkinnedMeshFeatureProcessor* featureProcessor) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(AzRender); if(!m_instance->m_model) { return false; diff --git a/Gems/Atom/Feature/Common/Code/Source/SkyBox/SkyBoxFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/SkyBox/SkyBoxFeatureProcessor.cpp index ca8775a073..3c85f16821 100644 --- a/Gems/Atom/Feature/Common/Code/Source/SkyBox/SkyBoxFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/SkyBox/SkyBoxFeatureProcessor.cpp @@ -8,8 +8,6 @@ #include -#include - #include #include @@ -190,7 +188,7 @@ namespace AZ void SkyBoxFeatureProcessor::Render(const FeatureProcessor::RenderPacket& packet) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(AzRender); AZ_UNUSED(packet); } diff --git a/Gems/Atom/Feature/Common/Code/Source/TransformService/TransformServiceFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/TransformService/TransformServiceFeatureProcessor.cpp index 141acbd744..54ad77d403 100644 --- a/Gems/Atom/Feature/Common/Code/Source/TransformService/TransformServiceFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/TransformService/TransformServiceFeatureProcessor.cpp @@ -14,7 +14,6 @@ #include #include -#include #include namespace AZ diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI/Factory.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/Factory.h index 71f9f1605b..1755d45a74 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/Factory.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/Factory.h @@ -112,6 +112,9 @@ namespace AZ //! Returns true if Pix dll is loaded static bool IsPixModuleLoaded(); + //! Returns true if Pix GPU events should be emitted + static bool PixGpuEventsEnabled(); + //! Returns true if Warp is enabled static bool UsingWarpDevice(); diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI/MemorySubAllocator.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/MemorySubAllocator.h index 3e464a6974..23caed3031 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/MemorySubAllocator.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/MemorySubAllocator.h @@ -12,8 +12,6 @@ #include #include -#include - namespace AZ { namespace RHI @@ -96,7 +94,7 @@ namespace AZ template typename MemorySubAllocator::memory_allocation MemorySubAllocator::Allocate(size_t sizeInBytes, size_t alignmentInBytes) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); if (RHI::AlignUp(sizeInBytes, alignmentInBytes) > m_descriptor.m_capacityInBytes) { return memory_allocation(); diff --git a/Gems/Atom/RHI/Code/Source/RHI/AliasedHeap.cpp b/Gems/Atom/RHI/Code/Source/RHI/AliasedHeap.cpp index 3e1c94b23d..f3afbabbe2 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/AliasedHeap.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/AliasedHeap.cpp @@ -13,7 +13,6 @@ #include #include #include -#include #include namespace AZ diff --git a/Gems/Atom/RHI/Code/Source/RHI/BufferPool.cpp b/Gems/Atom/RHI/Code/Source/RHI/BufferPool.cpp index 94b0b57c37..e1863ba085 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/BufferPool.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/BufferPool.cpp @@ -8,8 +8,6 @@ #include #include -#include - namespace AZ { namespace RHI @@ -119,7 +117,7 @@ namespace AZ ResultCode BufferPool::InitBuffer(const BufferInitRequest& initRequest) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); if (!ValidateInitRequest(initRequest)) { @@ -168,7 +166,7 @@ namespace AZ ResultCode BufferPool::MapBuffer(const BufferMapRequest& request, BufferMapResponse& response) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); if (!ValidateIsInitialized() || !ValidateNotProcessingFrame()) { diff --git a/Gems/Atom/RHI/Code/Source/RHI/CommandListValidator.cpp b/Gems/Atom/RHI/Code/Source/RHI/CommandListValidator.cpp index f885a86800..58c2136e2f 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/CommandListValidator.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/CommandListValidator.cpp @@ -19,8 +19,6 @@ #include #include #include -#include - namespace AZ { namespace RHI @@ -31,7 +29,7 @@ namespace AZ { return; } - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); AZ_Assert(m_scope == nullptr, "BeginScope called twice."); m_scope = &scope; @@ -58,7 +56,7 @@ namespace AZ { return true; } - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); ValidateViewContext context; context.m_scopeName = m_scope->GetId().GetCStr(); context.m_srgName = shaderResourceGroup.GetName().GetCStr(); diff --git a/Gems/Atom/RHI/Code/Source/RHI/Device.cpp b/Gems/Atom/RHI/Code/Source/RHI/Device.cpp index c8497cf7b1..38abdd6968 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/Device.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/Device.cpp @@ -9,7 +9,6 @@ #include #include -#include #include namespace AZ @@ -112,7 +111,7 @@ namespace AZ ResultCode Device::BeginFrame() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); if (ValidateIsInitialized() && ValidateIsNotInFrame()) { diff --git a/Gems/Atom/RHI/Code/Source/RHI/DrawListContext.cpp b/Gems/Atom/RHI/Code/Source/RHI/DrawListContext.cpp index 5f92d52006..e7254937e4 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/DrawListContext.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/DrawListContext.cpp @@ -7,6 +7,7 @@ */ #include +#include #include namespace AZ @@ -86,6 +87,7 @@ namespace AZ void DrawListContext::FinalizeLists() { + AZ_PROFILE_SCOPE(RHI, "DrawListContext: FinalizeLists"); for (size_t i = 0; i < m_mergedListsByTag.size(); ++i) { if (m_drawListMask[i]) diff --git a/Gems/Atom/RHI/Code/Source/RHI/Factory.cpp b/Gems/Atom/RHI/Code/Source/RHI/Factory.cpp index 82b0a13c86..e63c8d3bde 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/Factory.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/Factory.cpp @@ -26,6 +26,7 @@ static bool s_isRenderDocDllLoaded = false; #if defined(USE_PIX) static AZStd::unique_ptr s_pixModule; static bool s_isPixGpuCaptureDllLoaded = false; +static bool s_pixGpuMarkersEnabled = false; #endif static bool s_usingWarpDevice = false; @@ -62,7 +63,9 @@ namespace AZ #if defined(USE_RENDERDOC) // If RenderDoc is requested, we need to load the library as early as possible (before device queries/factories are made) bool enableRenderDoc = RHI::QueryCommandLineOption("enableRenderDoc"); - +#if defined(USE_PIX) + s_pixGpuMarkersEnabled = s_pixGpuMarkersEnabled || enableRenderDoc; +#endif if (enableRenderDoc && AZ_TRAIT_RENDERDOC_MODULE && !s_renderDocModule) { s_renderDocModule = DynamicModuleHandle::Create(AZ_TRAIT_RENDERDOC_MODULE); @@ -119,6 +122,9 @@ namespace AZ //Pix dll can still be injected even if we do not pass in enablePixGPU. This can be done if we launch the app from Pix. s_isPixGpuCaptureDllLoaded = Platform::IsPixDllInjected(AZ_TRAIT_PIX_MODULE); + + s_pixGpuMarkersEnabled = + s_pixGpuMarkersEnabled || RHI::QueryCommandLineOption("enablePixGpuMarkers") || s_isPixGpuCaptureDllLoaded; #endif } @@ -202,6 +208,15 @@ namespace AZ #endif } + bool Factory::PixGpuEventsEnabled() + { +#if defined(USE_PIX) + return s_pixGpuMarkersEnabled; +#else + return false; +#endif + } + bool Factory::UsingWarpDevice() { return s_usingWarpDevice; diff --git a/Gems/Atom/RHI/Code/Source/RHI/FrameGraph.cpp b/Gems/Atom/RHI/Code/Source/RHI/FrameGraph.cpp index e4e1a887b0..25158b1b3d 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/FrameGraph.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/FrameGraph.cpp @@ -17,8 +17,6 @@ #include #include #include -#include -#include namespace AZ { @@ -61,7 +59,7 @@ namespace AZ void FrameGraph::Begin() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); AZ_Assert(m_isBuilding == false, "FrameGraph::Begin called, but End was never called on the previous build cycle!"); AZ_Assert(m_isCompiled == false, "FrameGraph::Clear must be called before reuse."); diff --git a/Gems/Atom/RHI/Code/Source/RHI/FrameGraphAttachmentDatabase.cpp b/Gems/Atom/RHI/Code/Source/RHI/FrameGraphAttachmentDatabase.cpp index 388277ff59..f33aebaee5 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/FrameGraphAttachmentDatabase.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/FrameGraphAttachmentDatabase.cpp @@ -12,8 +12,6 @@ #include #include #include -#include - namespace AZ { namespace RHI diff --git a/Gems/Atom/RHI/Code/Source/RHI/FrameGraphCompiler.cpp b/Gems/Atom/RHI/Code/Source/RHI/FrameGraphCompiler.cpp index d06ec002e4..347d47d19a 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/FrameGraphCompiler.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/FrameGraphCompiler.cpp @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -288,7 +287,7 @@ namespace AZ return; } - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); /** * Each attachment declares which queue classes it can be used on. We require that the first scope be on the most diff --git a/Gems/Atom/RHI/Code/Source/RHI/FrameGraphExecuter.cpp b/Gems/Atom/RHI/Code/Source/RHI/FrameGraphExecuter.cpp index 6888531b67..7599e9c8f6 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/FrameGraphExecuter.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/FrameGraphExecuter.cpp @@ -10,8 +10,6 @@ #include #include #include -#include - namespace AZ { namespace RHI diff --git a/Gems/Atom/RHI/Code/Source/RHI/FrameGraphLogger.cpp b/Gems/Atom/RHI/Code/Source/RHI/FrameGraphLogger.cpp index 7b96352eca..57455e43f4 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/FrameGraphLogger.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/FrameGraphLogger.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include namespace AZ diff --git a/Gems/Atom/RHI/Code/Source/RHI/FrameScheduler.cpp b/Gems/Atom/RHI/Code/Source/RHI/FrameScheduler.cpp index eb4fb46cc9..716582b3ab 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/FrameScheduler.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/FrameScheduler.cpp @@ -24,7 +24,6 @@ #include #include -#include #include #include #include @@ -233,9 +232,10 @@ namespace AZ for (ScopeProducer* scopeProducer : m_scopeProducers) { + AZ_PROFILE_SCOPE(RHI, "FrameScheduler: PrepareProducers: Scope %s", scopeProducer->GetScopeId().GetCStr()); m_frameGraph->BeginScope(*scopeProducer->GetScope()); scopeProducer->SetupFrameGraphDependencies(*m_frameGraph); - + // All scopes depend on the root scope. if (scopeProducer->GetScopeId() != m_rootScopeId) { @@ -527,7 +527,10 @@ namespace AZ parentJob->StartAsChild(AZ::CreateJobFunction(AZStd::move(jobLambda), true, nullptr)); } - parentJob->WaitForChildren(); + { + AZ_PROFILE_SCOPE(RHI, "FrameScheduler: ExecuteGroupInternal: WaitForChildren"); + parentJob->WaitForChildren(); + } } m_frameGraphExecuter->EndGroup(groupIndex); diff --git a/Gems/Atom/RHI/Code/Source/RHI/ResourceView.cpp b/Gems/Atom/RHI/Code/Source/RHI/ResourceView.cpp index 2b769a7e31..f64a29bb8c 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/ResourceView.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/ResourceView.cpp @@ -8,8 +8,6 @@ #include #include -#include - namespace AZ { namespace RHI @@ -57,7 +55,7 @@ namespace AZ ResultCode ResourceView::OnResourceInvalidate() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); ResultCode resultCode = InvalidateInternal(); if (resultCode == ResultCode::Success) { diff --git a/Gems/Atom/RHI/Code/Source/RHI/Scope.cpp b/Gems/Atom/RHI/Code/Source/RHI/Scope.cpp index 63bb44453a..472309929e 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/Scope.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/Scope.cpp @@ -10,8 +10,6 @@ #include #include -#include - namespace AZ { namespace RHI @@ -90,7 +88,7 @@ namespace AZ void Scope::QueueResourcePoolResolves(ResourcePoolDatabase& resourcePoolDatabase) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); const auto queuePoolResolverFunction = [this](ResourcePoolResolver* poolResolver) { diff --git a/Gems/Atom/RHI/Code/Source/RHI/ShaderResourceGroupInvalidateRegistry.cpp b/Gems/Atom/RHI/Code/Source/RHI/ShaderResourceGroupInvalidateRegistry.cpp index a35f73df91..0791fdd34e 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/ShaderResourceGroupInvalidateRegistry.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/ShaderResourceGroupInvalidateRegistry.cpp @@ -7,8 +7,6 @@ */ #include #include -#include - namespace AZ { namespace RHI @@ -60,7 +58,7 @@ namespace AZ ResultCode ShaderResourceGroupInvalidateRegistry::OnResourceInvalidate() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); AZ_Assert(m_compileGroupFunction, "No compile function set"); const Resource* resource = *ResourceInvalidateBus::GetCurrentBusId(); diff --git a/Gems/Atom/RHI/Code/Source/RHI/ShaderResourceGroupPool.cpp b/Gems/Atom/RHI/Code/Source/RHI/ShaderResourceGroupPool.cpp index eb80b038eb..3209a30f1a 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/ShaderResourceGroupPool.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/ShaderResourceGroupPool.cpp @@ -8,8 +8,6 @@ #include #include #include -#include - namespace AZ { namespace RHI @@ -250,7 +248,7 @@ namespace AZ void ShaderResourceGroupPool::CompileGroupsForInterval(Interval interval) { - AZ_TRACE_METHOD_NAME("CompileGroupsForInterval"); + AZ_PROFILE_SCOPE(RHI, "CompileGroupsForInterval"); AZ_Assert(m_isCompiling, "You must call CompileGroupsBegin() first!"); AZ_Assert( diff --git a/Gems/Atom/RHI/Code/Source/RHI/StreamingImagePool.cpp b/Gems/Atom/RHI/Code/Source/RHI/StreamingImagePool.cpp index 6d67fa7844..6db8da3b55 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/StreamingImagePool.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/StreamingImagePool.cpp @@ -7,8 +7,6 @@ */ #include -#include - namespace AZ { namespace RHI @@ -74,7 +72,7 @@ namespace AZ ResultCode StreamingImagePool::Init(Device& device, const StreamingImagePoolDescriptor& descriptor) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); return ResourcePool::Init( device, descriptor, @@ -93,7 +91,7 @@ namespace AZ ResultCode StreamingImagePool::InitImage(const StreamingImageInitRequest& initRequest) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); if (!ValidateIsInitialized()) { diff --git a/Gems/Atom/RHI/Code/Source/RHI/SwapChain.cpp b/Gems/Atom/RHI/Code/Source/RHI/SwapChain.cpp index 074eedf1b6..6140bf545d 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/SwapChain.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/SwapChain.cpp @@ -8,8 +8,6 @@ #include #include #include -#include - namespace AZ { namespace RHI @@ -185,7 +183,7 @@ namespace AZ void SwapChain::Present() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); // Due to swapchain recreation, the images are refreshed. // There is no need to present swapchain for this frame. const uint32_t imageCount = aznumeric_cast(m_images.size()); diff --git a/Gems/Atom/RHI/Code/Tests/RHITestFixture.h b/Gems/Atom/RHI/Code/Tests/RHITestFixture.h index 620fc03c6f..da91c9e5f7 100644 --- a/Gems/Atom/RHI/Code/Tests/RHITestFixture.h +++ b/Gems/Atom/RHI/Code/Tests/RHITestFixture.h @@ -14,8 +14,6 @@ #include #include -#include -#include #include #include #include diff --git a/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/DX12_Windows.h b/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/DX12_Windows.h index 2eef783932..225b039c66 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/DX12_Windows.h +++ b/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/DX12_Windows.h @@ -56,6 +56,9 @@ AZ_POP_DISABLE_WARNING // This define controls whether DXR ray tracing support is available on the platform. #define AZ_DX12_DXR_SUPPORT +// This define is used to initialize the D3D12_ROOT_SIGNATURE_DESC::Flags property. +#define AZ_DX12_ROOT_SIGNATURE_FLAGS D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT + using ID3D12CommandAllocatorX = ID3D12CommandAllocator; using ID3D12CommandQueueX = ID3D12CommandQueue; using ID3D12DeviceX = ID3D12Device5; diff --git a/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/NsightAftermathGpuCrashTracker_Windows.cpp b/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/NsightAftermathGpuCrashTracker_Windows.cpp index 368ad5f4d0..e94ddcd7c7 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/NsightAftermathGpuCrashTracker_Windows.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/NsightAftermathGpuCrashTracker_Windows.cpp @@ -12,8 +12,6 @@ #include #include #include -#include - #if defined(USE_NSIGHT_AFTERMATH) GpuCrashTracker::~GpuCrashTracker() { diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/AliasedHeap.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/AliasedHeap.cpp index d45c58e24c..c988c4e14e 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/AliasedHeap.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/AliasedHeap.cpp @@ -14,7 +14,6 @@ #include #include #include -#include #include namespace AZ diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/BufferMemoryAllocator.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/BufferMemoryAllocator.cpp index d0e7d5364e..f03c5f32a8 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/BufferMemoryAllocator.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/BufferMemoryAllocator.cpp @@ -10,7 +10,6 @@ #include #include -#include namespace AZ { @@ -82,7 +81,7 @@ namespace AZ BufferMemoryView BufferMemoryAllocator::Allocate(size_t sizeInBytes, size_t overrideSubAllocAlignment) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); BufferMemoryView bufferMemoryView; @@ -141,7 +140,7 @@ namespace AZ BufferMemoryView BufferMemoryAllocator::AllocateUnique(const RHI::BufferDescriptor& bufferDescriptor) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); const size_t alignedSize = RHI::AlignUp(bufferDescriptor.m_byteCount, Alignment::CommittedBuffer); diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/BufferPool.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/BufferPool.cpp index c7b78a3945..ce09556767 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/BufferPool.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/BufferPool.cpp @@ -14,7 +14,6 @@ #include #include #include -#include #include #include @@ -54,7 +53,7 @@ namespace AZ CpuVirtualAddress MapBuffer(const RHI::BufferMapRequest& request) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); MemoryView stagingMemory = m_device->AcquireStagingMemory(request.m_byteCount, Alignment::Buffer); @@ -247,7 +246,7 @@ namespace AZ RHI::ResultCode BufferPool::InitBufferInternal(RHI::Buffer& bufferBase, const RHI::BufferDescriptor& bufferDescriptor) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); // We need respect the buffer's alignment if the buffer is used for SRV or UAV bool useBufferAlignment = RHI::CheckBitsAny(bufferDescriptor.m_bindFlags, @@ -307,7 +306,7 @@ namespace AZ RHI::ResultCode BufferPool::MapBufferInternal(const RHI::BufferMapRequest& request, RHI::BufferMapResponse& response) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); const RHI::BufferPoolDescriptor& poolDescriptor = GetDescriptor(); Buffer& buffer = *static_cast(request.m_buffer); diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandList.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandList.cpp index 1ee35c513a..25b412fbe1 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandList.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandList.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -97,7 +96,7 @@ namespace AZ SetName(name); PIXBeginEvent(PIX_MARKER_CMDLIST_COL, name.GetCStr()); - if (RHI::Factory::Get().IsPixModuleLoaded() || RHI::Factory::Get().IsRenderDocModuleLoaded()) + if (RHI::Factory::Get().PixGpuEventsEnabled()) { PIXBeginEvent(GetCommandList(), PIX_MARKER_CMDLIST_COL, name.GetCStr()); } @@ -107,7 +106,7 @@ namespace AZ { FlushBarriers(); PIXEndEvent(); - if (RHI::Factory::Get().IsPixModuleLoaded() || RHI::Factory::Get().IsRenderDocModuleLoaded()) + if (RHI::Factory::Get().PixGpuEventsEnabled()) { PIXEndEvent(GetCommandList()); } @@ -563,7 +562,7 @@ namespace AZ return; } - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); D3D12_VIEWPORT dx12Viewports[D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE]; const auto& viewports = m_state.m_viewportState.m_states; @@ -588,7 +587,7 @@ namespace AZ return; } - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); D3D12_RECT dx12Scissors[D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE]; const auto& scissors = m_state.m_scissorState.m_states; diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandListPool.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandListPool.cpp index 20021e71ba..a84e34a811 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandListPool.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandListPool.cpp @@ -9,8 +9,6 @@ #include #include #include -#include - namespace AZ { namespace DX12 @@ -28,7 +26,7 @@ namespace AZ RHI::Ptr CommandAllocatorFactory::CreateObject() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); Microsoft::WRL::ComPtr allocator; AssertSuccess(m_descriptor.m_dx12Device->CreateCommandAllocator( ConvertHardwareQueueClass(m_descriptor.m_hardwareQueueClass), @@ -39,7 +37,7 @@ namespace AZ void CommandAllocatorFactory::ResetObject(ID3D12CommandAllocator& allocator) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); allocator.Reset(); } diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandQueueContext.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandQueueContext.cpp index 5692809443..d640c2d543 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandQueueContext.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandQueueContext.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include @@ -57,16 +56,6 @@ namespace AZ m_commandQueues[hardwareQueueIdx]->Init(device, commandQueueDesc); } - Debug::EventTraceDrillerSetupBus::Broadcast( - &Debug::EventTraceDrillerSetupBus::Events::SetThreadName, - EventTrace::GpuQueueIds[static_cast(RHI::HardwareQueueClass::Graphics)], - EventTrace::GpuQueueNames[static_cast(RHI::HardwareQueueClass::Graphics)]); - - Debug::EventTraceDrillerSetupBus::Broadcast( - &Debug::EventTraceDrillerSetupBus::Events::SetThreadName, - EventTrace::GpuQueueIds[static_cast(RHI::HardwareQueueClass::Compute)], - EventTrace::GpuQueueNames[static_cast(RHI::HardwareQueueClass::Compute)]); - CalibrateClocks(); } diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/Device.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/Device.cpp index 3d44e56953..fc4ac81b41 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/Device.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/Device.cpp @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -191,7 +190,7 @@ namespace AZ void Device::EndFrameInternal() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); m_commandQueueContext.End(); m_commandListAllocator.Collect(); @@ -359,7 +358,7 @@ namespace AZ D3D12_RESOURCE_STATES initialState, D3D12_HEAP_TYPE heapType) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); D3D12_RESOURCE_DESC resourceDesc; ConvertImageDescriptor(imageDescriptor, resourceDesc); diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/FrameGraphCompiler.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/FrameGraphCompiler.cpp index 4ff7d581a4..e73978fccc 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/FrameGraphCompiler.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/FrameGraphCompiler.cpp @@ -19,8 +19,6 @@ #include #include #include -#include - // #define AZ_DX12_FRAMESCHEDULER_LOG_TRANSITIONS namespace AZ @@ -479,8 +477,7 @@ namespace AZ return; } - D3D12_RESOURCE_TRANSITION_BARRIER transition; - memset(&transition, 0, sizeof(D3D12_RESOURCE_TRANSITION_BARRIER)); // C4701 potentially unitialized local variable 'transition' used + D3D12_RESOURCE_TRANSITION_BARRIER transition = {0}; transition.pResource = image.GetMemoryView().GetMemory(); Scope& firstScope = static_cast(scopeAttachment->GetScope()); @@ -695,7 +692,7 @@ namespace AZ { Device& device = static_cast(GetDevice()); - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); CommandQueueContext& context = device.GetCommandQueueContext(); for (RHI::Scope* scopeBase : frameGraph.GetScopes()) diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/FrameGraphExecuter.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/FrameGraphExecuter.cpp index 156dd6e38e..2484890fea 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/FrameGraphExecuter.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/FrameGraphExecuter.cpp @@ -12,8 +12,6 @@ #include #include #include -#include - namespace AZ { diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/ImagePool.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/ImagePool.cpp index bbbc1ac943..7947c84736 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/ImagePool.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/ImagePool.cpp @@ -11,8 +11,6 @@ #include #include #include -#include - namespace AZ { namespace DX12 @@ -33,7 +31,7 @@ namespace AZ RHI::ResultCode UpdateImage(const RHI::ImageUpdateRequest& request, size_t& bytesTransferred) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); AZStd::lock_guard lock(m_imagePacketMutex); diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/MemoryPageAllocator.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/MemoryPageAllocator.cpp index 2715b7063b..931e3e132f 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/MemoryPageAllocator.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/MemoryPageAllocator.cpp @@ -7,8 +7,6 @@ */ #include #include -#include - namespace AZ { namespace DX12 @@ -35,7 +33,7 @@ namespace AZ return nullptr; } - AZ_TRACE_METHOD_NAME("Create Buffer Page"); + AZ_PROFILE_SCOPE(RHI, "Create Buffer Page"); D3D12_RESOURCE_STATES initialResourceState = ConvertInitialResourceState(m_descriptor.m_heapMemoryLevel, m_descriptor.m_hostMemoryAccess); if (RHI::CheckBitsAny(m_descriptor.m_bindFlags, RHI::BufferBindFlags::RayTracingAccelerationStructure)) diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/MemoryView.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/MemoryView.cpp index 6389076408..4b8604fa51 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/MemoryView.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/MemoryView.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include @@ -55,7 +54,7 @@ namespace AZ CpuVirtualAddress MemoryView::Map(RHI::HostMemoryAccess hostAccess) const { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); CpuVirtualAddress cpuAddress = nullptr; D3D12_RANGE readRange = {}; diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/PipelineLayout.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/PipelineLayout.cpp index 3fdeec1c51..5a54282e70 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/PipelineLayout.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/PipelineLayout.cpp @@ -417,7 +417,7 @@ namespace AZ } D3D12_ROOT_SIGNATURE_DESC rootSignatureDesc; - rootSignatureDesc.Flags = D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT; + rootSignatureDesc.Flags = AZ_DX12_ROOT_SIGNATURE_FLAGS; rootSignatureDesc.NumParameters = static_cast(parameters.size()); rootSignatureDesc.pParameters = parameters.data(); rootSignatureDesc.NumStaticSamplers = static_cast(staticSamplers.size()); diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/PipelineState.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/PipelineState.cpp index a2876398eb..85df5dde25 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/PipelineState.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/PipelineState.cpp @@ -10,8 +10,6 @@ #include #include #include -#include - namespace AZ { namespace DX12 diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingBlas.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingBlas.cpp index 0f651f9be3..b5b4850470 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingBlas.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingBlas.cpp @@ -5,7 +5,6 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#include #include #include #include diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingPipelineState.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingPipelineState.cpp index 37f4e6b49a..24c3cf3d16 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingPipelineState.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingPipelineState.cpp @@ -10,8 +10,6 @@ #include #include #include -#include - namespace AZ { namespace DX12 diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingShaderTable.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingShaderTable.cpp index 0a9ea63d2f..38f2f1c219 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingShaderTable.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingShaderTable.cpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -86,7 +85,7 @@ namespace AZ AZStd::wstring shaderExportNameWstring; AZStd::to_wstring(shaderExportNameWstring, record.m_shaderExportName.GetStringView()); - void* shaderIdentifier = stateObjectProperties->GetShaderIdentifier(shaderExportNameWstring.c_str()); + const void* shaderIdentifier = stateObjectProperties->GetShaderIdentifier(shaderExportNameWstring.c_str()); memcpy(mappedData, shaderIdentifier, D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES); mappedData += D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES; diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingTlas.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingTlas.cpp index 52e4aa4881..84f8daba04 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingTlas.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingTlas.cpp @@ -5,7 +5,6 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#include #include #include #include diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/Scope.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/Scope.cpp index cea072954a..95e88af77d 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/Scope.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/Scope.cpp @@ -20,8 +20,6 @@ #include #include #include -#include - namespace AZ { namespace DX12 @@ -94,13 +92,13 @@ namespace AZ const bool Scope::IsStateSupportedByQueue(D3D12_RESOURCE_STATES state) const { - const D3D12_RESOURCE_STATES VALID_COMPUTE_QUEUE_RESOURCE_STATES = + constexpr D3D12_RESOURCE_STATES VALID_COMPUTE_QUEUE_RESOURCE_STATES = (D3D12_RESOURCE_STATE_UNORDERED_ACCESS | D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE | D3D12_RESOURCE_STATE_COPY_DEST | D3D12_RESOURCE_STATE_COPY_SOURCE); - const D3D12_RESOURCE_STATES VALID_GRAPHICS_QUEUE_RESOURCE_STATES = + constexpr D3D12_RESOURCE_STATES VALID_GRAPHICS_QUEUE_RESOURCE_STATES = (D3D12_RESOURCE_STATES)DX12_RESOURCE_STATE_VALID_API_MASK; switch (GetHardwareQueueClass()) @@ -305,13 +303,13 @@ namespace AZ uint32_t commandListCount) const { AZ_UNUSED(commandListCount); - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); commandList.GetValidator().BeginScope(*this); PIXBeginEvent(0xFFFF00FF, GetId().GetCStr()); - if (RHI::Factory::Get().IsPixModuleLoaded() || RHI::Factory::Get().IsRenderDocModuleLoaded()) + if (RHI::Factory::Get().PixGpuEventsEnabled()) { PIXBeginEvent(commandList.GetCommandList(), 0xFFFF00FF, GetId().GetCStr()); } @@ -387,7 +385,7 @@ namespace AZ uint32_t commandListIndex, uint32_t commandListCount) const { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); const bool isEpilogue = (commandListIndex + 1) == commandListCount; if (isEpilogue) @@ -428,7 +426,7 @@ namespace AZ } } - if (RHI::Factory::Get().IsPixModuleLoaded() || RHI::Factory::Get().IsRenderDocModuleLoaded()) + if (RHI::Factory::Get().PixGpuEventsEnabled()) { PIXEndEvent(commandList.GetCommandList()); } diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/ShaderResourceGroupPool.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/ShaderResourceGroupPool.cpp index 087a36dc2f..1b50f09ea3 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/ShaderResourceGroupPool.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/ShaderResourceGroupPool.cpp @@ -14,8 +14,6 @@ #include #include #include -#include - namespace AZ { diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/StagingMemoryAllocator.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/StagingMemoryAllocator.cpp index 337b25a793..a7e48916ad 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/StagingMemoryAllocator.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/StagingMemoryAllocator.cpp @@ -9,8 +9,6 @@ #include #include -#include - namespace AZ { namespace DX12 @@ -124,7 +122,7 @@ namespace AZ MemoryView StagingMemoryAllocator::AllocateUnique(size_t sizeInBytes) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); RHI::BufferDescriptor descriptor; descriptor.m_byteCount = sizeInBytes; MemoryView memoryView = m_device->CreateBufferCommitted(descriptor, D3D12_RESOURCE_STATE_GENERIC_READ, D3D12_HEAP_TYPE_UPLOAD); diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/StreamingImagePool.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/StreamingImagePool.cpp index add7364056..6af229cc55 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/StreamingImagePool.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/StreamingImagePool.cpp @@ -12,8 +12,6 @@ #include #include #include -#include - // NOTE: Tiled resources are currently disabled, because RenderDoc does not support them. // #define AZ_RHI_USE_TILED_RESOURCES @@ -121,7 +119,7 @@ namespace AZ D3D12_RESOURCE_ALLOCATION_INFO StreamingImagePool::GetAllocationInfo(const RHI::ImageDescriptor& imageDescriptor, uint32_t residentMipLevel) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); uint32_t alignment = GetFormatDimensionAlignment(imageDescriptor.m_format); @@ -138,9 +136,7 @@ namespace AZ RHI::ResultCode StreamingImagePool::InitInternal([[maybe_unused]] RHI::Device& deviceBase, [[maybe_unused]] const RHI::StreamingImagePoolDescriptor& descriptor) { - AZ_TRACE_METHOD(); - - + AZ_PROFILE_FUNCTION(RHI); #ifdef AZ_RHI_USE_TILED_RESOURCES { @@ -232,7 +228,7 @@ namespace AZ void StreamingImagePool::AllocatePackedImageTiles(Image& image) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); AZ_Assert(image.IsTiled(), "This method is only valid for tiled resources."); AZ_Assert(image.GetDescriptor().m_arraySize == 1, "Not implemented for image arrays."); @@ -305,7 +301,7 @@ namespace AZ RHI::ResultCode StreamingImagePool::InitImageInternal(const RHI::StreamingImageInitRequest& request) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); Image& image = static_cast(*request.m_image); diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/SystemComponent.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/SystemComponent.cpp index 1f6cea1151..17993d7c1d 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/SystemComponent.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/SystemComponent.cpp @@ -38,7 +38,6 @@ #include #include #include -#include #include namespace AZ diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/AliasedHeap.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/AliasedHeap.cpp index 440615d77f..011dc7a353 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/AliasedHeap.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/AliasedHeap.cpp @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/AsyncUploadQueue.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/AsyncUploadQueue.cpp index eadd571452..f731d9e9d9 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/AsyncUploadQueue.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/AsyncUploadQueue.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -120,21 +119,21 @@ namespace AZ m_copyQueue->QueueCommand([=](void* queue) { - AZ_TRACE_METHOD_NAME("Upload Buffer"); + AZ_PROFILE_SCOPE(RHI, "Upload Buffer"); size_t pendingByteOffset = 0; size_t pendingByteCount = byteCount; CommandQueue* commandQueue = static_cast(queue); while (pendingByteCount > 0) { - AZ_TRACE_METHOD_NAME("Upload Buffer Chunk"); + AZ_PROFILE_SCOPE(RHI, "Upload Buffer Chunk"); FramePacket* framePacket = BeginFramePacket(commandQueue); const size_t bytesToCopy = AZStd::min(pendingByteCount, m_descriptor.m_stagingSizeInBytes); { - AZ_TRACE_METHOD_NAME("Copy CPU buffer"); + AZ_PROFILE_SCOPE(RHI, "Copy CPU buffer"); memcpy(framePacket->m_stagingResourceData, sourceData + pendingByteOffset, bytesToCopy); Platform::SynchronizeBufferOnCPU(framePacket->m_stagingResource, 0, bytesToCopy); } @@ -379,7 +378,7 @@ namespace AZ { AZ_Assert(!m_recordingFrame, "The previous frame packet isn't ended"); - AZ_TRACE_METHOD_NAME("AsyncUploadQueue: Wait copy frame"); + AZ_PROFILE_SCOPE(RHI, "AsyncUploadQueue: Wait copy frame"); FramePacket& framePacket = m_framePackets[m_frameIndex]; framePacket.m_fence.WaitOnCpu(); // ensure any previous uploads using this frame have completed @@ -400,7 +399,7 @@ namespace AZ { AZ_Assert(m_recordingFrame, "The frame packet wasn't started. You need to call StartFramePacket first."); - AZ_TRACE_METHOD_NAME("AsyncUploadQueue: Execute command"); + AZ_PROFILE_SCOPE(RHI, "AsyncUploadQueue: Execute command"); FramePacket& framePacket = m_framePackets[m_frameIndex]; framePacket.m_fence.SignalFromGpu(framePacket.m_mtlCommandBuffer); // signal fence when this upload haas completed diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferMemoryAllocator.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferMemoryAllocator.cpp index 7676459154..63c6dd68e4 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferMemoryAllocator.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferMemoryAllocator.cpp @@ -116,7 +116,7 @@ namespace AZ BufferMemoryView BufferMemoryAllocator::AllocateUnique(const RHI::BufferDescriptor& bufferDescriptor) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); const size_t alignedSize = RHI::AlignUp(bufferDescriptor.m_byteCount, Alignment::Buffer); RHI::HeapMemoryUsage& heapMemoryUsage = *m_descriptor.m_getHeapMemoryUsageFunction(); diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandList.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandList.cpp index 3c45e69d8b..2b8be3d1ab 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandList.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandList.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include #include @@ -177,7 +176,7 @@ namespace AZ void CommandList::Submit(const RHI::DispatchItem& dispatchItem) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); CreateEncoder(CommandEncoderType::Compute); bool bindResourceSuccessfull = CommitShaderResources(dispatchItem); @@ -479,7 +478,7 @@ namespace AZ void CommandList::Submit(const RHI::DrawItem& drawItem) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); CreateEncoder(CommandEncoderType::Render); @@ -582,7 +581,7 @@ namespace AZ { if (m_state.m_pipelineState != pipelineState) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); m_state.m_pipelineState = pipelineState; switch (pipelineState->GetType()) @@ -732,7 +731,7 @@ namespace AZ return; } - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); const auto& viewports = m_state.m_viewportState.m_states; MTLViewport metalViewports[viewports.size()]; diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListBase.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListBase.cpp index e386c25515..063622354b 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListBase.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListBase.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandQueueCommandBuffer.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandQueueCommandBuffer.cpp index e2a456c81c..0cdccef01e 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandQueueCommandBuffer.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandQueueCommandBuffer.cpp @@ -7,7 +7,6 @@ */ #include -#include #include namespace AZ diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandQueueContext.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandQueueContext.cpp index 37f8a8bab8..9fa0640f64 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandQueueContext.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandQueueContext.cpp @@ -6,7 +6,6 @@ * */ -#include #include #include #include @@ -60,7 +59,7 @@ namespace AZ void CommandQueueContext::WaitForIdle() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); for (uint32_t hardwareQueueIdx = 0; hardwareQueueIdx < RHI::HardwareQueueClassCount; ++hardwareQueueIdx) { m_commandQueues[hardwareQueueIdx]->WaitForIdle(); diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/Device.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/Device.cpp index 76af1ecab1..91d8287e8d 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/Device.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/Device.cpp @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/FrameGraphCompiler.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/FrameGraphCompiler.cpp index 9ee000e166..568d990e6f 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/FrameGraphCompiler.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/FrameGraphCompiler.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include #include @@ -47,7 +46,7 @@ namespace AZ { Device& device = static_cast(GetDevice()); - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); CommandQueueContext& context = device.GetCommandQueueContext(); for (RHI::Scope* scopeBase : frameGraph.GetScopes()) diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/FrameGraphExecuter.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/FrameGraphExecuter.cpp index 73bdcde9a0..41824ced9e 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/FrameGraphExecuter.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/FrameGraphExecuter.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include #include diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/MemoryPageAllocator.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/MemoryPageAllocator.cpp index 619a6e5b8a..2787eef9af 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/MemoryPageAllocator.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/MemoryPageAllocator.cpp @@ -9,8 +9,6 @@ #include #include #include -#include - namespace AZ { namespace Metal @@ -29,7 +27,7 @@ namespace AZ return nullptr; } - AZ_TRACE_METHOD_NAME("Create Buffer Page"); + AZ_PROFILE_SCOPE(RHI, "Create Buffer Page"); RHI::BufferDescriptor bufferDescriptor; bufferDescriptor.m_byteCount = m_descriptor.m_pageSizeInBytes; diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/PipelineState.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/PipelineState.cpp index 8d6ab8fee3..f7cc417224 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/PipelineState.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/PipelineState.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/Scope.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/Scope.cpp index c680684efd..4a1dc8765d 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/Scope.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/Scope.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include #include @@ -273,7 +272,7 @@ namespace AZ AZ::u32 commandListIndex, AZ::u32 commandListCount) const { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); if(m_isWritingToSwapChainScope) { @@ -331,7 +330,7 @@ namespace AZ AZ::u32 commandListIndex, AZ::u32 commandListCount) const { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); const bool isEpilogue = (commandListIndex + 1) == commandListCount; commandList.FlushEncoder(); diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroupPool.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroupPool.cpp index 0a9c001868..654fe9e4f6 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroupPool.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroupPool.cpp @@ -6,7 +6,6 @@ * */ -#include #include #include #include diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePool.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePool.cpp index 3d90b595e4..2ae7feddb8 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePool.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePool.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include #include @@ -36,7 +35,7 @@ namespace AZ RHI::ResultCode StreamingImagePool::InitInternal(RHI::Device& deviceBase, const RHI::StreamingImagePoolDescriptor& descriptor) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); Device& device = static_cast(deviceBase); SetResolver(AZStd::make_unique(device, this)); @@ -89,7 +88,7 @@ namespace AZ RHI::ResultCode StreamingImagePool::ExpandImageInternal(const RHI::StreamingImageExpandRequest& request) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); auto& image = static_cast(*request.m_image); auto& device = static_cast(GetDevice()); diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePoolResolver.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePoolResolver.cpp index 0a9aaf60d6..3ef2dc915a 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePoolResolver.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePoolResolver.cpp @@ -6,7 +6,6 @@ * */ -#include #include #include @@ -16,7 +15,7 @@ namespace AZ { RHI::ResultCode StreamingImagePoolResolver::UpdateImage(const RHI::StreamingImageExpandRequest& request) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); Image* image = static_cast(request.m_image); const RHI::ImageDescriptor& imageDescriptor = image->GetDescriptor(); diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/SystemComponent.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/SystemComponent.cpp index 840bef2b1b..3d1583fe1b 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/SystemComponent.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/SystemComponent.cpp @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/Gems/Atom/RHI/Null/Code/Source/RHI/SystemComponent.cpp b/Gems/Atom/RHI/Null/Code/Source/RHI/SystemComponent.cpp index 091084b097..e329d69ddc 100644 --- a/Gems/Atom/RHI/Null/Code/Source/RHI/SystemComponent.cpp +++ b/Gems/Atom/RHI/Null/Code/Source/RHI/SystemComponent.cpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/AliasedHeap.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/AliasedHeap.cpp index c0166e95b5..8b4d179574 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/AliasedHeap.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/AliasedHeap.cpp @@ -16,8 +16,6 @@ #include #include #include -#include - namespace AZ { namespace Vulkan diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/BufferMemoryPageAllocator.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/BufferMemoryPageAllocator.cpp index a1025e5501..00b1d4211c 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/BufferMemoryPageAllocator.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/BufferMemoryPageAllocator.cpp @@ -8,8 +8,6 @@ #include #include #include -#include - namespace AZ { namespace Vulkan @@ -50,7 +48,7 @@ namespace AZ return nullptr; } - AZ_TRACE_METHOD_NAME("Create BufferMemory Page"); + AZ_PROFILE_SCOPE(RHI, "Create BufferMemory Page"); RHI::Ptr bufferMemory; diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/CommandQueueContext.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/CommandQueueContext.cpp index 9cf6dce77b..c556e85979 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/CommandQueueContext.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/CommandQueueContext.cpp @@ -7,7 +7,6 @@ */ #include #include -#include #include #include #include diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/FrameGraphCompiler.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/FrameGraphCompiler.cpp index e153ad6645..9a27d2898d 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/FrameGraphCompiler.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/FrameGraphCompiler.cpp @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/MemoryPageAllocator.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/MemoryPageAllocator.cpp index 7535b19106..c7c372ad0a 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/MemoryPageAllocator.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/MemoryPageAllocator.cpp @@ -8,8 +8,6 @@ #include #include #include -#include - namespace AZ { namespace Vulkan @@ -35,7 +33,7 @@ namespace AZ return nullptr; } - AZ_TRACE_METHOD_NAME("Create Memory Page"); + AZ_PROFILE_SCOPE(RHI, "Create Memory Page"); const VkMemoryPropertyFlags flags = ConvertHeapMemoryLevel(m_descriptor.m_heapMemoryLevel) | m_descriptor.m_additionalMemoryPropertyFlags; RHI::Ptr memory = GetDevice().AllocateMemory(sizeInBytes, m_descriptor.m_memoryTypeBits, flags); diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/MemoryTypeAllocator.h b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/MemoryTypeAllocator.h index 8fd083d4b9..5504e6e791 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/MemoryTypeAllocator.h +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/MemoryTypeAllocator.h @@ -10,8 +10,6 @@ #include #include #include -#include - namespace AZ { namespace Vulkan @@ -108,8 +106,7 @@ namespace AZ template View MemoryTypeAllocator::Allocate(size_t sizeInBytes, size_t alignmentInBytes, bool forceUnique /*=false*/) { - AZ_TRACE_METHOD(); - + AZ_PROFILE_FUNCTION(RHI); View memoryView; @@ -155,7 +152,7 @@ namespace AZ template View MemoryTypeAllocator::AllocateUnique(const uint64_t sizeInBytes) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); auto memory = const_cast(m_pageAllocator.GetFactory()).CreateObject(sizeInBytes); if (!memory) { diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingBlas.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingBlas.cpp index 55e804aac9..333f88f8eb 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingBlas.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingBlas.cpp @@ -6,7 +6,6 @@ * */ -#include #include #include #include diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingPipelineState.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingPipelineState.cpp index 33623f93e4..65281d923f 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingPipelineState.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingPipelineState.cpp @@ -10,8 +10,6 @@ #include #include #include -#include - namespace AZ { namespace Vulkan diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingShaderTable.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingShaderTable.cpp index 0c5cda7008..d5ef121875 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingShaderTable.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingShaderTable.cpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingTlas.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingTlas.cpp index e36afd0b7a..ff6312b059 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingTlas.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingTlas.cpp @@ -6,7 +6,6 @@ * */ -#include #include #include #include diff --git a/Gems/Atom/RPI/Assets/ShaderLib/Atom/RPI/Math.azsli b/Gems/Atom/RPI/Assets/ShaderLib/Atom/RPI/Math.azsli index 6ffdb6e815..344ccac1fb 100644 --- a/Gems/Atom/RPI/Assets/ShaderLib/Atom/RPI/Math.azsli +++ b/Gems/Atom/RPI/Assets/ShaderLib/Atom/RPI/Math.azsli @@ -177,7 +177,7 @@ float ComputeLerpBetweenInnerOuterAABBs(float3 innerAabbMin, float3 innerAabbMax bool ObbContainsPoint(float4x4 obbTransformInverse, float3 obbHalfExtents, float3 testPoint) { // get the position in Obb local space, force to positive quadrant with abs() - float4 p = abs(mul(obbTransformInverse, float4(testPoint, 1.0f))); + float3 p = abs(mul(obbTransformInverse, float4(testPoint, 1.0f)).xyz); return AabbContainsPoint(-obbHalfExtents, obbHalfExtents, p); } diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/FeatureProcessor.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/FeatureProcessor.h index ca188a6d42..caf3728c89 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/FeatureProcessor.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/FeatureProcessor.h @@ -22,10 +22,12 @@ #include #include #include -#include namespace AZ { + // forward declares + class Job; + namespace RPI { //! @class FeatureProcessor @@ -51,6 +53,7 @@ namespace AZ struct SimulatePacket { + AZ::Job* m_parentJob = nullptr; }; struct RenderPacket diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Image/StreamingImageContext.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Image/StreamingImageContext.h index ec12a14ecf..fe65831716 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Image/StreamingImageContext.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Image/StreamingImageContext.h @@ -11,6 +11,7 @@ #include #include #include +#include #include diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/PassDefines.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/PassDefines.h index 9dd1bf6842..89766cccb5 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/PassDefines.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/PassDefines.h @@ -43,6 +43,10 @@ namespace AZ // Rendering -> Idle // -> Queued (Rendering will transition to Queued if a pass was queued with the PassSystem during Rendering) // + // Any State -> Orphaned (transition to Orphaned state can be outside the jurisdiction of the pass and so can happen from any state) + // Orphaned -> Queued (When coming out of Orphaned state, pass will queue itself for build. In practice this + // (almost?) never happens as orphaned passes are re-created in most if not all cases.) + // enum class PassState : u8 { // Default value, you should only ever see this in the Pass constructor @@ -92,7 +96,10 @@ namespace AZ // | // V // Pass is currently rendering. Pass must be in Idle state before entering this state - Rendering + Rendering, + + // Special state: Orphaned State, pass was removed from it's parent and is awaiting deletion + Orphaned }; // This enum keeps track of what actions the pass is queued for with the pass system diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Buffer/Buffer.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Buffer/Buffer.cpp index 2d812c602f..47ad7038f8 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Buffer/Buffer.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Buffer/Buffer.cpp @@ -17,7 +17,8 @@ #include #include #include -#include + +AZ_DECLARE_BUDGET(RPI); namespace AZ { @@ -90,7 +91,7 @@ namespace AZ RHI::ResultCode Buffer::Init(BufferAsset& bufferAsset) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); RHI::ResultCode resultCode = RHI::ResultCode::Fail; @@ -140,7 +141,7 @@ namespace AZ if (bufferAsset.GetBuffer().size() > 0 && !initWithData) { - AZ_TRACE_METHOD_NAME("Stream Upload"); + AZ_PROFILE_SCOPE(RPI, "Stream Upload"); m_streamFence = RHI::Factory::Get().CreateFence(); if (m_streamFence) { diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Buffer/BufferSystem.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Buffer/BufferSystem.cpp index 77e32cd040..cff9161c7c 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Buffer/BufferSystem.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Buffer/BufferSystem.cpp @@ -16,7 +16,6 @@ #include #include -#include #include #include diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp index 9dd4cf99b1..18be5c8460 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -35,7 +34,7 @@ //Enables more detailed profiling descriptions within the culling system, but adds some performance overhead. //Enable this to more easily see which jobs are associated with which view. -//#define AZ_CULL_PROFILE_VERBOSE +//#define AZ_CULL_PROFILE_VERBOSE namespace AZ { @@ -44,6 +43,7 @@ namespace AZ AZ_CVAR(bool, r_CullInParallel, true, nullptr, ConsoleFunctorFlags::Null, ""); AZ_CVAR(uint32_t, r_CullWorkPerBatch, 500, nullptr, ConsoleFunctorFlags::Null, ""); +#ifdef AZ_CULL_DEBUG_ENABLED void DebugDrawWorldCoordinateAxes(AuxGeomDraw* auxGeom) { auxGeom->DrawCylinder(Vector3(.5, .0, .0), Vector3(1, 0, 0), 0.02f, 1.0f, Colors::Red, AuxGeomDraw::DrawStyle::Solid, AuxGeomDraw::DepthTest::Off); @@ -199,6 +199,7 @@ namespace AZ AZ_Assert(false, "invalid frustum, cannot draw"); } } +#endif //AZ_CULL_DEBUG_ENABLED CullingDebugContext::~CullingDebugContext() { @@ -283,7 +284,7 @@ namespace AZ const Scene& scene, View& view, Frustum& frustum, - [[maybe_unused]]void* maskedOcclusionCulling) + [[maybe_unused]] void* maskedOcclusionCulling) { AZStd::shared_ptr worklistData = AZStd::make_shared(); worklistData->m_debugCtx = &debugCtx; @@ -319,14 +320,16 @@ namespace AZ for (const AzFramework::IVisibilityScene::NodeData& nodeData : worklist) { //If a node is entirely contained within the frustum, then we can skip the fine grained culling. - bool nodeIsContainedInFrustum = ShapeIntersection::Contains(worklistData->m_frustum, nodeData.m_bounds); + bool nodeIsContainedInFrustum = + !worklistData->m_debugCtx->m_enableFrustumCulling || + ShapeIntersection::Contains(worklistData->m_frustum, nodeData.m_bounds); #ifdef AZ_CULL_PROFILE_VERBOSE - AZ_PROFILE_SCOPE(RPI, "process node (view: %s, skip fine cull: %d", - m_view->GetName().GetCStr(), nodeIsContainedInFrustum ? 1 : 0); + AZ_PROFILE_SCOPE(RPI, "process node (view: %s, skip fine cull: %ds", + worklistData->m_view->GetName().GetCStr(), nodeIsContainedInFrustum ? "true" : "false"); #endif - if (nodeIsContainedInFrustum || !worklistData->m_debugCtx->m_enableFrustumCulling) + if (nodeIsContainedInFrustum) { //Add all objects within this node to the view, without any extra culling for (AzFramework::VisibilityEntry* visibleEntry : nodeData.m_entries) @@ -392,7 +395,7 @@ namespace AZ } } } - +#ifdef AZ_CULL_DEBUG_ENABLED if (worklistData->m_debugCtx->m_debugDraw && (worklistData->m_view->GetName() == worklistData->m_debugCtx->m_currentViewSelectionName)) { AZ_PROFILE_SCOPE(RPI, "debug draw culling"); @@ -444,8 +447,10 @@ namespace AZ } } } +#endif } +#ifdef AZ_CULL_DEBUG_ENABLED if (worklistData->m_debugCtx->m_enableStats) { CullingDebugContext::CullStats& cullStats = worklistData->m_debugCtx->GetCullStatsForView(worklistData->m_view); @@ -455,6 +460,7 @@ namespace AZ cullStats.m_numVisibleCullables += numVisibleCullables; ++cullStats.m_numJobs; } +#endif //AZ_CULL_DEBUG_ENABLED } #if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED @@ -467,6 +473,10 @@ namespace AZ return MaskedOcclusionCulling::CullingResult::VISIBLE; } +#ifdef AZ_CULL_PROFILE_VERBOSE + AZ_PROFILE_SCOPE(RPI, "TestOcclusionCulling"); +#endif + if (visibleEntry->m_boundingVolume.Contains(worklistData->m_view->GetCameraTransform().GetTranslation())) { // camera is inside bounding volume @@ -516,10 +526,15 @@ namespace AZ } #endif - void CullingScene::ProcessCullablesCommon(const Scene& scene, View& view, AZ::Frustum& frustum, [[maybe_unused]]void*& maskedOcclusionCulling) + void CullingScene::ProcessCullablesCommon( + const Scene& scene [[maybe_unused]], + View& view, + AZ::Frustum& frustum [[maybe_unused]], + void*& maskedOcclusionCulling [[maybe_unused]]) { AZ_PROFILE_SCOPE(RPI, "CullingScene::ProcessCullablesCommon() - %s", view.GetName().GetCStr()); +#ifdef AZ_CULL_DEBUG_ENABLED if (m_debugCtx.m_freezeFrustums) { AZStd::lock_guard lock(m_debugCtx.m_frozenFrustumsMutex); @@ -544,7 +559,7 @@ namespace AZ CullingDebugContext::CullStats& cullStats = m_debugCtx.GetCullStatsForView(&view); cullStats.m_cameraViewToWorld = view.GetViewToWorldMatrix(); } - +#endif //AZ_CULL_DEBUG_ENABLED #if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED // setup occlusion culling, if necessary maskedOcclusionCulling = m_occlusionPlanes.empty() ? nullptr : view.GetMaskedOcclusionCulling(); @@ -806,6 +821,7 @@ namespace AZ beginCullingDescriptor, [&view]() { + AZ_PROFILE_SCOPE(RPI, "CullingScene: BeginCullingTaskGraph"); view->BeginCulling(); }); } @@ -823,6 +839,7 @@ namespace AZ { const auto cullingLambda = [&view]() { + AZ_PROFILE_SCOPE(RPI, "CullingScene: BeginCullingJob"); view->BeginCulling(); }; @@ -844,7 +861,11 @@ namespace AZ m_taskGraphActive = AZ::Interface::Get(); - if (m_taskGraphActive && m_taskGraphActive->IsTaskGraphActive()) + if(views.size() == 1) // avoid job overhead when only 1 job + { + views[0]->BeginCulling(); + } + else if (m_taskGraphActive && m_taskGraphActive->IsTaskGraphActive()) { BeginCullingTaskGraph(views); } @@ -853,6 +874,7 @@ namespace AZ BeginCullingJobs(views); } +#if AZ_CULL_DEBUG_ENABLED AuxGeomDrawPtr auxGeom; if (m_debugCtx.m_debugDraw) { @@ -885,6 +907,7 @@ namespace AZ m_debugCtx.m_frozenFrustums.clear(); } } +#endif } void CullingScene::EndCulling() diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Image/ImageSystem.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Image/ImageSystem.cpp index f201e8414c..2c85f85424 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Image/ImageSystem.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Image/ImageSystem.cpp @@ -27,7 +27,6 @@ #include -#include #include #include #include diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImage.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImage.cpp index 8629588ea2..fb03d109a2 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImage.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImage.cpp @@ -16,12 +16,13 @@ #include -#include #include // Enable this define to debug output streaming image initialization and expanding process. //#define AZ_RPI_STREAMING_IMAGE_DEBUG_LOG +AZ_DECLARE_BUDGET(RPI); + namespace AZ { namespace RPI @@ -111,7 +112,7 @@ namespace AZ RHI::ResultCode StreamingImage::Init(StreamingImageAsset& imageAsset) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); Data::Instance pool; if (imageAsset.GetPoolAssetId().IsValid()) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImageController.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImageController.cpp index a84d8ca9b7..bb7fff03cb 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImageController.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImageController.cpp @@ -12,9 +12,10 @@ #include -#include #include +AZ_DECLARE_BUDGET(RPI); + namespace AZ { namespace RPI @@ -34,7 +35,7 @@ namespace AZ void StreamingImageController::AttachImage(StreamingImage* image) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); AZ_Assert(image, "Image must not be null"); @@ -69,7 +70,7 @@ namespace AZ void StreamingImageController::Update() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); AZStd::lock_guard lock(m_mutex); UpdateInternal(m_timestamp, m_contexts); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImagePool.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImagePool.cpp index 5c05422dad..23ff1abb42 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImagePool.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImagePool.cpp @@ -14,7 +14,6 @@ #include -#include #include namespace AZ @@ -43,7 +42,7 @@ namespace AZ RHI::ResultCode StreamingImagePool::Init(RHI::Device& device, StreamingImagePoolAsset& poolAsset) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); if (Validation::IsEnabled()) { diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Material/Material.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Material/Material.cpp index 63e55d379d..1f739c24f1 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Material/Material.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Material/Material.cpp @@ -18,7 +18,6 @@ #include #include -#include #include #include @@ -57,7 +56,7 @@ namespace AZ RHI::ResultCode Material::Init(MaterialAsset& materialAsset) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); ScopedValue isInitializing(&m_isInitializing, true, false); @@ -320,7 +319,7 @@ namespace AZ bool Material::Compile() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); if (NeedsCompile() && CanCompile()) { diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Model/Model.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Model/Model.cpp index 6549255d7e..4f3cf52dad 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Model/Model.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Model/Model.cpp @@ -11,7 +11,6 @@ #include -#include #include #include #include diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Model/ModelLod.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Model/ModelLod.cpp index 7850aa6da2..a928aec12f 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Model/ModelLod.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Model/ModelLod.cpp @@ -12,7 +12,6 @@ #include #include -#include #include namespace AZ @@ -52,7 +51,7 @@ namespace AZ RHI::ResultCode ModelLod::Init(const Data::Asset& lodAsset, const Data::Asset& modelAsset) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); for (const ModelLodAsset::Mesh& mesh : lodAsset->GetMeshes()) { @@ -389,7 +388,7 @@ namespace AZ const ModelLodAsset::Mesh::StreamBufferInfo& streamBufferInfo, Mesh& meshInstance) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); const Data::Asset& streamBufferAsset = streamBufferInfo.m_bufferAssetView.GetBufferAsset(); const Data::Instance& streamBuffer = Buffer::FindOrCreate(streamBufferAsset); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Pass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Pass.cpp index d04a35a10b..9155c0351a 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Pass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Pass.cpp @@ -147,6 +147,11 @@ namespace AZ m_treeDepth = m_parent->m_treeDepth + 1; m_path = ConcatPassName(m_parent->m_path, m_name); m_flags.m_partOfHierarchy = m_parent->m_flags.m_partOfHierarchy; + + if (m_state == PassState::Orphaned) + { + QueueForBuildAndInitialization(); + } } void Pass::RemoveFromParent() @@ -154,7 +159,7 @@ namespace AZ AZ_RPI_PASS_ASSERT(m_parent != nullptr, "Trying to remove pass from parent but pointer to the parent pass is null."); m_parent->RemoveChild(Ptr(this)); m_queueState = PassQueueState::NoQueue; - m_state = PassState::Idle; + m_state = PassState::Orphaned; } void Pass::OnOrphan() @@ -162,6 +167,8 @@ namespace AZ m_parent = nullptr; m_flags.m_partOfHierarchy = false; m_treeDepth = 0; + m_queueState = PassQueueState::NoQueue; + m_state = PassState::Orphaned; } // --- Getters & Setters --- @@ -1281,6 +1288,7 @@ namespace AZ void Pass::FrameBegin(FramePrepareParams params) { + AZ_PROFILE_SCOPE(RPI, "Pass::FrameBegin() - %s", m_path.GetCStr()); AZ_RPI_BREAK_ON_TARGET_PASS; if (!IsEnabled()) @@ -1303,7 +1311,10 @@ namespace AZ // FrameBeginInternal needs to be the last function be called in FrameBegin because its implementation expects // all the attachments are imported to database (for example, ImageAttachmentPreview) - FrameBeginInternal(params); + { + AZ_PROFILE_SCOPE(RPI, "Pass::FrameBeginInternal()"); + FrameBeginInternal(params); + } // readback attachment with output state UpdateReadbackAttachment(params, false); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassSystem.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassSystem.cpp index 39d0e879e1..cd64010680 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassSystem.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassSystem.cpp @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -312,7 +311,6 @@ namespace AZ Pass::FramePrepareParams params{ &frameGraphBuilder }; { - AZ_PROFILE_SCOPE(RPI, "Pass: FrameBegin"); m_rootPass->FrameBegin(params); } } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RasterPass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RasterPass.cpp index 5001951377..fa2ee4be94 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RasterPass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RasterPass.cpp @@ -146,6 +146,7 @@ namespace AZ void RasterPass::UpdateDrawList() { + AZ_PROFILE_SCOPE(RPI, "RasterPass::UpdateDrawList"); // DrawLists from dynamic draw AZStd::vector drawLists = DynamicDrawInterface::Get()->GetDrawListsForPass(this); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/RPISystem.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/RPISystem.cpp index 4465b8594f..3416b2895d 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/RPISystem.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/RPISystem.cpp @@ -31,7 +31,6 @@ #include #include -#include #include #include diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Scene.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Scene.cpp index 3e501c3d93..a21b0bfecd 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Scene.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Scene.cpp @@ -18,7 +18,6 @@ #include #include -#include #include #include #include @@ -400,10 +399,11 @@ namespace AZ for (FeatureProcessorPtr& fp : m_featureProcessors) { FeatureProcessor* featureProcessor = fp.get(); - const auto jobLambda = [this, featureProcessor]() + const auto jobLambda = [this, featureProcessor](AZ::Job& owner) { - - featureProcessor->Simulate(m_simulatePacket); + FeatureProcessor::SimulatePacket jobPacket = m_simulatePacket; + jobPacket.m_parentJob = &owner; + featureProcessor->Simulate(jobPacket); }; AZ::Job* simulationJob = AZ::CreateJobFunction(AZStd::move(jobLambda), true, nullptr); //auto-deletes @@ -516,7 +516,7 @@ namespace AZ collectDrawPacketsTG.Submit(&collectDrawPacketsTGEvent); // Launch CullingSystem::ProcessCullables() jobs (will run concurrently with FeatureProcessor::Render() jobs if m_parallelOctreeTraversal) - bool parallelOctreeTraversal = m_cullingScene->GetDebugContext().m_parallelOctreeTraversal; + const bool parallelOctreeTraversal = m_cullingScene->GetDebugContext().m_parallelOctreeTraversal; m_cullingScene->BeginCulling(m_renderPacket.m_views); static const AZ::TaskDescriptor processCullablesDescriptor{"AZ::RPI::Scene::ProcessCullables", "Graphics"}; AZ::TaskGraphEvent processCullablesTGEvent; @@ -576,6 +576,7 @@ namespace AZ } // Launch CullingSystem::ProcessCullables() jobs (will run concurrently with FeatureProcessor::Render() jobs) + const bool parallelOctreeTraversal = m_cullingScene->GetDebugContext().m_parallelOctreeTraversal; m_cullingScene->BeginCulling(m_renderPacket.m_views); for (ViewPtr& viewPtr : m_renderPacket.m_views) { @@ -584,7 +585,7 @@ namespace AZ m_cullingScene->ProcessCullablesJobs(*this, *viewPtr, thisJob); // can't call directly because ProcessCullables needs a parent job }, true, nullptr); //auto-deletes - if (m_cullingScene->GetDebugContext().m_parallelOctreeTraversal) + if (parallelOctreeTraversal) { processCullablesJob->SetDependent(collectDrawPacketsCompletion); processCullablesJob->Start(); @@ -731,20 +732,19 @@ namespace AZ // Add dynamic draw data for all the views if (m_dynamicDrawSystem) { - AZ_PROFILE_SCOPE(RPI, "DynamicDraw SubmitDrawData"); m_dynamicDrawSystem->SubmitDrawData(this, m_renderPacket.m_views); } } { - AZ_PROFILE_BEGIN(RPI, "FinalizeDrawLists"); - if (jobPolicy == RHI::JobPolicy::Serial) + AZ_PROFILE_SCOPE(RPI, "FinalizeDrawLists"); + if (jobPolicy == RHI::JobPolicy::Serial || + m_renderPacket.m_views.size() <= 1) // FinalizeDrawListsX both immediately wait for the job to complete, skip job if only 1 job would be generated { for (auto& view : m_renderPacket.m_views) { view->FinalizeDrawLists(); } - AZ_PROFILE_END(RPI); } else { @@ -756,7 +756,6 @@ namespace AZ { FinalizeDrawListsJobs(); } - AZ_PROFILE_END(RPI); } } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderResourceGroup.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderResourceGroup.cpp index df16b5cd08..7e43fba7a3 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderResourceGroup.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderResourceGroup.cpp @@ -10,7 +10,6 @@ #include -#include #include namespace AZ @@ -75,7 +74,7 @@ namespace AZ RHI::ResultCode ShaderResourceGroup::Init(ShaderAsset& shaderAsset, const SupervariantIndex& supervariantIndex, const AZ::Name& srgName) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); const auto& lay = shaderAsset.FindShaderResourceGroupLayout(srgName, supervariantIndex); m_layout = lay.get(); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/View.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/View.cpp index a5c67b6210..e1d564c8ac 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/View.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/View.cpp @@ -19,6 +19,8 @@ #include #include #include +#include +#include #include #if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED @@ -260,15 +262,25 @@ namespace AZ void View::SortFinalizedDrawLists() { + AZ_PROFILE_SCOPE(RPI, "View: SortFinalizedDrawLists"); RHI::DrawListsByTag& drawListsByTag = m_drawListContext.GetMergedDrawListsByTag(); + AZ::JobCompletion jobCompletion; for (size_t idx = 0; idx < drawListsByTag.size(); ++idx) { if (drawListsByTag[idx].size() > 1) { - SortDrawList(drawListsByTag[idx], RHI::DrawListTag(idx)); + auto jobLambda = [this, &drawListsByTag, idx]() + { + AZ_PROFILE_SCOPE(RPI, "View: SortDrawList Job"); + SortDrawList(drawListsByTag[idx], RHI::DrawListTag(idx)); + }; + Job* jobSortDrawList = aznew JobFunction(jobLambda, true, nullptr); // Auto-deletes + jobSortDrawList->SetDependent(&jobCompletion); + jobSortDrawList->Start(); } } + jobCompletion.StartAndWaitForCompletion(); } void View::SortDrawList(RHI::DrawList& drawList, RHI::DrawListTag tag) @@ -433,6 +445,7 @@ namespace AZ void View::BeginCulling() { #if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED + AZ_PROFILE_SCOPE(RPI, "View: ClearMaskedOcclusionBuffer"); m_maskedOcclusionCulling->ClearBuffer(); #endif } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/LuaMaterialFunctor.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/LuaMaterialFunctor.cpp index c33409f687..4212583e60 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/LuaMaterialFunctor.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/LuaMaterialFunctor.cpp @@ -18,8 +18,6 @@ #include #include #include -#include - namespace AZ { namespace RPI @@ -123,7 +121,7 @@ namespace AZ void LuaMaterialFunctor::Process(RuntimeContext& context) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); InitScriptContext(); @@ -141,7 +139,7 @@ namespace AZ void LuaMaterialFunctor::Process(EditorContext& context) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); InitScriptContext(); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Model/ModelAsset.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Model/ModelAsset.cpp index e362229d2d..0574803591 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Model/ModelAsset.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Model/ModelAsset.cpp @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -137,7 +136,7 @@ namespace AZ // For runtime approach is to do this during asset processing and serialized spatial information alongside with mesh model assets const auto jobLambda = [&]() -> void { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); AZStd::unique_ptr tree = AZStd::make_unique(); tree->Build(this); diff --git a/Gems/Atom/RPI/Code/Tests.Builders/BuilderTestFixture.h b/Gems/Atom/RPI/Code/Tests.Builders/BuilderTestFixture.h index 02e69e732c..4502d33e0b 100644 --- a/Gems/Atom/RPI/Code/Tests.Builders/BuilderTestFixture.h +++ b/Gems/Atom/RPI/Code/Tests.Builders/BuilderTestFixture.h @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp index 0f21dcb70e..ec365d7a6a 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp @@ -175,7 +175,8 @@ namespace AtomToolsFramework Base::StartCommon(systemEntity); - m_traceLogger.PrepareLogFile(GetBuildTargetName() + ".log"); + const bool clearLogFile = GetSettingOrDefault("/O3DE/AtomToolsFramework/Application/ClearLogOnStart", false); + m_traceLogger.OpenLogFile(GetBuildTargetName() + ".log", clearLogFile); AzToolsFramework::AssetDatabase::AssetDatabaseRequestsBus::Handler::BusConnect(); AzToolsFramework::AssetBrowser::AssetDatabaseLocationNotificationBus::Broadcast( diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp index f6efdc57b8..505ff70122 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp @@ -146,11 +146,17 @@ namespace AtomToolsFramework if (auto existingScene = scene->FindSubsystem()) { m_viewportContext->SetRenderScene(*existingScene); - if (auto auxGeomFP = existingScene->get()->GetFeatureProcessor()) + + // If we have a render pipeline, use it and ensure an AuxGeom feature processor is installed. + // Otherwise, fall through and ensure a render pipeline is installed for this scene. + if (m_viewportContext->GetCurrentPipeline()) { - m_auxGeom = auxGeomFP->GetOrCreateDrawQueueForView(m_defaultCamera.get()); + if (auto auxGeomFP = existingScene->get()->GetFeatureProcessor()) + { + m_auxGeom = auxGeomFP->GetOrCreateDrawQueueForView(m_defaultCamera.get()); + } + return; } - return; } AZ::RPI::ScenePtr atomScene; diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.cpp index c8df123d0d..35f5067cd0 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.cpp @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -135,11 +134,19 @@ namespace MaterialEditor { AzFramework::AssetCatalogEventBus::Handler::BusDisconnect(); MaterialViewportRequestBus::Handler::BusDisconnect(); + ClearContent(); + } + + void MaterialViewportComponent::ClearContent() + { + AZ::Data::AssetBus::MultiHandler::BusDisconnect(); + m_lightingPresetAssets.clear(); m_lightingPresetVector.clear(); m_lightingPresetLastSavePathMap.clear(); m_lightingPresetSelection.reset(); + m_modelPresetAssets.clear(); m_modelPresetVector.clear(); m_modelPresetLastSavePathMap.clear(); m_modelPresetSelection.reset(); @@ -151,84 +158,36 @@ namespace MaterialEditor MaterialViewportNotificationBus::Broadcast(&MaterialViewportNotificationBus::Events::OnBeginReloadContent); - const AZStd::string selectedLightingPresetNameOld = m_viewportSettings->m_selectedLightingPresetName; - - m_lightingPresetVector.clear(); - m_lightingPresetLastSavePathMap.clear(); - m_lightingPresetSelection.reset(); - - const AZStd::string selectedModelPresetNameOld = m_viewportSettings->m_selectedModelPresetName; - - m_modelPresetVector.clear(); - m_modelPresetLastSavePathMap.clear(); - m_modelPresetSelection.reset(); - - AZStd::vector lightingAssetInfoVector; - AZStd::vector modelAssetInfoVector; + ClearContent(); // Enumerate and load all the relevant preset files in the project. // (The files are stored in a temporary list instead of processed in the callback because deep operations inside // AssetCatalogRequestBus::EnumerateAssets can lead to deadlocked) - AZ::Data::AssetCatalogRequests::AssetEnumerationCB enumerateCB = [&lightingAssetInfoVector, &modelAssetInfoVector]([[maybe_unused]] const AZ::Data::AssetId id, const AZ::Data::AssetInfo& info) + AZ::Data::AssetCatalogRequests::AssetEnumerationCB enumerateCB = [this]([[maybe_unused]] const AZ::Data::AssetId id, const AZ::Data::AssetInfo& info) { if (AzFramework::StringFunc::EndsWith(info.m_relativePath.c_str(), ".lightingpreset.azasset")) { - lightingAssetInfoVector.push_back(info); + m_lightingPresetAssets[info.m_assetId] = { info.m_assetId, info.m_assetType }; + AZ::Data::AssetBus::MultiHandler::BusConnect(info.m_assetId); } else if (AzFramework::StringFunc::EndsWith(info.m_relativePath.c_str(), ".modelpreset.azasset")) { - modelAssetInfoVector.push_back(info); + m_modelPresetAssets[info.m_assetId] = { info.m_assetId, info.m_assetType }; + AZ::Data::AssetBus::MultiHandler::BusConnect(info.m_assetId); } }; AZ::Data::AssetCatalogRequestBus::Broadcast(&AZ::Data::AssetCatalogRequestBus::Events::EnumerateAssets, nullptr, enumerateCB, nullptr); - for (const auto& info : lightingAssetInfoVector) + for (auto& assetPair : m_lightingPresetAssets) { - if (info.m_assetId.IsValid()) - { - AZ::Data::Asset asset = AZ::RPI::AssetUtils::LoadAssetById( - info.m_assetId, AZ::RPI::AssetUtils::TraceLevel::Warning); - if (asset) - { - const AZ::Render::LightingPreset* preset = asset->GetDataAs(); - if (preset) - { - auto presetPtr = AddLightingPreset(*preset); - m_lightingPresetLastSavePathMap[presetPtr] = AZ::RPI::AssetUtils::GetSourcePathByAssetId(info.m_assetId); - AZ_TracePrintf("Material Editor", "Loaded viewport configuration: %s.\n", info.m_relativePath.c_str()); - } - } - } + assetPair.second.QueueLoad(); } - for (const auto& info : modelAssetInfoVector) + for (auto& assetPair : m_modelPresetAssets) { - if (info.m_assetId.IsValid()) - { - AZ::Data::Asset asset = - AZ::RPI::AssetUtils::LoadAssetById(info.m_assetId, AZ::RPI::AssetUtils::TraceLevel::Warning); - if (asset) - { - const AZ::Render::ModelPreset* preset = asset->GetDataAs(); - if (preset) - { - auto presetPtr = AddModelPreset(*preset); - m_modelPresetLastSavePathMap[presetPtr] = AZ::RPI::AssetUtils::GetSourcePathByAssetId(info.m_assetId); - AZ_TracePrintf("Material Editor", "Loaded viewport configuration: %s.\n", info.m_relativePath.c_str()); - } - } - } + assetPair.second.QueueLoad(); } - - // If there was a prior selection, this will keep the same configuration selected. - // Otherwise, these strings are empty and the operation will be ignored. - SelectLightingPresetByName(selectedLightingPresetNameOld); - SelectModelPresetByName(selectedModelPresetNameOld); - - MaterialViewportNotificationBus::Broadcast(&MaterialViewportNotificationBus::Events::OnEndReloadContent); - - AZ_TracePrintf("Material Editor", "Finished loading viewport configurations.\n"); } AZ::Render::LightingPresetPtr MaterialViewportComponent::AddLightingPreset(const AZ::Render::LightingPreset& preset) @@ -237,12 +196,6 @@ namespace MaterialEditor auto presetPtr = m_lightingPresetVector.back(); MaterialViewportNotificationBus::Broadcast(&MaterialViewportNotificationBus::Events::OnLightingPresetAdded, presetPtr); - - if (m_lightingPresetVector.size() == 1) - { - SelectLightingPreset(presetPtr); - } - return presetPtr; } @@ -314,12 +267,6 @@ namespace MaterialEditor auto presetPtr = m_modelPresetVector.back(); MaterialViewportNotificationBus::Broadcast(&MaterialViewportNotificationBus::Events::OnModelPresetAdded, presetPtr); - - if (m_modelPresetVector.size() == 1) - { - SelectModelPreset(presetPtr); - } - return presetPtr; } @@ -443,6 +390,39 @@ namespace MaterialEditor return m_viewportSettings->m_displayMapperOperationType; } + inline void MaterialViewportComponent::OnAssetReady(AZ::Data::Asset asset) + { + if (AZ::Data::Asset anyAsset = asset) + { + if (const auto lightingPreset = anyAsset->GetDataAs()) + { + auto presetPtr = AddLightingPreset(*lightingPreset); + const auto& presetPath = AZ::RPI::AssetUtils::GetSourcePathByAssetId(anyAsset.GetId()); + m_lightingPresetAssets[anyAsset.GetId()] = anyAsset; + m_lightingPresetLastSavePathMap[presetPtr] = presetPath; + AZ_TracePrintf("Material Editor", "Loaded Preset: %s\n", presetPath.c_str()); + } + + if (const auto modelPreset = anyAsset->GetDataAs()) + { + auto presetPtr = AddModelPreset(*modelPreset); + const auto& presetPath = AZ::RPI::AssetUtils::GetSourcePathByAssetId(anyAsset.GetId()); + m_modelPresetAssets[anyAsset.GetId()] = anyAsset; + m_modelPresetLastSavePathMap[presetPtr] = presetPath; + AZ_TracePrintf("Material Editor", "Loaded Preset: %s\n", presetPath.c_str()); + } + } + + AZ::Data::AssetBus::MultiHandler::BusDisconnect(asset.GetId()); + if (!AZ::Data::AssetBus::MultiHandler::BusIsConnected()) + { + SelectLightingPresetByName(m_viewportSettings->m_selectedLightingPresetName); + SelectModelPresetByName(m_viewportSettings->m_selectedModelPresetName); + MaterialViewportNotificationBus::Broadcast(&MaterialViewportNotificationBus::Events::OnEndReloadContent); + AZ_TracePrintf("Material Editor", "Finished loading viewport configurations.\n"); + } + } + void MaterialViewportComponent::OnCatalogLoaded([[maybe_unused]] const char* catalogFile) { AZ::TickBus::QueueFunction([this]() { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.h index a4f94c3546..07385d842d 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.h @@ -11,8 +11,10 @@ #include #include #include +#include #include #include +#include #include #include @@ -22,6 +24,7 @@ namespace MaterialEditor class MaterialViewportComponent : public AZ::Component , private MaterialViewportRequestBus::Handler + , private AZ::Data::AssetBus::MultiHandler , private AzFramework::AssetCatalogEventBus::Handler { public: @@ -46,6 +49,8 @@ namespace MaterialEditor void Deactivate() override; //////////////////////////////////////////////////////////////////////// + void ClearContent(); + //////////////////////////////////////////////////////////////////////// // MaterialViewportRequestBus::Handler overrides ... void ReloadContent() override; @@ -82,14 +87,21 @@ namespace MaterialEditor AZ::Render::DisplayMapperOperationType GetDisplayMapperOperationType() const override; //////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////// + // AZ::Data::AssetBus::MultiHandler overrides ... + void OnAssetReady(AZ::Data::Asset asset) override; + //////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////// // AzFramework::AssetCatalogEventBus::Handler overrides ... void OnCatalogLoaded(const char* catalogFile) override; //////////////////////////////////////////////////////////////////////// + AZStd::unordered_map> m_lightingPresetAssets; AZ::Render::LightingPresetPtrVector m_lightingPresetVector; AZ::Render::LightingPresetPtr m_lightingPresetSelection; + AZStd::unordered_map> m_modelPresetAssets; AZ::Render::ModelPresetPtrVector m_modelPresetVector; AZ::Render::ModelPresetPtr m_modelPresetSelection; diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportRenderer.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportRenderer.cpp index 4ad87492e3..409674f0bc 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportRenderer.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportRenderer.cpp @@ -306,7 +306,6 @@ namespace MaterialEditor { if (!preset) { - AZ_Warning("MaterialViewportRenderer", false, "Attempting to set invalid lighting preset."); return; } @@ -347,7 +346,6 @@ namespace MaterialEditor { if (!preset) { - AZ_Warning("MaterialViewportRenderer", false, "Attempting to set invalid model preset."); return; } diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.cpp index 8b864613c4..382001afd4 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.cpp @@ -16,7 +16,6 @@ #include #include #include -#include #include #include diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/MeshComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/MeshComponentController.cpp index 12b14d8162..517ba90f89 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/MeshComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/MeshComponentController.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/OcclusionCullingPlane/OcclusionCullingPlaneComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/OcclusionCullingPlane/OcclusionCullingPlaneComponentController.cpp index 4addbde3ef..a5cf1c0180 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/OcclusionCullingPlane/OcclusionCullingPlaneComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/OcclusionCullingPlane/OcclusionCullingPlaneComponentController.cpp @@ -15,7 +15,6 @@ #include #include -#include #include #include diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ReflectionProbe/ReflectionProbeComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ReflectionProbe/ReflectionProbeComponentController.cpp index 017f6c9cdf..5d33561d8a 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ReflectionProbe/ReflectionProbeComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ReflectionProbe/ReflectionProbeComponentController.cpp @@ -16,7 +16,6 @@ #include #include #include -#include #include #include diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp index 82ee19b6a5..421e5828b1 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp @@ -46,6 +46,14 @@ namespace AZ::Render return; } + // Update the mesh deformers (perform cpu skinning and morphing) when needed. + if (renderFlags[EMotionFX::ActorRenderFlag::RENDER_AABB] || renderFlags[EMotionFX::ActorRenderFlag::RENDER_FACENORMALS] || + renderFlags[EMotionFX::ActorRenderFlag::RENDER_TANGENTS] || renderFlags[EMotionFX::ActorRenderFlag::RENDER_VERTEXNORMALS] || + renderFlags[EMotionFX::ActorRenderFlag::RENDER_WIREFRAME]) + { + instance->UpdateMeshDeformers(0.0f, true); + } + const RPI::Scene* scene = RPI::Scene::GetSceneForEntityId(m_entityId); const RPI::ViewportContextPtr viewport = AZ::Interface::Get()->GetViewportContextByScene(scene); AzFramework::DebugDisplayRequests* debugDisplay = GetDebugDisplay(viewport->GetId()); diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRenderer.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRenderer.cpp index 396042c9f6..ef6ff4681a 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRenderer.cpp +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRenderer.cpp @@ -128,6 +128,7 @@ namespace EMStudio m_groundEntity->CreateComponent(AZ::Render::MeshComponentTypeId); m_groundEntity->CreateComponent(AZ::Render::MaterialComponentTypeId); m_groundEntity->CreateComponent(azrtti_typeid()); + m_groundEntity->Init(); m_groundEntity->Activate(); Reinit(); diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/ui/stylesheets/style_dark.qss b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/ui/stylesheets/style_dark.qss index 193034b781..e308875793 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/ui/stylesheets/style_dark.qss +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/ui/stylesheets/style_dark.qss @@ -1116,91 +1116,6 @@ QPushButton#captureButton:disabled { /*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/ -Driller--DrillerCaptureWindow > #centralwidget > #playButton { - color: white; -} - - -Driller--DrillerCaptureWindow > #centralwidget > AzToolsFramework--AZAutoSizingScrollArea#scrollArea { - background-color: rgb(100,100,100); - border: 1px solid rgb(100,100,100); -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--DrillerMainWindow QDockWidget -{ - background: rgb(56, 58, 59); -} - -Driller--DrillerMainWindow QDockWidget::title -{ - background: rgb(56, 58, 59); -} - -Driller--DrillerMainWindow QDockWidget .QWidget -{ - background: rgb(56, 58, 59); - border: 0px solid red; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--ChannelControl > QFrame { - background-color: rgb(100, 100, 100); -} - -Driller--ChannelControl > #infoArea > QLabel { - color: #999999; - font-size: 12px; - font-family: "open sans"; - font-weight:600; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--ChannelProfilerWidget #profilerName { - color: #cccccc; - font-size: 13px; - font-family: "open sans"; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--AnnotationHeaderView { - background-color: rgb(80,80,80); -} - -Driller--AnnotationHeaderView > #frame { - background-color: rgb(80,80,80); -} - -Driller--AnnotationHeaderView > #frame > #annotationBackground { - background-color: rgb(80,80,80); -} - -Driller--AnnotationHeaderView > #frame > #annotationBackground > #configureAnnotations { - color: white; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--CollapsiblePanel > QGroupBox { - background-color: rgb(56, 58, 59); - margin-top: 0px; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - AzToolsFramework--TargetSelectorButton#targetButton { color: white; } diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/shared/ui/resources/stylesheets/style_dark.qss b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/shared/ui/resources/stylesheets/style_dark.qss index 193034b781..e308875793 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/shared/ui/resources/stylesheets/style_dark.qss +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/shared/ui/resources/stylesheets/style_dark.qss @@ -1116,91 +1116,6 @@ QPushButton#captureButton:disabled { /*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/ -Driller--DrillerCaptureWindow > #centralwidget > #playButton { - color: white; -} - - -Driller--DrillerCaptureWindow > #centralwidget > AzToolsFramework--AZAutoSizingScrollArea#scrollArea { - background-color: rgb(100,100,100); - border: 1px solid rgb(100,100,100); -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--DrillerMainWindow QDockWidget -{ - background: rgb(56, 58, 59); -} - -Driller--DrillerMainWindow QDockWidget::title -{ - background: rgb(56, 58, 59); -} - -Driller--DrillerMainWindow QDockWidget .QWidget -{ - background: rgb(56, 58, 59); - border: 0px solid red; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--ChannelControl > QFrame { - background-color: rgb(100, 100, 100); -} - -Driller--ChannelControl > #infoArea > QLabel { - color: #999999; - font-size: 12px; - font-family: "open sans"; - font-weight:600; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--ChannelProfilerWidget #profilerName { - color: #cccccc; - font-size: 13px; - font-family: "open sans"; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--AnnotationHeaderView { - background-color: rgb(80,80,80); -} - -Driller--AnnotationHeaderView > #frame { - background-color: rgb(80,80,80); -} - -Driller--AnnotationHeaderView > #frame > #annotationBackground { - background-color: rgb(80,80,80); -} - -Driller--AnnotationHeaderView > #frame > #annotationBackground > #configureAnnotations { - color: white; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--CollapsiblePanel > QGroupBox { - background-color: rgb(56, 58, 59); - margin-top: 0px; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - AzToolsFramework--TargetSelectorButton#targetButton { color: white; } diff --git a/Gems/AtomTressFX/Assets/Shaders/HairRenderingFillPPLL.shader b/Gems/AtomTressFX/Assets/Shaders/HairRenderingFillPPLL.shader index e4859eca9b..fc4974fae2 100644 --- a/Gems/AtomTressFX/Assets/Shaders/HairRenderingFillPPLL.shader +++ b/Gems/AtomTressFX/Assets/Shaders/HairRenderingFillPPLL.shader @@ -39,5 +39,6 @@ "type": "Fragment" } ] - } + }, + "DisabledRHIBackends": ["metal"] } diff --git a/Gems/AtomTressFX/Assets/Shaders/HairShortCutGeometryDepthAlpha.shader b/Gems/AtomTressFX/Assets/Shaders/HairShortCutGeometryDepthAlpha.shader index 7cd1f44510..d2d34fb1cd 100644 --- a/Gems/AtomTressFX/Assets/Shaders/HairShortCutGeometryDepthAlpha.shader +++ b/Gems/AtomTressFX/Assets/Shaders/HairShortCutGeometryDepthAlpha.shader @@ -41,5 +41,6 @@ "type": "Fragment" } ] - } + }, + "DisabledRHIBackends": ["metal"] } diff --git a/Gems/AtomTressFX/Code/Rendering/HairFeatureProcessor.cpp b/Gems/AtomTressFX/Code/Rendering/HairFeatureProcessor.cpp index 74ba99c26c..f35bce391e 100644 --- a/Gems/AtomTressFX/Code/Rendering/HairFeatureProcessor.cpp +++ b/Gems/AtomTressFX/Code/Rendering/HairFeatureProcessor.cpp @@ -9,8 +9,6 @@ #include #include #include -#include - #include #include #include diff --git a/Gems/AtomTressFX/Code/Rendering/HairRenderObject.cpp b/Gems/AtomTressFX/Code/Rendering/HairRenderObject.cpp index 4d615e31ae..fe167cae8b 100644 --- a/Gems/AtomTressFX/Code/Rendering/HairRenderObject.cpp +++ b/Gems/AtomTressFX/Code/Rendering/HairRenderObject.cpp @@ -5,8 +5,6 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#include - #include #include @@ -958,7 +956,7 @@ namespace AZ const char* assetName, AMD::TressFXAsset* asset, AMD::TressFXSimulationSettings* simSettings, AMD::TressFXRenderingSettings* renderSettings) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(AzRender); ++s_objectCounter; diff --git a/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp b/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp index 5bad3ecf1c..d29bec190e 100644 --- a/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp +++ b/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp @@ -322,6 +322,10 @@ namespace AudioControls connection->m_value = value; return connection; } + case EACEControlType::eACET_ENVIRONMENT: + { + return AZStd::make_shared(control->GetId()); + } } } else @@ -571,11 +575,11 @@ namespace AudioControls case eACET_RTPC: return eWCT_WWISE_RTPC; case eACET_SWITCH: - return AUDIO_IMPL_INVALID_TYPE; + return (eWCT_WWISE_SWITCH | eWCT_WWISE_GAME_STATE); case eACET_SWITCH_STATE: return (eWCT_WWISE_SWITCH | eWCT_WWISE_GAME_STATE | eWCT_WWISE_RTPC); case eACET_ENVIRONMENT: - return (eWCT_WWISE_AUX_BUS | eWCT_WWISE_SWITCH | eWCT_WWISE_GAME_STATE | eWCT_WWISE_RTPC); + return (eWCT_WWISE_AUX_BUS | eWCT_WWISE_RTPC); case eACET_PRELOAD: return eWCT_WWISE_SOUND_BANK; } diff --git a/Gems/AudioSystem/Code/Source/Editor/ATLControlsPanel.cpp b/Gems/AudioSystem/Code/Source/Editor/ATLControlsPanel.cpp index 48a16e54e6..0f22616536 100644 --- a/Gems/AudioSystem/Code/Source/Editor/ATLControlsPanel.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/ATLControlsPanel.cpp @@ -168,6 +168,12 @@ namespace AudioControls m_pATLControlsTree->setModel(pProxyModel); m_pProxyModel = pProxyModel; + QAction* pAction = new QAction(tr("Delete"), this); + pAction->setShortcutContext(Qt::WidgetWithChildrenShortcut); + pAction->setShortcut(QKeySequence::Delete); + connect(pAction, SIGNAL(triggered()), this, SLOT(DeleteSelectedControl())); + m_pATLControlsTree->addAction(pAction); + connect(m_pATLControlsTree->selectionModel(), SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)), this, SIGNAL(SelectedControlChanged())); connect(m_pATLControlsTree->selectionModel(), SIGNAL(currentChanged(const QModelIndex&, const QModelIndex&)), this, SLOT(StopControlExecution())); connect(m_pTreeModel, SIGNAL(itemChanged(QStandardItem*)), this, SLOT(ItemModified(QStandardItem*))); @@ -802,6 +808,21 @@ namespace AudioControls { AZ::StringFunc::Path::StripExtension(sControlName); } + else if (eControlType == eACET_SWITCH_STATE) + { + if (!pATLParent->SwitchStateConnectionCheck(pAudioSystemControl)) + { + QMessageBox messageBox(this); + messageBox.setStandardButtons(QMessageBox::Ok); + messageBox.setDefaultButton(QMessageBox::Ok); + messageBox.setWindowTitle("Audio Controls Editor"); + messageBox.setText("Not in the same switch group, connection failed."); + if (messageBox.exec() == QMessageBox::Ok) + { + return; + } + } + } CATLControl* pTargetControl2 = m_pTreeModel->CreateControl(eControlType, sControlName, pATLParent); if (pTargetControl2) { diff --git a/Gems/AudioSystem/Code/Source/Editor/AudioControl.cpp b/Gems/AudioSystem/Code/Source/Editor/AudioControl.cpp index c0a8fb8dde..251cc808f9 100644 --- a/Gems/AudioSystem/Code/Source/Editor/AudioControl.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/AudioControl.cpp @@ -368,4 +368,36 @@ namespace AudioControls } } + bool CATLControl::SwitchStateConnectionCheck(IAudioSystemControl* middlewareControl) + { + if (IAudioSystemEditor* audioSystemImpl = CAudioControlsEditorPlugin::GetImplementationManager()->GetImplementation()) + { + CID parentID = middlewareControl->GetParent()->GetId(); + EACEControlType compatibleType = audioSystemImpl->ImplTypeToATLType(middlewareControl->GetType()); + if (compatibleType == EACEControlType::eACET_SWITCH_STATE && m_type == EACEControlType::eACET_SWITCH) + { + for (auto& child : m_children) + { + for (int j = 0; child && j < child->ConnectionCount(); ++j) + { + TConnectionPtr tmpConnection = child->GetConnectionAt(j); + if (tmpConnection) + { + IAudioSystemControl* tmpMiddlewareControl = audioSystemImpl->GetControl(tmpConnection->GetID()); + EACEControlType controlType = audioSystemImpl->ImplTypeToATLType(tmpMiddlewareControl->GetType()); + if (tmpMiddlewareControl && controlType == EACEControlType::eACET_SWITCH_STATE) + { + if (parentID != ACE_INVALID_CID && tmpMiddlewareControl->GetParent()->GetId() != parentID) + { + return false; + } + } + } + } + } + } + } + return true; + } + } // namespace AudioControls diff --git a/Gems/AudioSystem/Code/Source/Editor/AudioControl.h b/Gems/AudioSystem/Code/Source/Editor/AudioControl.h index 024e8eb6df..187ab757af 100644 --- a/Gems/AudioSystem/Code/Source/Editor/AudioControl.h +++ b/Gems/AudioSystem/Code/Source/Editor/AudioControl.h @@ -144,6 +144,8 @@ namespace AudioControls void SignalConnectionAdded(IAudioSystemControl* middlewareControl); void SignalConnectionRemoved(IAudioSystemControl* middlewareControl); + bool SwitchStateConnectionCheck(IAudioSystemControl* middlewareControl); + private: void SetId(CID id); void SetType(EACEControlType type); diff --git a/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorUndo.cpp b/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorUndo.cpp index 062d14addf..311f8a98a0 100644 --- a/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorUndo.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorUndo.cpp @@ -11,7 +11,7 @@ #include #include - +#include #include #include @@ -273,6 +273,51 @@ namespace AudioControls pControl->m_connectedControls = m_connectedControls; pModel->OnControlModified(pControl); + auto& tmpConnectedControls1 = + connectedControls.size() > m_connectedControls.size() ? connectedControls : m_connectedControls; + auto& tmpConnectedControls2 = + connectedControls.size() > m_connectedControls.size() ? m_connectedControls : connectedControls; + for (auto& connection1 : tmpConnectedControls1) + { + bool bCheck = true; + for (auto& connection2 : tmpConnectedControls2) + { + if (connection1 == connection2) + { + bCheck = false; + break; + } + } + + if (!bCheck) + { + continue; + } + + if (IAudioSystemEditor* audioSystemImpl = CAudioControlsEditorPlugin::GetImplementationManager()->GetImplementation()) + { + if (IAudioSystemControl* middlewareControl = audioSystemImpl->GetControl(connection1->GetID())) + { + if (connectedControls.size() > m_connectedControls.size()) + { + audioSystemImpl->ConnectionRemoved(middlewareControl); + pControl->SignalConnectionRemoved(middlewareControl); + } + else + { + TConnectionPtr connection = + audioSystemImpl->CreateConnectionToControl(pControl->GetType(), middlewareControl); + if (connection) + { + pControl->SignalConnectionAdded(middlewareControl); + } + } + + pControl->SignalControlModified(); + } + } + } + m_name = name; m_scope = scope; m_isAutoLoad = isAutoLoad; diff --git a/Gems/AudioSystem/Code/Source/Editor/AudioControlsWriter.cpp b/Gems/AudioSystem/Code/Source/Editor/AudioControlsWriter.cpp index eb022b706f..86f778bf03 100644 --- a/Gems/AudioSystem/Code/Source/Editor/AudioControlsWriter.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/AudioControlsWriter.cpp @@ -102,7 +102,8 @@ namespace AudioControls for (auto it = librariesToDelete.begin(); it != librariesToDelete.end(); ++it) { - DeleteLibraryFile((*it).c_str()); + auto newPathOpt = fileIO->ResolvePath(AZ::IO::PathView{ *it }); + DeleteLibraryFile(newPathOpt.value().Native()); } previousLibraryPaths = m_foundLibraryPaths; diff --git a/Gems/AudioSystem/Code/Source/Editor/QConnectionsWidget.cpp b/Gems/AudioSystem/Code/Source/Editor/QConnectionsWidget.cpp index 25981d2abd..ce7a49ae1e 100644 --- a/Gems/AudioSystem/Code/Source/Editor/QConnectionsWidget.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/QConnectionsWidget.cpp @@ -128,6 +128,22 @@ namespace AudioControls } else { + if (m_control->GetType() == EACEControlType::eACET_SWITCH_STATE) + { + if (!m_control->GetParent()->SwitchStateConnectionCheck(middlewareControl)) + { + QMessageBox messageBox(this); + messageBox.setStandardButtons(QMessageBox::Ok); + messageBox.setDefaultButton(QMessageBox::Ok); + messageBox.setWindowTitle("Audio Controls Editor"); + messageBox.setText("Not in the same switch group, connection failed."); + if (messageBox.exec() == QMessageBox::Ok) + { + return; + } + } + } + connection = audioSystemImpl->CreateConnectionToControl(m_control->GetType(), middlewareControl); if (connection) { diff --git a/Gems/AudioSystem/Code/Source/Editor/QSimpleAudioControlListWidget.cpp b/Gems/AudioSystem/Code/Source/Editor/QSimpleAudioControlListWidget.cpp index de86efb6a7..6dc54ac642 100644 --- a/Gems/AudioSystem/Code/Source/Editor/QSimpleAudioControlListWidget.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/QSimpleAudioControlListWidget.cpp @@ -225,6 +225,36 @@ namespace AudioControls { pItem->setFlags(pItem->flags() & ~Qt::ItemIsDragEnabled); } + + if (compatibleType == EACEControlType::eACET_SWITCH_STATE) + { + IAudioSystemControl* pControl = pAudioSystemEditorImpl->GetControl(GetItemId(pItem)); + if (pControl && !pControl->IsLocalized()) + { + size_t nConnect = 0; + for (int i = 0; i < pControl->GetParent()->ChildCount(); ++i) + { + IAudioSystemControl* child = pControl->GetParent()->GetChildAt(i); + if (child && child->IsConnected()) + { + ++nConnect; + } + } + + QTreeWidgetItem* pParentItem = GetItem(pControl->GetParent()->GetId(), pControl->GetParent()->IsLocalized()); + if (pParentItem) + { + if (nConnect > 0 && nConnect == pControl->GetParent()->ChildCount()) + { + pParentItem->setForeground(0, m_connectedColor); + } + else + { + pParentItem->setForeground(0, m_disconnectedColor); + } + } + } + } } } diff --git a/Gems/AudioSystem/Code/Source/Engine/FileCacheManager.cpp b/Gems/AudioSystem/Code/Source/Engine/FileCacheManager.cpp index 9efbd1d881..992434ff79 100644 --- a/Gems/AudioSystem/Code/Source/Engine/FileCacheManager.cpp +++ b/Gems/AudioSystem/Code/Source/Engine/FileCacheManager.cpp @@ -819,6 +819,11 @@ namespace Audio } else { + if (!audioFileEntry->m_asyncStreamRequest) + { + audioFileEntry->m_asyncStreamRequest = streamer->CreateRequest(); + } + streamer->Read( audioFileEntry->m_asyncStreamRequest, audioFileEntry->m_filePath.c_str(), diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/PhysicsSetup.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/PhysicsSetup.cpp index 02b3fd7649..d691f4b202 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/PhysicsSetup.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/PhysicsSetup.cpp @@ -273,7 +273,7 @@ namespace EMotionFX { AZ::Vector3 boneCenter = nodeTransform.GetTranslation() + 0.5f * boneDirection; float sumDistanceFromAxisSq = 0.0f; - float boneLengthSqReciprocal = 1.0f / boneDirection.GetLengthSq(); + float boneLengthSqReciprocal = 1.0f / (boneLength * boneLength); for (int i = 0; i < numMeshPoints; i++) { meshPoints[i] -= boneCenter; @@ -299,7 +299,7 @@ namespace EMotionFX { Physics::CapsuleShapeConfiguration* capsule = static_cast(collider.second.get()); capsule->m_height = boneDirection.GetLength(); - if (AZ::IsClose(localBoneDirection.GetLength(), 1.0f)) + if (!localBoneDirection.IsZero()) { collider.first->m_rotation = AZ::Quaternion::CreateShortestArc(AZ::Vector3::CreateAxisZ(), localBoneDirection.GetNormalized()); } @@ -309,7 +309,7 @@ namespace EMotionFX } else if (colliderType == azrtti_typeid()) { - if (AZ::IsClose(localBoneDirection.GetLength(), 1.0f)) + if (!localBoneDirection.IsZero()) { collider.first->m_rotation = AZ::Quaternion::CreateShortestArc(AZ::Vector3::CreateAxisZ(), localBoneDirection.GetNormalized()); } diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.cpp index c74cb3cb0f..2c9e84c9b9 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.cpp @@ -933,6 +933,7 @@ namespace EMStudio // save the current settings and disable rendering m_renderOptions.SetLastUsedLayout(layout->GetName()); + SaveRenderOptions(); ClearViewWidgets(); VisibilityChanged(false); diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionSetsWindow/MotionSetWindow.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionSetsWindow/MotionSetWindow.cpp index 393e26790b..3a4c2628b3 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionSetsWindow/MotionSetWindow.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionSetsWindow/MotionSetWindow.cpp @@ -1138,6 +1138,12 @@ namespace EMStudio for (size_t motionSetId = 0; motionSetId < numMotionSets; motionSetId++) { EMotionFX::MotionSet* motionSet2 = EMotionFX::GetMotionManager().GetMotionSet(motionSetId); + + if (motionSet2->GetIsOwnedByRuntime()) + { + continue; + } + if (motionSet2->FindMotionEntryById(motionEntry->GetId())) { numMotionSetContainsMotion++; @@ -1148,12 +1154,6 @@ namespace EMStudio } } - // If motion exists in multiple motion sets, then it should not be removed from motions window. - if (removeMotion && numMotionSetContainsMotion > 1) - { - continue; - } - // check the reference counter if only one reference registered // two is needed because the remove motion command has to be called to have the undo/redo possible // without it the motion list is also not updated because the remove motion callback is not called @@ -1170,6 +1170,12 @@ namespace EMStudio } motionIdsToRemoveString += motionEntry->GetId(); + // If motion exists in multiple motion sets, then it should not be removed from motions window. + if (removeMotion && numMotionSetContainsMotion > 1) + { + continue; + } + // Check if the motion is not valid, that means the motion is not loaded. if (removeMotion && motionEntry->GetMotion()) { diff --git a/Gems/EditorPythonBindings/Code/Tests/PythonTestingUtility.h b/Gems/EditorPythonBindings/Code/Tests/PythonTestingUtility.h index e2b3d1eadd..3ec1050b0b 100644 --- a/Gems/EditorPythonBindings/Code/Tests/PythonTestingUtility.h +++ b/Gems/EditorPythonBindings/Code/Tests/PythonTestingUtility.h @@ -84,7 +84,6 @@ namespace UnitTest m_fileIOHelper->m_fileIO.SetAlias("@engroot@", m_engineRoot.c_str()); AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Create(appDesc); AzFramework::ApplicationRequests::Bus::Handler::BusConnect(); diff --git a/Gems/EditorPythonBindings/Code/Tests/PythonTraceMessageSink.h b/Gems/EditorPythonBindings/Code/Tests/PythonTraceMessageSink.h index 28971aec9e..63616ce8ea 100644 --- a/Gems/EditorPythonBindings/Code/Tests/PythonTraceMessageSink.h +++ b/Gems/EditorPythonBindings/Code/Tests/PythonTraceMessageSink.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include namespace UnitTest @@ -15,18 +15,18 @@ namespace UnitTest /** Trace message handler to track messages during tests */ struct PythonTraceMessageSink final - : public AZ::Debug::TraceMessageDrillerBus::Handler + : public AZ::Debug::TraceMessageBus::Handler , public AzToolsFramework::EditorPythonConsoleNotificationBus::Handler { PythonTraceMessageSink() { - AZ::Debug::TraceMessageDrillerBus::Handler::BusConnect(); + AZ::Debug::TraceMessageBus::Handler::BusConnect(); AzToolsFramework::EditorPythonConsoleNotificationBus::Handler::BusConnect(); } ~PythonTraceMessageSink() { - AZ::Debug::TraceMessageDrillerBus::Handler::BusDisconnect(); + AZ::Debug::TraceMessageBus::Handler::BusDisconnect(); AzToolsFramework::EditorPythonConsoleNotificationBus::Handler::BusDisconnect(); } @@ -47,13 +47,13 @@ namespace UnitTest } ////////////////////////////////////////////////////////////////////////// - // TraceMessageDrillerBus - void OnPrintf(const char* window, const char* message) override + // TraceMessageBus + bool OnPrintf(const char* window, const char* message) override { - OnOutput(window, message); + return OnOutput(window, message); } - void OnOutput(const char* window, const char* message) override + bool OnOutput(const char* window, const char* message) override { AZStd::lock_guard lock(m_lock); @@ -73,6 +73,7 @@ namespace UnitTest } } } + return false; } ////////////////////////////////////////////////////////////////////////// diff --git a/Gems/GraphCanvas/Code/Source/Components/SceneComponent.cpp b/Gems/GraphCanvas/Code/Source/Components/SceneComponent.cpp index 52e7892364..e821ea9be2 100644 --- a/Gems/GraphCanvas/Code/Source/Components/SceneComponent.cpp +++ b/Gems/GraphCanvas/Code/Source/Components/SceneComponent.cpp @@ -669,6 +669,7 @@ namespace GraphCanvas { GeometryNotificationBus::Handler::BusDisconnect(); SceneNotificationBus::Handler::BusDisconnect(); + AZ::SystemTickBus::Handler::BusDisconnect(); } void GestureSceneHelper::TrackElement(const AZ::EntityId& elementId) diff --git a/Gems/GraphCanvas/Code/Source/GraphCanvas.cpp b/Gems/GraphCanvas/Code/Source/GraphCanvas.cpp index dfcb106777..ebc15023cc 100644 --- a/Gems/GraphCanvas/Code/Source/GraphCanvas.cpp +++ b/Gems/GraphCanvas/Code/Source/GraphCanvas.cpp @@ -382,6 +382,9 @@ namespace GraphCanvas m_translationAssets.push_back(assetId); } }; + + m_translationAssets.clear(); + AZ::Data::AssetCatalogRequestBus::Broadcast(&AZ::Data::AssetCatalogRequestBus::Events::EnumerateAssets, nullptr, collectAssetsCb, postEnumerateCb); } diff --git a/Gems/GraphCanvas/Code/Source/Translation/TranslationAsset.cpp b/Gems/GraphCanvas/Code/Source/Translation/TranslationAsset.cpp index a461866c46..3b026b4579 100644 --- a/Gems/GraphCanvas/Code/Source/Translation/TranslationAsset.cpp +++ b/Gems/GraphCanvas/Code/Source/Translation/TranslationAsset.cpp @@ -195,7 +195,7 @@ namespace GraphCanvas } else { - AZ_Error("TranslationAsset", false, "Serialization of the TranslationFormat failed for: %s", asset.GetHint().c_str()); + AZ_Warning("TranslationAsset", false, "Serialization of the TranslationFormat failed for: %s", asset.GetHint().c_str()); } } } diff --git a/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.cpp b/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.cpp index 80e488f3dc..754267b27d 100644 --- a/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.cpp +++ b/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.cpp @@ -15,39 +15,39 @@ namespace GraphCanvas void AddEntryToDatabase(const AZStd::string& baseKey, const AZStd::string& name, const rapidjson::Value& it, TranslationFormat* translationFormat) { - AZStd::string finalKey = baseKey; if (it.IsString()) { - if (translationFormat->m_database.find(finalKey) == translationFormat->m_database.end()) + auto translationDbItr = translationFormat->m_database.find(baseKey); + if (translationDbItr == translationFormat->m_database.end()) { - translationFormat->m_database[finalKey] = it.GetString(); + translationFormat->m_database[baseKey] = it.GetString(); } else { - AZStd::string existingValue = translationFormat->m_database[finalKey.c_str()]; + const AZStd::string& existingValue = translationDbItr->second; // There is a name collision - AZStd::string error = AZStd::string::format("Unable to store key: %s with value: %s because that key already exists with value: %s (proposed: %s)", finalKey.c_str(), it.GetString(), existingValue.c_str(), it.GetString()); + const AZStd::string error = AZStd::string::format("Unable to store key: %s with value: %s because that key already exists with value: %s (proposed: %s)", baseKey.c_str(), it.GetString(), existingValue.c_str(), it.GetString()); AZ_Error("TranslationSerializer", false, error.c_str()); } } else if (it.IsObject()) { + AZStd::string finalKey = baseKey; if (!name.empty()) { finalKey.append("."); finalKey.append(name); } - AZStd::string itemKey = finalKey; + AZStd::string itemKey; for (auto objIt = it.MemberBegin(); objIt != it.MemberEnd(); ++objIt) { + itemKey = finalKey; itemKey.append("."); itemKey.append(objIt->name.GetString()); AddEntryToDatabase(itemKey, name, objIt->value, translationFormat); - - itemKey = finalKey; } } @@ -60,18 +60,21 @@ namespace GraphCanvas key.append(name); } - AZStd::string itemKey = key; + AZStd::string itemKey; const rapidjson::Value& array = it; for (rapidjson::SizeType i = 0; i < array.Size(); ++i) { + itemKey = key; + // if there is a "base" member within the object, then use it, otherwise use the index - if (array[i].IsObject()) + const auto& element = array[i]; + if (element.IsObject()) { - if (array[i].HasMember(Schema::Field::key)) + rapidjson::Value::ConstMemberIterator innerKeyItr = element.FindMember(Schema::Field::key); + if (innerKeyItr != element.MemberEnd()) { - AZStd::string innerKey = array[i].FindMember(Schema::Field::key)->value.GetString(); - itemKey.append(AZStd::string::format(".%s", innerKey.c_str())); + itemKey.append(AZStd::string::format(".%s", innerKeyItr->value.GetString())); } else { @@ -79,9 +82,7 @@ namespace GraphCanvas } } - AddEntryToDatabase(itemKey, "", array[i], translationFormat); - - itemKey = key; + AddEntryToDatabase(itemKey, "", element, translationFormat); } } } @@ -114,42 +115,32 @@ namespace GraphCanvas { const rapidjson::Value::ConstMemberIterator entries = inputValue.FindMember(Schema::Field::entries); + AZStd::string keyStr; + AZStd::string contextStr; + AZStd::string variantStr; + AZStd::string baseKey; + rapidjson::SizeType entryCount = entries->value.Size(); for (rapidjson::SizeType i = 0; i < entryCount; ++i) { const rapidjson::Value& entry = entries->value[i]; - AZStd::string keyStr; - rapidjson::Value::ConstMemberIterator keyValue; - if (entry.HasMember(Schema::Field::key)) - { - keyValue = entry.FindMember(Schema::Field::key); - keyStr = keyValue->value.GetString(); - } + rapidjson::Value::ConstMemberIterator keyItr = entry.FindMember(Schema::Field::key); + keyStr = keyItr != entry.MemberEnd() ? keyItr->value.GetString() : ""; - AZStd::string contextStr; - rapidjson::Value::ConstMemberIterator contextValue; - if (entry.HasMember(Schema::Field::context)) - { - contextValue = entry.FindMember(Schema::Field::context); - contextStr = contextValue->value.GetString(); - } + rapidjson::Value::ConstMemberIterator contextItr = entry.FindMember(Schema::Field::context); + contextStr = contextItr != entry.MemberEnd() ? contextItr->value.GetString() : ""; - AZStd::string variantStr; - rapidjson::Value::ConstMemberIterator variantValue; - if (entry.HasMember(Schema::Field::variant)) - { - variantValue = entry.FindMember(Schema::Field::variant); - variantStr = variantValue->value.GetString(); - } + rapidjson::Value::ConstMemberIterator variantItr = entry.FindMember(Schema::Field::variant); + variantStr = variantItr != entry.MemberEnd() ? variantItr->value.GetString() : ""; - AZStd::string baseKey = contextStr; if (keyStr.empty()) { - AZ_Error("TranslationDatabase", false, "Every entry in the Translation data must have a key: %s", baseKey.c_str()); + AZ_Error("TranslationDatabase", false, "Every entry in the Translation data must have a key: %s", contextStr.c_str()); return context.Report(JSR::Tasks::ReadField, JSR::Outcomes::Unsupported, "Every entry in the Translation data must have a key"); } + baseKey = contextStr; if (!baseKey.empty()) { baseKey.append("."); @@ -167,7 +158,7 @@ namespace GraphCanvas for (auto it = entry.MemberBegin(); it != entry.MemberEnd(); ++it) { // Skip the fixed elements - if (it == keyValue || it == contextValue || it == variantValue) + if (it == keyItr || it == contextItr || it == variantItr) { continue; } diff --git a/Gems/ImGui/Code/Source/ImGuiManager.cpp b/Gems/ImGui/Code/Source/ImGuiManager.cpp index b30eda8825..f90aa60a88 100644 --- a/Gems/ImGui/Code/Source/ImGuiManager.cpp +++ b/Gems/ImGui/Code/Source/ImGuiManager.cpp @@ -172,7 +172,6 @@ void ImGuiManager::Initialize() // Broadcast ImGui Ready to Listeners ImGuiUpdateListenerBus::Broadcast(&IImGuiUpdateListener::OnImGuiInitialize); - m_currentControllerIndex = -1; m_button1Pressed = m_button2Pressed = false; m_menuBarStatusChanged = false; @@ -227,6 +226,7 @@ void ImGui::ImGuiManager::RestoreRenderWindowSizeToDefault() void ImGui::ImGuiManager::SetDpiScalingFactor(float dpiScalingFactor) { + ImGui::ImGuiContextScope contextScope(m_imguiContext); ImGuiIO& io = ImGui::GetIO(); // Set the global font scale to size our UI to the scaling factor // Note: Currently we use the default, 13px fixed-size IMGUI font, so this can get somewhat blurry @@ -235,6 +235,7 @@ void ImGui::ImGuiManager::SetDpiScalingFactor(float dpiScalingFactor) float ImGui::ImGuiManager::GetDpiScalingFactor() const { + ImGui::ImGuiContextScope contextScope(m_imguiContext); ImGuiIO& io = ImGui::GetIO(); return io.FontGlobalScale; } @@ -406,7 +407,7 @@ bool ImGuiManager::OnInputChannelEventFiltered(const InputChannel& inputChannel) // Cycle through ImGui Menu Bar States on Home button press if (inputChannelId == InputDeviceKeyboard::Key::NavigationHome) { - ToggleThroughImGuiVisibleState(-1); + ToggleThroughImGuiVisibleState(); } // Cycle through Standalone Editor Window States @@ -453,19 +454,10 @@ bool ImGuiManager::OnInputChannelEventFiltered(const InputChannel& inputChannel) } // Handle Controller Inputs - int inputControllerIndex = -1; - bool controllerInput = false; if (InputDeviceGamepad::IsGamepadDevice(inputDeviceId)) { - inputControllerIndex = inputDeviceId.GetIndex(); - controllerInput = true; - } - - - if (controllerInput) - { - // Only pipe in Controller Nav Inputs if we are the current Controller Index and at least 1 of the two controller modes are enabled. - if (m_currentControllerIndex == inputControllerIndex && m_controllerModeFlags) + // Only pipe in Controller Nav Inputs when at least 1 of the two controller modes are enabled. + if (m_controllerModeFlags) { const auto lyButtonToImGuiNav = s_lyInputToImGuiNavIndexMap.find(inputChannelId); if (lyButtonToImGuiNav != s_lyInputToImGuiNavIndexMap.end()) @@ -476,7 +468,7 @@ bool ImGuiManager::OnInputChannelEventFiltered(const InputChannel& inputChannel) } //Switch menu bar display only if two buttons are pressed at the same time - if (inputChannelId == InputDeviceGamepad::Button::L3) + if (inputChannelId == InputDeviceGamepad::Button::L1) { if (inputChannel.IsStateBegan()) { @@ -488,7 +480,7 @@ bool ImGuiManager::OnInputChannelEventFiltered(const InputChannel& inputChannel) m_menuBarStatusChanged = false; } } - if (inputChannelId == InputDeviceGamepad::Button::R3) + if (inputChannelId == InputDeviceGamepad::Button::R1) { if (inputChannel.IsStateBegan()) { @@ -502,7 +494,7 @@ bool ImGuiManager::OnInputChannelEventFiltered(const InputChannel& inputChannel) } if (!m_menuBarStatusChanged && m_button1Pressed && m_button2Pressed) { - ToggleThroughImGuiVisibleState(inputControllerIndex); + ToggleThroughImGuiVisibleState(); } // If we have the Discrete Input Mode Enabled.. and we are in the Visible State, then consume input here @@ -627,14 +619,13 @@ bool ImGuiManager::OnInputTextEventFiltered(const AZStd::string& textUTF8) return io.WantTextInput && m_clientMenuBarState == DisplayState::Visible;; } -void ImGuiManager::ToggleThroughImGuiVisibleState(int controllerIndex) +void ImGuiManager::ToggleThroughImGuiVisibleState() { ImGui::ImGuiContextScope contextScope(m_imguiContext); switch (m_clientMenuBarState) { case DisplayState::Hidden: - m_currentControllerIndex = controllerIndex; m_clientMenuBarState = DisplayState::Visible; // Draw the ImGui Mouse cursor if either the hardware mouse is connected, or the controller mouse is enabled. @@ -669,7 +660,6 @@ void ImGuiManager::ToggleThroughImGuiVisibleState(int controllerIndex) default: m_clientMenuBarState = DisplayState::Hidden; - m_currentControllerIndex = -1; // Enable system cursor if it's in editor and it's not editor game mode if (gEnv->IsEditor() && !gEnv->IsEditorGameMode()) @@ -686,12 +676,6 @@ void ImGuiManager::ToggleThroughImGuiVisibleState(int controllerIndex) m_setEnabledEvent.Signal(m_clientMenuBarState == DisplayState::Hidden); } -void ImGuiManager::ToggleThroughImGuiVisibleState() -{ - ToggleThroughImGuiVisibleState(-1); -} - - void ImGuiManager::RenderImGuiBuffers(const ImVec2& scaleRects) { ImGui::ImGuiContextScope contextScope(m_imguiContext); diff --git a/Gems/ImGui/Code/Source/ImGuiManager.h b/Gems/ImGui/Code/Source/ImGuiManager.h index c4fa5169f7..c0071c94c5 100644 --- a/Gems/ImGui/Code/Source/ImGuiManager.h +++ b/Gems/ImGui/Code/Source/ImGuiManager.h @@ -76,9 +76,6 @@ namespace ImGui // Sets up initial window size and listens for changes void InitWindowSize(); - // A function to toggle through the available ImGui Visibility States - void ToggleThroughImGuiVisibleState(int controllerIndex); - private: ImGuiContext* m_imguiContext = nullptr; DisplayState m_clientMenuBarState = DisplayState::Hidden; @@ -96,8 +93,6 @@ namespace ImGui std::vector m_idxBuffer; //Controller navigation - static const int MaxControllerNumber = 4; - int m_currentControllerIndex; bool m_button1Pressed, m_button2Pressed, m_menuBarStatusChanged; bool m_hardwardeMouseConnected = false; diff --git a/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp b/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp index ce9eab5f7e..e58ea77373 100644 --- a/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp +++ b/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp @@ -104,6 +104,8 @@ #include #include +#include + namespace LandscapeCanvasEditor { static const int NODE_OFFSET_X_PIXELS = 350; @@ -201,15 +203,34 @@ namespace LandscapeCanvasEditor { using namespace AzToolsFramework; - static const QStringList preferredCategories = { - "Vegetation", - "Atom" - }; + // A map of category names with preferred component names. + // There may be multiple component names for a category, as long as they provide different services. + const AZStd::map> preferredComponentsByCategory = { { "Shape", { "Shape Reference" } } }; + + // Scan through the preferred categories to see whether any exist in the componentDataTable. + for (const auto& preferredComponentPair : preferredComponentsByCategory) + { + auto candidateDataTablePair = componentDataTable.find(preferredComponentPair.first); + if (candidateDataTablePair != componentDataTable.end()) + { + // Now check all the preferred components for that category, and return the first one that exists in the candidate componentDataTable. + for (const auto& preferredComponentName : preferredComponentPair.second) + { + const auto& candidateComponent = candidateDataTablePair->second.find(preferredComponentName); + if (candidateComponent != candidateDataTablePair->second.end()) + { + return candidateComponent->second->m_typeId; + } + } + } + } // There are a couple of cases where we prefer certain categories of Components - // to be added over others (e.g. a Vegetation Shape Reference instead of actual LmbrCentral shapes), + // to be added over others, // so if those there are components in those categories, then choose them first. // Otherwise, just pick the first one in the list. + static const QStringList preferredCategories = { "Vegetation", "Atom" }; + ComponentPaletteUtil::ComponentDataTable::const_iterator categoryIt; for (const auto& categoryName : preferredCategories) { @@ -1303,7 +1324,7 @@ namespace LandscapeCanvasEditor } // Special case for the Vegetation Area Placement Bounds, the slot actually represents a separate - // Vegetation Reference Shape or actual Shape component on the same Entity + // Reference Shape or actual Shape component on the same Entity AZ::Component* component = nullptr; auto targetBaseNode = static_cast(targetNode.get()); if (targetBaseNode->GetBaseNodeType() == LandscapeCanvas::BaseNode::BaseNodeType::VegetationArea && targetSlot->GetName() == LandscapeCanvas::PLACEMENT_BOUNDS_SLOT_ID) @@ -1379,7 +1400,7 @@ namespace LandscapeCanvasEditor AzToolsFramework::EditorDisabledCompositionRequestBus::Event(targetEntityId, &AzToolsFramework::EditorDisabledCompositionRequests::GetDisabledComponents, disabledComponents); for (auto disabledComponent : disabledComponents) { - if (disabledComponent->RTTI_GetType() == Vegetation::EditorReferenceShapeComponentTypeId) + if (disabledComponent->RTTI_GetType() == LmbrCentral::EditorReferenceShapeComponentTypeId) { component = disabledComponent; @@ -1401,7 +1422,7 @@ namespace LandscapeCanvasEditor // If 'component' is still null then that means there is no Reference Shape component on our Entity, so we need to add one if (!component) { - AZ::ComponentId componentId = AddComponentTypeIdToEntity(targetEntityId, Vegetation::EditorReferenceShapeComponentTypeId); + AZ::ComponentId componentId = AddComponentTypeIdToEntity(targetEntityId, LmbrCentral::EditorReferenceShapeComponentTypeId); component = targetEntity->FindComponent(componentId); } diff --git a/Gems/LandscapeCanvas/Code/Source/Editor/Nodes/Areas/BaseAreaNode.cpp b/Gems/LandscapeCanvas/Code/Source/Editor/Nodes/Areas/BaseAreaNode.cpp index 312dd0873e..b24b681dde 100644 --- a/Gems/LandscapeCanvas/Code/Source/Editor/Nodes/Areas/BaseAreaNode.cpp +++ b/Gems/LandscapeCanvas/Code/Source/Editor/Nodes/Areas/BaseAreaNode.cpp @@ -26,6 +26,8 @@ #include "BaseAreaNode.h" #include +#include + namespace LandscapeCanvas { void BaseAreaNode::Reflect(AZ::ReflectContext* context) @@ -61,7 +63,7 @@ namespace LandscapeCanvas return nullptr; } - AZ::Component* component = entity->FindComponent(Vegetation::EditorReferenceShapeComponentTypeId); + AZ::Component* component = entity->FindComponent(LmbrCentral::EditorReferenceShapeComponentTypeId); if (component) { return component; diff --git a/Gems/LmbrCentral/Assets/Editor/Icons/Components/ShapeReference.svg b/Gems/LmbrCentral/Assets/Editor/Icons/Components/ShapeReference.svg new file mode 100644 index 0000000000..a304220c48 --- /dev/null +++ b/Gems/LmbrCentral/Assets/Editor/Icons/Components/ShapeReference.svg @@ -0,0 +1,3 @@ + + + diff --git a/Gems/LmbrCentral/Assets/Editor/Icons/Components/Viewport/ShapeReference.svg b/Gems/LmbrCentral/Assets/Editor/Icons/Components/Viewport/ShapeReference.svg new file mode 100644 index 0000000000..fe6abb9fe4 --- /dev/null +++ b/Gems/LmbrCentral/Assets/Editor/Icons/Components/Viewport/ShapeReference.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/Gems/LmbrCentral/Code/Mocks/LmbrCentral/Shape/MockShapes.h b/Gems/LmbrCentral/Code/Mocks/LmbrCentral/Shape/MockShapes.h index 20be74dd90..b0118a914a 100644 --- a/Gems/LmbrCentral/Code/Mocks/LmbrCentral/Shape/MockShapes.h +++ b/Gems/LmbrCentral/Code/Mocks/LmbrCentral/Shape/MockShapes.h @@ -56,5 +56,73 @@ namespace UnitTest MOCK_METHOD1(GenerateRandomPointInside, AZ::Vector3(AZ::RandomDistributionType randomDistribution)); MOCK_METHOD3(IntersectRay, bool(const AZ::Vector3& src, const AZ::Vector3& dir, float& distance)); }; + + class MockShape : public LmbrCentral::ShapeComponentRequestsBus::Handler + { + public: + AZ::Entity m_entity; + int m_count = 0; + + MockShape() + { + LmbrCentral::ShapeComponentRequestsBus::Handler::BusConnect(m_entity.GetId()); + } + + ~MockShape() + { + LmbrCentral::ShapeComponentRequestsBus::Handler::BusDisconnect(); + } + + AZ::Crc32 GetShapeType() override + { + ++m_count; + return AZ_CRC("TestShape", 0x856ca50c); + } + + AZ::Aabb m_aabb = AZ::Aabb::CreateNull(); + AZ::Aabb GetEncompassingAabb() override + { + ++m_count; + return m_aabb; + } + + AZ::Transform m_localTransform = AZ::Transform::CreateIdentity(); + AZ::Aabb m_localBounds = AZ::Aabb::CreateNull(); + void GetTransformAndLocalBounds(AZ::Transform& transform, AZ::Aabb& bounds) override + { + ++m_count; + transform = m_localTransform; + bounds = m_localBounds; + } + + bool m_pointInside = true; + bool IsPointInside([[maybe_unused]] const AZ::Vector3& point) override + { + ++m_count; + return m_pointInside; + } + + float m_distanceSquaredFromPoint = 0.0f; + float DistanceSquaredFromPoint([[maybe_unused]] const AZ::Vector3& point) override + { + ++m_count; + return m_distanceSquaredFromPoint; + } + + AZ::Vector3 m_randomPointInside = AZ::Vector3::CreateZero(); + AZ::Vector3 GenerateRandomPointInside([[maybe_unused]] AZ::RandomDistributionType randomDistribution) override + { + ++m_count; + return m_randomPointInside; + } + + bool m_intersectRay = false; + bool IntersectRay( + [[maybe_unused]] const AZ::Vector3& src, [[maybe_unused]] const AZ::Vector3& dir, [[maybe_unused]] float& distance) override + { + ++m_count; + return m_intersectRay; + } + }; } diff --git a/Gems/LmbrCentral/Code/Source/Audio/AudioListenerComponent.cpp b/Gems/LmbrCentral/Code/Source/Audio/AudioListenerComponent.cpp index 05d8061856..7062f685c2 100644 --- a/Gems/LmbrCentral/Code/Source/Audio/AudioListenerComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Audio/AudioListenerComponent.cpp @@ -96,7 +96,7 @@ namespace LmbrCentral } else { - m_positionEntity = entityId; + m_currentPositionEntity = entityId; } } @@ -221,26 +221,26 @@ namespace LmbrCentral if (rotationEntityId.IsValid()) { - AZ::EntityBus::MultiHandler::BusConnect(rotationEntityId); m_currentRotationEntity = rotationEntityId; + AZ::EntityBus::MultiHandler::BusConnect(rotationEntityId); } else { - AZ::TransformNotificationBus::MultiHandler::BusConnect(GetEntityId()); m_currentRotationEntity = GetEntityId(); + AZ::TransformNotificationBus::MultiHandler::BusConnect(GetEntityId()); } // Lastly, connect to the Entity used for Position if (positionEntityId.IsValid()) { - AZ::EntityBus::MultiHandler::BusConnect(positionEntityId); m_currentPositionEntity = positionEntityId; + AZ::EntityBus::MultiHandler::BusConnect(positionEntityId); } else { - AZ::TransformNotificationBus::MultiHandler::BusConnect(GetEntityId()); m_currentPositionEntity = GetEntityId(); + AZ::TransformNotificationBus::MultiHandler::BusConnect(GetEntityId()); } // Do a fetch of the transforms to sync upon connecting. diff --git a/Gems/LmbrCentral/Code/Source/LmbrCentral.cpp b/Gems/LmbrCentral/Code/Source/LmbrCentral.cpp index ad90c16f43..84ef11b35d 100644 --- a/Gems/LmbrCentral/Code/Source/LmbrCentral.cpp +++ b/Gems/LmbrCentral/Code/Source/LmbrCentral.cpp @@ -77,6 +77,7 @@ #include "Shape/CompoundShapeComponent.h" #include "Shape/SplineComponent.h" #include "Shape/PolygonPrismShapeComponent.h" +#include "Shape/ReferenceShapeComponent.h" namespace LmbrCentral { @@ -203,6 +204,7 @@ namespace LmbrCentral CapsuleShapeComponent::CreateDescriptor(), TubeShapeComponent::CreateDescriptor(), CompoundShapeComponent::CreateDescriptor(), + ReferenceShapeComponent::CreateDescriptor(), SplineComponent::CreateDescriptor(), PolygonPrismShapeComponent::CreateDescriptor(), NavigationSystemComponent::CreateDescriptor(), diff --git a/Gems/LmbrCentral/Code/Source/LmbrCentralEditor.cpp b/Gems/LmbrCentral/Code/Source/LmbrCentralEditor.cpp index 61b8c8f73d..69e7f57de8 100644 --- a/Gems/LmbrCentral/Code/Source/LmbrCentralEditor.cpp +++ b/Gems/LmbrCentral/Code/Source/LmbrCentralEditor.cpp @@ -34,6 +34,7 @@ #include "Shape/EditorSplineComponent.h" #include "Shape/EditorTubeShapeComponent.h" #include "Shape/EditorPolygonPrismShapeComponent.h" +#include "Shape/EditorReferenceShapeComponent.h" #include "Editor/EditorCommentComponent.h" #include "Shape/EditorCompoundShapeComponent.h" @@ -73,6 +74,7 @@ namespace LmbrCentral EditorCylinderShapeComponent::CreateDescriptor(), EditorCapsuleShapeComponent::CreateDescriptor(), EditorCompoundShapeComponent::CreateDescriptor(), + EditorReferenceShapeComponent::CreateDescriptor(), EditorSplineComponent::CreateDescriptor(), EditorPolygonPrismShapeComponent::CreateDescriptor(), EditorCommentComponent::CreateDescriptor(), diff --git a/Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.cpp b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.cpp similarity index 70% rename from Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.cpp rename to Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.cpp index 2fe8ae1e28..aca4fbc3b0 100644 --- a/Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.cpp @@ -10,11 +10,12 @@ #include #include #include +#include -namespace Vegetation +namespace LmbrCentral { void EditorReferenceShapeComponent::Reflect(AZ::ReflectContext* context) { - ReflectSubClass(context, 1, &EditorVegetationComponentBaseVersionConverter); + ReflectSubClass(context, 1, &EditorWrappedComponentBaseVersionConverter); } } diff --git a/Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.h b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h similarity index 59% rename from Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.h rename to Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h index d0f9bf1ea0..fd98809bcc 100644 --- a/Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.h +++ b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h @@ -8,24 +8,24 @@ #pragma once -#include -#include +#include +#include -namespace Vegetation +namespace LmbrCentral { class EditorReferenceShapeComponent - : public EditorVegetationComponentBase + : public EditorWrappedComponentBase { public: - using BaseClassType = EditorVegetationComponentBase; + using BaseClassType = EditorWrappedComponentBase; AZ_EDITOR_COMPONENT(EditorReferenceShapeComponent, EditorReferenceShapeComponentTypeId, BaseClassType); static void Reflect(AZ::ReflectContext* context); - static constexpr const char* const s_categoryName = "Vegetation"; - static constexpr const char* const s_componentName = "Vegetation Reference Shape"; + static constexpr const char* const s_categoryName = "Shape"; + static constexpr const char* const s_componentName = "Shape Reference"; static constexpr const char* const s_componentDescription = "Enables the entity to reference and reuse shape entities"; - static constexpr const char* const s_icon = "Editor/Icons/Components/Vegetation.svg"; - static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/Vegetation.svg"; + static constexpr const char* const s_icon = "Editor/Icons/Components/ShapeReference.svg"; + static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/ShapeReference.svg"; static constexpr const char* const s_helpUrl = "https://o3de.org/docs/user-guide/components/reference/"; }; } diff --git a/Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.cpp b/Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.cpp similarity index 99% rename from Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.cpp rename to Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.cpp index 620e43457d..7ed79fe3a3 100644 --- a/Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.cpp @@ -11,7 +11,7 @@ #include #include -namespace Vegetation +namespace LmbrCentral { void ReferenceShapeConfig::Reflect(AZ::ReflectContext* context) { @@ -27,7 +27,7 @@ namespace Vegetation if (edit) { edit->Class( - "Vegetation Reference Shape", "") + "Shape Reference", "") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) ->Attribute(AZ::Edit::Attributes::AutoExpand, true) diff --git a/Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.h b/Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.h similarity index 98% rename from Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.h rename to Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.h index dc61768bee..b4e11b13cb 100644 --- a/Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.h +++ b/Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.h @@ -12,16 +12,13 @@ #include #include #include -#include +#include namespace LmbrCentral { template class EditorWrappedComponentBase; -} -namespace Vegetation -{ class ReferenceShapeConfig : public AZ::ComponentConfig { diff --git a/Gems/LmbrCentral/Code/Tests/EditorPolygonPrismShapeComponentTests.cpp b/Gems/LmbrCentral/Code/Tests/EditorPolygonPrismShapeComponentTests.cpp index a5802ce8d5..41fc6c5624 100644 --- a/Gems/LmbrCentral/Code/Tests/EditorPolygonPrismShapeComponentTests.cpp +++ b/Gems/LmbrCentral/Code/Tests/EditorPolygonPrismShapeComponentTests.cpp @@ -143,7 +143,7 @@ namespace LmbrCentral using EditorPolygonPrismShapeComponentManipulatorFixture = UnitTest::IndirectCallManipulatorViewportInteractionFixtureMixin; - TEST_F(EditorPolygonPrismShapeComponentManipulatorFixture, PolygonPrismNonUniformScale_ManipulatorsScaleCorrectly) + TEST_F(EditorPolygonPrismShapeComponentManipulatorFixture, PolygonPrismNonUniformScaleManipulatorsScaleCorrectly) { // set the non-uniform scale and enter the polygon prism shape component's component mode const AZ::Vector3 nonUniformScale(2.0f, 3.0f, 4.0f); @@ -171,8 +171,8 @@ namespace LmbrCentral const auto screenStart = AzFramework::WorldToScreen(worldStart, m_cameraState); const auto screenEnd = AzFramework::WorldToScreen(worldEnd, m_cameraState); - // small diagonal offset to ensure we interact with the planar manipulator and not one of the linear manipulators - const AzFramework::ScreenVector offset(5, -5); + // diagonal offset to ensure we interact with the planar manipulator and not one of the linear manipulators + const AzFramework::ScreenVector offset(50, -50); m_actionDispatcher ->CameraState(m_cameraState) diff --git a/Gems/LmbrCentral/Code/Tests/ReferenceShapeTests.cpp b/Gems/LmbrCentral/Code/Tests/ReferenceShapeTests.cpp new file mode 100644 index 0000000000..040badf7e1 --- /dev/null +++ b/Gems/LmbrCentral/Code/Tests/ReferenceShapeTests.cpp @@ -0,0 +1,205 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include + +#include +#include + +namespace UnitTest +{ + class ReferenceComponentTests + : public AllocatorsFixture + { + protected: + AZ::ComponentApplication m_app; + + void SetUp() override + { + AZ::ComponentApplication::Descriptor appDesc; + appDesc.m_memoryBlocksByteSize = 20 * 1024 * 1024; + appDesc.m_recordingMode = AZ::Debug::AllocationRecords::RECORD_NO_RECORDS; + appDesc.m_stackRecordLevels = 20; + + m_app.Create(appDesc); + } + + void TearDown() override + { + m_app.Destroy(); + } + + template + AZStd::unique_ptr CreateEntity(const Configuration& config, Component** ppComponent) + { + m_app.RegisterComponentDescriptor(Component::CreateDescriptor()); + + auto entity = AZStd::make_unique(); + + if (ppComponent) + { + *ppComponent = entity->CreateComponent(config); + } + else + { + entity->CreateComponent(config); + } + + entity->Init(); + EXPECT_EQ(AZ::Entity::State::Init, entity->GetState()); + + entity->Activate(); + EXPECT_EQ(AZ::Entity::State::Active, entity->GetState()); + + return entity; + } + + template + bool IsComponentCompatible() + { + AZ::ComponentDescriptor::DependencyArrayType providedServicesA; + ComponentA::GetProvidedServices(providedServicesA); + + AZ::ComponentDescriptor::DependencyArrayType incompatibleServicesB; + ComponentB::GetIncompatibleServices(incompatibleServicesB); + + for (auto providedServiceA : providedServicesA) + { + for (auto incompatibleServiceB : incompatibleServicesB) + { + if (providedServiceA == incompatibleServiceB) + { + return false; + } + } + } + return true; + } + + template + bool AreComponentsCompatible() + { + return IsComponentCompatible() && IsComponentCompatible(); + } + }; + + TEST_F(ReferenceComponentTests, VerifyCompatibility) + { + EXPECT_FALSE((AreComponentsCompatible())); + } + + TEST_F(ReferenceComponentTests, ReferenceShapeComponent_WithValidReference) + { + UnitTest::MockShape testShape; + + LmbrCentral::ReferenceShapeConfig config; + config.m_shapeEntityId = testShape.m_entity.GetId(); + + LmbrCentral::ReferenceShapeComponent* component; + auto entity = CreateEntity(config, &component); + + AZ::RandomDistributionType randomDistribution = AZ::RandomDistributionType::Normal; + AZ::Vector3 randPos = AZ::Vector3::CreateOne(); + LmbrCentral::ShapeComponentRequestsBus::EventResult( + randPos, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GenerateRandomPointInside, randomDistribution); + EXPECT_EQ(AZ::Vector3::CreateZero(), randPos); + + testShape.m_aabb = AZ::Aabb::CreateFromPoint(AZ::Vector3(1.0f, 21.0f, 31.0f)); + AZ::Aabb resultAABB; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultAABB, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetEncompassingAabb); + EXPECT_EQ(testShape.m_aabb, resultAABB); + + AZ::Crc32 resultCRC = {}; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultCRC, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetShapeType); + EXPECT_EQ(AZ_CRC("TestShape", 0x856ca50c), resultCRC); + + testShape.m_localBounds = AZ::Aabb::CreateFromPoint(AZ::Vector3(1.0f, 21.0f, 31.0f)); + testShape.m_localTransform = AZ::Transform::CreateTranslation(testShape.m_localBounds.GetCenter()); + AZ::Transform resultTransform = AZ::Transform::CreateIdentity(); + AZ::Aabb resultBounds = AZ::Aabb::CreateNull(); + LmbrCentral::ShapeComponentRequestsBus::Event( + entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetTransformAndLocalBounds, resultTransform, resultBounds); + EXPECT_EQ(testShape.m_localTransform, resultTransform); + EXPECT_EQ(testShape.m_localBounds, resultBounds); + + testShape.m_pointInside = true; + bool resultPointInside = false; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultPointInside, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IsPointInside, AZ::Vector3::CreateZero()); + EXPECT_EQ(testShape.m_pointInside, resultPointInside); + + testShape.m_distanceSquaredFromPoint = 456.0f; + float resultdistanceSquaredFromPoint = 0; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultdistanceSquaredFromPoint, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::DistanceSquaredFromPoint, + AZ::Vector3::CreateZero()); + EXPECT_EQ(testShape.m_distanceSquaredFromPoint, resultdistanceSquaredFromPoint); + + testShape.m_intersectRay = false; + bool resultIntersectRay = false; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultIntersectRay, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IntersectRay, AZ::Vector3::CreateZero(), + AZ::Vector3::CreateZero(), 0.0f); + EXPECT_TRUE(testShape.m_intersectRay == resultIntersectRay); + } + + TEST_F(ReferenceComponentTests, ReferenceShapeComponent_WithInvalidReference) + { + LmbrCentral::ReferenceShapeConfig config; + config.m_shapeEntityId = AZ::EntityId(); + + LmbrCentral::ReferenceShapeComponent* component; + auto entity = CreateEntity(config, &component); + + AZ::RandomDistributionType randomDistribution = AZ::RandomDistributionType::Normal; + AZ::Vector3 randPos = AZ::Vector3::CreateOne(); + LmbrCentral::ShapeComponentRequestsBus::EventResult( + randPos, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GenerateRandomPointInside, randomDistribution); + EXPECT_EQ(randPos, AZ::Vector3::CreateZero()); + + AZ::Aabb resultAABB; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultAABB, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetEncompassingAabb); + EXPECT_EQ(resultAABB, AZ::Aabb::CreateNull()); + + AZ::Crc32 resultCRC; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultCRC, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetShapeType); + EXPECT_EQ(resultCRC, AZ::Crc32(AZ::u32(0))); + + AZ::Transform resultTransform; + AZ::Aabb resultBounds; + LmbrCentral::ShapeComponentRequestsBus::Event( + entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetTransformAndLocalBounds, resultTransform, resultBounds); + EXPECT_EQ(resultTransform, AZ::Transform::CreateIdentity()); + EXPECT_EQ(resultBounds, AZ::Aabb::CreateNull()); + + bool resultPointInside = true; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultPointInside, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IsPointInside, AZ::Vector3::CreateZero()); + EXPECT_EQ(resultPointInside, false); + + float resultdistanceSquaredFromPoint = 0; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultdistanceSquaredFromPoint, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::DistanceSquaredFromPoint, + AZ::Vector3::CreateZero()); + EXPECT_EQ(resultdistanceSquaredFromPoint, FLT_MAX); + + bool resultIntersectRay = true; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultIntersectRay, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IntersectRay, AZ::Vector3::CreateZero(), + AZ::Vector3::CreateZero(), 0.0f); + EXPECT_EQ(resultIntersectRay, false); + } +} // namespace UnitTest diff --git a/Gems/Vegetation/Code/Include/Vegetation/Ebuses/ReferenceShapeRequestBus.h b/Gems/LmbrCentral/Code/include/LmbrCentral/Shape/ReferenceShapeComponentBus.h similarity index 81% rename from Gems/Vegetation/Code/Include/Vegetation/Ebuses/ReferenceShapeRequestBus.h rename to Gems/LmbrCentral/Code/include/LmbrCentral/Shape/ReferenceShapeComponentBus.h index d6f517117b..2aec1a7614 100644 --- a/Gems/Vegetation/Code/Include/Vegetation/Ebuses/ReferenceShapeRequestBus.h +++ b/Gems/LmbrCentral/Code/include/LmbrCentral/Shape/ReferenceShapeComponentBus.h @@ -11,8 +11,11 @@ #include #include -namespace Vegetation +namespace LmbrCentral { + // Type ID for Reference EditorReferenceShapeComponent + static const char* EditorReferenceShapeComponentTypeId = "{21BC79CA-C2F4-428F-AF2E-B76E233D4254}"; + class ReferenceShapeRequests : public AZ::ComponentBus { diff --git a/Gems/LmbrCentral/Code/lmbrcentral_editor_files.cmake b/Gems/LmbrCentral/Code/lmbrcentral_editor_files.cmake index aea2f493c7..24f9ff6dcd 100644 --- a/Gems/LmbrCentral/Code/lmbrcentral_editor_files.cmake +++ b/Gems/LmbrCentral/Code/lmbrcentral_editor_files.cmake @@ -60,6 +60,8 @@ set(FILES Source/Shape/EditorCompoundShapeComponent.cpp Source/Shape/EditorQuadShapeComponent.h Source/Shape/EditorQuadShapeComponent.cpp + Source/Shape/EditorReferenceShapeComponent.h + Source/Shape/EditorReferenceShapeComponent.cpp Source/Shape/EditorSplineComponent.h Source/Shape/EditorSplineComponent.cpp Source/Shape/EditorSplineComponentMode.h diff --git a/Gems/LmbrCentral/Code/lmbrcentral_files.cmake b/Gems/LmbrCentral/Code/lmbrcentral_files.cmake index 10c9029777..6d224250fc 100644 --- a/Gems/LmbrCentral/Code/lmbrcentral_files.cmake +++ b/Gems/LmbrCentral/Code/lmbrcentral_files.cmake @@ -87,6 +87,8 @@ set(FILES Source/Shape/PolygonPrismShapeComponent.cpp Source/Shape/TubeShapeComponent.h Source/Shape/TubeShapeComponent.cpp + Source/Shape/ReferenceShapeComponent.h + Source/Shape/ReferenceShapeComponent.cpp Source/Shape/ShapeComponentConverters.h Source/Shape/ShapeComponentConverters.cpp Source/Shape/ShapeComponentConverters.inl diff --git a/Gems/LmbrCentral/Code/lmbrcentral_headers_files.cmake b/Gems/LmbrCentral/Code/lmbrcentral_headers_files.cmake index a3bc87a620..270a46cf32 100644 --- a/Gems/LmbrCentral/Code/lmbrcentral_headers_files.cmake +++ b/Gems/LmbrCentral/Code/lmbrcentral_headers_files.cmake @@ -56,6 +56,7 @@ set(FILES include/LmbrCentral/Shape/SplineComponentBus.h include/LmbrCentral/Shape/PolygonPrismShapeComponentBus.h include/LmbrCentral/Shape/TubeShapeComponentBus.h + include/LmbrCentral/Shape/ReferenceShapeComponentBus.h include/LmbrCentral/Shape/SplineAttribute.h include/LmbrCentral/Shape/SplineAttribute.inl include/LmbrCentral/Terrain/TerrainSystemRequestBus.h diff --git a/Gems/LmbrCentral/Code/lmbrcentral_tests_files.cmake b/Gems/LmbrCentral/Code/lmbrcentral_tests_files.cmake index c0f1ffd9ec..97e5d87829 100644 --- a/Gems/LmbrCentral/Code/lmbrcentral_tests_files.cmake +++ b/Gems/LmbrCentral/Code/lmbrcentral_tests_files.cmake @@ -24,5 +24,6 @@ set(FILES Tests/SpawnerComponentTest.cpp Tests/SplineComponentTests.cpp Tests/DiskShapeTest.cpp + Tests/ReferenceShapeTests.cpp Source/LmbrCentral.cpp ) diff --git a/Gems/LyShine/Code/Editor/AnchorPresetsWidget.cpp b/Gems/LyShine/Code/Editor/AnchorPresetsWidget.cpp index ca3701743e..84ff2e19a7 100644 --- a/Gems/LyShine/Code/Editor/AnchorPresetsWidget.cpp +++ b/Gems/LyShine/Code/Editor/AnchorPresetsWidget.cpp @@ -27,8 +27,6 @@ AnchorPresetsWidget::AnchorPresetsWidget(int defaultPresetIndex, , m_presetIndex(defaultPresetIndex) , m_buttons(AnchorPresets::PresetIndexCount, nullptr) { - setFixedSize(UICANVASEDITOR_ANCHOR_WIDGET_FIXED_SIZE, UICANVASEDITOR_ANCHOR_WIDGET_FIXED_SIZE); - // The layout. QGridLayout* grid = new QGridLayout(this); grid->setContentsMargins(0, 0, 0, 0); @@ -38,6 +36,7 @@ AnchorPresetsWidget::AnchorPresetsWidget(int defaultPresetIndex, { for (int presetIndex = 0; presetIndex < AnchorPresets::PresetIndexCount; ++presetIndex) { + QLayout* boxLayout = new QVBoxLayout(); PresetButton* button = new PresetButton(UICANVASEDITOR_ANCHOR_ICON_PATH_DEFAULT(presetIndex), UICANVASEDITOR_ANCHOR_ICON_PATH_HOVER(presetIndex), UICANVASEDITOR_ANCHOR_ICON_PATH_SELECTED(presetIndex), @@ -50,8 +49,9 @@ AnchorPresetsWidget::AnchorPresetsWidget(int defaultPresetIndex, presetChanger(presetIndex); }, this); - - grid->addWidget(button, (presetIndex / 4), (presetIndex % 4)); + boxLayout->addWidget(button); + boxLayout->setContentsMargins(2, 2, 2, 2); + grid->addItem(boxLayout, (presetIndex / 4), (presetIndex % 4)); m_buttons[ presetIndex ] = button; } diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewAnimNode.cpp b/Gems/LyShine/Code/Editor/Animation/UiAnimViewAnimNode.cpp index 5d62f88310..9aee4b10cd 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewAnimNode.cpp +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewAnimNode.cpp @@ -8,7 +8,7 @@ #include "UiEditorAnimationBus.h" -#include "UiEditorDLLBus.h" +#include #include "UiAnimViewAnimNode.h" #include "UiAnimViewTrack.h" #include "UiAnimViewSequence.h" diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequenceManager.cpp b/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequenceManager.cpp index 4cfeeaff6a..2a6c607b24 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequenceManager.cpp +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequenceManager.cpp @@ -8,7 +8,7 @@ #include "UiEditorAnimationBus.h" -#include "UiEditorDLLBus.h" +#include #include "UiAnimViewSequenceManager.h" #include "UiAnimViewUndo.h" #include "AnimationContext.h" diff --git a/Gems/LyShine/Code/Editor/EditorWindow.h b/Gems/LyShine/Code/Editor/EditorWindow.h index d9b3e60c32..538e565b7a 100644 --- a/Gems/LyShine/Code/Editor/EditorWindow.h +++ b/Gems/LyShine/Code/Editor/EditorWindow.h @@ -11,7 +11,7 @@ #include "EditorCommon.h" #include "Animation/UiEditorAnimationBus.h" -#include "UiEditorDLLBus.h" +#include #include "UiEditorInternalBus.h" #include "UiEditorEntityContext.h" #include "UiSliceManager.h" diff --git a/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.cpp b/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.cpp index f32ba1dbd5..229101d4c0 100644 --- a/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.cpp +++ b/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.cpp @@ -103,6 +103,7 @@ namespace LyShineEditor void LyShineEditorSystemComponent::Activate() { AzToolsFramework::EditorEventsBus::Handler::BusConnect(); + AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusConnect(); LyShine::LyShineRequestBus::Handler::BusConnect(); } @@ -118,6 +119,7 @@ namespace LyShineEditor } LyShine::LyShineRequestBus::Handler::BusDisconnect(); AzToolsFramework::EditorEventsBus::Handler::BusDisconnect(); + AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusDisconnect(); } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -204,4 +206,14 @@ namespace LyShineEditor UiEditorDLLBus::Broadcast(&UiEditorDLLInterface::OpenSourceCanvasFile, absoluteName); } } + + //////////////////////////////////////////////////////////////////////////////////////////////// + void LyShineEditorSystemComponent::OnStopPlayInEditor() + { + // reset UI system + if (gEnv->pLyShine) + { + gEnv->pLyShine->Reset(); + } + } } diff --git a/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.h b/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.h index 340c40cc5e..f355f18c3d 100644 --- a/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.h +++ b/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.h @@ -11,6 +11,7 @@ #include #include #include +#include #include namespace LyShineEditor @@ -18,6 +19,7 @@ namespace LyShineEditor class LyShineEditorSystemComponent : public AZ::Component , protected AzToolsFramework::EditorEvents::Bus::Handler + , protected AzToolsFramework::EditorEntityContextNotificationBus::Handler , protected AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotificationBus::Handler , protected LyShine::LyShineRequestBus::Handler { @@ -58,5 +60,10 @@ namespace LyShineEditor // LyShineRequestBus interface implementation void EditUICanvas(const AZStd::string_view& canvasPath) override; //////////////////////////////////////////////////////////////////////// + + //////////////////////////////////////////////////////////////////////// + // EditorEntityContextNotificationBus + void OnStopPlayInEditor() override; + //////////////////////////////////////////////////////////////////////// }; } diff --git a/Gems/LyShine/Code/Editor/PropertiesWidget.cpp b/Gems/LyShine/Code/Editor/PropertiesWidget.cpp index c128fe15b9..e350a367c6 100644 --- a/Gems/LyShine/Code/Editor/PropertiesWidget.cpp +++ b/Gems/LyShine/Code/Editor/PropertiesWidget.cpp @@ -49,7 +49,7 @@ PropertiesWidget::PropertiesWidget(EditorWindow* editorWindow, m_refreshTimer.setSingleShot(true); } - setMinimumWidth(250); + setMinimumWidth(330); ToolsApplicationEvents::Bus::Handler::BusConnect(); } diff --git a/Gems/LyShine/Code/Editor/SpriteBorderEditorCommon.h b/Gems/LyShine/Code/Editor/SpriteBorderEditorCommon.h index 3f4d6b25b9..95e3256160 100644 --- a/Gems/LyShine/Code/Editor/SpriteBorderEditorCommon.h +++ b/Gems/LyShine/Code/Editor/SpriteBorderEditorCommon.h @@ -10,7 +10,6 @@ #include // required to be included before platform.h #include #include -#include #include #include diff --git a/Gems/LyShine/Code/Editor/ViewportWidget.cpp b/Gems/LyShine/Code/Editor/ViewportWidget.cpp index bf7447585c..0746a5213f 100644 --- a/Gems/LyShine/Code/Editor/ViewportWidget.cpp +++ b/Gems/LyShine/Code/Editor/ViewportWidget.cpp @@ -454,29 +454,6 @@ void ViewportWidget::contextMenuEvent(QContextMenuEvent* e) RenderViewportWidget::contextMenuEvent(e); } -#ifdef LYSHINE_ATOM_TODO // check if still needed -void ViewportWidget::HandleSignalRender([[maybe_unused]] const SRenderContext& context) -{ - // Called from QViewport when redrawing the viewport. - // Triggered from a QViewport resize event or from our call to QViewport::Update - if (m_canvasRenderIsEnabled) - { - gEnv->pRenderer->SetSrgbWrite(true); - - UiEditorMode editorMode = m_editorWindow->GetEditorMode(); - - if (editorMode == UiEditorMode::Edit) - { - RenderEditMode(); - } - else // if (editorMode == UiEditorMode::Preview) - { - RenderPreviewMode(); - } - } -} -#endif - void ViewportWidget::UserSelectionChanged(HierarchyItemRawPtrList* items) { Refresh(); @@ -999,13 +976,6 @@ void ViewportWidget::RenderEditMode() m_viewportInteraction->GetCanvasToViewportScale(), m_viewportInteraction->GetCanvasToViewportTranslation()); -#ifdef LYSHINE_ATOM_TODO - // clear the stencil buffer before rendering each canvas - required for masking - // NOTE: the FRT_CLEAR_IMMEDIATE is required since we will not be setting the render target - ColorF viewportBackgroundColor(0, 0, 0, 0); // if clearing color we want to set alpha to zero also - gEnv->pRenderer->ClearTargetsImmediately(FRT_CLEAR_STENCIL, viewportBackgroundColor); -#endif - // Set the target size of the canvas EBUS_EVENT_ID(canvasEntityId, UiCanvasBus, SetTargetCanvasSize, false, canvasSize); diff --git a/Code/Legacy/CryCommon/LyShine/Animation/IUiAnimation.h b/Gems/LyShine/Code/Include/LyShine/Animation/IUiAnimation.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Animation/IUiAnimation.h rename to Gems/LyShine/Code/Include/LyShine/Animation/IUiAnimation.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/Sprite/UiSpriteBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/Sprite/UiSpriteBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/Sprite/UiSpriteBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/Sprite/UiSpriteBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/Tools/UiSystemToolsBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/Tools/UiSystemToolsBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/Tools/UiSystemToolsBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/Tools/UiSystemToolsBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiAnimateEntityBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiAnimateEntityBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiAnimateEntityBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiAnimateEntityBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiAnimationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiAnimationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiAnimationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiAnimationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiButtonBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiButtonBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiButtonBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiButtonBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiCanvasBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiCanvasBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiCanvasBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiCanvasBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiCanvasManagerBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiCanvasManagerBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiCanvasManagerBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiCanvasManagerBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiCanvasUpdateNotificationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiCanvasUpdateNotificationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiCanvasUpdateNotificationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiCanvasUpdateNotificationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiCheckboxBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiCheckboxBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiCheckboxBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiCheckboxBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiDraggableBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiDraggableBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiDraggableBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiDraggableBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiDropTargetBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiDropTargetBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiDropTargetBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiDropTargetBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiDropdownBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiDropdownBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiDropdownBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiDropdownBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiDropdownOptionBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiDropdownOptionBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiDropdownOptionBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiDropdownOptionBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiDynamicLayoutBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiDynamicLayoutBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiDynamicLayoutBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiDynamicLayoutBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiDynamicScrollBoxBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiDynamicScrollBoxBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiDynamicScrollBoxBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiDynamicScrollBoxBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiEditorBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiEditorBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiEditorBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiEditorBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiEditorCanvasBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiEditorCanvasBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiEditorCanvasBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiEditorCanvasBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiEditorChangeNotificationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiEditorChangeNotificationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiEditorChangeNotificationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiEditorChangeNotificationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiElementBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiElementBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiElementBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiElementBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiEntityContextBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiEntityContextBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiEntityContextBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiEntityContextBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiFaderBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiFaderBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiFaderBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiFaderBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiFlipbookAnimationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiFlipbookAnimationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiFlipbookAnimationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiFlipbookAnimationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiGameEntityContextBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiGameEntityContextBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiGameEntityContextBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiGameEntityContextBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiImageBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiImageBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiImageBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiImageBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiImageSequenceBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiImageSequenceBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiImageSequenceBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiImageSequenceBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiIndexableImageBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiIndexableImageBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiIndexableImageBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiIndexableImageBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiInitializationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiInitializationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiInitializationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiInitializationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiInteractableActionsBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiInteractableActionsBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiInteractableActionsBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiInteractableActionsBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiInteractableBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiInteractableBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiInteractableBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiInteractableBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiInteractableStatesBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiInteractableStatesBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiInteractableStatesBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiInteractableStatesBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiInteractionMaskBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiInteractionMaskBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiInteractionMaskBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiInteractionMaskBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutCellBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutCellBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutCellBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutCellBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutCellDefaultBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutCellDefaultBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutCellDefaultBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutCellDefaultBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutColumnBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutColumnBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutColumnBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutColumnBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutControllerBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutControllerBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutControllerBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutControllerBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutFitterBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutFitterBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutFitterBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutFitterBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutGridBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutGridBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutGridBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutGridBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutManagerBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutManagerBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutManagerBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutManagerBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutRowBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutRowBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutRowBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutRowBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiMarkupButtonBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiMarkupButtonBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiMarkupButtonBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiMarkupButtonBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiMaskBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiMaskBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiMaskBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiMaskBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiNavigationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiNavigationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiNavigationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiNavigationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiParticleEmitterBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiParticleEmitterBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiParticleEmitterBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiParticleEmitterBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonCommunicationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonCommunicationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonCommunicationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonCommunicationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonGroupBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonGroupBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonGroupBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonGroupBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonGroupCommunicationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonGroupCommunicationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonGroupCommunicationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonGroupCommunicationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiRenderBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiRenderBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiRenderBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiRenderBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiRenderControlBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiRenderControlBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiRenderControlBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiRenderControlBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiScrollBarBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiScrollBarBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiScrollBarBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiScrollBarBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiScrollBoxBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiScrollBoxBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiScrollBoxBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiScrollBoxBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiScrollableBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiScrollableBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiScrollableBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiScrollableBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiScrollerBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiScrollerBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiScrollerBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiScrollerBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiSliderBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiSliderBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiSliderBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiSliderBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiSpawnerBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiSpawnerBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiSpawnerBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiSpawnerBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiSystemBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiSystemBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiSystemBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiSystemBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiTextBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiTextBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiTextBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiTextBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiTextInputBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiTextInputBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiTextInputBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiTextInputBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiTooltipBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiTooltipBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiTooltipBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiTooltipBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiTooltipDataPopulatorBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiTooltipDataPopulatorBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiTooltipDataPopulatorBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiTooltipDataPopulatorBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiTooltipDisplayBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiTooltipDisplayBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiTooltipDisplayBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiTooltipDisplayBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiTransform2dBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiTransform2dBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiTransform2dBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiTransform2dBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiTransformBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiTransformBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiTransformBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiTransformBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiVisualBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiVisualBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiVisualBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiVisualBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/World/UiCanvasOnMeshBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/World/UiCanvasOnMeshBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/World/UiCanvasOnMeshBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/World/UiCanvasOnMeshBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/World/UiCanvasRefBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/World/UiCanvasRefBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/World/UiCanvasRefBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/World/UiCanvasRefBus.h diff --git a/Code/Legacy/CryCommon/LyShine/IDraw2d.h b/Gems/LyShine/Code/Include/LyShine/IDraw2d.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/IDraw2d.h rename to Gems/LyShine/Code/Include/LyShine/IDraw2d.h diff --git a/Code/Legacy/CryCommon/LyShine/ILyShine.h b/Gems/LyShine/Code/Include/LyShine/ILyShine.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/ILyShine.h rename to Gems/LyShine/Code/Include/LyShine/ILyShine.h diff --git a/Code/Legacy/CryCommon/LyShine/IRenderGraph.h b/Gems/LyShine/Code/Include/LyShine/IRenderGraph.h similarity index 87% rename from Code/Legacy/CryCommon/LyShine/IRenderGraph.h rename to Gems/LyShine/Code/Include/LyShine/IRenderGraph.h index 716e0f7417..0e7c127677 100644 --- a/Code/Legacy/CryCommon/LyShine/IRenderGraph.h +++ b/Gems/LyShine/Code/Include/LyShine/IRenderGraph.h @@ -7,9 +7,8 @@ */ #pragma once -#include -#include #include +#include namespace AZ { @@ -42,10 +41,6 @@ namespace LyShine //! End the setup of a mask render node, this marks the end of adding child primitives virtual void EndMask() = 0; - //! Begin rendering to a texture - virtual void BeginRenderToTexture(int renderTargetHandle, SDepthTexture* renderTargetDepthSurface, - const AZ::Vector2& viewportTopLeft, const AZ::Vector2& viewportSize, const AZ::Color& clearColor) = 0; - //! End rendering to a texture virtual void EndRenderToTexture() = 0; @@ -53,7 +48,7 @@ namespace LyShine //! The graph handles the allocation of this DynUiPrimitive and deletes it when the graph is reset //! This can be used if the UI component doesn't want to own the storage of the primitive. Used infrequently, //! e.g. for the selection rect on a text component. - virtual DynUiPrimitive* GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor) = 0; + virtual LyShine::UiPrimitive* GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor) = 0; //---- Functions for supporting masking (used during creation of the graph, not rendering ) ---- diff --git a/Code/Legacy/CryCommon/LyShine/ISprite.h b/Gems/LyShine/Code/Include/LyShine/ISprite.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/ISprite.h rename to Gems/LyShine/Code/Include/LyShine/ISprite.h diff --git a/Code/Legacy/CryCommon/LyShine/UiBase.h b/Gems/LyShine/Code/Include/LyShine/UiBase.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/UiBase.h rename to Gems/LyShine/Code/Include/LyShine/UiBase.h diff --git a/Code/Legacy/CryCommon/LyShine/UiComponentTypes.h b/Gems/LyShine/Code/Include/LyShine/UiComponentTypes.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/UiComponentTypes.h rename to Gems/LyShine/Code/Include/LyShine/UiComponentTypes.h diff --git a/Code/Editor/Plugins/EditorCommon/UiEditorDLLBus.h b/Gems/LyShine/Code/Include/LyShine/UiEditorDLLBus.h similarity index 100% rename from Code/Editor/Plugins/EditorCommon/UiEditorDLLBus.h rename to Gems/LyShine/Code/Include/LyShine/UiEditorDLLBus.h diff --git a/Code/Legacy/CryCommon/LyShine/UiEntityContext.h b/Gems/LyShine/Code/Include/LyShine/UiEntityContext.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/UiEntityContext.h rename to Gems/LyShine/Code/Include/LyShine/UiEntityContext.h diff --git a/Code/Legacy/CryCommon/LyShine/UiLayoutCellBase.h b/Gems/LyShine/Code/Include/LyShine/UiLayoutCellBase.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/UiLayoutCellBase.h rename to Gems/LyShine/Code/Include/LyShine/UiLayoutCellBase.h diff --git a/Gems/LyShine/Code/Include/LyShine/UiRenderFormats.h b/Gems/LyShine/Code/Include/LyShine/UiRenderFormats.h new file mode 100644 index 0000000000..632642856e --- /dev/null +++ b/Gems/LyShine/Code/Include/LyShine/UiRenderFormats.h @@ -0,0 +1,53 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ +#pragma once + +#include + +namespace LyShine +{ + struct UCol + { + union + { + uint32 dcolor; + uint8 bcolor[4]; + + struct + { + uint8 b, g, r, a; + }; + struct + { + uint8 z, y, x, w; + }; + }; + }; + + struct UiPrimitiveVertex + { + Vec2 xy; + UCol color; + Vec2 st; + uint8 texIndex; + uint8 texHasColorChannel; + uint8 texIndex2; + uint8 pad; + }; + + using UiIndice = AZ::u16; + + struct UiPrimitive : public AZStd::intrusive_slist_node + { + UiPrimitiveVertex* m_vertices = nullptr; + uint16* m_indices = nullptr; + int m_numVertices = 0; + int m_numIndices = 0; + }; + using UiPrimitiveList = AZStd::intrusive_slist>; +}; diff --git a/Code/Legacy/CryCommon/LyShine/UiSerializeHelpers.h b/Gems/LyShine/Code/Include/LyShine/UiSerializeHelpers.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/UiSerializeHelpers.h rename to Gems/LyShine/Code/Include/LyShine/UiSerializeHelpers.h diff --git a/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp b/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp index 13a4ddb425..c8818836d6 100644 --- a/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp +++ b/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp @@ -22,7 +22,6 @@ #include #include #include -#include ////////////////////////////////////////////////////////////////////////// namespace diff --git a/Gems/LyShine/Code/Source/Draw2d.cpp b/Gems/LyShine/Code/Source/Draw2d.cpp index 9a97f27592..f2c7c360d2 100644 --- a/Gems/LyShine/Code/Source/Draw2d.cpp +++ b/Gems/LyShine/Code/Source/Draw2d.cpp @@ -5,9 +5,9 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#include // for SVF_P3F_C4B_T2F which will be removed in a coming PR #include +#include #include "LyShinePassDataBus.h" #include @@ -22,15 +22,23 @@ #include #include -//////////////////////////////////////////////////////////////////////////////////////////////////// -// LOCAL STATIC FUNCTIONS -//////////////////////////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////////////////////////// -// Color to u32 => 0xAARRGGBB -static AZ::u32 PackARGB8888(const AZ::Color& color) +namespace { - return (color.GetA8() << 24) | (color.GetR8() << 16) | (color.GetG8() << 8) | color.GetB8(); + //////////////////////////////////////////////////////////////////////////////////////////////////// + // Color to u32 => 0xAARRGGBB + AZ::u32 PackARGB8888(const AZ::Color& color) + { + return (color.GetA8() << 24) | (color.GetR8() << 16) | (color.GetG8() << 8) | color.GetB8(); + } + + //////////////////////////////////////////////////////////////////////////////////////////////////// + // Vertex format for Dynamic Draw Context + struct Draw2dVertex + { + Vec3 xyz; + LyShine::UCol color; + Vec2 st; + }; } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -739,7 +747,7 @@ void CDraw2d::DeferredQuad::Draw(AZ::RHI::Ptr dynam const float z = 1.0f; // depth test disabled, if writing Z this will write at far plane - SVF_P3F_C4B_T2F vertices[NUM_VERTS]; + Draw2dVertex vertices[NUM_VERTS]; const int vertIndex[NUM_VERTS] = { 0, 1, 3, 3, 1, 2 }; @@ -804,7 +812,7 @@ void CDraw2d::DeferredLine::Draw(AZ::RHI::Ptr dynam const int32 NUM_VERTS = 2; - SVF_P3F_C4B_T2F vertices[NUM_VERTS]; + Draw2dVertex vertices[NUM_VERTS]; for (int i = 0; i < NUM_VERTS; ++i) { @@ -857,9 +865,9 @@ void CDraw2d::DeferredRectOutline::Draw(AZ::RHI::PtrSetPrimitiveType(AZ::RHI::PrimitiveTopology::TriangleList); dynamicDraw->DrawIndexed(vertices, NUM_VERTS, indices, NUM_INDICES, AZ::RHI::IndexFormat::Uint16, drawSrg); - } //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/Gems/LyShine/Code/Source/LyShine.cpp b/Gems/LyShine/Code/Source/LyShine.cpp index 19c6e4281e..d19bc3f92d 100644 --- a/Gems/LyShine/Code/Source/LyShine.cpp +++ b/Gems/LyShine/Code/Source/LyShine.cpp @@ -520,12 +520,6 @@ void CLyShine::OnLoadScreenUnloaded() m_uiCanvasManager->OnLoadScreenUnloaded(); } -//////////////////////////////////////////////////////////////////////////////////////////////////// -void CLyShine::OnDebugDraw() -{ - LyShineDebug::RenderDebug(); -} - //////////////////////////////////////////////////////////////////////////////////////////////////// void CLyShine::IncrementVisibleCounter() { diff --git a/Gems/LyShine/Code/Source/LyShine.h b/Gems/LyShine/Code/Source/LyShine.h index 065ad59f80..82f902a9f8 100644 --- a/Gems/LyShine/Code/Source/LyShine.h +++ b/Gems/LyShine/Code/Source/LyShine.h @@ -7,7 +7,6 @@ */ #pragma once -#include #include #include #include @@ -38,7 +37,6 @@ struct IConsoleCmdArgs; //! CLyShine is the full implementation of the ILyShine interface class CLyShine : public ILyShine - , public IRenderDebugListener , public UiCursorBus::Handler , public AzFramework::InputChannelEventListener , public AzFramework::InputTextEventListener @@ -88,13 +86,6 @@ public: // ~ILyShine - // IRenderDebugListener - - //! Renders any debug displays currently enabled for the UI system - void OnDebugDraw() override; - - // ~IRenderDebugListener - // UiCursorInterface void IncrementVisibleCounter() override; void DecrementVisibleCounter() override; diff --git a/Gems/LyShine/Code/Source/LyShineLoadScreen.cpp b/Gems/LyShine/Code/Source/LyShineLoadScreen.cpp index 831bdb048a..c59cb5cb34 100644 --- a/Gems/LyShine/Code/Source/LyShineLoadScreen.cpp +++ b/Gems/LyShine/Code/Source/LyShineLoadScreen.cpp @@ -10,8 +10,6 @@ #if AZ_LOADSCREENCOMPONENT_ENABLED -#include - #include #include #include diff --git a/Gems/LyShine/Code/Source/LyShineSystemComponent.cpp b/Gems/LyShine/Code/Source/LyShineSystemComponent.cpp index f815e2ddbd..787797e462 100644 --- a/Gems/LyShine/Code/Source/LyShineSystemComponent.cpp +++ b/Gems/LyShine/Code/Source/LyShineSystemComponent.cpp @@ -377,7 +377,7 @@ namespace LyShine } /////////////////////////////////////////////////////////////////////////////////////////////// - void LyShineSystemComponent::OnCrySystemInitialized([[maybe_unused]] ISystem& system, [[maybe_unused]] const SSystemInitParams& startupParams) + void LyShineSystemComponent::OnCrySystemInitialized(ISystem& system, [[maybe_unused]] const SSystemInitParams& startupParams) { #if !defined(AZ_MONOLITHIC_BUILD) // When module is linked dynamically, we must set our gEnv pointer. @@ -387,16 +387,36 @@ namespace LyShine m_pLyShine = new CLyShine(gEnv->pSystem); gEnv->pLyShine = m_pLyShine; + system.GetILevelSystem()->AddListener(this); + BroadcastCursorImagePathname(); + + if (gEnv->pLyShine) + { + gEnv->pLyShine->PostInit(); + } } - void LyShineSystemComponent::OnCrySystemShutdown([[maybe_unused]] ISystem& system) + /////////////////////////////////////////////////////////////////////////////////////////////// + void LyShineSystemComponent::OnCrySystemShutdown(ISystem& system) { + system.GetILevelSystem()->RemoveListener(this); + gEnv->pLyShine = nullptr; delete m_pLyShine; m_pLyShine = nullptr; } + //////////////////////////////////////////////////////////////////////// + void LyShineSystemComponent::OnUnloadComplete([[maybe_unused]] const char* levelName) + { + // Perform level unload procedures for the LyShine UI system + if (gEnv && gEnv->pLyShine) + { + gEnv->pLyShine->OnLevelUnload(); + } + } + //////////////////////////////////////////////////////////////////////////////////////////////////// void LyShineSystemComponent::BroadcastCursorImagePathname() { diff --git a/Gems/LyShine/Code/Source/LyShineSystemComponent.h b/Gems/LyShine/Code/Source/LyShineSystemComponent.h index 5b4086007b..d2cdcf6761 100644 --- a/Gems/LyShine/Code/Source/LyShineSystemComponent.h +++ b/Gems/LyShine/Code/Source/LyShineSystemComponent.h @@ -13,6 +13,7 @@ #include #include +#include #include #include @@ -37,6 +38,7 @@ namespace LyShine , protected LyShineAllocatorScope , protected UiFrameworkBus::Handler , protected CrySystemEventBus::Handler + , public ILevelSystemListener { public: AZ_COMPONENT(LyShineSystemComponent, lyShineSystemComponentUuid); @@ -92,6 +94,10 @@ namespace LyShine void OnCrySystemShutdown(ISystem&) override; //////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////// + // ILevelSystemListener interface implementation + void OnUnloadComplete(const char* levelName) override; + void BroadcastCursorImagePathname(); #if !defined(LYSHINE_BUILDER) && !defined(LYSHINE_TESTS) diff --git a/Gems/LyShine/Code/Source/Particle/UiParticle.cpp b/Gems/LyShine/Code/Source/Particle/UiParticle.cpp index 077e83a696..5354e52724 100644 --- a/Gems/LyShine/Code/Source/Particle/UiParticle.cpp +++ b/Gems/LyShine/Code/Source/Particle/UiParticle.cpp @@ -10,7 +10,6 @@ #include "UiParticleEmitterComponent.h" #include -#include //////////////////////////////////////////////////////////////////////////////////////////////////// void UiParticle::Init(UiParticle::UiParticleInitialParameters* initialParams) @@ -99,7 +98,7 @@ void UiParticle::Update(float deltaTime, const UiParticleUpdateParameters& updat } //////////////////////////////////////////////////////////////////////////////////////////////////// -bool UiParticle::FillVertices(SVF_P2F_C4B_T2F_F4B* outputVertices, const UiParticleRenderParameters& renderParameters, const AZ::Matrix4x4& transform) +bool UiParticle::FillVertices(LyShine::UiPrimitiveVertex* outputVertices, const UiParticleRenderParameters& renderParameters, const AZ::Matrix4x4& transform) { float particleLifetimePercentage = (renderParameters.isParticleInfinite ? 0.0f : m_particleAge / m_particleLifetime); float alphaStrength = 1.0f; diff --git a/Gems/LyShine/Code/Source/Particle/UiParticle.h b/Gems/LyShine/Code/Source/Particle/UiParticle.h index 24509634e1..2b8f83c63b 100644 --- a/Gems/LyShine/Code/Source/Particle/UiParticle.h +++ b/Gems/LyShine/Code/Source/Particle/UiParticle.h @@ -16,7 +16,7 @@ #include #include -#include +#include class UiParticle { @@ -81,7 +81,7 @@ public: //! Fill out the four vertices for the particle. //! Returns false if the vertex was not added because it was fully transparent. - bool FillVertices(SVF_P2F_C4B_T2F_F4B* outputVertices, const UiParticleRenderParameters& renderParameters, const AZ::Matrix4x4& transform); + bool FillVertices(LyShine::UiPrimitiveVertex* outputVertices, const UiParticleRenderParameters& renderParameters, const AZ::Matrix4x4& transform); bool IsActive(bool infiniteLifetime) const; diff --git a/Gems/LyShine/Code/Source/RenderGraph.cpp b/Gems/LyShine/Code/Source/RenderGraph.cpp index 567c29eecd..c7baf82fc0 100644 --- a/Gems/LyShine/Code/Source/RenderGraph.cpp +++ b/Gems/LyShine/Code/Source/RenderGraph.cpp @@ -154,7 +154,7 @@ namespace LyShine // [LYSHINE_ATOM_TODO][ATOM-15073] - need to combine into a single DrawIndexed call to take advantage of the draw call // optimization done by this RenderGraph. This option will be added to DynamicDrawContext. For // now we could combine the vertices ourselves - for (const DynUiPrimitive& primitive : m_primitives) + for (const LyShine::UiPrimitive& primitive : m_primitives) { dynamicDraw->DrawIndexed(primitive.m_vertices, primitive.m_numVertices, primitive.m_indices, primitive.m_numIndices, AZ::RHI::IndexFormat::Uint16, drawSrg); } @@ -163,7 +163,7 @@ namespace LyShine } //////////////////////////////////////////////////////////////////////////////////////////////////// - void PrimitiveListRenderNode::AddPrimitive(DynUiPrimitive* primitive) + void PrimitiveListRenderNode::AddPrimitive(LyShine::UiPrimitive* primitive) { // always clear the next pointer before adding to list primitive->m_next = nullptr; @@ -174,9 +174,9 @@ namespace LyShine } //////////////////////////////////////////////////////////////////////////////////////////////////// - DynUiPrimitiveList& PrimitiveListRenderNode::GetPrimitives() const + LyShine::UiPrimitiveList& PrimitiveListRenderNode::GetPrimitives() const { - return const_cast(m_primitives); + return const_cast(m_primitives); } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -198,7 +198,7 @@ namespace LyShine } //////////////////////////////////////////////////////////////////////////////////////////////////// - bool PrimitiveListRenderNode::HasSpaceToAddPrimitive(DynUiPrimitive* primitive) const + bool PrimitiveListRenderNode::HasSpaceToAddPrimitive(LyShine::UiPrimitive* primitive) const { return primitive->m_numVertices + m_totalNumVertices < std::numeric_limits::max(); } @@ -222,9 +222,9 @@ namespace LyShine { size_t numPrims = m_primitives.size(); size_t primCount = 0; - const DynUiPrimitive* lastPrim = nullptr; + const LyShine::UiPrimitive* lastPrim = nullptr; int highestTexUnit = 0; - for (const DynUiPrimitive& primitive : m_primitives) + for (const LyShine::UiPrimitive& primitive : m_primitives) { if (primCount > numPrims) { @@ -665,13 +665,6 @@ namespace LyShine } } - //////////////////////////////////////////////////////////////////////////////////////////////////// - void RenderGraph::BeginRenderToTexture([[maybe_unused]] int renderTargetHandle, [[maybe_unused]] SDepthTexture* renderTargetDepthSurface, - [[maybe_unused]] const AZ::Vector2& viewportTopLeft, [[maybe_unused]] const AZ::Vector2& viewportSize, [[maybe_unused]] const AZ::Color& clearColor) - { - // LYSHINE_ATOM_TODO - this function will be removed when all IRenderer references are gone from UI components - } - //////////////////////////////////////////////////////////////////////////////////////////////////// void RenderGraph::BeginRenderToTexture(AZ::Data::Instance attachmentImage, const AZ::Vector2& viewportTopLeft, const AZ::Vector2& viewportSize, const AZ::Color& clearColor) @@ -705,7 +698,7 @@ namespace LyShine } //////////////////////////////////////////////////////////////////////////////////////////////////// - void RenderGraph::AddPrimitiveAtom(DynUiPrimitive* primitive, const AZ::Data::Instance& texture, + void RenderGraph::AddPrimitiveAtom(LyShine::UiPrimitive* primitive, const AZ::Data::Instance& texture, bool isClampTextureMode, bool isTextureSRGB, bool isTexturePremultipliedAlpha, BlendMode blendMode) { AZStd::vector* renderNodeList = m_renderNodeListStack.top(); @@ -778,7 +771,7 @@ namespace LyShine } //////////////////////////////////////////////////////////////////////////////////////////////////// - void RenderGraph::AddAlphaMaskPrimitiveAtom(DynUiPrimitive* primitive, + void RenderGraph::AddAlphaMaskPrimitiveAtom(LyShine::UiPrimitive* primitive, AZ::Data::Instance contentAttachmentImage, AZ::Data::Instance maskAttachmentImage, bool isClampTextureMode, @@ -862,7 +855,7 @@ namespace LyShine } //////////////////////////////////////////////////////////////////////////////////////////////////// - DynUiPrimitive* RenderGraph::GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor) + LyShine::UiPrimitive* RenderGraph::GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor) { const int numVertsInQuad = 4; const int numIndicesInQuad = 6; @@ -1154,10 +1147,10 @@ namespace LyShine const PrimitiveListRenderNode* primListRenderNode = static_cast(renderNode); - DynUiPrimitiveList& primitives = primListRenderNode->GetPrimitives(); + LyShine::UiPrimitiveList& primitives = primListRenderNode->GetPrimitives(); info.m_numPrimitives += static_cast(primitives.size()); { - for (const DynUiPrimitive& primitive : primitives) + for (const LyShine::UiPrimitive& primitive : primitives) { info.m_numTriangles += primitive.m_numIndices / 3; } @@ -1338,10 +1331,10 @@ namespace LyShine previousNodeAlreadyCounted = false; } - DynUiPrimitiveList& primitives = primListRenderNode->GetPrimitives(); + LyShine::UiPrimitiveList& primitives = primListRenderNode->GetPrimitives(); int numPrimitives = static_cast(primitives.size()); int numTriangles = 0; - for (const DynUiPrimitive& primitive : primitives) + for (const LyShine::UiPrimitive& primitive : primitives) { numTriangles += primitive.m_numIndices / 3; } diff --git a/Gems/LyShine/Code/Source/RenderGraph.h b/Gems/LyShine/Code/Source/RenderGraph.h index 9edc1f50e8..36a9e63c5f 100644 --- a/Gems/LyShine/Code/Source/RenderGraph.h +++ b/Gems/LyShine/Code/Source/RenderGraph.h @@ -8,8 +8,8 @@ #pragma once -#include #include +#include #include #include #include @@ -79,8 +79,8 @@ namespace LyShine , const AZ::Matrix4x4& modelViewProjMat , AZ::RHI::Ptr dynamicDraw) override; - void AddPrimitive(DynUiPrimitive* primitive); - DynUiPrimitiveList& GetPrimitives() const; + void AddPrimitive(LyShine::UiPrimitive* primitive); + LyShine::UiPrimitiveList& GetPrimitives() const; int GetOrAddTexture(const AZ::Data::Instance& texture, bool isClampTextureMode); int GetNumTextures() const { return m_numTextures; } @@ -92,7 +92,7 @@ namespace LyShine bool GetIsPremultiplyAlpha() const { return m_preMultiplyAlpha; } AlphaMaskType GetAlphaMaskType() const { return m_alphaMaskType; } - bool HasSpaceToAddPrimitive(DynUiPrimitive* primitive) const; + bool HasSpaceToAddPrimitive(LyShine::UiPrimitive* primitive) const; // Search to see if this texture is already used by this texture unit, returns -1 if not used int FindTexture(const AZ::Data::Instance& texture, bool isClampTextureMode) const; @@ -122,7 +122,7 @@ namespace LyShine int m_totalNumVertices; int m_totalNumIndices; - DynUiPrimitiveList m_primitives; + LyShine::UiPrimitiveList m_primitives; }; // A mask render node handles using one set of render nodes to mask another set of render nodes @@ -262,13 +262,9 @@ namespace LyShine void StartChildrenForMask() override; void EndMask() override; - //! Begin rendering to a texture - void BeginRenderToTexture(int renderTargetHandle, SDepthTexture* renderTargetDepthSurface, - const AZ::Vector2& viewportTopLeft, const AZ::Vector2& viewportSize, const AZ::Color& clearColor) override; - void EndRenderToTexture() override; - DynUiPrimitive* GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor) override; + LyShine::UiPrimitive* GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor) override; bool IsRenderingToMask() const override; void SetIsRenderingToMask(bool isRenderingToMask) override; @@ -280,11 +276,11 @@ namespace LyShine // ~IRenderGraph // LYSHINE_ATOM_TODO - this can be renamed back to AddPrimitive after removal of IRenderer from all UI components - void AddPrimitiveAtom(DynUiPrimitive* primitive, const AZ::Data::Instance& texture, + void AddPrimitiveAtom(LyShine::UiPrimitive* primitive, const AZ::Data::Instance& texture, bool isClampTextureMode, bool isTextureSRGB, bool isTexturePremultipliedAlpha, BlendMode blendMode); //! Add an indexed triangle list primitive to the render graph which will use maskTexture as an alpha (gradient) mask - void AddAlphaMaskPrimitiveAtom(DynUiPrimitive* primitive, + void AddAlphaMaskPrimitiveAtom(LyShine::UiPrimitive* primitive, AZ::Data::Instance contentAttachmentImage, AZ::Data::Instance maskAttachmentImage, bool isClampTextureMode, @@ -333,8 +329,8 @@ namespace LyShine struct DynamicQuad { - SVF_P2F_C4B_T2F_F4B m_quadVerts[4]; - DynUiPrimitive m_primitive; + LyShine::UiPrimitiveVertex m_quadVerts[4]; + LyShine::UiPrimitive m_primitive; }; protected: // member functions diff --git a/Gems/LyShine/Code/Source/Sprite.cpp b/Gems/LyShine/Code/Source/Sprite.cpp index d9a0775cc1..65da7fa159 100644 --- a/Gems/LyShine/Code/Source/Sprite.cpp +++ b/Gems/LyShine/Code/Source/Sprite.cpp @@ -7,7 +7,6 @@ */ #include "Sprite.h" #include -#include #include #include #include diff --git a/Gems/LyShine/Code/Source/UiButtonComponent.cpp b/Gems/LyShine/Code/Source/UiButtonComponent.cpp index 11bb088400..06444cebe4 100644 --- a/Gems/LyShine/Code/Source/UiButtonComponent.cpp +++ b/Gems/LyShine/Code/Source/UiButtonComponent.cpp @@ -13,7 +13,6 @@ #include #include -#include #include #include #include diff --git a/Gems/LyShine/Code/Source/UiCanvasComponent.cpp b/Gems/LyShine/Code/Source/UiCanvasComponent.cpp index d967b88610..964ce1d0fa 100644 --- a/Gems/LyShine/Code/Source/UiCanvasComponent.cpp +++ b/Gems/LyShine/Code/Source/UiCanvasComponent.cpp @@ -16,7 +16,6 @@ #include "UiRenderer.h" #include "LyShine.h" -#include #include #include #include diff --git a/Gems/LyShine/Code/Source/UiCanvasManager.cpp b/Gems/LyShine/Code/Source/UiCanvasManager.cpp index f2397248b6..3bf0263363 100644 --- a/Gems/LyShine/Code/Source/UiCanvasManager.cpp +++ b/Gems/LyShine/Code/Source/UiCanvasManager.cpp @@ -12,11 +12,9 @@ #include "UiCanvasComponent.h" #include "UiGameEntityContext.h" -#include #include #include -#include #include #include #include @@ -180,8 +178,6 @@ AZ::EntityId UiCanvasManager::LoadCanvas(const AZStd::string& assetIdPathname) return AZ::EntityId(); } - AZ_ASSET_NAMED_SCOPE(assetIdPathname.c_str()); - UiGameEntityContext* entityContext = new UiGameEntityContext(); AZ::EntityId canvasEntityId = LoadCanvasInternal(assetIdPathname, false, "", entityContext); @@ -916,60 +912,56 @@ AZ::EntityId UiCanvasManager::LoadCanvasInternal(const AZStd::string& assetIdPat // editor version so that the user can test their canvas without saving it UiCanvasComponent* canvasComponent = FindEditorCanvasComponentByPathname(assetIdPath); - // This scope opened here intentionally to control the lifetime of the AZ_ASSET_NAMED_SCOPE + if (canvasComponent) { - AZ_ASSET_NAMED_SCOPE(pathToOpen.c_str()); - if (canvasComponent) + // this canvas is already loaded in the editor + if (forEditor) { - // this canvas is already loaded in the editor - if (forEditor) - { - // should never load a canvas in Editor if it is already loaded. The Editor should avoid loading the - // same canvas twice in Editor. If the game is running it is not possible to load a canvas - // from the editor. - gEnv->pSystem->Warning(VALIDATOR_MODULE_SHINE, VALIDATOR_WARNING, VALIDATOR_FLAG_FILE, - pathToOpen.c_str(), - "UI canvas file: %s is already loaded", - pathToOpen.c_str()); - return AZ::EntityId(); - } - else - { - // we are loading from the game, the canvas is already open in the editor, so - // we clone the canvas that is open in the editor. - canvasComponent = canvasComponent->CloneAndInitializeCanvas(entityContext, assetIdPath); - } + // should never load a canvas in Editor if it is already loaded. The Editor should avoid loading the + // same canvas twice in Editor. If the game is running it is not possible to load a canvas + // from the editor. + gEnv->pSystem->Warning(VALIDATOR_MODULE_SHINE, VALIDATOR_WARNING, VALIDATOR_FLAG_FILE, + pathToOpen.c_str(), + "UI canvas file: %s is already loaded", + pathToOpen.c_str()); + return AZ::EntityId(); } else { - // not already loaded in editor, attempt to load... - canvasComponent = UiCanvasComponent::LoadCanvasInternal(pathToOpen.c_str(), forEditor, assetIdPath.c_str(), entityContext, previousRemapTable, previousCanvasId); + // we are loading from the game, the canvas is already open in the editor, so + // we clone the canvas that is open in the editor. + canvasComponent = canvasComponent->CloneAndInitializeCanvas(entityContext, assetIdPath); } + } + else + { + // not already loaded in editor, attempt to load... + canvasComponent = UiCanvasComponent::LoadCanvasInternal(pathToOpen.c_str(), forEditor, assetIdPath.c_str(), entityContext, previousRemapTable, previousCanvasId); + } - if (canvasComponent) - { - // canvas loaded OK (or cloned from Editor canvas OK) + if (canvasComponent) + { + // canvas loaded OK (or cloned from Editor canvas OK) - // add to the list of loaded canvases - if (forEditor) + // add to the list of loaded canvases + if (forEditor) + { + m_loadedCanvasesInEditor.push_back(canvasComponent); + } + else + { + if (canvasComponent->GetEnabled() && canvasComponent->GetIsConsumingAllInputEvents()) { - m_loadedCanvasesInEditor.push_back(canvasComponent); + AzFramework::InputChannelRequestBus::Broadcast(&AzFramework::InputChannelRequests::ResetState); + EBUS_EVENT(UiCanvasBus, ClearAllInteractables); } - else - { - if (canvasComponent->GetEnabled() && canvasComponent->GetIsConsumingAllInputEvents()) - { - AzFramework::InputChannelRequestBus::Broadcast(&AzFramework::InputChannelRequests::ResetState); - EBUS_EVENT(UiCanvasBus, ClearAllInteractables); - } - m_loadedCanvases.push_back(canvasComponent); - SortCanvasesByDrawOrder(); + m_loadedCanvases.push_back(canvasComponent); + SortCanvasesByDrawOrder(); - // Update hover state for loaded canvases - m_generateMousePositionInputEvent = true; - } - canvasComponent->SetLocalUserIdInputFilter(m_localUserIdInputFilter); + // Update hover state for loaded canvases + m_generateMousePositionInputEvent = true; } + canvasComponent->SetLocalUserIdInputFilter(m_localUserIdInputFilter); } return (canvasComponent) ? canvasComponent->GetEntityId() : AZ::EntityId(); diff --git a/Gems/LyShine/Code/Source/UiFaderComponent.cpp b/Gems/LyShine/Code/Source/UiFaderComponent.cpp index cfca774612..62acbc30ef 100644 --- a/Gems/LyShine/Code/Source/UiFaderComponent.cpp +++ b/Gems/LyShine/Code/Source/UiFaderComponent.cpp @@ -503,7 +503,7 @@ void UiFaderComponent::UpdateCachedPrimitive(const AZ::Vector2& pixelAlignedTopL { // verts not yet allocated, allocate them now const int numIndices = 6; - m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numVertices]; + m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numVertices]; m_cachedPrimitive.m_numVertices = numVertices; static uint16 indices[numIndices] = { 0, 1, 2, 2, 3, 0 }; @@ -602,7 +602,7 @@ void UiFaderComponent::RenderRttFader(LyShine::IRenderGraph* renderGraph, UiElem if (m_cachedPrimitive.m_vertices[0].color.a != desiredPackedAlpha) { // go through all the cached vertices and update the alpha values - UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; + LyShine::UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; desiredPackedColor.a = desiredPackedAlpha; for (int i = 0; i < m_cachedPrimitive.m_numVertices; ++i) { diff --git a/Gems/LyShine/Code/Source/UiFaderComponent.h b/Gems/LyShine/Code/Source/UiFaderComponent.h index 218eab3794..3de1514023 100644 --- a/Gems/LyShine/Code/Source/UiFaderComponent.h +++ b/Gems/LyShine/Code/Source/UiFaderComponent.h @@ -169,5 +169,5 @@ private: // data int m_renderTargetHeight = 0; //! cached rendering data for performance optimization of rendering the render target to screen - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; }; diff --git a/Gems/LyShine/Code/Source/UiImageComponent.cpp b/Gems/LyShine/Code/Source/UiImageComponent.cpp index fac8a83c71..c47d4b6ea1 100644 --- a/Gems/LyShine/Code/Source/UiImageComponent.cpp +++ b/Gems/LyShine/Code/Source/UiImageComponent.cpp @@ -13,8 +13,6 @@ #include #include -#include - #include #include #include @@ -188,7 +186,7 @@ namespace //! Set the values for an image vertex //! This helper function is used so that we only have to initialize textIndex and texHasColorChannel in one place - void SetVertex(SVF_P2F_C4B_T2F_F4B& vert, const Vec2& pos, uint32 color, const Vec2& uv) + void SetVertex(LyShine::UiPrimitiveVertex& vert, const Vec2& pos, uint32 color, const Vec2& uv) { vert.xy = pos; vert.color.dcolor = color; @@ -201,7 +199,7 @@ namespace //! Set the values for an image vertex //! This version of the helper function takes AZ vectors - void SetVertex(SVF_P2F_C4B_T2F_F4B& vert, const AZ::Vector2& pos, uint32 color, const AZ::Vector2& uv) + void SetVertex(LyShine::UiPrimitiveVertex& vert, const AZ::Vector2& pos, uint32 color, const AZ::Vector2& uv) { SetVertex(vert, Vec2(pos.GetX(), pos.GetY()), color, Vec2(uv.GetX(), uv.GetY())); } @@ -215,7 +213,7 @@ namespace //! \param packedColor The color value to be put in every vertex //! \param transform The transform to be applied to the points //! \param xValues The x-values for the edges and borders - void FillVerts(SVF_P2F_C4B_T2F_F4B* verts, [[maybe_unused]] uint32 numVerts, uint32 numX, uint32 numY, uint32 packedColor, const AZ::Matrix4x4& transform, + void FillVerts(LyShine::UiPrimitiveVertex* verts, [[maybe_unused]] uint32 numVerts, uint32 numX, uint32 numY, uint32 packedColor, const AZ::Matrix4x4& transform, float* xValues, float* yValues, float* sValues, float* tValues, bool isPixelAligned) { @@ -463,7 +461,7 @@ void UiImageComponent::Render(LyShine::IRenderGraph* renderGraph) if (m_cachedPrimitive.m_vertices[0].color.a != desiredPackedAlpha) { // go through all the cached vertices and update the alpha values - UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; + LyShine::UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; desiredPackedColor.a = desiredPackedAlpha; for (int i = 0; i < m_cachedPrimitive.m_numVertices; ++i) { @@ -1535,7 +1533,7 @@ void UiImageComponent::RenderSingleQuad(const AZ::Vector2* positions, const AZ:: // points are a clockwise quad IDraw2d::Rounding pixelRounding = IsPixelAligned() ? IDraw2d::Rounding::Nearest : IDraw2d::Rounding::None; const uint32 numVertices = 4; - SVF_P2F_C4B_T2F_F4B vertices[numVertices]; + LyShine::UiPrimitiveVertex vertices[numVertices]; for (int i = 0; i < numVertices; ++i) { AZ::Vector2 roundedPoint = Draw2dHelper::RoundXY(positions[i], pixelRounding); @@ -1594,7 +1592,7 @@ void UiImageComponent::RenderLinearFilledQuad(const AZ::Vector2* positions, cons // points are a clockwise quad IDraw2d::Rounding pixelRounding = IsPixelAligned() ? IDraw2d::Rounding::Nearest : IDraw2d::Rounding::None; const uint32 numVertices = 4; - SVF_P2F_C4B_T2F_F4B vertices[numVertices]; + LyShine::UiPrimitiveVertex vertices[numVertices]; for (int i = 0; i < numVertices; ++i) { @@ -1653,7 +1651,7 @@ void UiImageComponent::RenderRadialFilledQuad(const AZ::Vector2* positions, cons // Fill vertices (rotated based on startingEdge). const int numVertices = 7; // The maximum amount of vertices that can be used - SVF_P2F_C4B_T2F_F4B verts[numVertices]; + LyShine::UiPrimitiveVertex verts[numVertices]; for (int i = 1; i < 5; ++i) { int srcIndex = (4 + i + startingEdge) % 4; @@ -1701,7 +1699,7 @@ void UiImageComponent::RenderRadialCornerFilledQuad(const AZ::Vector2* positions { // This fills the vertices (rotating them based on the origin edge) similar to RenderSingleQuad, then edits a vertex based on m_fillAmount. const uint32 numVerts = 4; - SVF_P2F_C4B_T2F_F4B verts[numVerts]; + LyShine::UiPrimitiveVertex verts[numVerts]; int vertexOffset = 0; if (m_fillCornerOrigin == FillCornerOrigin::TopLeft) { @@ -1754,7 +1752,7 @@ void UiImageComponent::RenderRadialEdgeFilledQuad(const AZ::Vector2* positions, { // This fills the vertices (rotating them based on the origin edge) similar to RenderSingleQuad, then edits a vertex based on m_fillAmount. const uint32 numVertices = 5; // Need an extra vertex for the origin. - SVF_P2F_C4B_T2F_F4B verts[numVertices]; + LyShine::UiPrimitiveVertex verts[numVertices]; int vertexOffset = 0; if (m_fillEdgeOrigin == FillEdgeOrigin::Left) { @@ -1916,7 +1914,7 @@ template void UiImageComponent::RenderSlicedFillModeNoneSprite { // fill out the verts const uint32 numVertices = numValues * numValues; - SVF_P2F_C4B_T2F_F4B vertices[numVertices]; + LyShine::UiPrimitiveVertex vertices[numVertices]; FillVerts(vertices, numVertices, numValues, numValues, packedColor, transform, xValues, yValues, sValues, tValues, IsPixelAligned()); int totalIndices = m_fillCenter ? numIndicesIn9Slice : numIndicesIn9SliceExcludingCenter; @@ -1932,7 +1930,7 @@ template void UiImageComponent::RenderSlicedLinearFilledSprite // 2. Fill vertices in the same way as a standard sliced sprite const uint32 numVertices = numValues * numValues; - SVF_P2F_C4B_T2F_F4B vertices[numVertices]; + LyShine::UiPrimitiveVertex vertices[numVertices]; ClipValuesForSlicedLinearFill(numValues, xValues, yValues, sValues, tValues); @@ -1950,7 +1948,7 @@ template void UiImageComponent::RenderSlicedRadialFilledSprite { // build the verts on the stack const uint32 numVertices = numValues * numValues; - SVF_P2F_C4B_T2F_F4B verts[numVertices]; + LyShine::UiPrimitiveVertex verts[numVertices]; // Fill the vertices with the generated xy and st values. FillVerts(verts, numVertices, numValues, numValues, packedColor, transform, xValues, yValues, sValues, tValues, IsPixelAligned()); @@ -1968,7 +1966,7 @@ template void UiImageComponent::RenderSlicedRadialCornerOrEdge { // build the verts on the stack const uint32 numVertices = numValues * numValues; - SVF_P2F_C4B_T2F_F4B verts[numVertices]; + LyShine::UiPrimitiveVertex verts[numVertices]; // Fill the vertices with the generated xy and st values. FillVerts(verts, numVertices, numValues, numValues, packedColor, transform, xValues, yValues, sValues, tValues, IsPixelAligned()); @@ -2053,12 +2051,12 @@ void UiImageComponent::ClipValuesForSlicedLinearFill(uint32 numValues, float* xV } //////////////////////////////////////////////////////////////////////////////////////////////////// -void UiImageComponent::ClipAndRenderForSlicedRadialFill(uint32 numVertsPerSide, uint32 numVerts, const SVF_P2F_C4B_T2F_F4B* verts, uint32 totalIndices, const uint16* indices) +void UiImageComponent::ClipAndRenderForSlicedRadialFill(uint32 numVertsPerSide, uint32 numVerts, const LyShine::UiPrimitiveVertex* verts, uint32 totalIndices, const uint16* indices) { // 1. Calculate two points of lines from the center to a point based on m_fillAmount and m_fillOrigin. // 2. Clip the triangles of the sprite against those lines based on the fill amount. - SVF_P2F_C4B_T2F_F4B renderVerts[numIndicesIn9Slice * 4]; // ClipToLine doesn't check for duplicate vertices for speed, so this is the maximum we'll need. + LyShine::UiPrimitiveVertex renderVerts[numIndicesIn9Slice * 4]; // ClipToLine doesn't check for duplicate vertices for speed, so this is the maximum we'll need. uint16 renderIndices[numIndicesIn9Slice * 4] = { 0 }; float fillOffset = AZ::DegToRad(m_fillStartAngle); @@ -2102,7 +2100,7 @@ void UiImageComponent::ClipAndRenderForSlicedRadialFill(uint32 numVertsPerSide, // Clips against first half line and then rotating line and adds results to render list. for (uint32 currentIndex = 0; currentIndex < totalIndices; currentIndex += 3) { - SVF_P2F_C4B_T2F_F4B intermediateVerts[maxTemporaryVerts]; + LyShine::UiPrimitiveVertex intermediateVerts[maxTemporaryVerts]; uint16 intermediateIndices[maxTemporaryIndices]; int intermedateVertexOffset = 0; int intermediateIndicesUsed = ClipToLine(verts, &indices[currentIndex], intermediateVerts, intermediateIndices, intermedateVertexOffset, 0, lineOrigin, firstHalfFixedLineEnd); @@ -2118,7 +2116,7 @@ void UiImageComponent::ClipAndRenderForSlicedRadialFill(uint32 numVertsPerSide, // Clips against first half line and adds results to render list then clips against the second half line and rotating line and also adds those results to render list. for (uint32 currentIndex = 0; currentIndex < totalIndices; currentIndex += 3) { - SVF_P2F_C4B_T2F_F4B intermediateVerts[maxTemporaryVerts]; + LyShine::UiPrimitiveVertex intermediateVerts[maxTemporaryVerts]; uint16 intermediateIndices[maxTemporaryIndices]; indicesUsed = ClipToLine(verts, &indices[currentIndex], renderVerts, renderIndices, vertexOffset, numIndicesToRender, lineOrigin, firstHalfFixedLineEnd); numIndicesToRender += indicesUsed; @@ -2137,12 +2135,12 @@ void UiImageComponent::ClipAndRenderForSlicedRadialFill(uint32 numVertsPerSide, } //////////////////////////////////////////////////////////////////////////////////////////////////// -void UiImageComponent::ClipAndRenderForSlicedRadialCornerOrEdgeFill(uint32 numVertsPerSide, uint32 numVerts, const SVF_P2F_C4B_T2F_F4B* verts, uint32 totalIndices, const uint16* indices) +void UiImageComponent::ClipAndRenderForSlicedRadialCornerOrEdgeFill(uint32 numVertsPerSide, uint32 numVerts, const LyShine::UiPrimitiveVertex* verts, uint32 totalIndices, const uint16* indices) { // 1. Calculate two points of a line from either the corner or center of an edge to a point based on m_fillAmount. // 2. Clip the triangles of the sprite against that line. - SVF_P2F_C4B_T2F_F4B renderVerts[numIndicesIn9Slice * 2]; // ClipToLine doesn't check for duplicate vertices for speed, so this is the maximum we'll need. + LyShine::UiPrimitiveVertex renderVerts[numIndicesIn9Slice * 2]; // ClipToLine doesn't check for duplicate vertices for speed, so this is the maximum we'll need. uint16 renderIndices[numIndicesIn9Slice * 2] = { 0 }; // Generate the start and direction of the line to clip against based on the fill origin and fill amount. @@ -2209,11 +2207,11 @@ void UiImageComponent::ClipAndRenderForSlicedRadialCornerOrEdgeFill(uint32 numVe } //////////////////////////////////////////////////////////////////////////////////////////////////// -int UiImageComponent::ClipToLine(const SVF_P2F_C4B_T2F_F4B* vertices, const uint16* indices, SVF_P2F_C4B_T2F_F4B* renderVertices, uint16* renderIndices, int& vertexOffset, int renderIndexOffset, const Vec2& lineOrigin, const Vec2& lineEnd) +int UiImageComponent::ClipToLine(const LyShine::UiPrimitiveVertex* vertices, const uint16* indices, LyShine::UiPrimitiveVertex* renderVertices, uint16* renderIndices, int& vertexOffset, int renderIndexOffset, const Vec2& lineOrigin, const Vec2& lineEnd) { Vec2 lineVector = lineEnd - lineOrigin; - SVF_P2F_C4B_T2F_F4B lastVertex = vertices[indices[2]]; - SVF_P2F_C4B_T2F_F4B currentVertex; + LyShine::UiPrimitiveVertex lastVertex = vertices[indices[2]]; + LyShine::UiPrimitiveVertex currentVertex; int verticesAdded = 0; for (int i = 0; i < 3; ++i) @@ -2235,7 +2233,7 @@ int UiImageComponent::ClipToLine(const SVF_P2F_C4B_T2F_F4B* vertices, const uint { //add calculated intersection float intersectionDistance = (vertexToLine.x * perpendicularLineVector.x + vertexToLine.y * perpendicularLineVector.y) / (triangleEdgeDirection.x * perpendicularLineVector.x + triangleEdgeDirection.y * perpendicularLineVector.y); - SVF_P2F_C4B_T2F_F4B intersectPoint; + LyShine::UiPrimitiveVertex intersectPoint; SetVertex(intersectPoint, lastVertex.xy + triangleEdgeDirection * intersectionDistance, lastVertex.color.dcolor, lastVertex.st + (currentVertex.st - lastVertex.st) * intersectionDistance); @@ -2252,7 +2250,7 @@ int UiImageComponent::ClipToLine(const SVF_P2F_C4B_T2F_F4B* vertices, const uint { //add calculated intersection float intersectionDistance = (vertexToLine.x * perpendicularLineVector.x + vertexToLine.y * perpendicularLineVector.y) / (triangleEdgeDirection.x * perpendicularLineVector.x + triangleEdgeDirection.y * perpendicularLineVector.y); - SVF_P2F_C4B_T2F_F4B intersectPoint; + LyShine::UiPrimitiveVertex intersectPoint; SetVertex(intersectPoint, lastVertex.xy + triangleEdgeDirection * intersectionDistance, lastVertex.color.dcolor, lastVertex.st + (currentVertex.st - lastVertex.st) * intersectionDistance); @@ -2288,12 +2286,12 @@ int UiImageComponent::ClipToLine(const SVF_P2F_C4B_T2F_F4B* vertices, const uint } //////////////////////////////////////////////////////////////////////////////////////////////////// -void UiImageComponent::RenderTriangleList(const SVF_P2F_C4B_T2F_F4B* vertices, const uint16* indices, int numVertices, int numIndices) +void UiImageComponent::RenderTriangleList(const LyShine::UiPrimitiveVertex* vertices, const uint16* indices, int numVertices, int numIndices) { if (numVertices != m_cachedPrimitive.m_numVertices) { ClearCachedVertices(); - m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numVertices]; + m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numVertices]; m_cachedPrimitive.m_numVertices = numVertices; } @@ -2304,7 +2302,7 @@ void UiImageComponent::RenderTriangleList(const SVF_P2F_C4B_T2F_F4B* vertices, c m_cachedPrimitive.m_numIndices = numIndices; } - memcpy(m_cachedPrimitive.m_vertices, vertices, sizeof(SVF_P2F_C4B_T2F_F4B) * numVertices); + memcpy(m_cachedPrimitive.m_vertices, vertices, sizeof(LyShine::UiPrimitiveVertex) * numVertices); memcpy(m_cachedPrimitive.m_indices, indices, sizeof(uint16) * numIndices); m_isRenderCacheDirty = false; diff --git a/Gems/LyShine/Code/Source/UiImageComponent.h b/Gems/LyShine/Code/Source/UiImageComponent.h index 0b93d5f8e5..bac8d8e455 100644 --- a/Gems/LyShine/Code/Source/UiImageComponent.h +++ b/Gems/LyShine/Code/Source/UiImageComponent.h @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -26,8 +27,6 @@ #include -#include - class ITexture; class ISprite; @@ -200,12 +199,12 @@ private: // member functions template void RenderSlicedRadialCornerOrEdgeFilledSprite(uint32 packedColor, const AZ::Matrix4x4& transform, float* xValues, float* yValues, float* sValues, float* tValues); void ClipValuesForSlicedLinearFill(uint32 numValues, float* xValues, float* yValues, float* sValues, float* tValues); - void ClipAndRenderForSlicedRadialFill(uint32 numVertsPerside, uint32 numVerts, const SVF_P2F_C4B_T2F_F4B* verts, uint32 totalIndices, const uint16* indices); - void ClipAndRenderForSlicedRadialCornerOrEdgeFill(uint32 numVertsPerside, uint32 numVerts, const SVF_P2F_C4B_T2F_F4B* verts, uint32 totalIndices, const uint16* indices); + void ClipAndRenderForSlicedRadialFill(uint32 numVertsPerside, uint32 numVerts, const LyShine::UiPrimitiveVertex* verts, uint32 totalIndices, const uint16* indices); + void ClipAndRenderForSlicedRadialCornerOrEdgeFill(uint32 numVertsPerside, uint32 numVerts, const LyShine::UiPrimitiveVertex* verts, uint32 totalIndices, const uint16* indices); - int ClipToLine(const SVF_P2F_C4B_T2F_F4B* vertices, const uint16* indices, SVF_P2F_C4B_T2F_F4B* newVertex, uint16* renderIndices, int& vertexOffset, int idxOffset, const Vec2& lineOrigin, const Vec2& lineEnd); + int ClipToLine(const LyShine::UiPrimitiveVertex* vertices, const uint16* indices, LyShine::UiPrimitiveVertex* newVertex, uint16* renderIndices, int& vertexOffset, int idxOffset, const Vec2& lineOrigin, const Vec2& lineEnd); - void RenderTriangleList(const SVF_P2F_C4B_T2F_F4B* vertices, const uint16* indices, int numVertices, int numIndices); + void RenderTriangleList(const LyShine::UiPrimitiveVertex* vertices, const uint16* indices, int numVertices, int numIndices); void ClearCachedVertices(); void ClearCachedIndices(); void MarkRenderCacheDirty(); @@ -294,6 +293,6 @@ private: // data bool m_isAlphaOverridden; // cached rendering data for performance optimization - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; bool m_isRenderCacheDirty = true; }; diff --git a/Gems/LyShine/Code/Source/UiImageSequenceComponent.cpp b/Gems/LyShine/Code/Source/UiImageSequenceComponent.cpp index d954cf2747..554a0383c1 100644 --- a/Gems/LyShine/Code/Source/UiImageSequenceComponent.cpp +++ b/Gems/LyShine/Code/Source/UiImageSequenceComponent.cpp @@ -26,7 +26,7 @@ namespace { //! Set the values for an image vertex //! This helper function is used so that we only have to initialize textIndex and texHasColorChannel in one place - void SetVertex(SVF_P2F_C4B_T2F_F4B& vert, const Vec2& pos, uint32 color, const Vec2& uv) + void SetVertex(LyShine::UiPrimitiveVertex& vert, const Vec2& pos, uint32 color, const Vec2& uv) { vert.xy = pos; vert.color.dcolor = color; @@ -39,7 +39,7 @@ namespace //! Set the values for an image vertex //! This version of the helper function takes AZ vectors - void SetVertex(SVF_P2F_C4B_T2F_F4B& vert, const AZ::Vector2& pos, uint32 color, const AZ::Vector2& uv) + void SetVertex(LyShine::UiPrimitiveVertex& vert, const AZ::Vector2& pos, uint32 color, const AZ::Vector2& uv) { SetVertex(vert, Vec2(pos.GetX(), pos.GetY()), color, Vec2(uv.GetX(), uv.GetY())); } @@ -146,7 +146,7 @@ void UiImageSequenceComponent::Render(LyShine::IRenderGraph* renderGraph) if (m_cachedPrimitive.m_vertices[0].color.a != desiredPackedAlpha) { // go through all the cached vertices and update the alpha values - UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; + LyShine::UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; desiredPackedColor.a = desiredPackedAlpha; for (int i = 0; i < m_cachedPrimitive.m_numVertices; ++i) { @@ -540,7 +540,7 @@ void UiImageSequenceComponent::RenderSingleQuad(const AZ::Vector2* positions, co // points are a clockwise quad IDraw2d::Rounding pixelRounding = IsPixelAligned() ? IDraw2d::Rounding::Nearest : IDraw2d::Rounding::None; const uint32 numVertices = 4; - SVF_P2F_C4B_T2F_F4B vertices[numVertices]; + LyShine::UiPrimitiveVertex vertices[numVertices]; for (int i = 0; i < numVertices; ++i) { AZ::Vector2 roundedPoint = Draw2dHelper::RoundXY(positions[i], pixelRounding); @@ -554,12 +554,12 @@ void UiImageSequenceComponent::RenderSingleQuad(const AZ::Vector2* positions, co } //////////////////////////////////////////////////////////////////////////////////////////////////// -void UiImageSequenceComponent::RenderTriangleList(const SVF_P2F_C4B_T2F_F4B* vertices, const uint16* indices, int numVertices, int numIndices) +void UiImageSequenceComponent::RenderTriangleList(const LyShine::UiPrimitiveVertex* vertices, const uint16* indices, int numVertices, int numIndices) { if (numVertices != m_cachedPrimitive.m_numVertices) { ClearCachedVertices(); - m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numVertices]; + m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numVertices]; m_cachedPrimitive.m_numVertices = numVertices; } @@ -570,7 +570,7 @@ void UiImageSequenceComponent::RenderTriangleList(const SVF_P2F_C4B_T2F_F4B* ver m_cachedPrimitive.m_numIndices = numIndices; } - memcpy(m_cachedPrimitive.m_vertices, vertices, sizeof(SVF_P2F_C4B_T2F_F4B) * numVertices); + memcpy(m_cachedPrimitive.m_vertices, vertices, sizeof(LyShine::UiPrimitiveVertex) * numVertices); memcpy(m_cachedPrimitive.m_indices, indices, sizeof(uint16) * numIndices); m_isRenderCacheDirty = false; diff --git a/Gems/LyShine/Code/Source/UiImageSequenceComponent.h b/Gems/LyShine/Code/Source/UiImageSequenceComponent.h index 84be0021f4..063bd836ff 100644 --- a/Gems/LyShine/Code/Source/UiImageSequenceComponent.h +++ b/Gems/LyShine/Code/Source/UiImageSequenceComponent.h @@ -17,12 +17,12 @@ #include #include #include +#include #include #include #include -#include //! \brief Image component capable of indexing and displaying from multiple image files in a directory. //! @@ -137,7 +137,7 @@ private: // member functions void RenderStretchedToFitOrFillSprite(ISprite* sprite, int cellIndex, uint32 packedColor, bool toFit); void RenderSingleQuad(const AZ::Vector2* positions, const AZ::Vector2* uvs, uint32 packedColor); bool IsPixelAligned(); - void RenderTriangleList(const SVF_P2F_C4B_T2F_F4B* vertices, const uint16* indices, int numVertices, int numIndices); + void RenderTriangleList(const LyShine::UiPrimitiveVertex* vertices, const uint16* indices, int numVertices, int numIndices); void ClearCachedVertices(); void ClearCachedIndices(); void MarkRenderCacheDirty(); @@ -157,6 +157,6 @@ private: // data ImageType m_imageType = ImageType::Fixed; //!< Affects how the texture/sprite is mapped to the image rectangle // cached rendering data for performance optimization - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; bool m_isRenderCacheDirty = true; }; diff --git a/Gems/LyShine/Code/Source/UiInteractableState.cpp b/Gems/LyShine/Code/Source/UiInteractableState.cpp index 6027ecf3d7..d2c09201c6 100644 --- a/Gems/LyShine/Code/Source/UiInteractableState.cpp +++ b/Gems/LyShine/Code/Source/UiInteractableState.cpp @@ -21,9 +21,8 @@ #include #include #include -#include +#include -#include #include "EditorPropertyTypes.h" #include "Sprite.h" diff --git a/Gems/LyShine/Code/Source/UiMaskComponent.cpp b/Gems/LyShine/Code/Source/UiMaskComponent.cpp index b6ffc2ae89..ebe611d547 100644 --- a/Gems/LyShine/Code/Source/UiMaskComponent.cpp +++ b/Gems/LyShine/Code/Source/UiMaskComponent.cpp @@ -13,7 +13,6 @@ #include #include -#include "IRenderer.h" #include "RenderToTextureBus.h" #include "RenderGraph.h" #include @@ -624,7 +623,7 @@ void UiMaskComponent::UpdateCachedPrimitive(const AZ::Vector2& pixelAlignedTopLe { // verts not yet allocated, allocate them now const int numIndices = 6; - m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numVertices]; + m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numVertices]; m_cachedPrimitive.m_numVertices = numVertices; static uint16 indices[numIndices] = { 0, 1, 2, 2, 3, 0 }; @@ -761,7 +760,7 @@ void UiMaskComponent::RenderUsingGradientMask(LyShine::IRenderGraph* renderGraph if (m_cachedPrimitive.m_vertices[0].color.a != desiredPackedAlpha) { // go through all the cached vertices and update the alpha values - UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; + LyShine::UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; desiredPackedColor.a = static_cast(desiredPackedAlpha); for (int i = 0; i < m_cachedPrimitive.m_numVertices; ++i) { diff --git a/Gems/LyShine/Code/Source/UiMaskComponent.h b/Gems/LyShine/Code/Source/UiMaskComponent.h index 8e04fa0b4f..33f7f93124 100644 --- a/Gems/LyShine/Code/Source/UiMaskComponent.h +++ b/Gems/LyShine/Code/Source/UiMaskComponent.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -187,10 +188,6 @@ private: // data //! When rendering to a texture this is the attachment image for the render target AZ::RHI::AttachmentId m_contentAttachmentImageId; - - //! When rendering to a texture this is our depth surface, we use the same one for rendering the mask elements - //! and the content elements - it is cleared in between. - SDepthTexture* m_renderTargetDepthSurface = nullptr; //! When rendering to a texture this is the texture ID of the render target //! When rendering to a texture this is the attachment image for the render target @@ -205,7 +202,7 @@ private: // data int m_renderTargetHeight = 0; //! cached rendering data for performance optimization of rendering the render target to screen - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; #ifndef _RELEASE //! This variable is only used to prevent spamming a warning message each frame (for nested stencil masks) diff --git a/Gems/LyShine/Code/Source/UiNavigationHelpers.h b/Gems/LyShine/Code/Source/UiNavigationHelpers.h index 5b655b531f..98191b3da4 100644 --- a/Gems/LyShine/Code/Source/UiNavigationHelpers.h +++ b/Gems/LyShine/Code/Source/UiNavigationHelpers.h @@ -9,7 +9,7 @@ #include #include -#include +#include namespace AzFramework { diff --git a/Gems/LyShine/Code/Source/UiNavigationSettings.h b/Gems/LyShine/Code/Source/UiNavigationSettings.h index 829ff8d817..09a327f9c2 100644 --- a/Gems/LyShine/Code/Source/UiNavigationSettings.h +++ b/Gems/LyShine/Code/Source/UiNavigationSettings.h @@ -8,7 +8,7 @@ #pragma once #include -#include +#include /////////////////////////////////////////////////////////////////////////////////////////////////// class UiNavigationSettings diff --git a/Gems/LyShine/Code/Source/UiParticleEmitterComponent.cpp b/Gems/LyShine/Code/Source/UiParticleEmitterComponent.cpp index 25498fc316..e55b310e4a 100644 --- a/Gems/LyShine/Code/Source/UiParticleEmitterComponent.cpp +++ b/Gems/LyShine/Code/Source/UiParticleEmitterComponent.cpp @@ -833,7 +833,7 @@ void UiParticleEmitterComponent::Render(LyShine::IRenderGraph* renderGraph) // particlesToRender is the max particles we will render, we could render less if some have zero alpha for (AZ::u32 i = 0; i < particlesToRender; ++i) { - SVF_P2F_C4B_T2F_F4B* firstVertexOfParticle = &m_cachedPrimitive.m_vertices[totalVerticesInserted]; + LyShine::UiPrimitiveVertex* firstVertexOfParticle = &m_cachedPrimitive.m_vertices[totalVerticesInserted]; if (m_particleContainer[i].FillVertices(firstVertexOfParticle, renderParameters, transform)) { @@ -1845,7 +1845,7 @@ void UiParticleEmitterComponent::ResetParticleBuffers() { delete [] m_cachedPrimitive.m_vertices; } - m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numVertices]; + m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numVertices]; m_particleContainer.clear(); m_particleContainer.reserve(m_particleBufferSize); diff --git a/Gems/LyShine/Code/Source/UiParticleEmitterComponent.h b/Gems/LyShine/Code/Source/UiParticleEmitterComponent.h index 452e0ad01a..51db5cebef 100644 --- a/Gems/LyShine/Code/Source/UiParticleEmitterComponent.h +++ b/Gems/LyShine/Code/Source/UiParticleEmitterComponent.h @@ -25,8 +25,6 @@ #include -#include - //////////////////////////////////////////////////////////////////////////////////////////////////// class UiParticleEmitterComponent : public AZ::Component @@ -349,5 +347,5 @@ protected: // data AZStd::vector m_particleContainer; AZ::u32 m_particleBufferSize = 0; - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; }; diff --git a/Gems/LyShine/Code/Source/UiTextComponent.cpp b/Gems/LyShine/Code/Source/UiTextComponent.cpp index ec17e93529..825f3869fd 100644 --- a/Gems/LyShine/Code/Source/UiTextComponent.cpp +++ b/Gems/LyShine/Code/Source/UiTextComponent.cpp @@ -1053,6 +1053,23 @@ namespace return maxLinesElementCanHold; } + //! Converts the vertex format used by FFont to the format being used by the dynamic draw context in LyShine. + //! + //! Note that the formats are currently identical, but this may change with the removal of more legacy code + void FontVertexToUiVertex(const SVF_P2F_C4B_T2F_F4B* fontVertices, LyShine::UiPrimitiveVertex* uiVertices, int numVertices) + { + for (int i = 0; i < numVertices; ++i) + { + uiVertices[i].xy = fontVertices[i].xy; + uiVertices[i].color.dcolor = fontVertices[i].color.dcolor; + uiVertices[i].st = fontVertices[i].st; + uiVertices[i].texIndex = fontVertices[i].texIndex; + uiVertices[i].texHasColorChannel = fontVertices[i].texHasColorChannel; + uiVertices[i].texIndex2 = fontVertices[i].texIndex2; + uiVertices[i].pad = fontVertices[i].pad; + } + } + } // anonymous namespace //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1823,7 +1840,7 @@ void UiTextComponent::Render(LyShine::IRenderGraph* renderGraph) for (UiTransformInterface::RectPoints& rect : rectPoints) { - DynUiPrimitive* primitive = renderGraph->GetDynamicQuadPrimitive(rect.pt, packedColor); + LyShine::UiPrimitive* primitive = renderGraph->GetDynamicQuadPrimitive(rect.pt, packedColor); primitive->m_next = nullptr; LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 @@ -4078,16 +4095,19 @@ void UiTextComponent::RenderDrawBatchLines( cacheBatch->m_font = drawBatch.font; cacheBatch->m_color = batchColor; - cacheBatch->m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numQuads * 4]; + cacheBatch->m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numQuads * 4]; cacheBatch->m_cachedPrimitive.m_indices = new uint16[numQuads * 6]; + AZStd::vector vertices(numQuads * 4); uint32 numQuadsWritten = cacheBatch->m_font->WriteTextQuadsToBuffers( - cacheBatch->m_cachedPrimitive.m_vertices, cacheBatch->m_cachedPrimitive.m_indices, numQuads, + vertices.data(), cacheBatch->m_cachedPrimitive.m_indices, numQuads, cacheBatch->m_position.GetX(), cacheBatch->m_position.GetY(), 1.0f, cacheBatch->m_text.c_str(), true, fontContext); AZ_Assert(numQuadsWritten <= numQuads, "value returned from WriteTextQuadsToBuffers is larger than size allocated"); - cacheBatch->m_cachedPrimitive.m_numVertices = numQuadsWritten * 4; + int numVertices = numQuadsWritten * 4; + FontVertexToUiVertex(vertices.data(), cacheBatch->m_cachedPrimitive.m_vertices, numVertices); + cacheBatch->m_cachedPrimitive.m_numVertices = numVertices; cacheBatch->m_cachedPrimitive.m_numIndices = numQuadsWritten * 6; cacheBatch->m_fontTextureVersion = drawBatch.font->GetFontTextureVersion(); @@ -4148,7 +4168,7 @@ void UiTextComponent::RenderDrawBatchLines( cacheImageBatch->m_texture = drawBatch.image->m_texture; - cacheImageBatch->m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[4]; + cacheImageBatch->m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[4]; for (int i = 0; i < 4; ++i) { cacheImageBatch->m_cachedPrimitive.m_vertices[i].xy = Vec2(imageQuad[i].GetX(), imageQuad[i].GetY()); @@ -4197,15 +4217,19 @@ void UiTextComponent::UpdateTextRenderBatchesForFontTextureChange() delete [] cacheBatch->m_cachedPrimitive.m_vertices; delete [] cacheBatch->m_cachedPrimitive.m_indices; - cacheBatch->m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numQuads * 4]; + cacheBatch->m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numQuads * 4]; cacheBatch->m_cachedPrimitive.m_indices = new uint16[numQuads * 6]; } + AZStd::vector vertices(numQuads * 4); uint32 numQuadsWritten = cacheBatch->m_font->WriteTextQuadsToBuffers( - cacheBatch->m_cachedPrimitive.m_vertices, cacheBatch->m_cachedPrimitive.m_indices, numQuads, + vertices.data(), cacheBatch->m_cachedPrimitive.m_indices, numQuads, cacheBatch->m_position.GetX(), cacheBatch->m_position.GetY(), 1.0f, cacheBatch->m_text.c_str(), true, fontContext); - cacheBatch->m_cachedPrimitive.m_numVertices = numQuadsWritten * 4; + int numVertices = numQuadsWritten * 4; + FontVertexToUiVertex(vertices.data(), cacheBatch->m_cachedPrimitive.m_vertices, numVertices); + + cacheBatch->m_cachedPrimitive.m_numVertices = numVertices; cacheBatch->m_cachedPrimitive.m_numIndices = numQuadsWritten * 6; cacheBatch->m_fontTextureVersion = cacheBatch->m_font->GetFontTextureVersion(); diff --git a/Gems/LyShine/Code/Source/UiTextComponent.h b/Gems/LyShine/Code/Source/UiTextComponent.h index cc1f9bf393..6c75c13941 100644 --- a/Gems/LyShine/Code/Source/UiTextComponent.h +++ b/Gems/LyShine/Code/Source/UiTextComponent.h @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -31,7 +32,6 @@ #include #include -#include #include #include #include @@ -608,13 +608,13 @@ private: // types ColorB m_color; IFFont* m_font; uint32 m_fontTextureVersion; - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; }; struct RenderCacheImageBatch { AZ::Data::Instance m_texture; - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; }; struct RenderCacheData diff --git a/Gems/LyShine/Code/Source/UiTextInputComponent.cpp b/Gems/LyShine/Code/Source/UiTextInputComponent.cpp index 9a55a3feeb..0e65256b92 100644 --- a/Gems/LyShine/Code/Source/UiTextInputComponent.cpp +++ b/Gems/LyShine/Code/Source/UiTextInputComponent.cpp @@ -17,7 +17,6 @@ #include -#include #include #include #include diff --git a/Gems/LyShine/Code/Source/UiTransform2dComponent.cpp b/Gems/LyShine/Code/Source/UiTransform2dComponent.cpp index 40839fac66..d169e4ee68 100644 --- a/Gems/LyShine/Code/Source/UiTransform2dComponent.cpp +++ b/Gems/LyShine/Code/Source/UiTransform2dComponent.cpp @@ -12,8 +12,6 @@ #include #include -#include - #include #include #include diff --git a/Gems/LyShine/Code/Source/World/UiCanvasAssetRefComponent.cpp b/Gems/LyShine/Code/Source/World/UiCanvasAssetRefComponent.cpp index 59d764f297..933cca424a 100644 --- a/Gems/LyShine/Code/Source/World/UiCanvasAssetRefComponent.cpp +++ b/Gems/LyShine/Code/Source/World/UiCanvasAssetRefComponent.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include //////////////////////////////////////////////////////////////////////////////////////////////////// //! UiCanvasAssetRefNotificationBus Behavior context handler class diff --git a/Gems/LyShine/Code/lyshine_static_files.cmake b/Gems/LyShine/Code/lyshine_static_files.cmake index 0c934eb057..1adbe1b796 100644 --- a/Gems/LyShine/Code/lyshine_static_files.cmake +++ b/Gems/LyShine/Code/lyshine_static_files.cmake @@ -9,6 +9,85 @@ set(FILES Source/Draw2d.cpp Include/LyShine/Draw2d.h + Include/LyShine/IDraw2d.h + Include/LyShine/IRenderGraph.h + Include/LyShine/ISprite.h + Include/LyShine/ILyShine.h + Include/LyShine/UiBase.h + Include/LyShine/UiLayoutCellBase.h + Include/LyShine/UiSerializeHelpers.h + Include/LyShine/UiComponentTypes.h + Include/LyShine/UiEntityContext.h + Include/LyShine/UiEditorDLLBus.h + Include/LyShine/UiRenderFormats.h + Include/LyShine/Animation/IUiAnimation.h + Include/LyShine/Bus/UiAnimationBus.h + Include/LyShine/Bus/UiAnimateEntityBus.h + Include/LyShine/Bus/UiButtonBus.h + Include/LyShine/Bus/UiCanvasBus.h + Include/LyShine/Bus/UiCanvasManagerBus.h + Include/LyShine/Bus/UiCanvasUpdateNotificationBus.h + Include/LyShine/Bus/UiCheckboxBus.h + Include/LyShine/Bus/UiDraggableBus.h + Include/LyShine/Bus/UiDropdownBus.h + Include/LyShine/Bus/UiDropdownOptionBus.h + Include/LyShine/Bus/UiDropTargetBus.h + Include/LyShine/Bus/UiDynamicLayoutBus.h + Include/LyShine/Bus/UiDynamicScrollBoxBus.h + Include/LyShine/Bus/UiEditorBus.h + Include/LyShine/Bus/UiEditorCanvasBus.h + Include/LyShine/Bus/UiEditorChangeNotificationBus.h + Include/LyShine/Bus/UiElementBus.h + Include/LyShine/Bus/UiEntityContextBus.h + Include/LyShine/Bus/UiFaderBus.h + Include/LyShine/Bus/UiFlipbookAnimationBus.h + Include/LyShine/Bus/UiGameEntityContextBus.h + Include/LyShine/Bus/UiImageBus.h + Include/LyShine/Bus/UiImageSequenceBus.h + Include/LyShine/Bus/UiIndexableImageBus.h + Include/LyShine/Bus/UiInitializationBus.h + Include/LyShine/Bus/UiInteractableActionsBus.h + Include/LyShine/Bus/UiInteractableBus.h + Include/LyShine/Bus/UiInteractableStatesBus.h + Include/LyShine/Bus/UiInteractionMaskBus.h + Include/LyShine/Bus/UiLayoutBus.h + Include/LyShine/Bus/UiLayoutCellBus.h + Include/LyShine/Bus/UiLayoutCellDefaultBus.h + Include/LyShine/Bus/UiLayoutColumnBus.h + Include/LyShine/Bus/UiLayoutControllerBus.h + Include/LyShine/Bus/UiLayoutFitterBus.h + Include/LyShine/Bus/UiLayoutGridBus.h + Include/LyShine/Bus/UiLayoutManagerBus.h + Include/LyShine/Bus/UiLayoutRowBus.h + Include/LyShine/Bus/UiMarkupButtonBus.h + Include/LyShine/Bus/UiMaskBus.h + Include/LyShine/Bus/UiNavigationBus.h + Include/LyShine/Bus/UiParticleEmitterBus.h + Include/LyShine/Bus/UiRadioButtonBus.h + Include/LyShine/Bus/UiRadioButtonCommunicationBus.h + Include/LyShine/Bus/UiRadioButtonGroupBus.h + Include/LyShine/Bus/UiRadioButtonGroupCommunicationBus.h + Include/LyShine/Bus/UiRenderBus.h + Include/LyShine/Bus/UiRenderControlBus.h + Include/LyShine/Bus/UiScrollableBus.h + Include/LyShine/Bus/UiScrollBarBus.h + Include/LyShine/Bus/UiScrollBoxBus.h + Include/LyShine/Bus/UiScrollerBus.h + Include/LyShine/Bus/UiSliderBus.h + Include/LyShine/Bus/UiSpawnerBus.h + Include/LyShine/Bus/UiSystemBus.h + Include/LyShine/Bus/UiTextBus.h + Include/LyShine/Bus/UiTextInputBus.h + Include/LyShine/Bus/UiTooltipBus.h + Include/LyShine/Bus/UiTooltipDataPopulatorBus.h + Include/LyShine/Bus/UiTooltipDisplayBus.h + Include/LyShine/Bus/UiTransform2dBus.h + Include/LyShine/Bus/UiTransformBus.h + Include/LyShine/Bus/UiVisualBus.h + Include/LyShine/Bus/Sprite/UiSpriteBus.h + Include/LyShine/Bus/World/UiCanvasOnMeshBus.h + Include/LyShine/Bus/World/UiCanvasRefBus.h + Include/LyShine/Bus/Tools/UiSystemToolsBus.h Source/LyShine.cpp Source/LyShine.h Source/LyShinePassDataBus.h diff --git a/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.cpp b/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.cpp index d5320d182e..2c8cb3df49 100644 --- a/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.cpp +++ b/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.cpp @@ -14,8 +14,6 @@ #include #include -#include - #include #include #include @@ -371,7 +369,7 @@ namespace LyShineExamples delete [] m_cachedPrimitive.m_vertices; } - m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numVertices]; + m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numVertices]; m_cachedPrimitive.m_numVertices = numVertices; } diff --git a/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.h b/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.h index f696228f5a..774cdd1809 100644 --- a/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.h +++ b/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -136,7 +137,7 @@ namespace LyShineExamples float m_overrideAlpha; // cached rendering data for performance optimization - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; bool m_isRenderCacheDirty = true; }; } diff --git a/Gems/MessagePopup/Code/CMakeLists.txt b/Gems/MessagePopup/Code/CMakeLists.txt index 73cd7ce8d6..51ec1a3bd1 100644 --- a/Gems/MessagePopup/Code/CMakeLists.txt +++ b/Gems/MessagePopup/Code/CMakeLists.txt @@ -19,6 +19,7 @@ ly_add_target( BUILD_DEPENDENCIES PUBLIC Legacy::CryCommon + Gem::LyShine ) ly_add_target( diff --git a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.cpp b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.cpp index 8f11985cba..0657b2306e 100644 --- a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.cpp +++ b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.cpp @@ -14,11 +14,8 @@ #include #include #include -#include -#include #include -#include #include #include #include @@ -63,6 +60,12 @@ namespace Multiplayer void PythonEditorFuncs::Reflect(AZ::ReflectContext* context) { + if (AZ::SerializeContext* serialize = azrtti_cast(context)) + { + serialize->Class() + ->Version(0); + } + if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) { // This will create static python methods in the 'azlmbr.multiplayer' module @@ -133,6 +136,7 @@ namespace Multiplayer AzToolsFramework::EditorEvents::Bus::Handler::BusDisconnect(); AzFramework::GameEntityContextEventBus::Handler::BusDisconnect(); MultiplayerEditorServerRequestBus::Handler::BusDisconnect(); + AZ::TickBus::Handler::BusDisconnect(); } void MultiplayerEditorSystemComponent::NotifyRegisterViews() @@ -157,12 +161,20 @@ namespace Multiplayer [[fallthrough]]; case eNotify_OnEndGameMode: // Kill the configured server if it's active - if (m_serverProcess) + AZ::TickBus::Handler::BusDisconnect(); + if (m_serverProcessWatcher) { - m_serverProcess->TerminateProcess(0); - m_serverProcess = nullptr; + m_serverProcessWatcher->TerminateProcess(0); + if (m_serverProcessTracePrinter) + { + m_serverProcessTracePrinter->Pump(); + m_serverProcessTracePrinter->WriteCurrentString(true); + m_serverProcessTracePrinter->WriteCurrentString(false); + } + m_serverProcessWatcher = nullptr; + m_serverProcessTracePrinter = nullptr; } - + if (INetworkInterface* editorNetworkInterface = AZ::Interface::Get()->RetrieveNetworkInterface(AZ::Name(MpEditorInterfaceName))) { editorNetworkInterface->Disconnect(m_editorConnId, AzNetworking::DisconnectReason::TerminatedByClient); @@ -181,7 +193,7 @@ namespace Multiplayer } } - AzFramework::ProcessWatcher* LaunchEditorServer() + void MultiplayerEditorSystemComponent::LaunchEditorServer() { // Assemble the server's path AZ::CVarFixedString serverProcess = editorsv_process; @@ -207,12 +219,22 @@ namespace Multiplayer { server_rhi = static_cast(editorsv_rhi_override); } + + const auto console = AZ::Interface::Get(); + AZ::CVarFixedString sv_defaultPlayerSpawnAsset; + + if (console->GetCvarValue("sv_defaultPlayerSpawnAsset", sv_defaultPlayerSpawnAsset) != AZ::GetValueResult::Success) + { + AZ_Assert( false, + "MultiplayerEditorSystemComponent::LaunchEditorServer failed! Could not find the sv_defaultPlayerSpawnAsset cvar; the editor-server " + "will fall back to using some other default player! Please update this code to use a valid cvar!") + } processLaunchInfo.m_commandlineParameters = AZStd::string::format( R"("%s" --project-path "%s" --editorsv_isDedicated true --sv_defaultPlayerSpawnAsset "%s" --rhi "%s")", serverPath.c_str(), AZ::Utils::GetProjectPath().c_str(), - static_cast(sv_defaultPlayerSpawnAsset).c_str(), + sv_defaultPlayerSpawnAsset.c_str(), server_rhi.GetCStr() ); processLaunchInfo.m_showWindow = true; @@ -220,13 +242,21 @@ namespace Multiplayer // Launch the Server AzFramework::ProcessWatcher* outProcess = AzFramework::ProcessWatcher::LaunchProcess( - processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_NONE); + processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_STDINOUT); AZ_Error( "MultiplayerEditor", processLaunchInfo.m_launchResult != AzFramework::ProcessLauncher::ProcessLaunchResult::PLR_MissingFile, "LaunchEditorServer failed! The ServerLauncher binary is missing! (%s) Please build server launcher.", serverPath.c_str()) - return outProcess; + // Stop the previous server if one exists + if (m_serverProcessWatcher) + { + AZ::TickBus::Handler::BusDisconnect(); + m_serverProcessWatcher->TerminateProcess(0); + } + m_serverProcessWatcher.reset(outProcess); + m_serverProcessTracePrinter = AZStd::make_unique(m_serverProcessWatcher->GetCommunicator(), "EditorServer"); + AZ::TickBus::Handler::BusConnect(); } void MultiplayerEditorSystemComponent::OnGameEntitiesStarted() @@ -286,7 +316,7 @@ namespace Multiplayer editorNetworkInterface->Listen(editorsv_port); // Launch the editor-server - m_serverProcess = LaunchEditorServer(); + LaunchEditorServer(); } else { @@ -393,4 +423,20 @@ namespace Multiplayer { return PyIsInGameMode(); } + + void MultiplayerEditorSystemComponent::OnTick(float, AZ::ScriptTimePoint) + { + if (m_serverProcessTracePrinter) + { + m_serverProcessTracePrinter->Pump(); + } + else + { + AZ::TickBus::Handler::BusDisconnect(); + AZ_Warning( + "MultiplayerEditorSystemComponent", false, + "The server process trace printer is NULL so we won't be able to pipe server logs to the editor. Please update the code to call AZ::TickBus::Handler::BusDisconnect whenever the editor-server is terminated.") + } + } + } diff --git a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.h b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.h index 77b41a5dc4..5e49f8f08d 100644 --- a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.h +++ b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.h @@ -13,14 +13,12 @@ #include #include -#include - #include #include #include -#include #include #include +#include #include namespace AzNetworking @@ -52,6 +50,7 @@ namespace Multiplayer , private AzToolsFramework::EditorEvents::Bus::Handler , private IEditorNotifyListener , private MultiplayerEditorServerRequestBus::Handler + , private AZ::TickBus::Handler { public: AZ_COMPONENT(MultiplayerEditorSystemComponent, "{9F335CC0-5574-4AD3-A2D8-2FAEF356946C}"); @@ -84,7 +83,9 @@ namespace Multiplayer bool IsInGameMode() override; //! @} - private: + private: + void LaunchEditorServer(); + //! EditorEvents::Handler overrides //! @{ void OnEditorNotifyEvent(EEditorNotifyEvent event) override; @@ -101,8 +102,14 @@ namespace Multiplayer void SendEditorServerLevelDataPacket(AzNetworking::IConnection* connection) override; //! @} + //! AZ::TickBus::Handler + //! @{ + void OnTick(float, AZ::ScriptTimePoint) override; + //! @} + IEditor* m_editor = nullptr; - AzFramework::ProcessWatcher* m_serverProcess = nullptr; + AZStd::unique_ptr m_serverProcessWatcher = nullptr; + AZStd::unique_ptr m_serverProcessTracePrinter = nullptr; AzNetworking::ConnectionId m_editorConnId; ServerAcceptanceReceivedEvent::Handler m_serverAcceptanceReceivedHandler; diff --git a/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.h b/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.h index d839407fb0..dd2e7956ca 100644 --- a/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.h +++ b/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.h @@ -37,8 +37,6 @@ namespace AzNetworking namespace Multiplayer { - AZ_CVAR_EXTERNED(AZ::CVarFixedString, sv_defaultPlayerSpawnAsset); - //! Multiplayer system component wraps the bridging logic between the game and transport layer. class MultiplayerSystemComponent final : public AZ::Component diff --git a/Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.cpp b/Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.cpp index 058517d5dc..c1e4d22b50 100644 --- a/Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.cpp +++ b/Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.cpp @@ -17,6 +17,12 @@ namespace Multiplayer void MultiplayerToolsSystemComponent::Reflect(AZ::ReflectContext* context) { + if (AZ::SerializeContext* serialize = azrtti_cast(context)) + { + serialize->Class() + ->Version(0); + } + NetworkPrefabProcessor::Reflect(context); } diff --git a/Gems/Multiplayer/Code/Tests/CommonBenchmarkSetup.h b/Gems/Multiplayer/Code/Tests/CommonBenchmarkSetup.h index c352dc2bbf..380a344f6d 100644 --- a/Gems/Multiplayer/Code/Tests/CommonBenchmarkSetup.h +++ b/Gems/Multiplayer/Code/Tests/CommonBenchmarkSetup.h @@ -198,7 +198,7 @@ namespace Multiplayer } }; - class BenchmarkNetworkEntityManager : public MockNetworkEntityManager + class BenchmarkNetworkEntityManager : public Multiplayer::INetworkEntityManager { public: BenchmarkNetworkEntityManager() : m_authorityTracker(*this) {} @@ -235,6 +235,54 @@ namespace Multiplayer return InvalidNetEntityId; } + void Initialize([[maybe_unused]] const HostId& hostId, [[maybe_unused]] AZStd::unique_ptr entityDomain) override {} + bool IsInitialized() const override { return false; } + IEntityDomain* GetEntityDomain() const override { return nullptr; } + EntityList CreateEntitiesImmediate( + [[maybe_unused]] const PrefabEntityId& prefabEntryId, + [[maybe_unused]] NetEntityRole netEntityRole, + [[maybe_unused]] const AZ::Transform& transform, + [[maybe_unused]] AutoActivate autoActivate) override { + return {}; + } + EntityList CreateEntitiesImmediate( + [[maybe_unused]] const PrefabEntityId& prefabEntryId, + [[maybe_unused]] NetEntityId netEntityId, + [[maybe_unused]] NetEntityRole netEntityRole, + [[maybe_unused]] AutoActivate autoActivate, + [[maybe_unused]] const AZ::Transform& transform) override { + return {}; + } + [[nodiscard]] AZStd::unique_ptr RequestNetSpawnableInstantiation( + [[maybe_unused]] const AZ::Data::Asset& netSpawnable, + [[maybe_unused]] const AZ::Transform& transform) override { + return {}; + } + void SetupNetEntity([[maybe_unused]] AZ::Entity* netEntity, [[maybe_unused]] PrefabEntityId prefabEntityId, [[maybe_unused]] NetEntityRole netEntityRole) override {} + uint32_t GetEntityCount() const override { + return 0; + } + void MarkForRemoval([[maybe_unused]] const ConstNetworkEntityHandle& entityHandle) override {} + bool IsMarkedForRemoval([[maybe_unused]] const ConstNetworkEntityHandle& entityHandle) const override { + return false; + } + void ClearEntityFromRemovalList([[maybe_unused]] const ConstNetworkEntityHandle& entityHandle) override {} + void ClearAllEntities() override {} + void AddEntityMarkedDirtyHandler([[maybe_unused]] AZ::Event<>::Handler& entityMarkedDirtyHandle) override {} + void AddEntityNotifyChangesHandler([[maybe_unused]] AZ::Event<>::Handler& entityNotifyChangesHandle) override {} + void AddEntityExitDomainHandler([[maybe_unused]] EntityExitDomainEvent::Handler& entityExitDomainHandler) override {} + void AddControllersActivatedHandler([[maybe_unused]] ControllersActivatedEvent::Handler& controllersActivatedHandler) override {} + void AddControllersDeactivatedHandler([[maybe_unused]] ControllersDeactivatedEvent::Handler& controllersDeactivatedHandler) override {} + void NotifyEntitiesDirtied() override {} + void NotifyEntitiesChanged() override {} + void NotifyControllersActivated([[maybe_unused]] const ConstNetworkEntityHandle& entityHandle, [[maybe_unused]] EntityIsMigrating entityIsMigrating) override {} + void NotifyControllersDeactivated([[maybe_unused]] const ConstNetworkEntityHandle& entityHandle, [[maybe_unused]] EntityIsMigrating entityIsMigrating) override {} + void HandleLocalRpcMessage([[maybe_unused]] NetworkEntityRpcMessage& message) override {} + void HandleEntitiesExitDomain([[maybe_unused]] const NetEntityIdSet& entitiesNotInDomain) override {} + void ForceAssumeAuthority([[maybe_unused]] const ConstNetworkEntityHandle& entityHandle) override {} + void SetMigrateTimeoutTimeMs([[maybe_unused]] AZ::TimeMs timeoutTimeMs) override {} + void DebugDraw() const override {} + NetworkEntityTracker m_tracker; NetworkEntityAuthorityTracker m_authorityTracker; MultiplayerComponentRegistry m_multiplayerComponentRegistry; diff --git a/Gems/Multiplayer/Code/Tests/MockInterfaces.h b/Gems/Multiplayer/Code/Tests/MockInterfaces.h index 1060006169..b9d8edbea5 100644 --- a/Gems/Multiplayer/Code/Tests/MockInterfaces.h +++ b/Gems/Multiplayer/Code/Tests/MockInterfaces.h @@ -144,7 +144,6 @@ namespace UnitTest MOCK_METHOD0(GetJsonRegistrationContext, AZ::JsonRegistrationContext* ()); MOCK_CONST_METHOD0(GetEngineRoot, const char* ()); MOCK_CONST_METHOD0(GetExecutableFolder, const char* ()); - MOCK_METHOD0(GetDrillerManager, AZ::Debug::DrillerManager* ()); MOCK_METHOD1(ResolveModulePath, void(AZ::OSString&)); MOCK_METHOD0(GetAzCommandLine, AZ::CommandLine* ()); MOCK_CONST_METHOD1(QueryApplicationType, void(AZ::ApplicationTypeQuery&)); diff --git a/Gems/PhysX/Code/Editor/DebugDraw.cpp b/Gems/PhysX/Code/Editor/DebugDraw.cpp index 90a1eb6004..a54230ec38 100644 --- a/Gems/PhysX/Code/Editor/DebugDraw.cpp +++ b/Gems/PhysX/Code/Editor/DebugDraw.cpp @@ -687,6 +687,53 @@ namespace PhysX [[maybe_unused]] const AZ::Vector3& colliderScale, [[maybe_unused]] const bool forceUniformScaling) const { + const int numColumns = heightfieldShapeConfig.GetNumColumns(); + const int numRows = heightfieldShapeConfig.GetNumRows(); + + const float minXBounds = -(numColumns * heightfieldShapeConfig.GetGridResolution().GetX()) / 2.0f; + const float minYBounds = -(numRows * heightfieldShapeConfig.GetGridResolution().GetY()) / 2.0f; + + auto heights = heightfieldShapeConfig.GetSamples(); + + for (int xIndex = 0; xIndex < numColumns - 1; xIndex++) + { + for (int yIndex = 0; yIndex < numRows - 1; yIndex++) + { + const int index0 = yIndex * numColumns + xIndex; + const int index1 = yIndex * numColumns + xIndex + 1; + const int index2 = (yIndex + 1) * numColumns + xIndex; + const int index3 = (yIndex + 1) * numColumns + xIndex + 1; + + const float x0 = minXBounds + heightfieldShapeConfig.GetGridResolution().GetX() * xIndex; + const float x1 = minXBounds + heightfieldShapeConfig.GetGridResolution().GetX() * (xIndex + 1); + const float y0 = minYBounds + heightfieldShapeConfig.GetGridResolution().GetY() * yIndex; + const float y1 = minYBounds + heightfieldShapeConfig.GetGridResolution().GetY() * (yIndex + 1); + + // Always draw top and left line of quad + debugDisplay.DrawLine( + AZ::Vector3(x0, y0, heights[index0].m_height), + AZ::Vector3(x1, y0, heights[index1].m_height)); + debugDisplay.DrawLine( + AZ::Vector3(x0, y0, heights[index0].m_height), + AZ::Vector3(x0, y1, heights[index2].m_height)); + + // Draw bottom line in last row + if (yIndex == numRows - 2) + { + debugDisplay.DrawLine( + AZ::Vector3(x1, y1, heights[index3].m_height), + AZ::Vector3(x0, y1, heights[index2].m_height)); + } + + // Draw right line in last column + if (xIndex == numColumns - 2) + { + debugDisplay.DrawLine( + AZ::Vector3(x1, y0, heights[index1].m_height), + AZ::Vector3(x1, y1, heights[index3].m_height)); + } + } + } } AZ::Transform Collider::GetColliderLocalTransform( diff --git a/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsSubComponentModeAngleCone.cpp b/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsSubComponentModeAngleCone.cpp index 11abe0fa2a..b229c9d020 100644 --- a/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsSubComponentModeAngleCone.cpp +++ b/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsSubComponentModeAngleCone.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -34,22 +35,22 @@ namespace PhysX const float XRotationManipulatorWidth = 0.05f; } // namespace Internal - JointsSubComponentModeAngleCone::JointsSubComponentModeAngleCone( - const AZStd::string& propertyName, float max, float min) + JointsSubComponentModeAngleCone::JointsSubComponentModeAngleCone(const AZStd::string& propertyName, float max, float min) : m_propertyName(propertyName) , m_max(max) , m_min(min) { - } void JointsSubComponentModeAngleCone::Setup(const AZ::EntityComponentIdPair& idPair) { m_entityComponentIdPair = idPair; EditorJointRequestBus::EventResult( - m_resetPostion, m_entityComponentIdPair, &PhysX::EditorJointRequests::GetVector3Value, JointsComponentModeCommon::ParamaterNames::Position); + m_resetPostion, m_entityComponentIdPair, &PhysX::EditorJointRequests::GetVector3Value, + JointsComponentModeCommon::ParamaterNames::Position); EditorJointRequestBus::EventResult( - m_resetRotation, m_entityComponentIdPair, &PhysX::EditorJointRequests::GetVector3Value, JointsComponentModeCommon::ParamaterNames::Rotation); + m_resetRotation, m_entityComponentIdPair, &PhysX::EditorJointRequests::GetVector3Value, + JointsComponentModeCommon::ParamaterNames::Rotation); EditorJointRequestBus::EventResult( m_resetLimits, m_entityComponentIdPair, &EditorJointRequests::GetLinearValuePair, m_propertyName); @@ -57,7 +58,8 @@ namespace PhysX AZ::Transform localTransform = AZ::Transform::CreateIdentity(); EditorJointRequestBus::EventResult( - localTransform, m_entityComponentIdPair, &EditorJointRequests::GetTransformValue, JointsComponentModeCommon::ParamaterNames::Transform); + localTransform, m_entityComponentIdPair, &EditorJointRequests::GetTransformValue, + JointsComponentModeCommon::ParamaterNames::Transform); const AZ::Quaternion localRotation = localTransform.GetRotation(); // Initialize manipulators used to resize the base of the cone. @@ -105,10 +107,10 @@ namespace PhysX { AngleLimitsFloatPair m_startValues; }; - auto sharedState = AZStd::make_shared(); + auto sharedState = AZStd::make_shared(); m_yLinearManipulator->InstallLeftMouseDownCallback( - [this, sharedState](const AzToolsFramework::LinearManipulator::Action& /*action*/) mutable + [this, sharedState](const AzToolsFramework::LinearManipulator::Action& /*action*/) { AngleLimitsFloatPair currentValue; EditorJointRequestBus::EventResult( @@ -137,7 +139,7 @@ namespace PhysX }); m_zLinearManipulator->InstallLeftMouseDownCallback( - [this, sharedState](const AzToolsFramework::LinearManipulator::Action& /*action*/) mutable + [this, sharedState](const AzToolsFramework::LinearManipulator::Action& /*action*/) { AngleLimitsFloatPair currentValue; EditorJointRequestBus::EventResult( @@ -166,7 +168,7 @@ namespace PhysX }); m_yzPlanarManipulator->InstallLeftMouseDownCallback( - [this, sharedState]([[maybe_unused]]const AzToolsFramework::PlanarManipulator::Action& action) mutable + [this, sharedState]([[maybe_unused]] const AzToolsFramework::PlanarManipulator::Action& action) { AngleLimitsFloatPair currentValue; EditorJointRequestBus::EventResult( @@ -207,9 +209,8 @@ namespace PhysX { AZ::Transform m_startTM; }; - auto sharedStateXRotate = AZStd::make_shared(); - auto mouseDownCallback = [this, sharedRotationState](const AzToolsFramework::AngularManipulator::Action& action) mutable -> void + auto mouseDownCallback = [this, sharedRotationState](const AzToolsFramework::AngularManipulator::Action& action) { AZ::Quaternion normalizedStart = action.m_start.m_rotation.GetNormalized(); sharedRotationState->m_axis = AZ::Vector3(normalizedStart.GetX(), normalizedStart.GetY(), normalizedStart.GetZ()); @@ -222,8 +223,9 @@ namespace PhysX sharedRotationState->m_valuePair = currentValue; }; + auto sharedStateXRotate = AZStd::make_shared(); auto mouseDownRotateXCallback = - [this, sharedStateXRotate]([[maybe_unused]] const AzToolsFramework::AngularManipulator::Action& action) mutable -> void + [this, sharedStateXRotate]([[maybe_unused]] const AzToolsFramework::AngularManipulator::Action& action) { PhysX::EditorJointRequestBus::EventResult( sharedStateXRotate->m_startTM, m_entityComponentIdPair, &PhysX::EditorJointRequests::GetTransformValue, @@ -233,7 +235,7 @@ namespace PhysX m_xRotationManipulator->InstallLeftMouseDownCallback(mouseDownRotateXCallback); m_xRotationManipulator->InstallMouseMoveCallback( - [this, sharedStateXRotate](const AzToolsFramework::AngularManipulator::Action& action) mutable -> void + [this, sharedStateXRotate](const AzToolsFramework::AngularManipulator::Action& action) { const AZ::Quaternion manipulatorOrientation = action.m_start.m_rotation * action.m_current.m_delta; @@ -241,11 +243,11 @@ namespace PhysX newTransform = sharedStateXRotate->m_startTM * AZ::Transform::CreateFromQuaternion(action.m_current.m_delta); PhysX::EditorJointRequestBus::Event( - m_entityComponentIdPair, &PhysX::EditorJointRequests::SetVector3Value, JointsComponentModeCommon::ParamaterNames::Position, - newTransform.GetTranslation()); + m_entityComponentIdPair, &PhysX::EditorJointRequests::SetVector3Value, + JointsComponentModeCommon::ParamaterNames::Position, newTransform.GetTranslation()); PhysX::EditorJointRequestBus::Event( - m_entityComponentIdPair, &PhysX::EditorJointRequests::SetVector3Value, JointsComponentModeCommon::ParamaterNames::Rotation, - newTransform.GetRotation().GetEulerDegrees()); + m_entityComponentIdPair, &PhysX::EditorJointRequests::SetVector3Value, + JointsComponentModeCommon::ParamaterNames::Rotation, newTransform.GetRotation().GetEulerDegrees()); m_yLinearManipulator->SetLocalOrientation(manipulatorOrientation); m_zLinearManipulator->SetLocalOrientation(manipulatorOrientation); @@ -332,8 +334,7 @@ namespace PhysX { AzToolsFramework::ManipulatorViews views; views.emplace_back(CreateManipulatorViewLine( - *linearManipulator, color, axisLength, - AzToolsFramework::ManipulatorLineBoundWidth(AzFramework::InvalidViewportId))); + *linearManipulator, color, axisLength, AzToolsFramework::ManipulatorLineBoundWidth(AzFramework::InvalidViewportId))); views.emplace_back(CreateManipulatorViewCone( *linearManipulator, color, linearManipulator->GetAxis() * (axisLength - coneLength), coneLength, coneRadius)); linearManipulator->SetViews(AZStd::move(views)); @@ -345,9 +346,10 @@ namespace PhysX void JointsSubComponentModeAngleCone::ConfigurePlanarView(const AZ::Color& planeColor, const AZ::Color& plane2Color) { - const float planeSize = 0.6f; AzToolsFramework::ManipulatorViews views; - views.emplace_back(CreateManipulatorViewQuad(*m_yzPlanarManipulator, planeColor, plane2Color, planeSize)); + views.emplace_back(AzToolsFramework::CreateManipulatorViewQuad( + m_yzPlanarManipulator->GetAxis1(), m_yzPlanarManipulator->GetAxis2(), planeColor, plane2Color, AZ::Vector3::CreateZero(), + AzToolsFramework::PlanarManipulatorAxisLength())); m_yzPlanarManipulator->SetViews(AZStd::move(views)); } diff --git a/Gems/PhysX/Code/Source/Pipeline/MeshGroup.cpp b/Gems/PhysX/Code/Source/Pipeline/MeshGroup.cpp index d0ff4008b2..24bfeef1be 100644 --- a/Gems/PhysX/Code/Source/Pipeline/MeshGroup.cpp +++ b/Gems/PhysX/Code/Source/Pipeline/MeshGroup.cpp @@ -864,7 +864,8 @@ namespace PhysX { if (auto* physicsSystem = AZ::Interface::Get()) { - if (const auto* physicsConfiguration = physicsSystem->GetConfiguration()) + if (const auto* physicsConfiguration = physicsSystem->GetConfiguration(); + physicsConfiguration && physicsConfiguration->m_materialLibraryAsset) { const auto& materials = physicsConfiguration->m_materialLibraryAsset->GetMaterialsData(); diff --git a/Gems/Profiler/Code/Source/CpuProfiler.h b/Gems/Profiler/Code/Source/CpuProfiler.h index 23130efa63..9235ac7da9 100644 --- a/Gems/Profiler/Code/Source/CpuProfiler.h +++ b/Gems/Profiler/Code/Source/CpuProfiler.h @@ -8,7 +8,6 @@ #pragma once -#include #include #include #include diff --git a/Gems/PythonAssetBuilder/Code/Include/PythonAssetBuilder/PythonBuilderRequestBus.h b/Gems/PythonAssetBuilder/Code/Include/PythonAssetBuilder/PythonBuilderRequestBus.h deleted file mode 100644 index e88d793189..0000000000 --- a/Gems/PythonAssetBuilder/Code/Include/PythonAssetBuilder/PythonBuilderRequestBus.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include - -namespace PythonAssetBuilder -{ - //! A request bus to help produce Open 3D Engine asset data - class PythonBuilderRequests - : public AZ::EBusTraits - { - public: - ////////////////////////////////////////////////////////////////////////// - // EBusTraits overrides - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; - ////////////////////////////////////////////////////////////////////////// - - //! Creates an AZ::Entity populated with Editor components and a name - virtual AZ::Outcome CreateEditorEntity(const AZStd::string& name) = 0; - - //! Writes out a .SLICE file with a given list of entities; optionally can be set to dynamic - virtual AZ::Outcome WriteSliceFile( - AZStd::string_view filename, - AZStd::vector entityList, - bool makeDynamic) = 0; - }; - - using PythonBuilderRequestBus = AZ::EBus; -} diff --git a/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderModule.cpp b/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderModule.cpp index 1d330c90df..2675855e4b 100644 --- a/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderModule.cpp +++ b/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderModule.cpp @@ -34,9 +34,7 @@ namespace PythonAssetBuilder // Add required SystemComponents to the SystemEntity. AZ::ComponentTypeList GetRequiredSystemComponents() const override { - return AZ::ComponentTypeList { - azrtti_typeid(), - }; + return AZ::ComponentTypeList{}; } }; } diff --git a/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderSystemComponent.cpp b/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderSystemComponent.cpp index 5a233e6656..36822bc656 100644 --- a/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderSystemComponent.cpp +++ b/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderSystemComponent.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include @@ -57,13 +56,6 @@ namespace PythonAssetBuilder ->Event("RegisterAssetBuilder", &PythonAssetBuilderRequestBus::Events::RegisterAssetBuilder) ->Event("GetExecutableFolder", &PythonAssetBuilderRequestBus::Events::GetExecutableFolder) ; - - behaviorContext->EBus("PythonBuilderRequestBus") - ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation) - ->Attribute(AZ::Script::Attributes::Module, "asset.entity") - ->Event("WriteSliceFile", &PythonBuilderRequestBus::Events::WriteSliceFile) - ->Event("CreateEditorEntity", &PythonBuilderRequestBus::Events::CreateEditorEntity) - ; } } @@ -97,13 +89,10 @@ namespace PythonAssetBuilder { pythonInterface->StartPython(true); } - - PythonBuilderRequestBus::Handler::BusConnect(); } void PythonAssetBuilderSystemComponent::Deactivate() { - PythonBuilderRequestBus::Handler::BusDisconnect(); m_messageSink.reset(); if (PythonAssetBuilderRequestBus::HasHandlers()) @@ -148,109 +137,4 @@ namespace PythonAssetBuilder } return AZ::Failure(AZStd::string("GetExecutableFolder access is missing.")); } - - AZ::Outcome PythonAssetBuilderSystemComponent::CreateEditorEntity(const AZStd::string& name) - { - AZ::EntityId entityId; - AzToolsFramework::EditorEntityContextRequestBus::BroadcastResult( - entityId, - &AzToolsFramework::EditorEntityContextRequestBus::Events::CreateNewEditorEntity, - name.c_str()); - - if (entityId.IsValid() == false) - { - return AZ::Failure("Failed to CreateNewEditorEntity."); - } - - AZ::Entity* entity = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(entity, &AZ::ComponentApplicationRequests::FindEntity, entityId); - - if (entity == nullptr) - { - return AZ::Failure(AZStd::string::format("Failed to find created entityId %s", entityId.ToString().c_str())); - } - - entity->Deactivate(); - - AzToolsFramework::EditorEntityContextRequestBus::Broadcast( - &AzToolsFramework::EditorEntityContextRequestBus::Events::AddRequiredComponents, - *entity); - - entity->Activate(); - - return AZ::Success(entityId); - } - - AZ::Outcome PythonAssetBuilderSystemComponent::WriteSliceFile( - AZStd::string_view filename, - AZStd::vector entityList, - bool makeDynamic) - { - using namespace AzToolsFramework::SliceUtilities; - - AZ::SerializeContext* serializeContext = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationBus::Events::GetSerializeContext); - if (serializeContext == nullptr) - { - return AZ::Failure("GetSerializeContext failed"); - } - - // transaction->Commit() requires the "@user@" alias - auto settingsRegistry = AZ::SettingsRegistry::Get(); - auto ioBase = AZ::IO::FileIOBase::GetInstance(); - if (ioBase->GetAlias("@user@") == nullptr) - { - if (AZ::IO::Path userPath; settingsRegistry->Get(userPath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_ProjectUserPath)) - { - userPath /= "AssetProcessorTemp"; - ioBase->SetAlias("@user@", userPath.c_str()); - } - } - - // transaction->Commit() expects the file to exist and write-able - AZ::IO::HandleType fileHandle; - AZ::IO::LocalFileIO::GetInstance()->Open(filename.data(), AZ::IO::OpenMode::ModeWrite, fileHandle); - if (fileHandle == AZ::IO::InvalidHandle) - { - return AZ::Failure( - AZStd::string::format("Failed to create slice file %.*s", aznumeric_cast(filename.size()), filename.data())); - } - AZ::IO::LocalFileIO::GetInstance()->Close(fileHandle); - - AZ::u32 creationFlags = 0; - if (makeDynamic) - { - creationFlags |= SliceTransaction::CreateAsDynamic; - } - - SliceTransaction::TransactionPtr transaction = SliceTransaction::BeginNewSlice(nullptr, serializeContext, creationFlags); - - // add entities - for (const AZ::EntityId& entityId : entityList) - { - auto addResult = transaction->AddEntity(entityId, SliceTransaction::SliceAddEntityFlags::DiscardSliceAncestry); - if (!addResult) - { - return AZ::Failure(AZStd::string::format("Failed slice add entity: %s", addResult.GetError().c_str())); - } - } - - // commit to a file - AZ::Data::AssetType sliceAssetType; - auto resultCommit = transaction->Commit(filename.data(), nullptr, [&sliceAssetType]( - SliceTransaction::TransactionPtr transactionPtr, - [[maybe_unused]] const char* fullPath, - const SliceTransaction::SliceAssetPtr& sliceAssetPtr) - { - sliceAssetType = sliceAssetPtr->GetType(); - return AZ::Success(); - }); - - if (!resultCommit) - { - return AZ::Failure(AZStd::string::format("Failed commit slice: %s", resultCommit.GetError().c_str())); - } - - return AZ::Success(sliceAssetType); - } } diff --git a/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderSystemComponent.h b/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderSystemComponent.h index 8bb2512308..278df0873d 100644 --- a/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderSystemComponent.h +++ b/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderSystemComponent.h @@ -11,7 +11,6 @@ #include #include -#include namespace PythonAssetBuilder { @@ -21,7 +20,6 @@ namespace PythonAssetBuilder class PythonAssetBuilderSystemComponent : public AZ::Component , protected PythonAssetBuilderRequestBus::Handler - , protected PythonBuilderRequestBus::Handler { public: AZ_COMPONENT(PythonAssetBuilderSystemComponent, "{E2872C13-D103-4534-9A95-76A66C8DDB5D}"); @@ -42,13 +40,6 @@ namespace PythonAssetBuilder AZ::Outcome RegisterAssetBuilder(const AssetBuilderSDK::AssetBuilderDesc& desc) override; AZ::Outcome GetExecutableFolder() const override; - // PythonBuilderRequestBus - AZ::Outcome CreateEditorEntity(const AZStd::string& name) override; - AZ::Outcome WriteSliceFile( - AZStd::string_view filename, - AZStd::vector entityList, - bool makeDynamic) override; - private: using PythonBuilderWorkerPointer = AZStd::shared_ptr; using PythonBuilderWorkerMap = AZStd::unordered_map; diff --git a/Gems/PythonAssetBuilder/Code/Tests/PythonAssetBuilderTest.cpp b/Gems/PythonAssetBuilder/Code/Tests/PythonAssetBuilderTest.cpp index fb30264b66..ee9ff71b5a 100644 --- a/Gems/PythonAssetBuilder/Code/Tests/PythonAssetBuilderTest.cpp +++ b/Gems/PythonAssetBuilder/Code/Tests/PythonAssetBuilderTest.cpp @@ -14,7 +14,6 @@ #include "Source/PythonAssetBuilderSystemComponent.h" #include -#include #include #include @@ -87,65 +86,6 @@ namespace UnitTest &PythonAssetBuilderRequestBus::Events::GetExecutableFolder); EXPECT_TRUE(result.IsSuccess()); } - - // test bus API exists - - TEST_F(PythonAssetBuilderTest, PythonBuilderRequestBus_CreateEditorEntity_Exists) - { - using namespace PythonAssetBuilder; - - EXPECT_FALSE(PythonBuilderRequestBus::HasHandlers()); - - // Some static tests to make sure the public API has not changed since that - // would break Python asset builders using this EBus - { - AZ::Outcome result; - AZStd::string name; - PythonBuilderRequestBus::BroadcastResult( - result, - &PythonBuilderRequestBus::Events::CreateEditorEntity, - name); - EXPECT_FALSE(result.IsSuccess()); - } - - m_app->RegisterComponentDescriptor(PythonAssetBuilderSystemComponent::CreateDescriptor()); - m_systemEntity->CreateComponent(); - m_systemEntity->Init(); - m_systemEntity->Activate(); - - EXPECT_TRUE(PythonBuilderRequestBus::HasHandlers()); - } - - TEST_F(PythonAssetBuilderTest, PythonBuilderRequestBus_WriteSliceFile_Exists) - { - using namespace PythonAssetBuilder; - - EXPECT_FALSE(PythonBuilderRequestBus::HasHandlers()); - - // Some static tests to make sure the public API has not changed since that - // would break Python asset builders using this EBus - { - AZ::Outcome result; - AZStd::string_view filename; - AZStd::vector entities; - bool makeDynamic = {}; - PythonBuilderRequestBus::BroadcastResult( - result, - &PythonBuilderRequestBus::Events::WriteSliceFile, - filename, - entities, - makeDynamic); - EXPECT_FALSE(result.IsSuccess()); - } - - m_app->RegisterComponentDescriptor(PythonAssetBuilderSystemComponent::CreateDescriptor()); - m_systemEntity->CreateComponent(); - m_systemEntity->Init(); - m_systemEntity->Activate(); - - EXPECT_TRUE(PythonBuilderRequestBus::HasHandlers()); - } - } AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV); diff --git a/Gems/PythonAssetBuilder/Code/Tests/PythonBuilderProcessJobTest.cpp b/Gems/PythonAssetBuilder/Code/Tests/PythonBuilderProcessJobTest.cpp index c8cfd4264f..c7ea5f3df3 100644 --- a/Gems/PythonAssetBuilder/Code/Tests/PythonBuilderProcessJobTest.cpp +++ b/Gems/PythonAssetBuilder/Code/Tests/PythonBuilderProcessJobTest.cpp @@ -106,17 +106,4 @@ namespace UnitTest PythonBuilderNotificationBus::Event(builderId, &PythonBuilderNotificationBus::Events::OnCancel); EXPECT_EQ(1, mockJobHandler.m_onCancelCount); } - - TEST_F(PythonBuilderProcessJobTest, PythonBuilderRequestBus_Behavior_Exists) - { - using namespace PythonAssetBuilder; - using namespace AssetBuilderSDK; - - RegisterAssetBuilder(m_app.get(), m_systemEntity); - - auto entry = m_app->GetBehaviorContext()->m_ebuses.find("PythonBuilderRequestBus"); - ASSERT_NE(m_app->GetBehaviorContext()->m_ebuses.end(), entry); - EXPECT_NE(entry->second->m_events.end(), entry->second->m_events.find("WriteSliceFile")); - EXPECT_NE(entry->second->m_events.end(), entry->second->m_events.find("CreateEditorEntity")); - } } diff --git a/Gems/PythonAssetBuilder/Code/pythonassetbuilder_common_files.cmake b/Gems/PythonAssetBuilder/Code/pythonassetbuilder_common_files.cmake index 171c6b5357..35e512c97e 100644 --- a/Gems/PythonAssetBuilder/Code/pythonassetbuilder_common_files.cmake +++ b/Gems/PythonAssetBuilder/Code/pythonassetbuilder_common_files.cmake @@ -9,7 +9,6 @@ set(FILES Include/PythonAssetBuilder/PythonAssetBuilderBus.h Include/PythonAssetBuilder/PythonBuilderNotificationBus.h - Include/PythonAssetBuilder/PythonBuilderRequestBus.h Source/PythonAssetBuilderSystemComponent.cpp Source/PythonAssetBuilderSystemComponent.h Source/PythonBuilderMessageSink.cpp diff --git a/Gems/PythonAssetBuilder/Code/pythonassetbuilder_editor_files.cmake b/Gems/PythonAssetBuilder/Code/pythonassetbuilder_editor_files.cmake index 171c6b5357..35e512c97e 100644 --- a/Gems/PythonAssetBuilder/Code/pythonassetbuilder_editor_files.cmake +++ b/Gems/PythonAssetBuilder/Code/pythonassetbuilder_editor_files.cmake @@ -9,7 +9,6 @@ set(FILES Include/PythonAssetBuilder/PythonAssetBuilderBus.h Include/PythonAssetBuilder/PythonBuilderNotificationBus.h - Include/PythonAssetBuilder/PythonBuilderRequestBus.h Source/PythonAssetBuilderSystemComponent.cpp Source/PythonAssetBuilderSystemComponent.h Source/PythonBuilderMessageSink.cpp diff --git a/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/actor_group.py b/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/actor_group.py new file mode 100644 index 0000000000..dd9f1f8729 --- /dev/null +++ b/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/actor_group.py @@ -0,0 +1,519 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +import json +import uuid +import os, sys + +sys.path.append(os.path.dirname(__file__)) +import physics_data + +class ActorGroup(): + """ + Configure actor data exporting. + + Attributes + ---------- + name: + Name for the group. This name will also be used as the name for the generated file. + + selectedRootBone: + The root bone of the animation that will be exported. + + rules: `list` of actor rules (derived from BaseRule) + modifiers to fine-tune the export process. + + Methods + ------- + + to_dict() + Converts contents to a Python dictionary + + add_rule(rule) + Adds a rule into the internal rules container + Returns True if the rule was added to the internal rules container + + create_rule(rule) + Helper method to add and return the rule + + remove_rule(type) + Removes the rule from the internal rules container + + to_dict() + Converts the contents to as a Python dictionary + + to_json() + Converts the contents to a JSON string + + """ + def __init__(self): + self.typename = 'ActorGroup' + self.name = '' + self.selectedRootBone = '' + self.id = uuid.uuid4() + self.rules = set() + + def add_rule(self, rule) -> bool: + if (rule not in self.rules): + self.rules.add(rule) + return True + return False + + def create_rule(self, rule) -> any: + if (self.add_rule(rule)): + return rule + return None + + def remove_rule(self, type) -> None: + self.rules.discard(rule) + + def to_dict(self) -> dict: + out = {} + out['$type'] = self.typename + out['name'] = self.name + out['selectedRootBone'] = self.selectedRootBone + out['id'] = f"{{{str(self.id)}}}" + # convert the rules + ruleList = [] + for rule in self.rules: + jsonStr = json.dumps(rule, cls=RuleEncoder) + jsonDict = json.loads(jsonStr) + ruleList.append(jsonDict) + out['rules'] = ruleList + return out + + def to_json(self) -> any: + jsonDOM = self.to_dict() + return json.dumps(jsonDOM, cls=RuleEncoder, indent=1) + +class RuleEncoder(json.JSONEncoder): + """ + A helper class to encode the Python classes with to a Python dictionary + + Methods + ------- + + encode(obj) + Converts contents to a Python dictionary for the JSONEncoder + + """ + def encode(self, obj): + chunk = obj + if isinstance(obj, BaseRule): + chunk = obj.to_dict() + elif isinstance(obj, dict): + chunk = obj + elif hasattr(obj, 'to_dict'): + chunk = obj.to_dict() + else: + chunk = obj.__dict__ + + return super().encode(chunk) + +class BaseRule(): + """ + Base class of the actor rules to help encode the type name of abstract rules + + Parameters + ---------- + typename : str + A typename the $type will be in the JSON chunk object + + Attributes + ---------- + typename: str + The type name of the abstract classes to be serialized + + id: UUID + a unique ID for the rule + + Methods + ------- + to_dict() + Converts contents to a Python dictionary + Adds the '$type' member + Adds a random 'id' member + """ + def __init__(self, typename): + self.typename = typename + self.id = uuid.uuid4() + + def __eq__(self, other): + return self.id.__eq__(other.id) + + def __ne__(self, other): + return self.__eq__(other) is False + + def __hash__(self): + return self.id.__hash__() + + def to_dict(self): + data = self.__dict__ + data['id'] = f"{{{str(self.id)}}}" + # rename 'typename' to '$type' + data['$type'] = self.typename + data.pop('typename') + return data + +class SceneNodeSelectionList(BaseRule): + """ + Contains a list of node names to include (selectedNodes) and to exclude (unselectedNodes) + + Attributes + ---------- + selectedNodes: `list` of str + The node names to include for this group rule + + unselectedNodes: `list` of str + The node names to exclude for this group rule + + Methods + ------- + convert_selection(self, container, key): + this adds its contents to an existing dictionary container at a key position + + select_targets(self, selectedList, allNodesList:list) + helper function to include a small list of node names from list of all the node names + + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__('SceneNodeSelectionList') + self.selectedNodes = [] + self.unselectedNodes = [] + + def convert_selection(self, container, key): + container[key] = self.to_dict() + + def select_targets(self, selectedList, allNodesList:list): + self.selectedNodes = selectedList + self.unselectedNodes = allNodesList.copy() + for node in selectedList: + if node in self.unselectedNodes: + self.unselectedNodes.remove(node) + +class LodNodeSelectionList(SceneNodeSelectionList): + """ + Level of Detail node selection list + + The selected nodes should be joints with BoneData + derived from SceneNodeSelectionList + see also LodRule + + Attributes + ---------- + lodLevel: int + the level of detail to target where 0 is nearest level of detail + up to 5 being the farthest level of detail range for 6 levels maximum + + Methods + ------- + + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__() + self.typename = 'LodNodeSelectionList' + self.lodLevel = 0 + + def to_dict(self): + data = super().to_dict() + data['lodLevel'] = self.lodLevel + return data + +class PhysicsAnimationConfiguration(): + """ + Configuration for animated physics structures which are more detailed than the character controller. + For example, ragdoll or hit detection configurations. + See also 'class Physics::AnimationConfiguration' + + Attributes + ---------- + hitDetectionConfig: CharacterColliderConfiguration + for hit detection + + ragdollConfig: RagdollConfiguration + to set up physics properties + + clothConfig: CharacterColliderConfiguration + for cloth physics + + simulatedObjectColliderConfig: CharacterColliderConfiguration + for simulation physics + + Methods + ------- + + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + self.hitDetectionConfig = physics_data.CharacterColliderConfiguration() + self.ragdollConfig = physics_data.RagdollConfiguration() + self.clothConfig = physics_data.CharacterColliderConfiguration() + self.simulatedObjectColliderConfig = physics_data.CharacterColliderConfiguration() + + def to_dict(self): + data = {} + data["hitDetectionConfig"] = self.hitDetectionConfig.to_dict() + data["ragdollConfig"] = self.ragdollConfig.to_dict() + data["clothConfig"] = self.clothConfig.to_dict() + data["simulatedObjectColliderConfig"] = self.simulatedObjectColliderConfig.to_dict() + return data + +class EMotionFXPhysicsSetup(): + """ + Physics setup properties + See also 'class EMotionFX::PhysicsSetup' + + Attributes + ---------- + config: PhysicsAnimationConfiguration + Configuration to setup physics properties + + Methods + ------- + + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + self.typename = 'PhysicsSetup' + self.config = PhysicsAnimationConfiguration() + + def to_dict(self): + return { + "config" : self.config.to_dict() + } + +class ActorPhysicsSetupRule(BaseRule): + """ + Physics setup properties + + Attributes + ---------- + data: EMotionFXPhysicsSetup + Data to setup physics properties + + Methods + ------- + + set_hit_detection_config(self, hitDetectionConfig) + Simple helper function to assign the hit detection configuration + + set_ragdoll_config(self, ragdollConfig) + Simple helper function to assign the ragdoll configuration + + set_cloth_config(self, clothConfig) + Simple helper function to assign the cloth configuration + + set_simulated_object_collider_config(self, simulatedObjectColliderConfig) + Simple helper function to assign the assign simulated object collider configuration + + to_dict() + Converts contents to a Python dictionary + + """ + def __init__(self): + super().__init__('ActorPhysicsSetupRule') + self.data = EMotionFXPhysicsSetup() + + def set_hit_detection_config(self, hitDetectionConfig) -> None: + self.data.config.hitDetectionConfig = hitDetectionConfig + + def set_ragdoll_config(self, ragdollConfig) -> None: + self.data.config.ragdollConfig = ragdollConfig + + def set_cloth_config(self, clothConfig) -> None: + self.data.config.clothConfig = clothConfig + + def set_simulated_object_collider_config(self, simulatedObjectColliderConfig) -> None: + self.data.config.simulatedObjectColliderConfig = simulatedObjectColliderConfig + + def to_dict(self): + data = super().to_dict() + data["data"] = self.data.to_dict() + return data + +class ActorScaleRule(BaseRule): + """ + Scale the actor + + Attributes + ---------- + scaleFactor: float + Set the multiplier to scale geometry. + + Methods + ------- + to_dict() + Converts contents to a Python dictionary + + """ + def __init__(self): + super().__init__('ActorScaleRule') + self.scaleFactor = 1.0 + +class CoordinateSystemRule(BaseRule): + """ + Modify the target coordinate system, applying a transformation to all data (transforms and vertex data if it exists). + + Attributes + ---------- + targetCoordinateSystem: int + Change the direction the actor/motion will face by applying a post transformation to the data. + + useAdvancedData: bool + If True, use advanced settings + + originNodeName: str + Select a Node from the scene as the origin for this export. + + rotation: [float, float, float, float] + Sets the orientation offset of the processed mesh in degrees. Rotates (yaw, pitch, roll) the group after translation. + + translation: [float, float, float] + Moves the group along the given vector3. + + scale: float + Sets the scale offset of the processed mesh. + + Methods + ------- + + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__('CoordinateSystemRule') + self.targetCoordinateSystem = 0 + self.useAdvancedData = False + self.originNodeName = '' + self.rotation = [0.0, 0.0, 0.0, 1.0] + self.translation = [0.0, 0.0, 0.0] + self.scale = 1.0 + +class SkeletonOptimizationRule(BaseRule): + """ + Advanced skeleton optimization rule. + + Attributes + ---------- + autoSkeletonLOD: bool + Client side skeleton LOD based on skinning information and critical bones list. + + serverSkeletonOptimization: bool + Server side skeleton optimization based on hit detections and critical bones list. + + criticalBonesList: `list` of SceneNodeSelectionList + Bones in this list will not be optimized out. + + Methods + ------- + + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__('SkeletonOptimizationRule') + self.autoSkeletonLOD = True + self.serverSkeletonOptimization = False + self.criticalBonesList = SceneNodeSelectionList() + + def to_dict(self): + data = super().to_dict() + self.criticalBonesList.convert_selection(data, 'criticalBonesList') + return data + +class LodRule(BaseRule): + """ + Set up the level of detail for the meshes in this group. + + The engine supports 6 total lods. + 1 for the base model then 5 more lods. + The rule only captures lods past level 0 so this is set to 5. + + Attributes + ---------- + nodeSelectionList: `list` of LodNodeSelectionList + Select the meshes to assign to each level of detail. + + Methods + ------- + + add_lod_level(lodLevel, selectedNodes=None, unselectedNodes=None) + A helper function to add selected nodes (list of node names) and unselected nodes (list of node names) + This creates a LodNodeSelectionList and adds it to the node selection list + returns the LodNodeSelectionList that was created + + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__('{3CB103B3-CEAF-49D7-A9DC-5A31E2DF15E4} LodRule') + self.nodeSelectionList = [] # list of LodNodeSelectionList + + def add_lod_level(self, lodLevel, selectedNodes=None, unselectedNodes=None) -> LodNodeSelectionList: + lodNodeSelection = LodNodeSelectionList() + lodNodeSelection.selectedNodes = selectedNodes + lodNodeSelection.unselectedNodes = unselectedNodes + lodNodeSelection.lodLevel = lodLevel + self.nodeSelectionList.append(lodNodeSelection) + return lodNodeSelection + + def to_dict(self): + data = super().to_dict() + selectionListList = data.pop('nodeSelectionList') + data['nodeSelectionList'] = [] + for nodeList in selectionListList: + data['nodeSelectionList'].append(nodeList.to_dict()) + return data + +class MorphTargetRule(BaseRule): + """ + Select morph targets for actor. + + Attributes + ---------- + targets: `list` of SceneNodeSelectionList + Select 1 or more meshes to include in the actor as morph targets. + + Methods + ------- + + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__('MorphTargetRule') + self.targets = SceneNodeSelectionList() + + def to_dict(self): + data = super().to_dict() + self.targets.convert_selection(data, 'targets') + return data + +class CommentRule(BaseRule): + """ + Add an optional comment to the asset's properties. + + Attributes + ---------- + text: str + Text for the comment. + + Methods + ------- + + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__('CommentRule') + self.text = '' diff --git a/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/physics_data.py b/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/physics_data.py new file mode 100644 index 0000000000..8dea8d8b3a --- /dev/null +++ b/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/physics_data.py @@ -0,0 +1,580 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +# for underlying data structures, see Code\Framework\AzFramework\AzFramework\Physics\Shape.h + +class ColliderConfiguration(): + """ + Configuration for a collider + + Attributes + ---------- + Trigger: bool + Should this shape act as a trigger shape. + + Simulated: bool + Should this shape partake in collision in the physical simulation. + + InSceneQueries: bool + Should this shape partake in scene queries (ray casts, overlap tests, sweeps). + + Exclusive: bool + Can this collider be shared between multiple bodies? + + Position: [float, float, float] Vector3 + Shape offset relative to the connected rigid body. + + Rotation: [float, float, float, float] Quaternion + Shape rotation relative to the connected rigid body. + + ColliderTag: str + Identification tag for the collider. + + RestOffset: float + Bodies will come to rest separated by the sum of their rest offsets. + + ContactOffset: float + Bodies will start to generate contacts when closer than the sum of their contact offsets. + Methods + ------- + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + self.Trigger = True + self.Simulated = True + self.InSceneQueries = True + self.Exclusive = True + self.Position = [0.0, 0.0, 0.0] + self.Rotation = [0.0, 0.0, 0.0, 1.0] + self.ColliderTag = '' + self.RestOffset = 0.0 + self.ContactOffset = 0.02 + + def to_dict(self): + return self.__dict__ + +# for underlying data structures, see Code\Framework\AzFramework\AzFramework\Physics\Character.h + +class CharacterColliderNodeConfiguration(): + """ + Shapes to define the animation's to model of physics + + Attributes + ---------- + name : str + debug name of the node + + shapes : `list` of `tuple` of (ColliderConfiguration, ShapeConfiguration) + a list of pairs of collider and shape configuration + + Methods + ------- + add_collider_shape_pair(colliderConfiguration, shapeConfiguration) + Helper function to add a collider and shape configuration at the same time + + to_dict() + Converts contents to a Python dictionary + + """ + def __init__(self): + self.name = '' + self.shapes = [] # List of Tuple of (ColliderConfiguration, ShapeConfiguration) + + def add_collider_shape_pair(self, colliderConfiguration, shapeConfiguration) -> None: + pair = (colliderConfiguration, shapeConfiguration) + self.shapes.append(pair) + + def to_dict(self): + data = {} + shapeList = [] + for index, shape in enumerate(self.shapes): + tupleValue = (shape[0].to_dict(), # ColliderConfiguration + shape[1].to_dict()) # ShapeConfiguration + shapeList.append(tupleValue) + data['name'] = self.name + data['shapes'] = shapeList + return data + +class CharacterColliderConfiguration(): + """ + Information required to create the basic physics representation of a character. + + Attributes + ---------- + nodes : `list` of CharacterColliderNodeConfiguration + a list of CharacterColliderNodeConfiguration nodes + + Methods + ------- + add_character_collider_node_configuration(colliderConfiguration, shapeConfiguration) + Helper function to add a character collider node configuration into the nodes + + add_character_collider_node_configuration_node(name, colliderConfiguration, shapeConfiguration) + Helper function to add a character collider node configuration into the nodes + + **Returns**: CharacterColliderNodeConfiguration + + to_dict() + Converts contents to a Python dictionary + + """ + def __init__(self): + self.nodes = [] # list of CharacterColliderNodeConfiguration + + def add_character_collider_node_configuration(self, characterColliderNodeConfiguration) -> None: + self.nodes.append(characterColliderNodeConfiguration) + + def add_character_collider_node_configuration_node(self, name, colliderConfiguration, shapeConfiguration) -> CharacterColliderNodeConfiguration: + characterColliderNodeConfiguration = CharacterColliderNodeConfiguration() + self.add_character_collider_node_configuration(characterColliderNodeConfiguration) + characterColliderNodeConfiguration.name = name + characterColliderNodeConfiguration.add_collider_shape_pair(colliderConfiguration, shapeConfiguration) + return characterColliderNodeConfiguration + + def to_dict(self): + data = {} + nodeList = [] + for node in self.nodes: + nodeList.append(node.to_dict()) + data['nodes'] = nodeList + return data + +# see Code\Framework\AzFramework\AzFramework\Physics\ShapeConfiguration.h for underlying data structures + +class ShapeConfiguration(): + """ + Base class for all the shape collider configurations + + Attributes + ---------- + scale : [float, float, float] + a 3-element list to describe the scale along the X, Y, and Z axises such as [1.0, 1.0, 1.0] + + Methods + ------- + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self, shapeType): + self._shapeType = shapeType + self.scale = [1.0, 1.0, 1.0] + + def to_dict(self): + return { + "$type": self._shapeType, + "Scale": self.scale + } + +class SphereShapeConfiguration(ShapeConfiguration): + """ + The configuration for a Sphere collider + + Attributes + ---------- + radius: float + a scalar value to define the radius of the sphere + + Methods + ------- + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__('SphereShapeConfiguration') + self.radius = 0.5 + + def to_dict(self): + data = super().to_dict() + data['Radius'] = self.radius + return data + +class BoxShapeConfiguration(ShapeConfiguration): + """ + The configuration for a Box collider + + Attributes + ---------- + dimensions: [float, float, float] + The width, height, and depth dimensions of the Box collider + + Methods + ------- + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__('BoxShapeConfiguration') + self.dimensions = [1.0, 1.0, 1.0] + + def to_dict(self): + data = super().to_dict() + data['Configuration'] = self.dimensions + return data + +class CapsuleShapeConfiguration(ShapeConfiguration): + """ + The configuration for a Capsule collider + + Attributes + ---------- + height: float + The height of the Capsule + + radius: float + The radius of the Capsule + + Methods + ------- + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__('CapsuleShapeConfiguration') + self.height = 1.00 + self.radius = 0.25 + + def to_dict(self): + data = super().to_dict() + data['Height'] = self.height + data['Radius'] = self.radius + return data + +class PhysicsAssetShapeConfiguration(ShapeConfiguration): + """ + The configuration for a Asset collider using a mesh asset for collision + + Attributes + ---------- + asset: { "assetHint": assetReference } + the name of the asset to load for collision information + + assetScale: [float, float, float] + The scale of the asset shape such as [1.0, 1.0, 1.0] + + useMaterialsFromAsset: bool + Auto-set physics materials using asset's physics material names + + subdivisionLevel: int + The level of subdivision if a primitive shape is replaced with a convex mesh due to scaling. + + Methods + ------- + set_asset_reference(self, assetReference: str) + Helper function to set the asset reference to the collision mesh such as 'my/folder/my_mesh.azmodel' + + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__('PhysicsAssetShapeConfiguration') + self.asset = {} + self.assetScale = [1.0, 1.0, 1.0] + self.useMaterialsFromAsset = True + self.subdivisionLevel = 4 + + def set_asset_reference(self, assetReference: str) -> None: + self.asset = { "assetHint": assetReference } + + def to_dict(self): + data = super().to_dict() + data['PhysicsAsset'] = self.asset + data['AssetScale'] = self.assetScale + data['UseMaterialsFromAsset'] = self.useMaterialsFromAsset + data['SubdivisionLevel'] = self.subdivisionLevel + return data + +# for underlying data structures, see Code\Framework\AzFramework\AzFramework\Physics\Configuration\JointConfiguration.h + +class JointConfiguration(): + """ + The joint configuration + + see also: class AzPhysics::JointConfiguration + + Attributes + ---------- + Name: str + For debugging/tracking purposes only. + + ParentLocalRotation: [float, float, float, float] + Parent joint frame relative to parent body. + + ParentLocalPosition: [float, float, float] + Joint position relative to parent body. + + ChildLocalRotation: [float, float, float, float] + Child joint frame relative to child body. + + ChildLocalPosition: [float, float, float] + Joint position relative to child body. + + StartSimulationEnabled: bool + When active, the joint will be enabled when the simulation begins. + + Methods + ------- + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + self.Name = '' + self.ParentLocalRotation = [0.0, 0.0, 0.0, 1.0] + self.ParentLocalPosition = [0.0, 0.0, 0.0] + self.ChildLocalRotation = [0.0, 0.0, 0.0, 1.0] + self.ChildLocalPosition = [0.0, 0.0, 0.0] + self.StartSimulationEnabled = True + + def to_dict(self): + return self.__dict__ + +# for underlying data structures, see Code\Framework\AzFramework\AzFramework\Physics\Configuration\SimulatedBodyConfiguration.h + +class SimulatedBodyConfiguration(): + """ + Base Class of all Physics Bodies that will be simulated. + + see also: class AzPhysics::SimulatedBodyConfiguration + + Attributes + ---------- + name: str + For debugging/tracking purposes only. + + position: [float, float, float] + starting position offset + + orientation: [float, float, float, float] + starting rotation (Quaternion) + + startSimulationEnabled: bool + to start when simulation engine starts + + Methods + ------- + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + self.name = '' + self.position = [0.0, 0.0, 0.0] + self.orientation = [0.0, 0.0, 0.0, 1.0] + self.startSimulationEnabled = True + + def to_dict(self): + return { + "name" : self.name, + "position" : self.position, + "orientation" : self.orientation, + "startSimulationEnabled" : self.startSimulationEnabled + } + + +# for underlying data structures, see Code\Framework\AzFramework\AzFramework\Physics\Configuration\RigidBodyConfiguration.h + +class RigidBodyConfiguration(SimulatedBodyConfiguration): + """ + PhysX Rigid Body Configuration + + see also: class AzPhysics::RigidBodyConfiguration + + Attributes + ---------- + initialLinearVelocity: [float, float, float] + Linear velocity applied when the rigid body is activated. + + initialAngularVelocity: [float, float, float] + Angular velocity applied when the rigid body is activated (limited by maximum angular velocity) + + centerOfMassOffset: [float, float, float] + Local space offset for the center of mass (COM). + + mass: float + The mass of the rigid body in kilograms. + A value of 0 is treated as infinite. + The trajectory of infinite mass bodies cannot be affected by any collisions or forces other than gravity. + + linearDamping: float + The rate of decay over time for linear velocity even if no forces are acting on the rigid body. + + angularDamping: float + The rate of decay over time for angular velocity even if no forces are acting on the rigid body. + + sleepMinEnergy: float + The rigid body can go to sleep (settle) when kinetic energy per unit mass is persistently below this value. + + maxAngularVelocity: float + Clamp angular velocities to this maximum value. + + startAsleep: bool + When active, the rigid body will be asleep when spawned, and wake when the body is disturbed. + + interpolateMotion: bool + When active, simulation results are interpolated resulting in smoother motion. + + gravityEnabled: bool + When active, global gravity affects this rigid body. + + kinematic: bool + When active, the rigid body is not affected by gravity or other forces and is moved by script. + + ccdEnabled: bool + When active, the rigid body has continuous collision detection (CCD). + Use this to ensure accurate collision detection, particularly for fast moving rigid bodies. + CCD must be activated in the global PhysX preferences. + + ccdMinAdvanceCoefficient: float + Coefficient affecting how granularly time is subdivided in CCD. + + ccdFrictionEnabled: bool + Whether friction is applied when resolving CCD collisions. + + computeCenterOfMass: bool + Compute the center of mass (COM) for this rigid body. + + computeInertiaTensor: bool + When active, inertia is computed based on the mass and shape of the rigid body. + + computeMass: bool + When active, the mass of the rigid body is computed based on the volume and density values of its colliders. + + Methods + ------- + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__() + + # Basic initial settings. + self.initialLinearVelocity = [0.0, 0.0, 0.0] + self.initialAngularVelocity = [0.0, 0.0, 0.0] + self.centerOfMassOffset = [0.0, 0.0, 0.0] + + # Simulation parameters. + self.mass = 1.0 + self.linearDamping = 0.05 + self.angularDamping = 0.15 + self.sleepMinEnergy = 0.005 + self.maxAngularVelocity = 100.0 + self.startAsleep = False + self.interpolateMotion = False + self.gravityEnabled = True + self.kinematic = False + self.ccdEnabled = False + self.ccdMinAdvanceCoefficient = 0.15 + self.ccdFrictionEnabled = False + self.computeCenterOfMass = True + self.computeInertiaTensor = True + self.computeMass = True + + # Flags to restrict motion along specific world-space axes. + self.lockLinearX = False + self.lockLinearY = False + self.lockLinearZ = False + + # Flags to restrict rotation around specific world-space axes. + self.lockAngularX = False + self.lockAngularY = False + self.lockAngularZ = False + + # If set, non-simulated shapes will also be included in the mass properties calculation. + self.includeAllShapesInMassCalculation = False + + def to_dict(self): + data = super().to_dict() + data["Initial linear velocity"] = self.initialLinearVelocity + data["Initial angular velocity"] = self.initialAngularVelocity + data["Linear damping"] = self.linearDamping + data["Angular damping"] = self.angularDamping + data["Sleep threshold"] = self.sleepMinEnergy + data["Start Asleep"] = self.startAsleep + data["Interpolate Motion"] = self.interpolateMotion + data["Gravity Enabled"] = self.gravityEnabled + data["Kinematic"] = self.kinematic + data["CCD Enabled"] = self.ccdEnabled + data["Compute Mass"] = self.computeMass + data["Lock Linear X"] = self.lockLinearX + data["Lock Linear Y"] = self.lockLinearY + data["Lock Linear Z"] = self.lockLinearZ + data["Lock Angular X"] = self.lockAngularX + data["Lock Angular Y"] = self.lockAngularY + data["Lock Angular Z"] = self.lockAngularZ + data["Mass"] = self.mass + data["Compute COM"] = self.computeCenterOfMass + data["Centre of mass offset"] = self.centerOfMassOffset + data["Compute inertia"] = self.computeInertiaTensor + data["Maximum Angular Velocity"] = self.maxAngularVelocity + data["Include All Shapes In Mass"] = self.includeAllShapesInMassCalculation + data["CCD Min Advance"] = self.ccdMinAdvanceCoefficient + data["CCD Friction"] = self.ccdFrictionEnabled + return data + +# for underlying data structures, see Code\Framework\AzFramework\AzFramework\Physics\Ragdoll.h + +class RagdollNodeConfiguration(RigidBodyConfiguration): + """ + Ragdoll node Configuration + + see also: class Physics::RagdollConfiguration + + Attributes + ---------- + JointConfig: JointConfiguration + Ragdoll joint node configuration + + Methods + ------- + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__() + self.JointConfig = JointConfiguration() + + def to_dict(self): + data = super().to_dict() + data['JointConfig'] = self.JointConfig.to_dict() + return data + +class RagdollConfiguration(): + """ + A configuration of join nodes and a character collider configuration for a ragdoll + + see also: class Physics::RagdollConfiguration + + Attributes + ---------- + nodes: `list` of RagdollNodeConfiguration + A list of RagdollNodeConfiguration entries + + colliders: CharacterColliderConfiguration + A CharacterColliderConfiguration + + Methods + ------- + add_ragdoll_node_configuration(ragdollNodeConfiguration) + Helper function to add a single ragdoll node configuration (normally for each joint/bone node) + + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + self.nodes = [] # list of RagdollNodeConfiguration + self.colliders = CharacterColliderConfiguration() + + def add_ragdoll_node_configuration(self, ragdollNodeConfiguration) -> None: + self.nodes.append(ragdollNodeConfiguration) + + def to_dict(self): + data = {} + nodeList = [] + for index, node in enumerate(self.nodes): + nodeList.append(node.to_dict()) + data['nodes'] = nodeList + data['colliders'] = self.colliders.to_dict() + return data diff --git a/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/scene_data.py b/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/scene_data.py index d105ecdb43..173558d784 100755 --- a/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/scene_data.py +++ b/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/scene_data.py @@ -4,8 +4,11 @@ For complete copyright and license terms please see the LICENSE at the root of t SPDX-License-Identifier: Apache-2.0 OR MIT """ -import azlmbr.scene as sceneApi +import typing import json +import azlmbr.scene as sceneApi +from enum import Enum, IntEnum + # Wraps the AZ.SceneAPI.Containers.SceneGraph.NodeIndex internal class class SceneGraphNodeIndex: @@ -24,6 +27,7 @@ class SceneGraphNodeIndex: def equal(self, other) -> bool: return self.nodeIndex.Equal(other) + # Wraps AZ.SceneAPI.Containers.SceneGraph.Name internal class class SceneGraphName(): def __init__(self, sceneGraphName) -> None: @@ -35,6 +39,7 @@ class SceneGraphName(): def get_name(self) -> str: return self.name.GetName() + # Wraps AZ.SceneAPI.Containers.SceneGraph class class SceneGraph(): def __init__(self, sceneGraphInstance) -> None: @@ -90,13 +95,26 @@ class SceneGraph(): def get_node_content(self, node): return self.sceneGraph.GetNodeContent(node) + +class PrimitiveShape(IntEnum): + BEST_FIT = 0 + SPHERE = 1 + BOX = 2 + CAPSULE = 3 + + +class DecompositionMode(IntEnum): + VOXEL = 0 + TETRAHEDRON = 1 + + # Contains a dictionary to contain and export AZ.SceneAPI.Containers.SceneManifest class SceneManifest(): def __init__(self): self.manifest = {'values': []} def add_mesh_group(self, name: str) -> dict: - meshGroup = {} + meshGroup = {} meshGroup['$type'] = '{07B356B7-3635-40B5-878A-FAC4EFD5AD86} MeshGroup' meshGroup['name'] = name meshGroup['nodeSelectionList'] = {'selectedNodes': [], 'unselectedNodes': []} @@ -272,5 +290,242 @@ class SceneManifest(): mesh_group['rules']['rules'].append(rule) + def __add_physx_base_mesh_group(self, name: str, physics_material: typing.Optional[str]) -> dict: + import azlmbr.math + group = { + '$type': '{5B03C8E6-8CEE-4DA0-A7FA-CD88689DD45B} MeshGroup', + 'id': azlmbr.math.Uuid_CreateRandom().ToString(), + 'name': name, + 'NodeSelectionList': { + 'selectedNodes': [], + 'unselectedNodes': [] + }, + "MaterialSlots": [ + "Material" + ], + "PhysicsMaterials": [ + self.__default_or_value(physics_material, "") + ], + "rules": { + "rules": [] + } + } + self.manifest['values'].append(group) + + return group + + def add_physx_triangle_mesh_group(self, name: str, merge_meshes: bool = True, weld_vertices: bool = False, + disable_clean_mesh: bool = False, + force_32bit_indices: bool = False, + suppress_triangle_mesh_remap_table: bool = False, + build_triangle_adjacencies: bool = False, + mesh_weld_tolerance: float = 0.0, + num_tris_per_leaf: int = 4, + physics_material: typing.Optional[str] = None) -> dict: + """ + Adds a Triangle type PhysX Mesh Group to the scene. + + :param name: Name of the mesh group. + :param merge_meshes: When true, all selected nodes will be merged into a single collision mesh. + :param weld_vertices: When true, mesh welding is performed. Clean mesh must be enabled. + :param disable_clean_mesh: When true, mesh cleaning is disabled. This makes cooking faster. + :param force_32bit_indices: When true, 32-bit indices will always be created regardless of triangle count. + :param suppress_triangle_mesh_remap_table: When true, the face remap table is not created. + This saves a significant amount of memory, but the SDK will not be able to provide the remap + information for internal mesh triangles returned by collisions, sweeps or raycasts hits. + :param build_triangle_adjacencies: When true, the triangle adjacency information is created. + :param mesh_weld_tolerance: If mesh welding is enabled, this controls the distance at + which vertices are welded. If mesh welding is not enabled, this value defines the + acceptance distance for mesh validation. Provided no two vertices are within this + distance, the mesh is considered to be clean. If not, a warning will be emitted. + :param num_tris_per_leaf: Mesh cooking hint for max triangles per leaf limit. Fewer triangles per leaf + produces larger meshes with better runtime performance and worse cooking performance. + :param physics_material: Configure which physics material to use. + :return: The newly created mesh group. + """ + group = self.__add_physx_base_mesh_group(name, physics_material) + group["export method"] = 0 + group["TriangleMeshAssetParams"] = { + "MergeMeshes": merge_meshes, + "WeldVertices": weld_vertices, + "DisableCleanMesh": disable_clean_mesh, + "Force32BitIndices": force_32bit_indices, + "SuppressTriangleMeshRemapTable": suppress_triangle_mesh_remap_table, + "BuildTriangleAdjacencies": build_triangle_adjacencies, + "MeshWeldTolerance": mesh_weld_tolerance, + "NumTrisPerLeaf": num_tris_per_leaf + } + + return group + + def add_physx_convex_mesh_group(self, name: str, area_test_epsilon: float = 0.059, plane_tolerance: float = 0.0006, + use_16bit_indices: bool = False, + check_zero_area_triangles: bool = False, + quantize_input: bool = False, + use_plane_shifting: bool = False, + shift_vertices: bool = False, + gauss_map_limit: int = 32, + build_gpu_data: bool = False, + physics_material: typing.Optional[str] = None) -> dict: + """ + Adds a Convex type PhysX Mesh Group to the scene. + + :param name: Name of the mesh group. + :param area_test_epsilon: If the area of a triangle of the hull is below this value, the triangle will be + rejected. This test is done only if Check Zero Area Triangles is used. + :param plane_tolerance: The value is used during hull construction. When a new point is about to be added + to the hull it gets dropped when the point is closer to the hull than the planeTolerance. + :param use_16bit_indices: Denotes the use of 16-bit vertex indices in Convex triangles or polygons. + :param check_zero_area_triangles: Checks and removes almost zero-area triangles during convex hull computation. + The rejected area size is specified in Area Test Epsilon. + :param quantize_input: Quantizes the input vertices using the k-means clustering. + :param use_plane_shifting: Enables plane shifting vertex limit algorithm. Plane shifting is an alternative + algorithm for the case when the computed hull has more vertices than the specified vertex + limit. + :param shift_vertices: Convex hull input vertices are shifted to be around origin to provide better + computation stability + :param gauss_map_limit: Vertex limit beyond which additional acceleration structures are computed for each + convex mesh. Increase that limit to reduce memory usage. Computing the extra structures + all the time does not guarantee optimal performance. + :param build_gpu_data: When true, additional information required for GPU-accelerated rigid body + simulation is created. This can increase memory usage and cooking times for convex meshes + and triangle meshes. Convex hulls are created with respect to GPU simulation limitations. + Vertex limit is set to 64 and vertex limit per face is internally set to 32. + :param physics_material: Configure which physics material to use. + :return: The newly created mesh group. + """ + group = self.__add_physx_base_mesh_group(name, physics_material) + group["export method"] = 1 + group["ConvexAssetParams"] = { + "AreaTestEpsilon": area_test_epsilon, + "PlaneTolerance": plane_tolerance, + "Use16bitIndices": use_16bit_indices, + "CheckZeroAreaTriangles": check_zero_area_triangles, + "QuantizeInput": quantize_input, + "UsePlaneShifting": use_plane_shifting, + "ShiftVertices": shift_vertices, + "GaussMapLimit": gauss_map_limit, + "BuildGpuData": build_gpu_data + } + + return group + + def add_physx_primitive_mesh_group(self, name: str, + primitive_shape_target: PrimitiveShape = PrimitiveShape.BEST_FIT, + volume_term_coefficient: float = 0.0, + physics_material: typing.Optional[str] = None) -> dict: + """ + Adds a Primitive Shape type PhysX Mesh Group to the scene + + :param name: Name of the mesh group. + :param primitive_shape_target: The shape that should be fitted to this mesh. If BEST_FIT is selected, the + algorithm will determine which of the shapes fits best. + :param volume_term_coefficient: This parameter controls how aggressively the primitive fitting algorithm will try + to minimize the volume of the fitted primitive. A value of 0 (no volume minimization) is + recommended for most meshes, especially those with moderate to high vertex counts. + :param physics_material: Configure which physics material to use. + :return: The newly created mesh group. + """ + group = self.__add_physx_base_mesh_group(name, physics_material) + group["export method"] = 2 + group["PrimitiveAssetParams"] = { + "PrimitiveShapeTarget": int(primitive_shape_target), + "VolumeTermCoefficient": volume_term_coefficient + } + + return group + + def physx_mesh_group_decompose_meshes(self, mesh_group: dict, max_convex_hulls: int = 1024, + max_num_vertices_per_convex_hull: int = 64, + concavity: float = .001, + resolution: float = 100000, + mode: DecompositionMode = DecompositionMode.VOXEL, + alpha: float = .05, + beta: float = .05, + min_volume_per_convex_hull: float = 0.0001, + plane_downsampling: int = 4, + convex_hull_downsampling: int = 4, + pca: bool = False, + project_hull_vertices: bool = True) -> None: + """ + Enables and configures mesh decomposition for a PhysX Mesh Group. + Only valid for convex or primitive mesh types. + + :param mesh_group: Mesh group to configure decomposition for. + :param max_convex_hulls: Controls the maximum number of hulls to generate. + :param max_num_vertices_per_convex_hull: Controls the maximum number of triangles per convex hull. + :param concavity: Maximum concavity of each approximate convex hull. + :param resolution: Maximum number of voxels generated during the voxelization stage. + :param mode: Select voxel-based approximate convex decomposition or tetrahedron-based + approximate convex decomposition. + :param alpha: Controls the bias toward clipping along symmetry planes. + :param beta: Controls the bias toward clipping along revolution axes. + :param min_volume_per_convex_hull: Controls the adaptive sampling of the generated convex hulls. + :param plane_downsampling: Controls the granularity of the search for the best clipping plane. + :param convex_hull_downsampling: Controls the precision of the convex hull generation process + during the clipping plane selection stage. + :param pca: Enable or disable normalizing the mesh before applying the convex decomposition. + :param project_hull_vertices: Project the output convex hull vertices onto the original source mesh to increase + the floating point accuracy of the results. + """ + mesh_group['DecomposeMeshes'] = True + mesh_group['ConvexDecompositionParams'] = { + "MaxConvexHulls": max_convex_hulls, + "MaxNumVerticesPerConvexHull": max_num_vertices_per_convex_hull, + "Concavity": concavity, + "Resolution": resolution, + "Mode": int(mode), + "Alpha": alpha, + "Beta": beta, + "MinVolumePerConvexHull": min_volume_per_convex_hull, + "PlaneDownsampling": plane_downsampling, + "ConvexHullDownsampling": convex_hull_downsampling, + "PCA": pca, + "ProjectHullVertices": project_hull_vertices + } + + def physx_mesh_group_add_selected_node(self, mesh_group: dict, node: str) -> None: + """ + Adds a node to the selected nodes list + + :param mesh_group: Mesh group to add to. + :param node: Node path to add. + """ + mesh_group['NodeSelectionList']['selectedNodes'].append(node) + + def physx_mesh_group_add_unselected_node(self, mesh_group: dict, node: str) -> None: + """ + Adds a node to the unselected nodes list + + :param mesh_group: Mesh group to add to. + :param node: Node path to add. + """ + mesh_group['NodeSelectionList']['unselectedNodes'].append(node) + + def physx_mesh_group_add_selected_unselected_nodes(self, mesh_group: dict, selected: typing.List[str], + unselected: typing.List[str]) -> None: + """ + Adds a set of nodes to the selected/unselected node lists + + :param mesh_group: Mesh group to add to. + :param selected: List of node paths to add to the selected list. + :param unselected: List of node paths to add to the unselected list. + """ + mesh_group['NodeSelectionList']['selectedNodes'].extend(selected) + mesh_group['NodeSelectionList']['unselectedNodes'].extend(unselected) + + def physx_mesh_group_add_comment(self, mesh_group: dict, comment: str) -> None: + """ + Adds a comment rule + + :param mesh_group: Mesh group to add the rule to. + :param comment: Comment string. + """ + rule = { + "$type": "CommentRule", + "comment": comment + } + mesh_group['rules']['rules'].append(rule) + def export(self): return json.dumps(self.manifest) diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToAutonomousNoParamsNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToAutonomousNoParamsNotifyEvent.names new file mode 100644 index 0000000000..216212ca4a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToAutonomousNoParamsNotifyEvent.names @@ -0,0 +1,50 @@ +{ + "entries": [ + { + "base": "AuthorityToAutonomousNoParams Notify Event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "Authority To Autonomous No Params Notify Event" + }, + "slots": [ + { + "base": "AuthorityToAutonomousNoParams Notify Event", + "details": { + "name": "AuthorityToAutonomousNoParams Notify Event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToAutonomousNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToAutonomousNotifyEvent.names new file mode 100644 index 0000000000..50c0ec6013 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToAutonomousNotifyEvent.names @@ -0,0 +1,56 @@ +{ + "entries": [ + { + "base": "AuthorityToAutonomous Notify Event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "Authority To Autonomous Notify Event" + }, + "slots": [ + { + "base": "someFloat", + "details": { + "name": "someFloat" + } + }, + { + "base": "AuthorityToAutonomous Notify Event", + "details": { + "name": "AuthorityToAutonomous Notify Event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToClientNoParamsNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToClientNoParamsNotifyEvent.names new file mode 100644 index 0000000000..bf5b975d63 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToClientNoParamsNotifyEvent.names @@ -0,0 +1,50 @@ +{ + "entries": [ + { + "base": "AuthorityToClientNoParams Notify Event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "Authority To Client No Params Notify Event" + }, + "slots": [ + { + "base": "AuthorityToClientNoParams Notify Event", + "details": { + "name": "AuthorityToClientNoParams Notify Event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToClientNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToClientNotifyEvent.names new file mode 100644 index 0000000000..d3ba2e9299 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToClientNotifyEvent.names @@ -0,0 +1,56 @@ +{ + "entries": [ + { + "base": "AuthorityToClient Notify Event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "Authority To Client Notify Event" + }, + "slots": [ + { + "base": "someFloat", + "details": { + "name": "someFloat" + } + }, + { + "base": "AuthorityToClient Notify Event", + "details": { + "name": "AuthorityToClient Notify Event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AutonomousToAuthorityNoParamsNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AutonomousToAuthorityNoParamsNotifyEvent.names new file mode 100644 index 0000000000..ba5f7aec0c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AutonomousToAuthorityNoParamsNotifyEvent.names @@ -0,0 +1,50 @@ +{ + "entries": [ + { + "base": "AutonomousToAuthorityNoParams Notify Event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "Autonomous To Authority No Params Notify Event" + }, + "slots": [ + { + "base": "AutonomousToAuthorityNoParams Notify Event", + "details": { + "name": "AutonomousToAuthorityNoParams Notify Event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AutonomousToAuthorityNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AutonomousToAuthorityNotifyEvent.names new file mode 100644 index 0000000000..73566d177e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AutonomousToAuthorityNotifyEvent.names @@ -0,0 +1,56 @@ +{ + "entries": [ + { + "base": "AutonomousToAuthority Notify Event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "Autonomous To Authority Notify Event" + }, + "slots": [ + { + "base": "someFloat", + "details": { + "name": "someFloat" + } + }, + { + "base": "AutonomousToAuthority Notify Event", + "details": { + "name": "AutonomousToAuthority Notify Event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/ServerToAuthorityNoParamNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/ServerToAuthorityNoParamNotifyEvent.names new file mode 100644 index 0000000000..b6694211cd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/ServerToAuthorityNoParamNotifyEvent.names @@ -0,0 +1,50 @@ +{ + "entries": [ + { + "base": "ServerToAuthorityNoParam Notify Event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "Server To Authority No Param Notify Event" + }, + "slots": [ + { + "base": "ServerToAuthorityNoParam Notify Event", + "details": { + "name": "ServerToAuthorityNoParam Notify Event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/ServerToAuthorityNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/ServerToAuthorityNotifyEvent.names new file mode 100644 index 0000000000..71ab303260 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/ServerToAuthorityNotifyEvent.names @@ -0,0 +1,56 @@ +{ + "entries": [ + { + "base": "ServerToAuthority Notify Event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "Server To Authority Notify Event" + }, + "slots": [ + { + "base": "someFloat", + "details": { + "name": "someFloat" + } + }, + { + "base": "ServerToAuthority Notify Event", + "details": { + "name": "ServerToAuthority Notify Event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Entity Transform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Entity Transform.names deleted file mode 100644 index 389c88d709..0000000000 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Entity Transform.names +++ /dev/null @@ -1,45 +0,0 @@ -{ - "entries": [ - { - "base": "Entity Transform", - "context": "BehaviorClass", - "variant": "", - "details": { - "name": "Entity Transform" - }, - "methods": [ - { - "base": "Rotate", - "context": "Entity Transform", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke Rotate" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after Rotate is invoked" - }, - "details": { - "name": "Entity Transform::Rotate", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "const EntityId&", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", - "details": { - "name": "const Vector3&" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialData.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialData.names index c7e5b5814d..9f6af426d0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialData.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialData.names @@ -5,8 +5,7 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "Material Data", - "category": "Rendering" + "name": "Material Data" }, "methods": [ { @@ -433,6 +432,7 @@ }, { "base": "GetNormal", + "context": "Getter", "details": { "name": "Get Normal" }, @@ -440,13 +440,14 @@ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Normal" } } ] }, { "base": "GetDiffuse", + "context": "Getter", "details": { "name": "Get Diffuse" }, @@ -454,13 +455,14 @@ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Diffuse" } } ] }, { "base": "GetSpecular", + "context": "Getter", "details": { "name": "Get Specular" }, @@ -468,13 +470,14 @@ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Specular" } } ] }, { "base": "GetBump", + "context": "Getter", "details": { "name": "Get Bump" }, @@ -482,13 +485,14 @@ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Bump" } } ] }, { "base": "GetEmissive", + "context": "Getter", "details": { "name": "Get Emissive" }, @@ -496,13 +500,14 @@ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Emissive" } } ] }, { "base": "GetRoughness", + "context": "Getter", "details": { "name": "Get Roughness" }, @@ -510,13 +515,14 @@ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Roughness" } } ] }, { "base": "GetBaseColor", + "context": "Getter", "details": { "name": "Get Base Color" }, @@ -524,13 +530,14 @@ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Base Color" } } ] }, { "base": "GetAmbientOcclusion", + "context": "Getter", "details": { "name": "Get Ambient Occlusion" }, @@ -538,13 +545,14 @@ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Ambient Occlusion" } } ] }, { "base": "GetMetallic", + "context": "Getter", "details": { "name": "Get Metallic" }, @@ -552,7 +560,7 @@ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Metallic" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Matrix3x4.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Matrix3x4.names index 4b529d8dda..bfa6c885cb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Matrix3x4.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Matrix3x4.names @@ -5,7 +5,7 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "Matrix3x4" + "name": "Matrix 3x 4" }, "methods": [ { @@ -13,21 +13,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateZero" + "tooltip": "When signaled, this will invoke Create Zero" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateZero is invoked" + "tooltip": "Signaled after Create Zero is invoked" }, "details": { - "name": "Create Zero", - "tooltip": "Creates a Matrix3x4 with all values zero" + "name": "Create Zero" }, "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -44,14 +43,13 @@ "tooltip": "Signaled after Set Rotation Part From Quaternion is invoked" }, "details": { - "name": "Set Rotation Part From Quaternion", - "tooltip": "Sets the 3x3 part of the matrix from a quaternion" + "name": "Set Rotation Part From Quaternion" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { @@ -74,32 +72,25 @@ "tooltip": "Signaled after Create From Columns is invoked" }, "details": { - "name": "Create From Columns", - "tooltip": "Constructs from individual columns" + "name": "Create From Columns" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column 1" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column 2" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column 3" - } - }, - { - "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", - "details": { - "name": "Column 4" + "name": "Vector 3" } } ], @@ -107,7 +98,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -124,26 +115,19 @@ "tooltip": "Signaled after Is Close is invoked" }, "details": { - "name": "Is Close", - "tooltip": "Tests element-wise whether this matrix is close to another matrix, within the specified tolerance" + "name": "Is Close" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "A" - } - }, - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "B" + "name": "Matrix 3x 4" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Tolerance" + "name": "float" } } ], @@ -151,7 +135,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Is Close" + "name": "bool" } } ] @@ -168,20 +152,13 @@ "tooltip": "Signaled after Is Orthogonal is invoked" }, "details": { - "name": "Is Orthogonal", - "tooltip": "Tests if the 3x3 part of the matrix is orthogonal" + "name": "Is Orthogonal" }, "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Tolerance" + "name": "float" } } ], @@ -189,7 +166,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Is Orthogonal" + "name": "bool" } } ] @@ -206,14 +183,13 @@ "tooltip": "Signaled after Orthogonalize is invoked" }, "details": { - "name": "Orthogonalize", - "tooltip": "Modifies the basis vectors of the matrix to be orthogonal and unit length" + "name": "Orthogonalize" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } } ] @@ -223,29 +199,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Create From Matrix3x3" + "tooltip": "When signaled, this will invoke Create From Matrix 3x 3" }, "exit": { "name": "Out", - "tooltip": "Signaled after Create From Matrix3x3 is invoked" + "tooltip": "Signaled after Create From Matrix 3x 3 is invoked" }, "details": { - "name": "Create From Matrix3x3", - "tooltip": "Constructs from a Matrix3x3, with translation set to zero" + "name": "Create From Matrix 3x 3" }, - "params": [ - { - "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", - "details": { - "name": "Matrix3x3" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -262,22 +229,13 @@ "tooltip": "Signaled after Retrieve Scale is invoked" }, "details": { - "name": "Retrieve Scale", - "tooltip": "Gets the scale part of the transformation (the length of the basis vectors)" + "name": "Retrieve Scale" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Scale" + "name": "Vector 3" } } ] @@ -287,29 +245,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Create Rotation X" + "tooltip": "When signaled, this will invoke Create RotationX" }, "exit": { "name": "Out", - "tooltip": "Signaled after Create Rotation X is invoked" + "tooltip": "Signaled after Create RotationX is invoked" }, "details": { - "name": "Create Rotation X", - "tooltip": "Sets the matrix to be a rotation around the X-axis, specified in radians" + "name": "Create RotationX" }, - "params": [ - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "Angle (Radians)" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -319,26 +268,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Create From Matrix3x3 And Translation" + "tooltip": "When signaled, this will invoke Create From Matrix 3x 3 And Translation" }, "exit": { "name": "Out", - "tooltip": "Signaled after Create From Matrix3x3 And Translation is invoked" + "tooltip": "Signaled after Create From Matrix 3x 3 And Translation is invoked" }, "details": { - "name": "Create From Matrix3x3 And Translation" + "name": "Create From Matrix 3x 3 And Translation" }, "params": [ - { - "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", - "details": { - "name": "Matrix3x3" - } - }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Translation" + "name": "Vector 3" } } ], @@ -346,7 +289,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -356,28 +299,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ToString" + "tooltip": "When signaled, this will invoke To String" }, "exit": { "name": "Out", - "tooltip": "Signaled after ToString is invoked" + "tooltip": "Signaled after To String is invoked" }, "details": { "name": "To String" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "String" + "name": "AZ Std::basic_string, allocator>" } } ] @@ -394,22 +329,13 @@ "tooltip": "Signaled after Extract Scale is invoked" }, "details": { - "name": "Extract Scale", - "tooltip": "Gets the scale part of the transformation as in RetrieveScale, and also removes this scaling from the matrix" + "name": "Extract Scale" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Scale" + "name": "Vector 3" } } ] @@ -428,19 +354,11 @@ "details": { "name": "Get Transpose" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Transpose" + "name": "Matrix 3x 4" } } ] @@ -457,14 +375,13 @@ "tooltip": "Signaled after Invert Fast is invoked" }, "details": { - "name": "Invert Fast", - "tooltip": "Inverts the transformation represented by the matrix, assuming the 3x3 part is orthogonal" + "name": "Invert Fast" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Inverted" + "name": "Matrix 3x 4" } } ] @@ -481,26 +398,19 @@ "tooltip": "Signaled after Create From Rows is invoked" }, "details": { - "name": "Create From Rows", - "tooltip": "Constructs from individual rows" + "name": "Create From Rows" }, "params": [ { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Row 1" + "name": "Vector 4" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Row 2" - } - }, - { - "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", - "details": { - "name": "Row 3" + "name": "Vector 4" } } ], @@ -508,7 +418,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -525,22 +435,13 @@ "tooltip": "Signaled after Create Translation is invoked" }, "details": { - "name": "Create Translation", - "tooltip": "Sets the matrix to be a translation matrix, with 3x3 part set to the identity" + "name": "Create Translation" }, - "params": [ - { - "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", - "details": { - "name": "Translation" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -550,29 +451,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetTranspose3x3" + "tooltip": "When signaled, this will invoke Get Transpose 3x 3" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetTranspose3x3 is invoked" + "tooltip": "Signaled after Get Transpose 3x 3 is invoked" }, "details": { - "name": "Get Transpose 3x3", - "tooltip": "Gets the matrix obtained by transposing the 3x3 part of the matrix, leaving the translation untouched" + "name": "Get Transpose 3x 3" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Transpose" + "name": "Matrix 3x 4" } } ] @@ -589,26 +481,25 @@ "tooltip": "Signaled after Set Column is invoked" }, "details": { - "name": "Set Column", - "tooltip": "Sets the specified column" + "name": "Set Column" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Column Index" + "name": "int" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Vector 3" } } ] @@ -625,20 +516,13 @@ "tooltip": "Signaled after Get Row is invoked" }, "details": { - "name": "Get Row", - "tooltip": "Gets the specified row" + "name": "Get Row" }, "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Row Index" + "name": "int" } } ], @@ -646,7 +530,7 @@ { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Vector4" + "name": "Vector 4" } } ] @@ -656,29 +540,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetInverseFast" + "tooltip": "When signaled, this will invoke Get Inverse Fast" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetInverseFast is invoked" + "tooltip": "Signaled after Get Inverse Fast is invoked" }, "details": { - "name": "GetInverseFast", - "tooltip": "Gets the inverse of the transformation represented by the matrix.\nThis function works for any matrix, even if they have scaling or skew.\nIf the 3x3 part of the matrix is orthogonal then \ref GetInverseFast is much faster" + "name": "Get Inverse Fast" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Inverse" + "name": "Matrix 3x 4" } } ] @@ -695,23 +570,13 @@ "tooltip": "Signaled after Get Orthogonalized is invoked" }, "details": { - "name": "Get Orthogonalized", - "tooltip": "Returns an orthogonal matrix based on this matrix" - + "name": "Get Orthogonalized" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Orthogonalized" + "name": "Matrix 3x 4" } } ] @@ -721,27 +586,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Multiply3x3" + "tooltip": "When signaled, this will invoke Multiply 3x 3" }, "exit": { "name": "Out", - "tooltip": "Signaled after Multiply3x3 is invoked" + "tooltip": "Signaled after Multiply 3x 3 is invoked" }, "details": { - "name": "Multiply 3x3", - "tooltip": "Post-multiplies the matrix by a vector, using only the 3x3 part of the matrix" + "name": "Multiply 3x 3" }, "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Vector 3" } } ], @@ -749,7 +607,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Result" + "name": "Vector 3" } } ] @@ -766,22 +624,13 @@ "tooltip": "Signaled after Is Finite is invoked" }, "details": { - "name": "Is Finite", - "tooltip": "Checks whether the elements of the matrix are all finite" + "name": "Is Finite" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Is Finite" + "name": "bool" } } ] @@ -798,22 +647,13 @@ "tooltip": "Signaled after Create From Quaternion is invoked" }, "details": { - "name": "Create From Quaternion", - "tooltip": "Sets the matrix from a quaternion, with translation set to zero" + "name": "Create From Quaternion" }, - "params": [ - { - "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", - "details": { - "name": "Quaternion" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -830,38 +670,37 @@ "tooltip": "Signaled after Set Basis And Translation is invoked" }, "details": { - "name": "Set Basis And Translation", - "tooltip": "Sets the three basis vectors and the translation" + "name": "Set Basis And Translation" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Basis X" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Basis Y" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Basis Z" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Translation" + "name": "Vector 3" } } ] @@ -871,27 +710,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Multiply Vector4" + "tooltip": "When signaled, this will invoke Multiply Vector 4" }, "exit": { "name": "Out", - "tooltip": "Signaled after Multiply Vector4 is invoked" + "tooltip": "Signaled after Multiply Vector 4 is invoked" }, "details": { - "name": "Multiply Vector4", - "tooltip": "Operator for transforming a Vector4" + "name": "Multiply Vector 4" }, "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Vector4" + "name": "Vector 4" } } ], @@ -899,7 +731,7 @@ { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Result" + "name": "Vector 4" } } ] @@ -916,22 +748,13 @@ "tooltip": "Signaled after Create Scale is invoked" }, "details": { - "name": "Create Scale", - "tooltip": "Sets the matrix to be a scale matrix, with translation set to zero" + "name": "Create Scale" }, - "params": [ - { - "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", - "details": { - "name": "Scale" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -948,22 +771,13 @@ "tooltip": "Signaled after Create Diagonal is invoked" }, "details": { - "name": "Create Diagonal", - "tooltip": "Sets the matrix to be a diagonal matrix, with translation set to zero" + "name": "Create Diagonal" }, - "params": [ - { - "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", - "details": { - "name": "Diagonal" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -980,22 +794,13 @@ "tooltip": "Signaled after Get Translation is invoked" }, "details": { - "name": "Get Translation", - "tooltip": "Gets the translation" + "name": "Get Translation" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Translation" + "name": "Vector 3" } } ] @@ -1012,14 +817,13 @@ "tooltip": "Signaled after Invert Full is invoked" }, "details": { - "name": "Invert Full", - "tooltip": "Inverts the transformation represented by the matrix\nThis function works for any matrix, even if they have scaling or skew\nIf the 3x3 part of the matrix is orthogonal then \ref InvertFast is much faster" + "name": "Invert Full" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Inverted" + "name": "Matrix 3x 4" } } ] @@ -1036,38 +840,37 @@ "tooltip": "Signaled after Set Columns is invoked" }, "details": { - "name": "Set Columns", - "tooltip": "Sets all the columns of the matrix" + "name": "Set Columns" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column 1" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column 2" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column 3" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column 4" + "name": "Vector 3" } } ] @@ -1084,32 +887,31 @@ "tooltip": "Signaled after Set Element is invoked" }, "details": { - "name": "Set Element", - "tooltip": "Sets the element in the specified row and column\nAccessing individual elements can be slower than working with entire rows" + "name": "Set Element" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Row" + "name": "int" } }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Column" + "name": "int" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Value" + "name": "float" } } ] @@ -1126,20 +928,13 @@ "tooltip": "Signaled after Equal is invoked" }, "details": { - "name": "Equal", - "tooltip": "Compares if two Matrix3x4 are equal" + "name": "Equal" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "A" - } - }, - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "B" + "name": "Matrix 3x 4" } } ], @@ -1147,7 +942,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Equal" + "name": "bool" } } ] @@ -1157,29 +952,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Determinant 3x3" + "tooltip": "When signaled, this will invoke Get Determinant 3x 3" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Determinant 3x3 is invoked" + "tooltip": "Signaled after Get Determinant 3x 3 is invoked" }, "details": { - "name": "Get Determinant 3x3", - "tooltip": "Calculates the determinant of the 3x3 part of the matrix" + "name": "Get Determinant 3x 3" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Determinant" + "name": "float" } } ] @@ -1196,38 +982,37 @@ "tooltip": "Signaled after Get Columns is invoked" }, "details": { - "name": "Get Columns", - "tooltip": "Gets all the columns of the matrix" + "name": "Get Columns" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column 1" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column 2" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column 3" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column 4" + "name": "Vector 3" } } ] @@ -1237,39 +1022,38 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetRows" + "tooltip": "When signaled, this will invoke Set Rows" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetRows is invoked" + "tooltip": "Signaled after Set Rows is invoked" }, "details": { - "name": "SetRows", - "tooltip": "Sets all rows of the matrix" + "name": "Set Rows" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Row 1" + "name": "Vector 4" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Row 2" + "name": "Vector 4" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Row 3" + "name": "Vector 4" } } ] @@ -1286,20 +1070,13 @@ "tooltip": "Signaled after Get Multiplied By Scale is invoked" }, "details": { - "name": "Get Multiplied By Scale", - "tooltip": "Gets a copy of the Matrix3x4 and multiplies it by the specified scale" + "name": "Get Multiplied By Scale" }, "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Scale" + "name": "Vector 3" } } ], @@ -1307,7 +1084,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -1317,29 +1094,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Create Rotation Z" + "tooltip": "When signaled, this will invoke Create RotationZ" }, "exit": { "name": "Out", - "tooltip": "Signaled after Create Rotation Z is invoked" + "tooltip": "Signaled after Create RotationZ is invoked" }, "details": { - "name": "CreateRotationZ", - "tooltip": "Sets the matrix to be a rotation around the Z-axis, specified in radians" + "name": "Create RotationZ" }, - "params": [ - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "Angle (Radians)" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -1356,20 +1124,13 @@ "tooltip": "Signaled after Create From Quaternion And Translation is invoked" }, "details": { - "name": "Create From Quaternion And Translation", - "tooltip": "Sets the matrix from a quaternion and a translation" + "name": "Create From Quaternion And Translation" }, "params": [ - { - "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", - "details": { - "name": "Quaternion" - } - }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Translation" + "name": "Vector 3" } } ], @@ -1377,7 +1138,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -1387,27 +1148,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Row As Vector3" + "tooltip": "When signaled, this will invoke Get Row As Vector 3" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Row As Vector3 is invoked" + "tooltip": "Signaled after Get Row As Vector 3 is invoked" }, "details": { - "name": "Get Row As Vector3", - "tooltip": "Gets the specified row as a Vector3" + "name": "Get Row As Vector 3" }, "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Row" + "name": "int" } } ], @@ -1415,7 +1169,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Result" + "name": "Vector 3" } } ] @@ -1425,35 +1179,51 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Multiply Matrix3x4" + "tooltip": "When signaled, this will invoke Multiply Matrix 3x 4" }, "exit": { "name": "Out", - "tooltip": "Signaled after Multiply Matrix3x4 is invoked" + "tooltip": "Signaled after Multiply Matrix 3x 4 is invoked" }, "details": { - "name": "Multiply Matrix3x4", - "tooltip": "Operator for matrix-matrix multiplication" + "name": "Multiply Matrix 3x 4" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } - }, + } + ], + "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Multiplicand" + "name": "Matrix 3x 4" } } - ], + ] + }, + { + "base": "UnsafeCreateFromMatrix4x4", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Unsafe Create From Matrix 4x 4" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Unsafe Create From Matrix 4x 4 is invoked" + }, + "details": { + "name": "Unsafe Create From Matrix 4x 4" + }, "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -1470,32 +1240,31 @@ "tooltip": "Signaled after Get Rows is invoked" }, "details": { - "name": "GetRows", - "tooltip": "Gets all rows of the matrix" + "name": "Get Rows" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Row 1" + "name": "Vector 4" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Row 2" + "name": "Vector 4" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Row 3" + "name": "Vector 4" } } ] @@ -1512,22 +1281,13 @@ "tooltip": "Signaled after Clone is invoked" }, "details": { - "name": "Clone", - "tooltip": "Returns a deep copy of the provided Matrix3x4" + "name": "Clone" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Clone" + "name": "Matrix 3x 4" } } ] @@ -1537,27 +1297,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Multiply Vector3" + "tooltip": "When signaled, this will invoke Multiply Vector 3" }, "exit": { "name": "Out", - "tooltip": "Signaled after Multiply Vector3 is invoked" + "tooltip": "Signaled after Multiply Vector 3 is invoked" }, "details": { - "name": "Multiply Vector3", - "tooltip": "perator for transforming a Vector3" + "name": "Multiply Vector 3" }, "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Vector 3" } } ], @@ -1565,7 +1318,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Result" + "name": "Vector 3" } } ] @@ -1582,14 +1335,13 @@ "tooltip": "Signaled after Create Identity is invoked" }, "details": { - "name": "Create Identity", - "tooltip": "Creates an identity Matrix3x4" + "name": "Create Identity" }, "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -1599,45 +1351,44 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetBasisAndTranslation" + "tooltip": "When signaled, this will invoke Get Basis And Translation" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetBasisAndTranslation is invoked" + "tooltip": "Signaled after Get Basis And Translation is invoked" }, "details": { - "name": "GetBasisAndTranslation", - "tooltip": "Gets the three basis vectors and the translation" + "name": "Get Basis And Translation" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Basis X" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Basis Y" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Basis Z" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Translation" + "name": "Vector 3" } } ] @@ -1654,22 +1405,13 @@ "tooltip": "Signaled after Create From Value is invoked" }, "details": { - "name": "Create From Value", - "tooltip": "Constructs a matrix with all components set to the specified value" + "name": "Create From Value" }, - "params": [ - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "Value" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -1686,26 +1428,19 @@ "tooltip": "Signaled after Get Element is invoked" }, "details": { - "name": "Get Element", - "tooltip": "Gets the element in the specified row and column\nAccessing individual elements can be slower than working with entire rows" + "name": "Get Element" }, "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Row" + "name": "int" } }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Column" + "name": "int" } } ], @@ -1713,7 +1448,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Value" + "name": "float" } } ] @@ -1723,21 +1458,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Transpose 3x3" + "tooltip": "When signaled, this will invoke Transpose 3x 3" }, "exit": { "name": "Out", - "tooltip": "Signaled after Transpose 3x3 is invoked" + "tooltip": "Signaled after Transpose 3x 3 is invoked" }, "details": { - "name": "Transpose 3x3", - "tooltip": "Gets the matrix obtained by transposing the 3x3 part of the matrix, leaving the translation untouched" + "name": "Transpose 3x 3" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } } ] @@ -1754,14 +1488,13 @@ "tooltip": "Signaled after Transpose is invoked" }, "details": { - "name": "Transpose", - "tooltip": "Transposes the 3x3 part of the matrix, and sets the translation part to zero" + "name": "Transpose" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } } ] @@ -1771,29 +1504,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Create Rotation Y" + "tooltip": "When signaled, this will invoke Create RotationY" }, "exit": { "name": "Out", - "tooltip": "Signaled after Create Rotation Y is invoked" + "tooltip": "Signaled after Create RotationY is invoked" }, "details": { - "name": "Create Rotation Y", - "tooltip": "Sets the matrix to be a rotation around the Y-axis, specified in radians" + "name": "Create RotationY" }, - "params": [ - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "Angle (Radians)" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -1803,33 +1527,32 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetRow" + "tooltip": "When signaled, this will invoke Set Row" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetRow is invoked" + "tooltip": "Signaled after Set Row is invoked" }, "details": { - "name": "Set Row", - "tooltip": "Sets the specified row" + "name": "Set Row" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Row Index" + "name": "int" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Vector4" + "name": "Vector 4" } } ] @@ -1846,22 +1569,13 @@ "tooltip": "Signaled after Get Inverse Full is invoked" }, "details": { - "name": "Get Inverse Full", - "tooltip": "Gets the inverse of the transformation represented by the matrix\nThis function works for any matrix, even if they have scaling or skew\nIf the 3x3 part of the matrix is orthogonal then \ref GetInverseFast is much faster" + "name": "Get Inverse Full" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -1878,20 +1592,13 @@ "tooltip": "Signaled after Get Column is invoked" }, "details": { - "name": "Get Column", - "tooltip": "Gets the specified column" + "name": "Get Column" }, "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Column Index" + "name": "int" } } ], @@ -1899,7 +1606,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column" + "name": "Vector 3" } } ] @@ -1916,35 +1623,46 @@ "tooltip": "Signaled after Set Translation is invoked" }, "details": { - "name": "Set Translation", - "tooltip": "Sets the translation" + "name": "Set Translation" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Translation" + "name": "Vector 3" } } ] }, { - "base": "basisX", + "base": "GetbasisX", "context": "Getter", "details": { - "name": "Get Basis X" + "name": "GetbasisX" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" + } + }, + { + "typeid": "", + "details": { + "name": "basisX" + } + }, + { + "typeid": "", + "details": { + "name": "" } } ], @@ -1952,43 +1670,55 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Basis X" + "name": "Vector 3" } } ] }, { - "base": "basisX", + "base": "SetbasisX", "context": "Setter", "details": { - "name": "Set Basis X" + "name": "SetbasisX" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Basis X" + "name": "basisX" } } ] }, { - "base": "basisY", + "base": "GetbasisY", "context": "Getter", "details": { - "name": "Get Basis Y" + "name": "GetbasisY" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" + } + }, + { + "typeid": "", + "details": { + "name": "basisY" + } + }, + { + "typeid": "", + "details": { + "name": "" } } ], @@ -1996,43 +1726,55 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Basis Y" + "name": "Vector 3" } } ] }, { - "base": "basisY", + "base": "SetbasisY", "context": "Setter", "details": { - "name": "Set Basis Y" + "name": "SetbasisY" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Basis Y" + "name": "basisY" } } ] }, { - "base": "basisZ", + "base": "GetbasisZ", "context": "Getter", "details": { - "name": "Get Basis Z" + "name": "GetbasisZ" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" + } + }, + { + "typeid": "", + "details": { + "name": "basisZ" + } + }, + { + "typeid": "", + "details": { + "name": "" } } ], @@ -2040,43 +1782,55 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Basis Z" + "name": "Vector 3" } } ] }, { - "base": "basisZ", + "base": "SetbasisZ", "context": "Setter", "details": { - "name": "Set Basis Z" + "name": "SetbasisZ" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Basis Z" + "name": "basisZ" } } ] }, { - "base": "translation", + "base": "Gettranslation", "context": "Getter", "details": { - "name": "Get Translation" + "name": "Gettranslation" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" + } + }, + { + "typeid": "", + "details": { + "name": "translation" + } + }, + { + "typeid": "", + "details": { + "name": "" } } ], @@ -2084,28 +1838,28 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Translation" + "name": "Vector 3" } } ] }, { - "base": "translation", + "base": "Settranslation", "context": "Setter", "details": { - "name": "Set Translation" + "name": "Settranslation" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Translation" + "name": "translation" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponent.names new file mode 100644 index 0000000000..22636e0453 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponent.names @@ -0,0 +1,438 @@ +{ + "entries": [ + { + "base": "NetworkTestPlayerComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Network Test Player Component" + }, + "methods": [ + { + "base": "AutonomousToAuthority", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Autonomous To Authority" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Autonomous To Authority is invoked" + }, + "details": { + "name": "Autonomous To Authority" + }, + "params": [ + { + "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", + "details": { + "name": "Network Test Player Component" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "ServerToAuthority", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Server To Authority" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Server To Authority is invoked" + }, + "details": { + "name": "Server To Authority" + }, + "params": [ + { + "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", + "details": { + "name": "Network Test Player Component" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "AutonomousToAuthorityByEntityId", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Autonomous To Authority By Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Autonomous To Authority By Entity Id is invoked" + }, + "details": { + "name": "Autonomous To Authority By Entity Id" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Source", + "tooltip": "The Source containing the NetworkTestPlayerComponentController" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "some Float" + } + } + ] + }, + { + "base": "ServerToAuthorityByEntityId", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Server To Authority By Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Server To Authority By Entity Id is invoked" + }, + "details": { + "name": "Server To Authority By Entity Id" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Source", + "tooltip": "The Source containing the NetworkTestPlayerComponentController" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "some Float" + } + } + ] + }, + { + "base": "AutonomousToAuthorityNoParams", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Autonomous To Authority No Params" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Autonomous To Authority No Params is invoked" + }, + "details": { + "name": "Autonomous To Authority No Params" + }, + "params": [ + { + "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", + "details": { + "name": "Network Test Player Component" + } + } + ] + }, + { + "base": "AuthorityToAutonomous", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Authority To Autonomous" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Authority To Autonomous is invoked" + }, + "details": { + "name": "Authority To Autonomous" + }, + "params": [ + { + "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", + "details": { + "name": "Network Test Player Component" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "AuthorityToClientNoParams", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Authority To Client No Params" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Authority To Client No Params is invoked" + }, + "details": { + "name": "Authority To Client No Params" + }, + "params": [ + { + "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", + "details": { + "name": "Network Test Player Component" + } + } + ] + }, + { + "base": "AuthorityToClientByEntityId", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Authority To Client By Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Authority To Client By Entity Id is invoked" + }, + "details": { + "name": "Authority To Client By Entity Id" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Source", + "tooltip": "The Source containing the NetworkTestPlayerComponentController" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "some Float" + } + } + ] + }, + { + "base": "AuthorityToClient", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Authority To Client" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Authority To Client is invoked" + }, + "details": { + "name": "Authority To Client" + }, + "params": [ + { + "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", + "details": { + "name": "Network Test Player Component" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "AuthorityToAutonomousNoParams", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Authority To Autonomous No Params" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Authority To Autonomous No Params is invoked" + }, + "details": { + "name": "Authority To Autonomous No Params" + }, + "params": [ + { + "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", + "details": { + "name": "Network Test Player Component" + } + } + ] + }, + { + "base": "ServerToAuthorityNoParamByEntityId", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Server To Authority No Param By Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Server To Authority No Param By Entity Id is invoked" + }, + "details": { + "name": "Server To Authority No Param By Entity Id" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Source", + "tooltip": "The Source containing the NetworkTestPlayerComponentController" + } + } + ] + }, + { + "base": "AuthorityToClientNoParamsByEntityId", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Authority To Client No Params By Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Authority To Client No Params By Entity Id is invoked" + }, + "details": { + "name": "Authority To Client No Params By Entity Id" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Source", + "tooltip": "The Source containing the NetworkTestPlayerComponentController" + } + } + ] + }, + { + "base": "AuthorityToAutonomousByEntityId", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Authority To Autonomous By Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Authority To Autonomous By Entity Id is invoked" + }, + "details": { + "name": "Authority To Autonomous By Entity Id" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Source", + "tooltip": "The Source containing the NetworkTestPlayerComponentController" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "some Float" + } + } + ] + }, + { + "base": "AutonomousToAuthorityNoParamsByEntityId", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Autonomous To Authority No Params By Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Autonomous To Authority No Params By Entity Id is invoked" + }, + "details": { + "name": "Autonomous To Authority No Params By Entity Id" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Source", + "tooltip": "The Source containing the NetworkTestPlayerComponentController" + } + } + ] + }, + { + "base": "AuthorityToAutonomousNoParamsByEntityId", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Authority To Autonomous No Params By Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Authority To Autonomous No Params By Entity Id is invoked" + }, + "details": { + "name": "Authority To Autonomous No Params By Entity Id" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Source", + "tooltip": "The Source containing the NetworkTestPlayerComponentController" + } + } + ] + }, + { + "base": "ServerToAuthorityNoParam", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Server To Authority No Param" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Server To Authority No Param is invoked" + }, + "details": { + "name": "Server To Authority No Param" + }, + "params": [ + { + "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", + "details": { + "name": "Network Test Player Component" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponentNetworkInput.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponentNetworkInput.names index 011315360d..d8c016db0f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponentNetworkInput.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponentNetworkInput.names @@ -5,8 +5,7 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "Network Test Player Component Network Input", - "category": "Automated Testing" + "name": "Network Test Player Component Network Input" }, "methods": [ { @@ -27,13 +26,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Forward Back" - } - }, - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "Left Right" + "name": "left Right" } } ], @@ -47,9 +40,9 @@ ] }, { - "base": "FwdBack", + "base": "GetFwdBack", "details": { - "name": "Get Forward Back" + "name": "Get Fwd Back" }, "params": [ { @@ -63,15 +56,15 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Forward Back" + "name": "Fwd Back" } } ] }, { - "base": "FwdBack", + "base": "SetFwdBack", "details": { - "name": "Set Forward Back" + "name": "Set Fwd Back" }, "params": [ { @@ -83,13 +76,13 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Forward Back" + "name": "Fwd Back" } } ] }, { - "base": "LeftRight", + "base": "GetLeftRight", "details": { "name": "Get Left Right" }, @@ -111,7 +104,7 @@ ] }, { - "base": "LeftRight", + "base": "SetLeftRight", "details": { "name": "Set Left Right" }, diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ReferenceShapeConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ReferenceShapeConfig.names index c312519f02..d52ef119df 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ReferenceShapeConfig.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ReferenceShapeConfig.names @@ -5,19 +5,32 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "ReferenceShapeConfig" + "name": "Reference Shape Config" }, "methods": [ { - "base": "shapeEntityId", + "base": "GetshapeEntityId", + "context": "Getter", "details": { - "name": "ReferenceShapeConfig::shapeEntityId::Getter" + "name": "Getshape Entity Id" }, "params": [ { "typeid": "{3E49974D-2EE0-4AF9-92B9-229A22B515C3}", "details": { - "name": "ReferenceShapeConfig*" + "name": "Vegetation Reference Shape" + } + }, + { + "typeid": "", + "details": { + "name": "shape Entity Id" + } + }, + { + "typeid": "", + "details": { + "name": "" } } ], @@ -25,28 +38,29 @@ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId&", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } ] }, { - "base": "shapeEntityId", + "base": "SetshapeEntityId", + "context": "Setter", "details": { - "name": "ReferenceShapeConfig::shapeEntityId::Setter" + "name": "Setshape Entity Id" }, "params": [ { "typeid": "{3E49974D-2EE0-4AF9-92B9-229A22B515C3}", "details": { - "name": "ReferenceShapeConfig*" + "name": "Vegetation Reference Shape" } }, { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "const EntityId&", + "name": "shape Entity Id", "tooltip": "Entity Unique Id" } } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Unit Testing.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Unit Testing.names deleted file mode 100644 index 160f0563c1..0000000000 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Unit Testing.names +++ /dev/null @@ -1,471 +0,0 @@ -{ - "entries": [ - { - "base": "Unit Testing", - "context": "BehaviorClass", - "variant": "", - "details": { - "name": "Unit Testing", - "category": "Tests" - }, - "methods": [ - { - "base": "ExpectLessThanEqual", - "context": "Unit Testing", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke ExpectLessThanEqual" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after ExpectLessThanEqual is invoked" - }, - "details": { - "name": "Expect Less Than Equal", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", - "details": { - "name": "Candidate" - } - }, - { - "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", - "details": { - "name": "Reference" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "Report" - } - } - ] - }, - { - "base": "ExpectGreaterThanEqual", - "context": "Unit Testing", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke ExpectGreaterThanEqual" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after ExpectGreaterThanEqual is invoked" - }, - "details": { - "name": "Unit Testing::Expect Greater Than Equal", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", - "details": { - "name": "Candidate" - } - }, - { - "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", - "details": { - "name": "Reference" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "Report" - } - } - ] - }, - { - "base": "MarkComplete", - "context": "Unit Testing", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke MarkComplete" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after MarkComplete is invoked" - }, - "details": { - "name": "Mark Complete", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "Report" - } - } - ] - }, - { - "base": "ExpectTrue", - "context": "Unit Testing", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke ExpectTrue" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after ExpectTrue is invoked" - }, - "details": { - "name": "Expect True", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", - "details": { - "name": "Candidate" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "Report" - } - } - ] - }, - { - "base": "Checkpoint", - "context": "Unit Testing", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke Checkpoint" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after Checkpoint is invoked" - }, - "details": { - "name": "Checkpoint", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "Report" - } - } - ] - }, - { - "base": "ExpectFalse", - "context": "Unit Testing", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke ExpectFalse" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after ExpectFalse is invoked" - }, - "details": { - "name": "Expect False", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", - "details": { - "name": "Candidate" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "Report" - } - } - ] - }, - { - "base": "ExpectEqual", - "context": "Unit Testing", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke ExpectEqual" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after ExpectEqual is invoked" - }, - "details": { - "name": "Expect Equal", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", - "details": { - "name": "Candidate" - } - }, - { - "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", - "details": { - "name": "Reference" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "Report" - } - } - ] - }, - { - "base": "ExpectLessThan", - "context": "Unit Testing", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke ExpectLessThan" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after ExpectLessThan is invoked" - }, - "details": { - "name": "Expect Less Than", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", - "details": { - "name": "Candidate" - } - }, - { - "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", - "details": { - "name": "Reference" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "Report" - } - } - ] - }, - { - "base": "AddSuccess", - "context": "Unit Testing", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke Add Success" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after Add Success is invoked" - }, - "details": { - "name": "Add Success", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "Report" - } - } - ] - }, - { - "base": "ExpectNotEqual", - "context": "Unit Testing", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke ExpectNotEqual" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after ExpectNotEqual is invoked" - }, - "details": { - "name": "Expect Not Equal", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", - "details": { - "name": "Aabb" - } - }, - { - "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", - "details": { - "name": "Aabb" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "Report" - } - } - ] - }, - { - "base": "ExpectGreaterThan", - "context": "Unit Testing", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke ExpectGreaterThan" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after ExpectGreaterThan is invoked" - }, - "details": { - "name": "Expect Greater Than", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", - "details": { - "name": "double" - } - }, - { - "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", - "details": { - "name": "double" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "Report" - } - } - ] - }, - { - "base": "AddFailure", - "context": "Unit Testing", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke AddFailure" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after AddFailure is invoked" - }, - "details": { - "name": "Add Failure", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "Report" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_AddElementatEnd.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_AddElementatEnd.names index 30d402f254..2b32364681 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_AddElementatEnd.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_AddElementatEnd.names @@ -7,31 +7,30 @@ "details": { "name": "Add Element at End", "category": "Containers", - "tooltip": "Adds the provided element at the end of the container", - "subtitle": "Containers" + "tooltip": "Adds the provided element at the end of the container" }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Container", + "base": "DataOutput_Container_0", "details": { "name": "Container" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Output signal" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_ClearAllElements.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_ClearAllElements.names index 4e071c5e32..fad702a8f4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_ClearAllElements.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_ClearAllElements.names @@ -7,30 +7,29 @@ "details": { "name": "Clear All Elements", "category": "Containers", - "tooltip": "Eliminates all the elements in the container", - "subtitle": "Containers" + "tooltip": "Eliminates all the elements in the container" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Container", + "base": "DataOutput_Container_0", "details": { "name": "Container" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_Erase.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_Erase.names index 601836b23d..eb5c846fc8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_Erase.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_Erase.names @@ -7,38 +7,37 @@ "details": { "name": "Erase", "category": "Containers", - "tooltip": "Erase the element at the specified Index or with the specified Key", - "subtitle": "Containers" + "tooltip": "Erase the element at the specified Index or with the specified Key" }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Container", + "base": "DataOutput_Container_0", "details": { "name": "Container" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Output signal" } }, { - "base": "Output_Element Not Found", + "base": "Output_Element Not Found_1", "details": { "name": "Element Not Found", "tooltip": "Triggered if the specified element was not found" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_ForEach.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_ForEach.names index 817bbf8e17..d20095fcf4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_ForEach.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_ForEach.names @@ -11,34 +11,34 @@ }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signaled upon node entry" } }, { - "base": "Input_Break", + "base": "Input_Break_1", "details": { "name": "Break", "tooltip": "Stops the iteration when signaled" } }, { - "base": "Output_Each", + "base": "Output_Each_0", "details": { "name": "Each", "tooltip": "Signalled after each element of the container" } }, { - "base": "Output_Finished", + "base": "Output_Finished_1", "details": { "name": "Finished", "tooltip": "The container has been fully iterated over" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetElement.names index fab464a029..0eba48907e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetElement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetElement.names @@ -7,32 +7,31 @@ "details": { "name": "Get Element", "category": "Containers", - "tooltip": "Returns the element at the specified Index or Key", - "subtitle": "Containers" + "tooltip": "Returns the element at the specified Index or Key" }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Output signal" } }, { - "base": "Output_Key Not Found", + "base": "Output_Key Not Found_1", "details": { "name": "Key Not Found", "tooltip": "Triggered if the specified key was not found" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetFirstElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetFirstElement.names index fa616642b4..ebbbcfeb31 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetFirstElement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetFirstElement.names @@ -7,25 +7,24 @@ "details": { "name": "Get First Element", "category": "Containers", - "tooltip": "Retrieves the first element in the container", - "subtitle": "Containers" + "tooltip": "Retrieves the first element in the container" }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Output signal" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetLastElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetLastElement.names index 2c13a87d7b..715fedfff5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetLastElement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetLastElement.names @@ -7,25 +7,24 @@ "details": { "name": "Get Last Element", "category": "Containers", - "tooltip": "Get Last Element", - "subtitle": "Containers" + "tooltip": "Get Last Element" }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Output signal" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetSize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetSize.names index 1f7dbdad03..20c6ae2825 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetSize.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetSize.names @@ -7,30 +7,29 @@ "details": { "name": "Get Size", "category": "Containers", - "tooltip": "Get the number of elements in the specified container", - "subtitle": "Containers" + "tooltip": "Get the number of elements in the specified container" }, "slots": [ { - "base": "DataOutput_Size", + "base": "DataOutput_Size_0", "details": { "name": "Size" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_Insert.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_Insert.names index 347510eeeb..abf140df6f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_Insert.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_Insert.names @@ -7,31 +7,30 @@ "details": { "name": "Insert", "category": "Containers", - "tooltip": "Inserts an element into the container at the specified Index or Key", - "subtitle": "Containers" + "tooltip": "Inserts an element into the container at the specified Index or Key" }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Container", + "base": "DataOutput_Container_0", "details": { "name": "Container" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Output signal" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_IsEmpty.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_IsEmpty.names index a3254521e2..9b87e1d329 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_IsEmpty.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_IsEmpty.names @@ -7,44 +7,43 @@ "details": { "name": "Is Empty", "category": "Containers", - "tooltip": "Returns whether the container is empty", - "subtitle": "Containers" + "tooltip": "Returns whether the container is empty" }, "slots": [ { - "base": "DataOutput_Is Empty", + "base": "DataOutput_Is Empty_0", "details": { "name": "Is Empty" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "Output_True", + "base": "Output_True_1", "details": { "name": "True", "tooltip": "The container is empty" } }, { - "base": "Output_False", + "base": "Output_False_2", "details": { "name": "False", "tooltip": "The container is not empty" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_AZEventHandler.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_AZEventHandler.names index af1e8efe7a..bfd0c9954a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_AZEventHandler.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_AZEventHandler.names @@ -11,35 +11,35 @@ }, "slots": [ { - "base": "Input_Connect", + "base": "Input_Connect_0", "details": { "name": "Connect", "tooltip": "Connect the AZ Event to this AZ Event Handler." } }, { - "base": "Input_Disconnect", + "base": "Input_Disconnect_1", "details": { "name": "Disconnect", "tooltip": "Disconnect current AZ Event from this AZ Event Handler." } }, { - "base": "Output_On Connected", + "base": "Output_On Connected_0", "details": { "name": "On Connected", "tooltip": "Signaled when a connection has taken place." } }, { - "base": "Output_On Disconnected", + "base": "Output_On Disconnected_1", "details": { "name": "On Disconnected", "tooltip": "Signaled when this event handler is disconnected." } }, { - "base": "Output_OnEvent", + "base": "Output_OnEvent_2", "details": { "name": "OnEvent", "tooltip": "Triggered when the AZ Event invokes Signal() function." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_EventHandler.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_EventHandler.names index 1a09bb23d9..1cde29ec96 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_EventHandler.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_EventHandler.names @@ -11,35 +11,35 @@ }, "slots": [ { - "base": "Input_Connect", + "base": "Input_Connect_0", "details": { "name": "Connect", "tooltip": "Connect this event handler to the specified entity." } }, { - "base": "Input_Disconnect", + "base": "Input_Disconnect_1", "details": { "name": "Disconnect", "tooltip": "Disconnect this event handler." } }, { - "base": "Output_OnConnected", + "base": "Output_OnConnected_0", "details": { "name": "OnConnected", "tooltip": "Signaled when a connection has taken place." } }, { - "base": "Output_OnDisconnected", + "base": "Output_OnDisconnected_1", "details": { "name": "OnDisconnected", "tooltip": "Signaled when this event handler is disconnected." } }, { - "base": "Output_OnFailure", + "base": "Output_OnFailure_2", "details": { "name": "OnFailure", "tooltip": "Signaled when it is not possible to connect this handler." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_FunctionDefinition.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_FunctionDefinition.names index da666253e6..3c9379ef22 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_FunctionDefinition.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_FunctionDefinition.names @@ -7,18 +7,17 @@ "details": { "name": "Function Definition", "category": "Core", - "tooltip": "Represents either an execution entry or exit node.", - "subtitle": "Core" + "tooltip": "Represents either an execution entry or exit node." }, "slots": [ { - "base": "Input_ ", + "base": "Input_ _0", "details": { "name": " " } }, { - "base": "Output_ ", + "base": "Output_ _0", "details": { "name": " " } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_MethodOverloaded.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_MethodOverloaded.names index 8c778bf0b6..62a4d815a5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_MethodOverloaded.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_MethodOverloaded.names @@ -5,7 +5,7 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MethodOverloaded", + "name": "Method Overloaded", "category": "Core", "tooltip": "MethodOverloaded" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_Nodeling.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_Nodeling.names index 58dd499c58..99ed9ebda3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_Nodeling.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_Nodeling.names @@ -7,8 +7,7 @@ "details": { "name": "Nodeling", "category": "Core", - "tooltip": "Represents either an execution entry or exit node", - "subtitle": "Core" + "tooltip": "Represents either an execution entry or exit node" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_ReceiveScriptEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_ReceiveScriptEvent.names index ee0a92ccae..685dd56da2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_ReceiveScriptEvent.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_ReceiveScriptEvent.names @@ -11,35 +11,35 @@ }, "slots": [ { - "base": "Input_Connect", + "base": "Input_Connect_0", "details": { "name": "Connect", "tooltip": "Connect this event handler to the specified entity." } }, { - "base": "Input_Disconnect", + "base": "Input_Disconnect_1", "details": { "name": "Disconnect", "tooltip": "Disconnect this event handler." } }, { - "base": "Output_OnConnected", + "base": "Output_OnConnected_0", "details": { "name": "OnConnected", "tooltip": "Signaled when a connection has taken place." } }, { - "base": "Output_OnDisconnected", + "base": "Output_OnDisconnected_1", "details": { "name": "OnDisconnected", "tooltip": "Signaled when this event handler is disconnected." } }, { - "base": "Output_OnFailure", + "base": "Output_OnFailure_2", "details": { "name": "OnFailure", "tooltip": "Signaled when it is not possible to connect this handler." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_SendScriptEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_SendScriptEvent.names index d5faa52c52..52d949446c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_SendScriptEvent.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_SendScriptEvent.names @@ -11,14 +11,14 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Fires the specified ScriptEvent when signaled" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Trigged after the ScriptEvent has been signaled and returns" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Add.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Add.names index e78805904d..46833c3e0c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Add.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Add.names @@ -7,38 +7,37 @@ "details": { "name": "Add", "category": "Deprecated", - "tooltip": "This node is deprecated, use Add (+), it provides contextual type and slots", - "subtitle": "Deprecated" + "tooltip": "This node is deprecated, use Add (+), it provides contextual type and slots" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Matrix3x3: A", + "base": "DataInput_A_0", "details": { - "name": "Matrix3x3: A" + "name": "A" } }, { - "base": "DataInput_Matrix3x3: B", + "base": "DataInput_B_1", "details": { - "name": "Matrix3x3: B" + "name": "B" } }, { - "base": "DataOutput_Result: Matrix3x3", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_DivideByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_DivideByNumber.names index 32e7e9b9ca..be77f24b3d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_DivideByNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_DivideByNumber.names @@ -5,40 +5,39 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "DivideByNumber", + "name": "Divide By Number", "category": "Deprecated", - "tooltip": "returns matrix created from multiply the source matrix by 1/Divisor", - "subtitle": "Deprecated" + "tooltip": "returns matrix created from multiply the source matrix by 1/Divisor" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Matrix3x3: Source", + "base": "DataInput_Source_0", "details": { - "name": "Matrix3x3: Source" + "name": "Source" } }, { - "base": "DataInput_Number: Divisor", + "base": "DataInput_Divisor_1", "details": { - "name": "Number: Divisor" + "name": "Divisor" } }, { - "base": "DataOutput_Result: Matrix3x3", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_DivideByVector.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_DivideByVector.names index d0fbd8fefb..9eebba003c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_DivideByVector.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_DivideByVector.names @@ -1,44 +1,43 @@ { "entries": [ { - "base": "{57BA2085-2225-5E7E-B132-9CCD0AFC55EA}", + "base": "{DF3A38B7-2C72-5CE5-BB8C-3293C7431F60}", "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "DivideByVector", + "name": "Divide By Vector", "category": "Deprecated", - "tooltip": "This node is deprecated, use Divide (/), it provides contextual type and slot configurations.", - "subtitle": "Deprecated" + "tooltip": "This node is deprecated, use Divide (/), it provides contextual type and slots" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector3: Numerator", + "base": "DataInput_Numerator_0", "details": { - "name": "Vector3: Numerator" + "name": "Numerator" } }, { - "base": "DataInput_Vector3: Divisor", + "base": "DataInput_Divisor_1", "details": { - "name": "Vector3: Divisor" + "name": "Divisor" } }, { - "base": "DataOutput_Result: Vector3", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Length.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Length.names index 1f534b7480..4e38b41d29 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Length.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Length.names @@ -7,32 +7,31 @@ "details": { "name": "Length", "category": "Deprecated", - "tooltip": "This node is deprecated, use the Length node, it provides contextual type and slot configurations", - "subtitle": "Deprecated" + "tooltip": "This node is deprecated, use the Length node, it provides contextual type and slot configurations" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Quaternion: Source", + "base": "DataInput_Source_0", "details": { - "name": "Quaternion: Source" + "name": "Source" } }, { - "base": "DataOutput_Result: Number", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByColor.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByColor.names index b5330e253a..b25bb7779d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByColor.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByColor.names @@ -5,40 +5,39 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MultiplyByColor", + "name": "Multiply By Color", "category": "Deprecated", - "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots", - "subtitle": "Deprecated" + "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Color: A", + "base": "DataInput_A_0", "details": { - "name": "Color: A" + "name": "A" } }, { - "base": "DataInput_Color: B", + "base": "DataInput_B_1", "details": { - "name": "Color: B" + "name": "B" } }, { - "base": "DataOutput_Result: Color", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Color" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByMatrix.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByMatrix.names index 934d7deea7..82002c339e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByMatrix.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByMatrix.names @@ -1,44 +1,43 @@ { "entries": [ { - "base": "{FDB0FF00-F185-5CCF-851A-BBD5116C43EC}", + "base": "{29187DB1-2573-5243-86EB-190B64E00C54}", "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MultiplyByMatrix", + "name": "Multiply By Matrix", "category": "Deprecated", - "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots", - "subtitle": "Deprecated" + "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Matrix3x3: A", + "base": "DataInput_A_0", "details": { - "name": "Matrix3x3: A" + "name": "A" } }, { - "base": "DataInput_Matrix3x3: B", + "base": "DataInput_B_1", "details": { - "name": "Matrix3x3: B" + "name": "B" } }, { - "base": "DataOutput_Result: Matrix3x3", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByRotation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByRotation.names index fa8a381927..5427a3bc28 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByRotation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByRotation.names @@ -5,40 +5,39 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MultiplyByRotation", + "name": "Multiply By Rotation", "category": "Deprecated", - "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots", - "subtitle": "Deprecated" + "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Quaternion: A", + "base": "DataInput_A_0", "details": { - "name": "Quaternion: A" + "name": "A" } }, { - "base": "DataInput_Quaternion: B", + "base": "DataInput_B_1", "details": { - "name": "Quaternion: B" + "name": "B" } }, { - "base": "DataOutput_Result: Quaternion", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Quaternion" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByTransform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByTransform.names index 946f79aa5e..85c90f19b5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByTransform.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByTransform.names @@ -5,40 +5,39 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MultiplyByTransform", + "name": "Multiply By Transform", "category": "Deprecated", - "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots", - "subtitle": "Deprecated" + "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Transform: A", + "base": "DataInput_A_0", "details": { - "name": "Transform: A" + "name": "A" } }, { - "base": "DataInput_Transform: B", + "base": "DataInput_B_1", "details": { - "name": "Transform: B" + "name": "B" } }, { - "base": "DataOutput_Result: Transform", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Transform" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByVector.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByVector.names index 70747caf68..1ec5c980e7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByVector.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByVector.names @@ -5,40 +5,39 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MultiplyByVector", + "name": "Multiply By Vector", "category": "Deprecated", - "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots", - "subtitle": "Deprecated" + "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector4: Source", + "base": "DataInput_Source_0", "details": { - "name": "Vector4: Source" + "name": "Source" } }, { - "base": "DataInput_Vector4: Multiplier", + "base": "DataInput_Multiplier_1", "details": { - "name": "Vector4: Multiplier" + "name": "Multiplier" } }, { - "base": "DataOutput_Result: Vector4", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Vector4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Negate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Negate.names index 4f209d49d4..134425dd02 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Negate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Negate.names @@ -7,32 +7,31 @@ "details": { "name": "Negate", "category": "Deprecated", - "tooltip": "returns Source with every element multiplied by -1", - "subtitle": "Deprecated" + "tooltip": "returns Source with every element multiplied by -1" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Color: Source", + "base": "DataInput_Source_0", "details": { - "name": "Color: Source" + "name": "Source" } }, { - "base": "DataOutput_Result: Color", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Color" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Subtract.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Subtract.names index ddd6536be0..3190e11862 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Subtract.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Subtract.names @@ -1,44 +1,43 @@ { "entries": [ { - "base": "{C94009EE-73ED-5CA2-B1AC-026EB08D1EF5}", + "base": "{36F01867-D157-5540-ADB8-3E71F96D2187}", "context": "ScriptCanvas::Node", "variant": "", "details": { "name": "Subtract", "category": "Deprecated", - "tooltip": "This node is deprecated, use Subtract (-), it provides contextual type and slots", - "subtitle": "Deprecated" + "tooltip": "This node is deprecated, use Subtract (-), it provides contextual type and slots" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector3: A", + "base": "DataInput_A_0", "details": { - "name": "Vector3: A" + "name": "A" } }, { - "base": "DataInput_Vector3: B", + "base": "DataInput_B_1", "details": { - "name": "Vector3: B" + "name": "B" } }, { - "base": "DataOutput_Result: Vector3", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Developer_WrapperMock.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Developer_WrapperMock.names index de6117ff88..f62869bbd5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Developer_WrapperMock.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Developer_WrapperMock.names @@ -5,7 +5,7 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "WrapperMock", + "name": "Wrapper Mock", "category": "Developer", "tooltip": "Node for Mocking Wrapper Node visuals" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityForward.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityForward.names index 582552020f..02ef0059da 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityForward.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityForward.names @@ -7,35 +7,35 @@ "details": { "name": "Get Entity Forward", "category": "Entity/Entity", - "tooltip": "Returns the forward direction vector from the specified entity' world transform, scaled by a given value (O3DE uses Z up, right handed)" + "tooltip": "returns the forward direction vector from the specified entity' world transform, scaled by a given value (O3DE uses Z up, right handed)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_EntityId", + "base": "DataInput_EntityId_0", "details": { "name": "EntityId" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_1", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityRight.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityRight.names index 1d8a2958e5..24aa7f38ab 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityRight.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityRight.names @@ -7,35 +7,35 @@ "details": { "name": "Get Entity Right", "category": "Entity/Entity", - "tooltip": "Returns the right direction vector from the specified entity's world transform, scaled by a given value (O3DE uses Z up, right handed)" + "tooltip": "returns the right direction vector from the specified entity's world transform, scaled by a given value (O3DE uses Z up, right handed)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_EntityId", + "base": "DataInput_EntityId_0", "details": { "name": "EntityId" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_1", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityUp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityUp.names index 55e4e5c419..ae8642dd03 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityUp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityUp.names @@ -7,35 +7,35 @@ "details": { "name": "Get Entity Up", "category": "Entity/Entity", - "tooltip": "Returns the up direction vector from the specified entity's world transform, scaled by a given value (O3DE uses Z up, right handed)" + "tooltip": "returns the up direction vector from the specified entity's world transform, scaled by a given value (O3DE uses Z up, right handed)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_EntityId", + "base": "DataInput_EntityId_0", "details": { "name": "EntityId" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_1", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsActive.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsActive.names index 5969f5e851..3908523dfd 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsActive.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsActive.names @@ -7,29 +7,29 @@ "details": { "name": "Is Active", "category": "Entity/Entity", - "tooltip": "Returns true if entity with the provided Id is valid and active." + "tooltip": "returns true if entity with the provided Id is valid and active." }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Entity Id", + "base": "DataInput_Entity Id_0", "details": { "name": "Entity Id" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsValid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsValid.names index 5f8783a4d6..577938d029 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsValid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsValid.names @@ -7,29 +7,29 @@ "details": { "name": "Is Valid", "category": "Entity/Entity", - "tooltip": "Returns true if Source is valid, else false" + "tooltip": "returns true if Source is valid, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_ToString.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_ToString.names index 1c2d36859d..a26df73e86 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_ToString.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_ToString.names @@ -7,29 +7,29 @@ "details": { "name": "To String", "category": "Entity/Entity", - "tooltip": "Returns a string representation of Source" + "tooltip": "returns a string representation of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_BranchInputTypeExample.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_BranchInputTypeExample.names new file mode 100644 index 0000000000..714992620f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_BranchInputTypeExample.names @@ -0,0 +1,70 @@ +{ + "entries": [ + { + "base": "{FDD3D684-2C9A-0C05-D2A3-FD67685D8F26}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Branch Input Type Example", + "category": "Examples", + "tooltip": "Example of branch passing as input by value, pointer and reference." + }, + "slots": [ + { + "base": "Input_Get Internal Vector_0", + "details": { + "name": "Get Internal Vector" + } + }, + { + "base": "Output_On Get Internal Vector_0", + "details": { + "name": "On Get Internal Vector" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + }, + { + "base": "Input_Branches On Input Type_1", + "details": { + "name": "Branches On Input Type" + } + }, + { + "base": "DataInput_Input Type_0", + "details": { + "name": "Input Type" + } + }, + { + "base": "Output_By Value_1", + "details": { + "name": "By Value" + } + }, + { + "base": "DataOutput_Value Input_1", + "details": { + "name": "Value Input" + } + }, + { + "base": "Output_By Pointer_2", + "details": { + "name": "By Pointer" + } + }, + { + "base": "DataOutput_Pointer Input_2", + "details": { + "name": "Pointer Input" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_InputTypeExample.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_InputTypeExample.names similarity index 71% rename from Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_InputTypeExample.names rename to Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_InputTypeExample.names index 0497af8efc..6ebd476fb1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_InputTypeExample.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_InputTypeExample.names @@ -5,62 +5,61 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "InputTypeExample", - "category": "Tests", - "tooltip": "Example of passing as input by value, pointer and reference.", - "subtitle": "Tests" + "name": "Input Type Example", + "category": "Examples", + "tooltip": "Example of passing as input by value, pointer and reference." }, "slots": [ { - "base": "Input_Clear By Value", + "base": "Input_Clear By Value_0", "details": { "name": "Clear By Value" } }, { - "base": "DataInput_Value Input", + "base": "DataInput_Value Input_0", "details": { "name": "Value Input" } }, { - "base": "Output_On Clear By Value", + "base": "Output_On Clear By Value_0", "details": { "name": "On Clear By Value" } }, { - "base": "Input_Clear By Pointer", + "base": "Input_Clear By Pointer_1", "details": { "name": "Clear By Pointer" } }, { - "base": "DataInput_Pointer Input", + "base": "DataInput_Pointer Input_1", "details": { "name": "Pointer Input" } }, { - "base": "Output_On Clear By Pointer", + "base": "Output_On Clear By Pointer_1", "details": { "name": "On Clear By Pointer" } }, { - "base": "Input_Clear By Reference", + "base": "Input_Clear By Reference_2", "details": { "name": "Clear By Reference" } }, { - "base": "DataInput_Reference Input", + "base": "DataInput_Reference Input_2", "details": { "name": "Reference Input" } }, { - "base": "Output_On Clear By Reference", + "base": "Output_On Clear By Reference_2", "details": { "name": "On Clear By Reference" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_PropertyExample.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_PropertyExample.names similarity index 66% rename from Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_PropertyExample.names rename to Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_PropertyExample.names index 8360f6b541..d547017e44 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_PropertyExample.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_PropertyExample.names @@ -5,20 +5,19 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "PropertyExample", - "category": "Tests", - "tooltip": "Example of using properties.", - "subtitle": "Tests" + "name": "Property Example", + "category": "Examples", + "tooltip": "Example of using properties." }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_On In", + "base": "Output_On In_0", "details": { "name": "On In" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_ReturnTypeExample.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_ReturnTypeExample.names similarity index 71% rename from Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_ReturnTypeExample.names rename to Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_ReturnTypeExample.names index 555fc92580..4122975929 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_ReturnTypeExample.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_ReturnTypeExample.names @@ -5,62 +5,61 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ReturnTypeExample", - "category": "Tests", - "tooltip": "Example of returning by value, pointer and reference.", - "subtitle": "Tests" + "name": "Return Type Example", + "category": "Examples", + "tooltip": "Example of returning by value, pointer and reference." }, "slots": [ { - "base": "Input_Return By Value", + "base": "Input_Return By Value_0", "details": { "name": "Return By Value" } }, { - "base": "Output_On Return By Value", + "base": "Output_On Return By Value_0", "details": { "name": "On Return By Value" } }, { - "base": "DataOutput_Value", + "base": "DataOutput_Value_0", "details": { "name": "Value" } }, { - "base": "Input_Return By Pointer", + "base": "Input_Return By Pointer_1", "details": { "name": "Return By Pointer" } }, { - "base": "Output_On Return By Pointer", + "base": "Output_On Return By Pointer_1", "details": { "name": "On Return By Pointer" } }, { - "base": "DataOutput_Pointer", + "base": "DataOutput_Pointer_1", "details": { "name": "Pointer" } }, { - "base": "Input_Return By Reference", + "base": "Input_Return By Reference_2", "details": { "name": "Return By Reference" } }, { - "base": "Output_On Return By Reference", + "base": "Output_On Return By Reference_2", "details": { "name": "On Return By Reference" } }, { - "base": "DataOutput_Reference", + "base": "DataOutput_Reference_2", "details": { "name": "Reference" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Input_InputHandler.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Input_InputHandler.names index e11a54b639..8ce3fd36df 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Input_InputHandler.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Input_InputHandler.names @@ -1,57 +1,43 @@ { "entries": [ { - "base": "{0A2EB488-5A6A-E166-BB62-23FF81499E33}", + "base": "{0B0AC61B-4BBA-42BF-BDCD-DAF2D3CA41A8}", "context": "ScriptCanvas::Node", "variant": "", "details": { "name": "Input Handler", - "category": "Input/Input System", + "category": "Input", "tooltip": "Handle processed input events found in input binding assets" }, "slots": [ { - "base": "Input_Connect Event", - "details": { - "name": "Connect Event", - "tooltip": "Connect to input event name as defined in an input binding asset." - } - }, - { - "base": "DataInput_Event Name", + "base": "DataInput_Event Name_0", "details": { "name": "Event Name" } }, { - "base": "Output_On Connect Event", + "base": "DataOutput_Value_0", "details": { - "name": "On Connect Event", - "tooltip": "Connect to input event name as defined in an input binding asset." + "name": "Value" } }, { - "base": "Output_Pressed", + "base": "Output_Pressed_0", "details": { "name": "Pressed", "tooltip": "Signaled when the input event begins." } }, { - "base": "DataOutput_value", - "details": { - "name": "value" - } - }, - { - "base": "Output_Held", + "base": "Output_Held_1", "details": { "name": "Held", "tooltip": "Signaled while the input event is active." } }, { - "base": "Output_Released", + "base": "Output_Released_2", "details": { "name": "Released", "tooltip": "Signaled when the input event ends." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_ExpressionNodeBase.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_ExpressionNodeBase.names index 2d9711106c..d68e675a1b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_ExpressionNodeBase.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_ExpressionNodeBase.names @@ -5,14 +5,13 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ExpressionNodeBase", + "name": "Expression Node Base", "category": "Internal", - "tooltip": "Base class for any node that wants to evaluate user given expressions.", - "subtitle": "Internal" + "tooltip": "Base class for any node that wants to evaluate user given expressions." }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_ScriptEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_ScriptEvent.names index d475d33102..3ba54b226b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_ScriptEvent.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_ScriptEvent.names @@ -7,8 +7,7 @@ "details": { "name": "Script Event", "category": "Internal", - "tooltip": "Base class for Script Events.", - "subtitle": "Internal" + "tooltip": "Base class for Script Events." } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_StringFormatted.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_StringFormatted.names index 12ad68d7e3..8affe52662 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_StringFormatted.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_StringFormatted.names @@ -5,27 +5,26 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "StringFormatted", + "name": "String Formatted", "category": "Internal", - "tooltip": "Base class for any nodes that use string formatting capabilities.", - "subtitle": "Internal" + "tooltip": "Base class for any nodes that use string formatting capabilities." }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { "name": "Value" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/LogicDeprecated_Indexer.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/LogicDeprecated_Indexer.names index 21b990bd6e..0c75b39c96 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/LogicDeprecated_Indexer.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/LogicDeprecated_Indexer.names @@ -7,68 +7,67 @@ "details": { "name": "Indexer", "category": "Logic/Deprecated", - "tooltip": "An execution flow gate that activates each input flow in sequential order", - "subtitle": "Deprecated" + "tooltip": "An execution flow gate that activates each input flow in sequential order" }, "slots": [ { - "base": "Input_In0", + "base": "Input_In0_0", "details": { "name": "In0", "tooltip": "Input 0" } }, { - "base": "Input_In1", + "base": "Input_In1_1", "details": { "name": "In1", "tooltip": "Input 1" } }, { - "base": "Input_In2", + "base": "Input_In2_2", "details": { "name": "In2", "tooltip": "Input 2" } }, { - "base": "Input_In3", + "base": "Input_In3_3", "details": { "name": "In3", "tooltip": "Input 3" } }, { - "base": "Input_In4", + "base": "Input_In4_4", "details": { "name": "In4", "tooltip": "Input 4" } }, { - "base": "Input_In5", + "base": "Input_In5_5", "details": { "name": "In5", "tooltip": "Input 5" } }, { - "base": "Input_In6", + "base": "Input_In6_6", "details": { "name": "In6", "tooltip": "Input 6" } }, { - "base": "Input_In7", + "base": "Input_In7_7", "details": { "name": "In7", "tooltip": "Input 7" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled when the node is triggered." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_And.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_And.names index a98ca0b451..4638153291 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_And.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_And.names @@ -11,40 +11,40 @@ }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Any.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Any.names index d323290c96..d049db83ba 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Any.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Any.names @@ -11,13 +11,13 @@ }, "slots": [ { - "base": "Input_Input 0", + "base": "Input_Input 0_0", "details": { "name": "Input 0" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled when the node receives a signal from the selected index" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Break.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Break.names index 9763a75d7c..3c490572fe 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Break.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Break.names @@ -7,18 +7,17 @@ "details": { "name": "Break", "category": "Logic", - "tooltip": "Used to exit a looping structure", - "subtitle": "Logic" + "tooltip": "Used to exit a looping structure" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out 0", + "base": "Output_Out 0_0", "details": { "name": "Out 0", "tooltip": "Output 0" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Cycle.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Cycle.names index 0f7c401571..54084c6388 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Cycle.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Cycle.names @@ -6,18 +6,17 @@ "variant": "", "details": { "name": "Cycle", - "category": "Logic", - "subtitle": "Logic" + "category": "Logic" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out 0", + "base": "Output_Out 0_0", "details": { "name": "Out 0", "tooltip": "Output 0" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_If.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_If.names index 34d7c6b746..3f24114234 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_If.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_If.names @@ -11,27 +11,27 @@ }, "slots": [ { - "base": "DataInput_Condition", + "base": "DataInput_Condition_0", "details": { "name": "Condition" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the condition provided evaluates to true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the condition provided evaluates to false." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_IsNull.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_IsNull.names index b36abc7903..c7d0c93d12 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_IsNull.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_IsNull.names @@ -11,33 +11,33 @@ }, "slots": [ { - "base": "DataInput_Reference", + "base": "DataInput_Reference_0", "details": { "name": "Reference" } }, { - "base": "DataOutput_Is Null", + "base": "DataOutput_Is Null_0", "details": { "name": "Is Null" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the reference provided is null." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the reference provided is not null." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Multiplexer.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Multiplexer.names index a0c6110b96..89789a406d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Multiplexer.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Multiplexer.names @@ -11,69 +11,69 @@ }, "slots": [ { - "base": "DataInput_Index", + "base": "DataInput_Index_0", "details": { "name": "Index" } }, { - "base": "Input_In0", + "base": "Input_In0_0", "details": { "name": "In0", "tooltip": "Input 0" } }, { - "base": "Input_In1", + "base": "Input_In1_1", "details": { "name": "In1", "tooltip": "Input 1" } }, { - "base": "Input_In2", + "base": "Input_In2_2", "details": { "name": "In2", "tooltip": "Input 2" } }, { - "base": "Input_In3", + "base": "Input_In3_3", "details": { "name": "In3", "tooltip": "Input 3" } }, { - "base": "Input_In4", + "base": "Input_In4_4", "details": { "name": "In4", "tooltip": "Input 4" } }, { - "base": "Input_In5", + "base": "Input_In5_5", "details": { "name": "In5", "tooltip": "Input 5" } }, { - "base": "Input_In6", + "base": "Input_In6_6", "details": { "name": "In6", "tooltip": "Input 6" } }, { - "base": "Input_In7", + "base": "Input_In7_7", "details": { "name": "In7", "tooltip": "Input 7" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled when the node receives a signal from the selected index" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Not.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Not.names index 37104685a0..471d1a5660 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Not.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Not.names @@ -11,33 +11,33 @@ }, "slots": [ { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { "name": "Value" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Once.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Once.names index f35f338941..113e1da29f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Once.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Once.names @@ -11,28 +11,28 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Input_Reset", + "base": "Input_Reset_1", "details": { "name": "Reset", "tooltip": "Reset signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Output signal" } }, { - "base": "Output_On Reset", + "base": "Output_On Reset_1", "details": { "name": "On Reset", "tooltip": "Triggered when Reset" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Or.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Or.names index 492f4d2a44..e68230a2b1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Or.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Or.names @@ -11,40 +11,40 @@ }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_OrderedSequencer.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_OrderedSequencer.names index c82ae5b04f..0d2c73a0d8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_OrderedSequencer.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_OrderedSequencer.names @@ -7,18 +7,17 @@ "details": { "name": "Ordered Sequencer", "category": "Logic", - "tooltip": "Triggers the execution outputs in the specified ordered. The next line will trigger once the first line reaches a break in execution(either through latent node, or a terminal endpoint)", - "subtitle": "Logic" + "tooltip": "Triggers the execution outputs in the specified ordered. The next line will trigger once the first line reaches a break in execution(either through latent node, or a terminal endpoint)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out 0", + "base": "Output_Out 0_0", "details": { "name": "Out 0", "tooltip": "Output 0" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_RandomSignal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_RandomSignal.names index 75094119a8..bd94410c07 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_RandomSignal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_RandomSignal.names @@ -7,24 +7,23 @@ "details": { "name": "Random Signal", "category": "Logic", - "tooltip": "Triggers one of the selected outputs at Random depending on the weights provided.", - "subtitle": "Logic" + "tooltip": "Triggers one of the selected outputs at Random depending on the weights provided." }, "slots": [ { - "base": "DataInput_Weight 1", + "base": "DataInput_Weight 1_0", "details": { "name": "Weight 1" } }, { - "base": "Output_Out 1", + "base": "Output_Out 1_0", "details": { "name": "Out 1" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Sequencer.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Sequencer.names index 8856ddd2ac..067a064123 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Sequencer.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Sequencer.names @@ -11,82 +11,82 @@ }, "slots": [ { - "base": "DataInput_Index", + "base": "DataInput_Index_0", "details": { "name": "Index" } }, { - "base": "DataInput_Order", + "base": "DataInput_Order_1", "details": { "name": "Order" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Input_Next", + "base": "Input_Next_1", "details": { "name": "Next", "tooltip": "When next is activated, it enables the next output" } }, { - "base": "Output_Out0", + "base": "Output_Out0_0", "details": { "name": "Out0", "tooltip": "Output 0" } }, { - "base": "Output_Out1", + "base": "Output_Out1_1", "details": { "name": "Out1", "tooltip": "Output 1" } }, { - "base": "Output_Out2", + "base": "Output_Out2_2", "details": { "name": "Out2", "tooltip": "Output 2" } }, { - "base": "Output_Out3", + "base": "Output_Out3_3", "details": { "name": "Out3", "tooltip": "Output 3" } }, { - "base": "Output_Out4", + "base": "Output_Out4_4", "details": { "name": "Out4", "tooltip": "Output 4" } }, { - "base": "Output_Out5", + "base": "Output_Out5_5", "details": { "name": "Out5", "tooltip": "Output 5" } }, { - "base": "Output_Out6", + "base": "Output_Out6_6", "details": { "name": "Out6", "tooltip": "Output 6" } }, { - "base": "Output_Out7", + "base": "Output_Out7_7", "details": { "name": "Out7", "tooltip": "Output 7" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Switch.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Switch.names index 3791eb864e..c1e9f956af 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Switch.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Switch.names @@ -11,19 +11,19 @@ }, "slots": [ { - "base": "DataInput_Index", + "base": "DataInput_Index_0", "details": { "name": "Index" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out 0", + "base": "Output_Out 0_0", "details": { "name": "Out 0", "tooltip": "Output 0" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_While.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_While.names index a1bd16a211..7cedbd76a4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_While.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_While.names @@ -6,31 +6,30 @@ "variant": "", "details": { "name": "While", - "category": "Logic", - "subtitle": "Logic" + "category": "Logic" }, "slots": [ { - "base": "DataInput_Condition", + "base": "DataInput_Condition_0", "details": { "name": "Condition" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signalled if the condition is false, or if the loop calls the break node" } }, { - "base": "Output_Loop", + "base": "Output_Loop_1", "details": { "name": "Loop", "tooltip": "Signalled if the condition is true, and every time the last node of 'Loop' finishes" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddAABB.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddAABB.names index 81545f0ba2..738beb9967 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddAABB.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddAABB.names @@ -5,38 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Add Axis Aligned Bounding Boxes", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the AABB that is the (min(min(A), min(B)), max(max(A), max(B)))", - "subtitle": "Axis Aligned Bounding Box" + "name": "AddAABB", + "category": "Math/AABB", + "tooltip": "returns the AABB that is the (min(min(A), min(B)), max(max(A), max(B)))" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: A", + "base": "DataInput_A_0", "details": { - "name": "First" + "name": "A" } }, { - "base": "DataInput_AABB: B", + "base": "DataInput_B_1", "details": { - "name": "Second" + "name": "B" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddPoint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddPoint.names index fd88952e19..9269e2f51c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddPoint.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddPoint.names @@ -6,39 +6,38 @@ "variant": "", "details": { "name": "Add Point", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the AABB that is the (min(min(Source), Point), max(max(Source), Point))", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the AABB that is the (min(min(Source), Point), max(max(Source), Point))" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Vector3: Point", + "base": "DataInput_Point_1", "details": { "name": "Point" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { - "name": "AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ApplyTransform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ApplyTransform.names index 874cd39c9f..d658ab4c88 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ApplyTransform.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ApplyTransform.names @@ -6,39 +6,38 @@ "variant": "", "details": { "name": "Apply Transform", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the AABB translated and possibly scaled by the Transform", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the AABB translated and possibly scaled by the Transform" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Transform: Transform", + "base": "DataInput_Transform_1", "details": { "name": "Transform" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { - "name": "AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Center.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Center.names index c9118de014..c32001636a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Center.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Center.names @@ -6,33 +6,32 @@ "variant": "", "details": { "name": "Center", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the center of Source", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the center of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result: Vector3", + "base": "DataOutput_Result_0", "details": { - "name": "Center" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Clamp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Clamp.names index 2062682005..0addcf10ae 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Clamp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Clamp.names @@ -6,39 +6,38 @@ "variant": "", "details": { "name": "Clamp", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the largest version of Source that can fit entirely within Clamp", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the largest version of Source that can fit entirely within Clamp" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_AABB: Clamp", + "base": "DataInput_Clamp_1", "details": { "name": "Clamp" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { - "name": "AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsAABB.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsAABB.names index 7c208bcdd6..7af4e39a1b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsAABB.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsAABB.names @@ -5,40 +5,39 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Contains Axis Aligned Bounding Box", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns true if Source contains all of the bounds of Candidate, else false", - "subtitle": "Axis Aligned Bounding Box" + "name": "ContainsAABB", + "category": "Math/AABB", + "tooltip": "returns true if Source contains all of the bounds of Candidate, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_AABB: Candidate", + "base": "DataInput_Candidate_1", "details": { "name": "Candidate" } }, { - "base": "DataOutput_Result: Boolean", + "base": "DataOutput_Result_0", "details": { - "name": "Contains" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsVector3.names index c3d7c00e94..b2745c2608 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsVector3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsVector3.names @@ -5,40 +5,39 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Contains Vector3", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns true if Source contains the Candidate, else false", - "subtitle": "Axis Aligned Bounding Box" + "name": "Contains Vector 3", + "category": "Math/AABB", + "tooltip": "returns true if Source contains the Candidate, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Vector3: Candidate", + "base": "DataInput_Candidate_1", "details": { "name": "Candidate" } }, { - "base": "DataOutput_Result: Boolean", + "base": "DataOutput_Result_0", "details": { - "name": "Contains" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Distance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Distance.names index 7c8e0ebb3a..3113b03864 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Distance.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Distance.names @@ -6,39 +6,38 @@ "variant": "", "details": { "name": "Distance", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the shortest distance from Point to Source, or zero of Point is contained in Source", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the shortest distance from Point to Source, or zero of Point is contained in Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Vector3: Point", + "base": "DataInput_Point_1", "details": { "name": "Point" } }, { - "base": "DataOutput_Result: Number", + "base": "DataOutput_Result_0", "details": { - "name": "Distance" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Expand.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Expand.names index 05390a20e5..6f7cc2934c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Expand.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Expand.names @@ -6,39 +6,38 @@ "variant": "", "details": { "name": "Expand", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the Source expanded in each axis by the absolute value of each axis in Delta", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the Source expanded in each axis by the absolute value of each axis in Delta" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Vector3: Delta", + "base": "DataInput_Delta_1", "details": { "name": "Delta" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { - "name": "AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Extents.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Extents.names index db3ddc567f..5cb269e3de 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Extents.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Extents.names @@ -6,33 +6,32 @@ "variant": "", "details": { "name": "Extents", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the Vector3(Source.Width, Source.Height, Source.Depth)", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the Vector3(Source.Width, Source.Height, Source.Depth)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result: Vector3", + "base": "DataOutput_Result_0", "details": { - "name": "Extents" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterHalfExtents.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterHalfExtents.names index d1c6a9ca27..5dbba72465 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterHalfExtents.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterHalfExtents.names @@ -6,39 +6,38 @@ "variant": "", "details": { "name": "From Center Half Extents", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the AABB with Min = Center - HalfExtents, Max = Center + HalfExtents", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the AABB with Min = Center - HalfExtents, Max = Center + HalfExtents" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector3: Center", + "base": "DataInput_Center_0", "details": { "name": "Center" } }, { - "base": "DataInput_Vector3: HalfExtents", + "base": "DataInput_HalfExtents_1", "details": { - "name": "Half Extents" + "name": "HalfExtents" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { - "name": "AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterRadius.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterRadius.names index 06a369986d..a6eac59710 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterRadius.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterRadius.names @@ -6,39 +6,38 @@ "variant": "", "details": { "name": "From Center Radius", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the AABB with Min = Center - Vector3(radius, radius, radius), Max = Center + Vector3(radius, radius, radius)", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the AABB with Min = Center - Vector3(radius, radius, radius), Max = Center + Vector3(radius, radius, radius)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector3: Center", + "base": "DataInput_Center_0", "details": { "name": "Center" } }, { - "base": "DataInput_Number: Radius", + "base": "DataInput_Radius_1", "details": { "name": "Radius" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { - "name": "AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromMinMax.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromMinMax.names index 982b3b8342..7e638dfd5d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromMinMax.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromMinMax.names @@ -6,39 +6,38 @@ "variant": "", "details": { "name": "From Min Max", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the AABB from Min and Max if Min <= Max, else returns FromPoint(max)", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the AABB from Min and Max if Min <= Max, else returns FromPoint(max)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector3: Min", + "base": "DataInput_Min_0", "details": { "name": "Min" } }, { - "base": "DataInput_Vector3: Max", + "base": "DataInput_Max_1", "details": { "name": "Max" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { - "name": "AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromOBB.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromOBB.names index 205f2373e4..17404286f0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromOBB.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromOBB.names @@ -5,34 +5,33 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Oriented Bounding Box", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the AABB which contains Source", - "subtitle": "Axis Aligned Bounding Box" + "name": "FromOBB", + "category": "Math/AABB", + "tooltip": "returns the AABB which contains Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_OBB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { - "name": "AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromPoint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromPoint.names index 7bd74f5e61..6d862421ae 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromPoint.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromPoint.names @@ -6,33 +6,32 @@ "variant": "", "details": { "name": "From Point", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the AABB with min and max set to Source", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the AABB with min and max set to Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector3: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { - "name": "AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMax.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMax.names index 0eb6d80940..fdeb6fb6b7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMax.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMax.names @@ -6,33 +6,32 @@ "variant": "", "details": { "name": "Get Max", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the Vector3 that is the max value on each axis of Source", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the Vector3 that is the max value on each axis of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result: Vector3", + "base": "DataOutput_Result_0", "details": { - "name": "Max" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMin.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMin.names index 8bcf1804db..b73fe74b31 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMin.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMin.names @@ -6,33 +6,32 @@ "variant": "", "details": { "name": "Get Min", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the Vector3 that is the min value on each axis of Source", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the Vector3 that is the min value on each axis of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result: Vector3", + "base": "DataOutput_Result_0", "details": { - "name": "Min" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsFinite.names index 14a10d9b46..ff2e716d2b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsFinite.names @@ -6,33 +6,32 @@ "variant": "", "details": { "name": "Is Finite", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns true if Source is finite, else false", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns true if Source is finite, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result: Boolean", + "base": "DataOutput_Result_0", "details": { - "name": "Is Finite" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsValid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsValid.names index 9c6d0dc8ff..2eec8a0a6e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsValid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsValid.names @@ -6,33 +6,32 @@ "variant": "", "details": { "name": "Is Valid", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns ture if Source is valid, that is if Source.min <= Source.max, else false", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns ture if Source is valid, that is if Source.min <= Source.max, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { - "name": "AABB: Source" + "name": "Source" } }, { - "base": "DataOutput_Result: Boolean", + "base": "DataOutput_Result_0", "details": { - "name": "Is Valid" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Null.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Null.names index 48c6bd2b60..a4f5209cba 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Null.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Null.names @@ -5,28 +5,27 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Invalid Axis Aligned Bounding Box", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns an invalid AABB (min > max), adding any point to it will make it valid", - "subtitle": "Axis Aligned Bounding Box" + "name": "Null", + "category": "Math/AABB", + "tooltip": "returns an invalid AABB (min > max), adding any point to it will make it valid" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { - "name": "Invalid AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Overlaps.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Overlaps.names index 56b83a6eb8..1a69a2d819 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Overlaps.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Overlaps.names @@ -6,39 +6,38 @@ "variant": "", "details": { "name": "Overlaps", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns true if A overlaps B, else false", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns true if A overlaps B, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: A", + "base": "DataInput_A_0", "details": { - "name": "AABB: A" + "name": "A" } }, { - "base": "DataInput_AABB: B", + "base": "DataInput_B_1", "details": { - "name": "AABB: B" + "name": "B" } }, { - "base": "DataOutput_Result: Boolean", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_SurfaceArea.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_SurfaceArea.names index b0e2985fbb..22152bd4a6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_SurfaceArea.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_SurfaceArea.names @@ -6,33 +6,32 @@ "variant": "", "details": { "name": "Surface Area", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the sum of the surface area of all six faces of Source", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the sum of the surface area of all six faces of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { - "name": "AABB: Source" + "name": "Source" } }, { - "base": "DataOutput_Result: Number", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ToSphere.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ToSphere.names index e77bde466f..30d54f3e14 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ToSphere.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ToSphere.names @@ -6,39 +6,38 @@ "variant": "", "details": { "name": "To Sphere", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the center and radius of smallest sphere that contains Source", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the center and radius of smallest sphere that contains Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { - "name": "AABB: Source" + "name": "Source" } }, { - "base": "DataOutput_Center: Vector3", + "base": "DataOutput_Center_0", "details": { - "name": "Center: Vector3" + "name": "Center" } }, { - "base": "DataOutput_Radius: Number", + "base": "DataOutput_Radius_1", "details": { - "name": "Radius: Number" + "name": "Radius" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Translate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Translate.names index 0be4731085..34c66d8e43 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Translate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Translate.names @@ -6,39 +6,38 @@ "variant": "", "details": { "name": "Translate", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the Source with each point added with Translation", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the Source with each point added with Translation" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { - "name": "AABB: Source" + "name": "Source" } }, { - "base": "DataInput_Vector3: Translation", + "base": "DataInput_Translation_1", "details": { - "name": "Vector3: Translation" + "name": "Translation" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { - "name": "Result: AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_XExtent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_XExtent.names index f6051e7dc8..0795654fa1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_XExtent.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_XExtent.names @@ -6,33 +6,32 @@ "variant": "", "details": { "name": "X Extent", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the X extent (max X - min X) of Source", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the X extent (max X - min X) of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { - "name": "AABB: Source" + "name": "Source" } }, { - "base": "DataOutput_Result: Number", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_YExtent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_YExtent.names index eab2924849..277ba3cef5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_YExtent.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_YExtent.names @@ -6,33 +6,32 @@ "variant": "", "details": { "name": "Y Extent", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the Y extent (max Y - min Y) of Source", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the Y extent (max Y - min Y) of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { - "name": "AABB: Source" + "name": "Source" } }, { - "base": "DataOutput_Result: Number", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ZExtent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ZExtent.names index 4a107a844d..8f477f3325 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ZExtent.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ZExtent.names @@ -6,33 +6,32 @@ "variant": "", "details": { "name": "Z Extent", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the Z extent (max Z - min Z) of Source", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the Z extent (max Z - min Z) of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { - "name": "AABB: Source" + "name": "Source" } }, { - "base": "DataOutput_Result: Number", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot.names index a3eef6a2e7..c3d3a759ab 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot.names @@ -7,38 +7,37 @@ "details": { "name": "Dot", "category": "Math/Color", - "tooltip": "returns the 4-element dot product of A and B", - "subtitle": "Color" + "tooltip": "returns the 4-element dot product of A and B" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Color: A", + "base": "DataInput_A_0", "details": { - "name": "Color: A" + "name": "A" } }, { - "base": "DataInput_Color: B", + "base": "DataInput_B_1", "details": { - "name": "Color: B" + "name": "B" } }, { - "base": "DataOutput_Result: Number", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot3.names index 7ddb05f4dd..5e548beccf 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot3.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Dot (RGB)", + "name": "Dot 3", "category": "Math/Color", "tooltip": "returns the 3-element dot product of A and B, using only the R, G, B elements" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromValues.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromValues.names index 45e436bce6..327b08382e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromValues.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromValues.names @@ -7,47 +7,47 @@ "details": { "name": "From Values", "category": "Math/Color", - "tooltip": "Returns a Color from the R, G, B, A inputs" + "tooltip": "returns a Color from the R, G, B, A inputs" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_R", + "base": "DataInput_R_0", "details": { "name": "R" } }, { - "base": "DataInput_G", + "base": "DataInput_G_1", "details": { "name": "G" } }, { - "base": "DataInput_B", + "base": "DataInput_B_2", "details": { "name": "B" } }, { - "base": "DataInput_A", + "base": "DataInput_A_3", "details": { "name": "A" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3.names index c709935b7c..c5ae0aa32e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Vector3", + "name": "From Vector 3", "category": "Math/Color", - "tooltip": "Returns a Color with R, G, B set to X, Y, Z values of RGB, respectively. A is set to 1.0" + "tooltip": "returns a Color with R, G, B set to X, Y, Z values of RGB, respectively. A is set to 1.0" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_RGB", + "base": "DataInput_RGB_0", "details": { "name": "RGB" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3AndNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3AndNumber.names index 61004481db..9364547804 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3AndNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3AndNumber.names @@ -5,40 +5,39 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Vector3 And Number", + "name": "From Vector 3 And Number", "category": "Math/Color", - "tooltip": "returns a Color with R, G, B set to X, Y, Z values of RGB, respectively. A is set to A", - "subtitle": "Color" + "tooltip": "returns a Color with R, G, B set to X, Y, Z values of RGB, respectively. A is set to A" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector3: RGB", + "base": "DataInput_RGB_0", "details": { - "name": "Red, Green, Blue" + "name": "RGB" } }, { - "base": "DataInput_Number: A", + "base": "DataInput_A_1", "details": { - "name": "Alpha" + "name": "A" } }, { - "base": "DataOutput_Result: Color", + "base": "DataOutput_Result_0", "details": { - "name": "Color" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_GammaToLinear.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_GammaToLinear.names index b02a810b0f..5c94cfdc4e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_GammaToLinear.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_GammaToLinear.names @@ -7,30 +7,29 @@ "details": { "name": "Gamma To Linear", "category": "Math/Color", - "tooltip": "returns Source converted from gamma corrected to linear space", - "subtitle": "Color" + "tooltip": "returns Source converted from gamma corrected to linear space" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Color: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result: Color", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsClose.names index 7f7038d383..1b3e666878 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsClose.names @@ -7,44 +7,43 @@ "details": { "name": "Is Close", "category": "Math/Color", - "tooltip": "Returns true if A is within Tolerance of B, else false", - "subtitle": "Color" + "tooltip": "returns true if A is within Tolerance of B, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Color: A", + "base": "DataInput_A_0", "details": { - "name": "First" + "name": "A" } }, { - "base": "DataInput_Color: B", + "base": "DataInput_B_1", "details": { - "name": "Second" + "name": "B" } }, { - "base": "DataInput_Number: Tolerance", + "base": "DataInput_Tolerance_2", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result: Boolean", + "base": "DataOutput_Result_0", "details": { - "name": "Is Close" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsZero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsZero.names index 31b2a61f3d..a2efd6ad06 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsZero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsZero.names @@ -7,38 +7,37 @@ "details": { "name": "Is Zero", "category": "Math/Color", - "tooltip": "returns true if Source is within Tolerance of zero", - "subtitle": "Color" + "tooltip": "returns true if Source is within Tolerance of zero" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Color: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Number: Tolerance", + "base": "DataInput_Tolerance_1", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result: Boolean", + "base": "DataOutput_Result_0", "details": { - "name": "Is Zero" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_LinearToGamma.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_LinearToGamma.names index ba7118a997..79de306912 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_LinearToGamma.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_LinearToGamma.names @@ -7,29 +7,29 @@ "details": { "name": "Linear To Gamma", "category": "Math/Color", - "tooltip": "Returns Source converted from linear to gamma corrected space" + "tooltip": "returns Source converted from linear to gamma corrected space" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_MultiplyByNumber.names index 7f67402d65..588c0fd3d6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_MultiplyByNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_MultiplyByNumber.names @@ -7,38 +7,37 @@ "details": { "name": "Multiply By Number", "category": "Math/Color", - "tooltip": "Returns Source with every elemented multiplied by Multiplier", - "subtitle": "Color" + "tooltip": "returns Source with every elemented multiplied by Multiplier" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Color: Source", + "base": "DataInput_Source_0", "details": { - "name": "Color: Source" + "name": "Source" } }, { - "base": "DataInput_Number: Multiplier", + "base": "DataInput_Multiplier_1", "details": { - "name": "Number: Multiplier" + "name": "Multiplier" } }, { - "base": "DataOutput_Result: Color", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Color" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_One.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_One.names index 7034549282..9ea9b55a68 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_One.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_One.names @@ -7,26 +7,25 @@ "details": { "name": "One", "category": "Math/Color", - "tooltip": "returns a Color with every element set to 1", - "subtitle": "Color" + "tooltip": "returns a Color with every element set to 1" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataOutput_Result: Color", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Color" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_EqualTo_==_.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_EqualTo_==_.names index e3c8499aee..7ee72caed6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_EqualTo_==_.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_EqualTo_==_.names @@ -11,40 +11,40 @@ }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_GreaterThan__.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_GreaterThan__.names index 36f3163ae4..aad4fffa7c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_GreaterThan__.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_GreaterThan__.names @@ -11,40 +11,40 @@ }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_GreaterThanorEqualTo_=_.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_GreaterThanorEqualTo_=_.names index 68dc66c790..5dd48b7df6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_GreaterThanorEqualTo_=_.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_GreaterThanorEqualTo_=_.names @@ -11,40 +11,40 @@ }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_LessThan___.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_LessThan___.names index 1247a766f5..8d74f9f791 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_LessThan___.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_LessThan___.names @@ -11,40 +11,40 @@ }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_LessThanorEqualTo__=_.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_LessThanorEqualTo__=_.names index f0e9e1602f..48329b3495 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_LessThanorEqualTo__=_.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_LessThanorEqualTo__=_.names @@ -11,40 +11,40 @@ }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_NotEqualTo_!=_.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_NotEqualTo_!=_.names index 6be7dfcbf6..8fedb7632d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_NotEqualTo_!=_.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_NotEqualTo_!=_.names @@ -11,40 +11,40 @@ }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathCrc32_FromString.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathCrc32_FromString.names index a3682b3751..636371c087 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathCrc32_FromString.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathCrc32_FromString.names @@ -6,30 +6,30 @@ "variant": "", "details": { "name": "From String", - "category": "Math/Tag", - "tooltip": "Returns a Tag from the string" + "category": "Math/Crc32", + "tooltip": "returns a Crc32 from the string" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { - "name": "Text" + "name": "Value" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromColumns.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromColumns.names index 3d2cd9186f..90ba23eaf8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromColumns.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromColumns.names @@ -7,41 +7,41 @@ "details": { "name": "From Columns", "category": "Math/Matrix3x3", - "tooltip": "Returns a rotation matrix based on angle around Z axis" + "tooltip": "returns a rotation matrix based on angle around Z axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Column1", + "base": "DataInput_Column1_0", "details": { - "name": "Column 1" + "name": "Column1" } }, { - "base": "DataInput_Column2", + "base": "DataInput_Column2_1", "details": { - "name": "Column 2" + "name": "Column2" } }, { - "base": "DataInput_Column3", + "base": "DataInput_Column3_2", "details": { - "name": "Column 3" + "name": "Column3" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromCrossProduct.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromCrossProduct.names index 03cfbb8526..a5660a3c6f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromCrossProduct.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromCrossProduct.names @@ -7,29 +7,29 @@ "details": { "name": "From Cross Product", "category": "Math/Matrix3x3", - "tooltip": "Returns a skew-symmetric cross product matrix based on supplied vector" + "tooltip": "returns a skew-symmetric cross product matrix based on supplied vector" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromDiagonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromDiagonal.names index 9725855cf1..b92cdef563 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromDiagonal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromDiagonal.names @@ -7,29 +7,29 @@ "details": { "name": "From Diagonal", "category": "Math/Matrix3x3", - "tooltip": "Returns a diagonal matrix using the supplied vector" + "tooltip": "returns a diagonal matrix using the supplied vector" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromMatrix4x4.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromMatrix4x4.names index 4f8d7ec9d9..3040b5b8ed 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromMatrix4x4.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromMatrix4x4.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Matrix4x4", + "name": "From Matrix 4x 4", "category": "Math/Matrix3x3", - "tooltip": "Returns a matrix from the first 3 rows of a Matrix3x3" + "tooltip": "returns a matrix from the first 3 rows of a Matrix3x3" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromQuaternion.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromQuaternion.names index 64c63a37e2..3b381ff3b5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromQuaternion.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromQuaternion.names @@ -7,29 +7,29 @@ "details": { "name": "From Quaternion", "category": "Math/Matrix3x3", - "tooltip": "Returns a rotation matrix using the supplied quaternion" + "tooltip": "returns a rotation matrix using the supplied quaternion" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationXDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationXDegrees.names index 23275a718e..2289885994 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationXDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationXDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Rotation X Degrees", + "name": "From RotationX Degrees", "category": "Math/Matrix3x3", - "tooltip": "Returns a rotation matrix representing a rotation in degrees around X-axis" + "tooltip": "returns a rotation matrix representing a rotation in degrees around X-axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationYDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationYDegrees.names index e52288fade..362ff04556 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationYDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationYDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Rotation Y Degrees", + "name": "From RotationY Degrees", "category": "Math/Matrix3x3", - "tooltip": "Returns a rotation matrix representing a rotation in degrees around Y-axis" + "tooltip": "returns a rotation matrix representing a rotation in degrees around Y-axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationZDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationZDegrees.names index 888a75aff2..bf51a84455 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationZDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationZDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Rotation Z Degrees", + "name": "From RotationZ Degrees", "category": "Math/Matrix3x3", - "tooltip": "Returns a rotation matrix representing a rotation in degrees around Z-axis" + "tooltip": "returns a rotation matrix representing a rotation in degrees around Z-axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRows.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRows.names index 3a3cdb722d..879e73fa67 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRows.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRows.names @@ -7,41 +7,41 @@ "details": { "name": "From Rows", "category": "Math/Matrix3x3", - "tooltip": "Returns a matrix from three row" + "tooltip": "returns a matrix from three row" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Row1", + "base": "DataInput_Row1_0", "details": { - "name": "Row 1" + "name": "Row1" } }, { - "base": "DataInput_Row2", + "base": "DataInput_Row2_1", "details": { - "name": "Row 2" + "name": "Row2" } }, { - "base": "DataInput_Row3", + "base": "DataInput_Row3_2", "details": { - "name": "Row 3" + "name": "Row3" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromScale.names index 3040759f1f..d331aa7cd1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromScale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromScale.names @@ -7,29 +7,29 @@ "details": { "name": "From Scale", "category": "Math/Matrix3x3", - "tooltip": "Returns a scale matrix using the supplied vector" + "tooltip": "returns a scale matrix using the supplied vector" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_0", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromTransform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromTransform.names index 11a310374e..69982d93ab 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromTransform.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromTransform.names @@ -7,29 +7,29 @@ "details": { "name": "From Transform", "category": "Math/Matrix3x3", - "tooltip": "Returns a matrix using the supplied transform" + "tooltip": "returns a matrix using the supplied transform" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Transform", + "base": "DataInput_Transform_0", "details": { "name": "Transform" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumn.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumn.names index 60a538ecd7..7e5e053278 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumn.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumn.names @@ -7,35 +7,35 @@ "details": { "name": "Get Column", "category": "Math/Matrix3x3", - "tooltip": "Returns vector from matrix corresponding to the Column index" + "tooltip": "returns vector from matrix corresponding to the Column index" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Column", + "base": "DataInput_Column_1", "details": { "name": "Column" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumns.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumns.names index 5cb723836e..4fe70dce73 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumns.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumns.names @@ -7,43 +7,43 @@ "details": { "name": "Get Columns", "category": "Math/Matrix3x3", - "tooltip": "Returns all columns from matrix" + "tooltip": "returns all columns from matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Column1", + "base": "DataOutput_Column1_0", "details": { - "name": "Column 1" + "name": "Column1" } }, { - "base": "DataOutput_Column2", + "base": "DataOutput_Column2_1", "details": { - "name": "Column 2" + "name": "Column2" } }, { - "base": "DataOutput_Column3", + "base": "DataOutput_Column3_2", "details": { - "name": "Column 3" + "name": "Column3" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetDiagonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetDiagonal.names index 3516b89257..ab47e40a1f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetDiagonal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetDiagonal.names @@ -7,29 +7,29 @@ "details": { "name": "Get Diagonal", "category": "Math/Matrix3x3", - "tooltip": "Returns vector of matrix diagonal values" + "tooltip": "returns vector of matrix diagonal values" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetElement.names index 7d9f46c441..efe3dd4ae6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetElement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetElement.names @@ -7,41 +7,41 @@ "details": { "name": "Get Element", "category": "Math/Matrix3x3", - "tooltip": "Returns scalar from matrix corresponding to the (Row,Column) pair" + "tooltip": "returns scalar from matrix corresponding to the (Row,Column) pair" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Row", + "base": "DataInput_Row_1", "details": { "name": "Row" } }, { - "base": "DataInput_Column", + "base": "DataInput_Column_2", "details": { "name": "Column" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRow.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRow.names index f85577a201..e6e954f231 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRow.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRow.names @@ -7,35 +7,35 @@ "details": { "name": "Get Row", "category": "Math/Matrix3x3", - "tooltip": "Returns vector from matrix corresponding to the Row index" + "tooltip": "returns vector from matrix corresponding to the Row index" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Row", + "base": "DataInput_Row_1", "details": { "name": "Row" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRows.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRows.names index 98834cbfe4..1896cb9da3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRows.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRows.names @@ -7,43 +7,43 @@ "details": { "name": "Get Rows", "category": "Math/Matrix3x3", - "tooltip": "Returns all rows from matrix" + "tooltip": "returns all rows from matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Row1", + "base": "DataOutput_Row1_0", "details": { - "name": "Row 1" + "name": "Row1" } }, { - "base": "DataOutput_Row2", + "base": "DataOutput_Row2_1", "details": { - "name": "Row 2" + "name": "Row2" } }, { - "base": "DataOutput_Row3", + "base": "DataOutput_Row3_2", "details": { - "name": "Row 3" + "name": "Row3" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Invert.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Invert.names index c128a22337..33491ec876 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Invert.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Invert.names @@ -7,29 +7,29 @@ "details": { "name": "Invert", "category": "Math/Matrix3x3", - "tooltip": "Returns inverse of Matrix" + "tooltip": "returns inverse of Matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsClose.names index 03d72efaf8..7852102617 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsClose.names @@ -7,41 +7,41 @@ "details": { "name": "Is Close", "category": "Math/Matrix3x3", - "tooltip": "Returns true if each element of both Matrix are equal within some tolerance" + "tooltip": "returns true if each element of both Matrix are equal within some tolerance" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_2", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsFinite.names index 11cf183614..96cd01c1f6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsFinite.names @@ -7,29 +7,29 @@ "details": { "name": "Is Finite", "category": "Math/Matrix3x3", - "tooltip": "Returns true if all numbers in matrix is finite" + "tooltip": "returns true if all numbers in matrix is finite" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsOrthogonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsOrthogonal.names index f0e0fba7e1..134e985d08 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsOrthogonal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsOrthogonal.names @@ -7,29 +7,29 @@ "details": { "name": "Is Orthogonal", "category": "Math/Matrix3x3", - "tooltip": "Returns true if the matrix is orthogonal" + "tooltip": "returns true if the matrix is orthogonal" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByNumber.names index 79f5fee679..82442a675d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByNumber.names @@ -7,35 +7,35 @@ "details": { "name": "Multiply By Number", "category": "Math/Matrix3x3", - "tooltip": "Returns matrix created from multiply the source matrix by Multiplier" + "tooltip": "returns matrix created from multiply the source matrix by Multiplier" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Multiplier", + "base": "DataInput_Multiplier_1", "details": { "name": "Multiplier" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByVector.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByVector.names index bd4f2c6ece..35b4b06bc6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByVector.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByVector.names @@ -7,35 +7,35 @@ "details": { "name": "Multiply By Vector", "category": "Math/Matrix3x3", - "tooltip": "Returns vector created by right left multiplying matrix by supplied vector" + "tooltip": "returns vector created by right left multiplying matrix by supplied vector" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Vector", + "base": "DataInput_Vector_1", "details": { "name": "Vector" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Orthogonalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Orthogonalize.names index cb1a2ffc69..4d5778ce63 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Orthogonalize.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Orthogonalize.names @@ -7,29 +7,29 @@ "details": { "name": "Orthogonalize", "category": "Math/Matrix3x3", - "tooltip": "Returns an orthogonal matrix from the Source matrix" + "tooltip": "returns an orthogonal matrix from the Source matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToAdjugate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToAdjugate.names index 32dc94b070..7e78ac305f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToAdjugate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToAdjugate.names @@ -7,29 +7,29 @@ "details": { "name": "To Adjugate", "category": "Math/Matrix3x3", - "tooltip": "Returns the transpose of Matrix of cofactors" + "tooltip": "returns the transpose of Matrix of cofactors" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToDeterminant.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToDeterminant.names index eecd614044..8296a2177e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToDeterminant.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToDeterminant.names @@ -7,29 +7,29 @@ "details": { "name": "To Determinant", "category": "Math/Matrix3x3", - "tooltip": "Returns determinant of Matrix" + "tooltip": "returns determinant of Matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Determinant", + "base": "DataOutput_Determinant_0", "details": { "name": "Determinant" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToScale.names index 27680a0107..dc2816e915 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToScale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToScale.names @@ -7,29 +7,29 @@ "details": { "name": "To Scale", "category": "Math/Matrix3x3", - "tooltip": "Returns scale part of the transformation matrix" + "tooltip": "returns scale part of the transformation matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Transpose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Transpose.names index 495a34df7c..a95931218a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Transpose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Transpose.names @@ -11,25 +11,25 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Zero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Zero.names index 036dd90b45..7a65f849a8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Zero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Zero.names @@ -7,23 +7,23 @@ "details": { "name": "Zero", "category": "Math/Matrix3x3", - "tooltip": "Returns the zero matrix" + "tooltip": "returns the zero matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromColumns.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromColumns.names index 8ff9f22184..ac4641b312 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromColumns.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromColumns.names @@ -5,52 +5,51 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromColumns", + "name": "From Columns", "category": "Math/Matrix4x4", - "tooltip": "returns a rotation matrix based on angle around Z axis", - "subtitle": "Matrix4x4" + "tooltip": "returns a rotation matrix based on angle around Z axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector4: Column1", + "base": "DataInput_Column1_0", "details": { - "name": "Vector4: Column1" + "name": "Column1" } }, { - "base": "DataInput_Vector4: Column2", + "base": "DataInput_Column2_1", "details": { - "name": "Vector4: Column2" + "name": "Column2" } }, { - "base": "DataInput_Vector4: Column3", + "base": "DataInput_Column3_2", "details": { - "name": "Vector4: Column3" + "name": "Column3" } }, { - "base": "DataInput_Vector4: Column4", + "base": "DataInput_Column4_3", "details": { - "name": "Vector4: Column4" + "name": "Column4" } }, { - "base": "DataOutput_Result: Matrix4x4", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Matrix4x4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromDiagonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromDiagonal.names index 60d8c29b6d..f041a0304c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromDiagonal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromDiagonal.names @@ -7,29 +7,29 @@ "details": { "name": "From Diagonal", "category": "Math/Matrix4x4", - "tooltip": "Returns a diagonal matrix using the supplied vector" + "tooltip": "returns a diagonal matrix using the supplied vector" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromMatrix3x3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromMatrix3x3.names index 634489bc27..36a8f92060 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromMatrix3x3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromMatrix3x3.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Matrix3x3", + "name": "From Matrix 3x 3", "category": "Math/Matrix4x4", - "tooltip": "Returns a matrix from the from the Matrix3x3" + "tooltip": "returns a matrix from the from the Matrix3x3" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternion.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternion.names index abdd77ac84..59acee1602 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternion.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternion.names @@ -5,34 +5,33 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromQuaternion", + "name": "From Quaternion", "category": "Math/Matrix4x4", - "tooltip": "returns a rotation matrix using the supplied quaternion", - "subtitle": "Matrix4x4" + "tooltip": "returns a rotation matrix using the supplied quaternion" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Quaternion: Source", + "base": "DataInput_Source_0", "details": { - "name": "Quaternion: Source" + "name": "Source" } }, { - "base": "DataOutput_Result: Matrix4x4", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Matrix4x4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternionAndTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternionAndTranslation.names index a922fb957d..74aacf6e19 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternionAndTranslation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternionAndTranslation.names @@ -7,35 +7,35 @@ "details": { "name": "From Quaternion And Translation", "category": "Math/Matrix4x4", - "tooltip": "Returns a skew-symmetric cross product matrix based on supplied vector" + "tooltip": "returns a skew-symmetric cross product matrix based on supplied vector" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Rotation", + "base": "DataInput_Rotation_0", "details": { "name": "Rotation" } }, { - "base": "DataInput_Translation", + "base": "DataInput_Translation_1", "details": { "name": "Translation" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationXDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationXDegrees.names index 092564c7c2..fcd02e86ac 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationXDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationXDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Rotation X Degrees", + "name": "From RotationX Degrees", "category": "Math/Matrix4x4", - "tooltip": "Returns a rotation matrix representing a rotation in degrees around X-axis" + "tooltip": "returns a rotation matrix representing a rotation in degrees around X-axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationYDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationYDegrees.names index 1b1796ed2f..62a5e6f877 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationYDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationYDegrees.names @@ -5,34 +5,33 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Rotation Y Degrees", + "name": "From RotationY Degrees", "category": "Math/Matrix4x4", - "tooltip": "Returns a rotation matrix representing a rotation in degrees around Y-axis", - "subtitle": "Matrix4x4" + "tooltip": "returns a rotation matrix representing a rotation in degrees around Y-axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Number: Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result: Matrix4x4", + "base": "DataOutput_Result_0", "details": { - "name": "Matrix4x4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationZDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationZDegrees.names index 8b449f02a7..f41b0edc7d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationZDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationZDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Rotation Z Degrees", + "name": "From RotationZ Degrees", "category": "Math/Matrix4x4", - "tooltip": "Returns a rotation matrix representing a rotation in degrees around Z-axis" + "tooltip": "returns a rotation matrix representing a rotation in degrees around Z-axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRows.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRows.names index fba64d8d32..0f90d8ba79 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRows.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRows.names @@ -7,47 +7,47 @@ "details": { "name": "From Rows", "category": "Math/Matrix4x4", - "tooltip": "Returns a matrix from three row" + "tooltip": "returns a matrix from three row" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Row1", + "base": "DataInput_Row1_0", "details": { - "name": "Row 1" + "name": "Row1" } }, { - "base": "DataInput_Row2", + "base": "DataInput_Row2_1", "details": { - "name": "Row 2" + "name": "Row2" } }, { - "base": "DataInput_Row3", + "base": "DataInput_Row3_2", "details": { - "name": "Row 3" + "name": "Row3" } }, { - "base": "DataInput_Row4", + "base": "DataInput_Row4_3", "details": { - "name": "Row 4" + "name": "Row4" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromScale.names index 314a856dbe..9d3e41426c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromScale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromScale.names @@ -7,32 +7,31 @@ "details": { "name": "From Scale", "category": "Math/Matrix4x4", - "tooltip": "Returns a scale matrix using the supplied vector", - "subtitle": "Matrix4x4" + "tooltip": "returns a scale matrix using the supplied vector" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector3: Scale", + "base": "DataInput_Scale_0", "details": { - "name": "Vector3: Scale" + "name": "Scale" } }, { - "base": "DataOutput_Result: Matrix4x4", + "base": "DataOutput_Result_0", "details": { - "name": "Matrix4x4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTransform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTransform.names index a9e0062987..adff3f7877 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTransform.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTransform.names @@ -7,32 +7,31 @@ "details": { "name": "From Transform", "category": "Math/Matrix4x4", - "tooltip": "Returns a matrix using the supplied transform", - "subtitle": "Matrix4x4" + "tooltip": "returns a matrix using the supplied transform" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Transform: Transform", + "base": "DataInput_Transform_0", "details": { "name": "Transform" } }, { - "base": "DataOutput_Result: Matrix4x4", + "base": "DataOutput_Result_0", "details": { - "name": "Matrix4x4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTranslation.names index 45af601aea..28288fa217 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTranslation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTranslation.names @@ -7,32 +7,31 @@ "details": { "name": "From Translation", "category": "Math/Matrix4x4", - "tooltip": "Returns a skew-symmetric cross product matrix based on supplied vector", - "subtitle": "Matrix4x4" + "tooltip": "returns a skew-symmetric cross product matrix based on supplied vector" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector3: Source", + "base": "DataInput_Source_0", "details": { - "name": "Translation" + "name": "Source" } }, { - "base": "DataOutput_Result: Matrix4x4", + "base": "DataOutput_Result_0", "details": { - "name": "Matrix4x4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumn.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumn.names index fbf0e8d1c2..39572748ab 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumn.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumn.names @@ -7,38 +7,37 @@ "details": { "name": "Get Column", "category": "Math/Matrix4x4", - "tooltip": "Returns vector from matrix corresponding to the Column index", - "subtitle": "Matrix4x4" + "tooltip": "returns vector from matrix corresponding to the Column index" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Matrix4x4: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Number: Column", + "base": "DataInput_Column_1", "details": { "name": "Column" } }, { - "base": "DataOutput_Result: Vector4", + "base": "DataOutput_Result_0", "details": { - "name": "Column" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumns.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumns.names index d9f7201afc..9a8c298188 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumns.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumns.names @@ -7,50 +7,49 @@ "details": { "name": "Get Columns", "category": "Math/Matrix4x4", - "tooltip": "Returns all columns from matrix", - "subtitle": "Matrix4x4" + "tooltip": "returns all columns from matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Matrix4x4: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Column1: Vector4", + "base": "DataOutput_Column1_0", "details": { - "name": "Column 1" + "name": "Column1" } }, { - "base": "DataOutput_Column2: Vector4", + "base": "DataOutput_Column2_1", "details": { - "name": "Column 2" + "name": "Column2" } }, { - "base": "DataOutput_Column3: Vector4", + "base": "DataOutput_Column3_2", "details": { - "name": "Column 3" + "name": "Column3" } }, { - "base": "DataOutput_Column4: Vector4", + "base": "DataOutput_Column4_3", "details": { - "name": "Column 4" + "name": "Column4" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetDiagonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetDiagonal.names index e1b0efe63c..d1c60e00a7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetDiagonal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetDiagonal.names @@ -7,29 +7,29 @@ "details": { "name": "Get Diagonal", "category": "Math/Matrix4x4", - "tooltip": "Returns vector of matrix diagonal values" + "tooltip": "returns vector of matrix diagonal values" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetElement.names index c5409e7d8f..20eae66177 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetElement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetElement.names @@ -7,41 +7,41 @@ "details": { "name": "Get Element", "category": "Math/Matrix4x4", - "tooltip": "Returns scalar from matrix corresponding to the (Row,Column) pair" + "tooltip": "returns scalar from matrix corresponding to the (Row,Column) pair" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Row", + "base": "DataInput_Row_1", "details": { "name": "Row" } }, { - "base": "DataInput_Column", + "base": "DataInput_Column_2", "details": { "name": "Column" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRow.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRow.names index 09a624c5f3..fcf7b55e3c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRow.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRow.names @@ -7,35 +7,35 @@ "details": { "name": "Get Row", "category": "Math/Matrix4x4", - "tooltip": "Returns vector from matrix corresponding to the Row index" + "tooltip": "returns vector from matrix corresponding to the Row index" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Row", + "base": "DataInput_Row_1", "details": { "name": "Row" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRows.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRows.names index c189d8f68a..47f4681441 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRows.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRows.names @@ -7,47 +7,47 @@ "details": { "name": "Get Rows", "category": "Math/Matrix4x4", - "tooltip": "Returns all rows from matrix" + "tooltip": "returns all rows from matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Row1", + "base": "DataOutput_Row1_0", "details": { "name": "Row1" } }, { - "base": "DataOutput_Row2", + "base": "DataOutput_Row2_1", "details": { "name": "Row2" } }, { - "base": "DataOutput_Row3", + "base": "DataOutput_Row3_2", "details": { "name": "Row3" } }, { - "base": "DataOutput_Row4", + "base": "DataOutput_Row4_3", "details": { "name": "Row4" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetTranslation.names index b035564d83..9ee8dbb79e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetTranslation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetTranslation.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetTranslation", + "name": "Get Translation", "category": "Math/Matrix4x4", "tooltip": "returns translation vector from the matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Invert.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Invert.names index 89adc7d466..d69062c969 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Invert.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Invert.names @@ -7,29 +7,29 @@ "details": { "name": "Invert", "category": "Math/Matrix4x4", - "tooltip": "Returns inverse of Matrix" + "tooltip": "returns inverse of Matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsClose.names index 9bf12495f9..466f9e3c83 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsClose.names @@ -7,41 +7,41 @@ "details": { "name": "Is Close", "category": "Math/Matrix4x4", - "tooltip": "Returns true if each element of both Matrix are equal within some tolerance" + "tooltip": "returns true if each element of both Matrix are equal within some tolerance" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_2", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsFinite.names index 9fea9efe33..2438332ba5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsFinite.names @@ -7,29 +7,29 @@ "details": { "name": "Is Finite", "category": "Math/Matrix4x4", - "tooltip": "Returns true if all numbers in matrix is finite" + "tooltip": "returns true if all numbers in matrix is finite" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_MultiplyByVector.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_MultiplyByVector.names index 79bb32bbf3..5c6ff232cd 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_MultiplyByVector.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_MultiplyByVector.names @@ -7,35 +7,35 @@ "details": { "name": "Multiply By Vector", "category": "Math/Matrix4x4", - "tooltip": "Returns vector created by right left multiplying matrix by supplied vector" + "tooltip": "returns vector created by right left multiplying matrix by supplied vector" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Vector", + "base": "DataInput_Vector_1", "details": { "name": "Vector" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_ToScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_ToScale.names index eeae11fc39..35b40a84ab 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_ToScale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_ToScale.names @@ -7,29 +7,29 @@ "details": { "name": "To Scale", "category": "Math/Matrix4x4", - "tooltip": "Returns scale part of the transformation matrix" + "tooltip": "returns scale part of the transformation matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Transpose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Transpose.names index 621a831e9a..5552f5743d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Transpose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Transpose.names @@ -11,25 +11,25 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Zero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Zero.names index 3a208bbab5..f131e57d79 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Zero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Zero.names @@ -11,19 +11,19 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Add.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Add.names index 9e3a0728d6..06a74eb189 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Add.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Add.names @@ -7,38 +7,37 @@ "details": { "name": "Add", "category": "Math/Number/Deprecated", - "tooltip": "Add", - "subtitle": "Deprecated" + "tooltip": "Add" }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled after the arithmetic operation is done." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Divide.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Divide.names index 7f4e449aad..db5af885f4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Divide.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Divide.names @@ -7,38 +7,37 @@ "details": { "name": "Divide", "category": "Math/Number/Deprecated", - "tooltip": "Divide", - "subtitle": "Deprecated" + "tooltip": "Divide" }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled after the arithmetic operation is done." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Multiply.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Multiply.names index 57be0e3fb3..d1755f18c8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Multiply.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Multiply.names @@ -7,38 +7,37 @@ "details": { "name": "Multiply", "category": "Math/Number/Deprecated", - "tooltip": "Multiply", - "subtitle": "Deprecated" + "tooltip": "Multiply" }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled after the arithmetic operation is done." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Subtract.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Subtract.names index 4fa1764fde..8f963de916 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Subtract.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Subtract.names @@ -7,38 +7,37 @@ "details": { "name": "Subtract", "category": "Math/Number/Deprecated", - "tooltip": "Subtract", - "subtitle": "Deprecated" + "tooltip": "Subtract" }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled after the arithmetic operation is done." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromAabb.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromAabb.names index 9280f009e8..8776fb9f9a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromAabb.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromAabb.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Axis Aligned Bounding Box", - "category": "Math/Oriented Bounding Box", - "tooltip": "Converts the Source to an Oriented Bounding Box" + "name": "From Aabb", + "category": "Math/OBB", + "tooltip": "converts the Source to an OBB" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromPositionRotationAndHalfLengths.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromPositionRotationAndHalfLengths.names index bc125f2c9d..6bd745fc00 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromPositionRotationAndHalfLengths.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromPositionRotationAndHalfLengths.names @@ -6,42 +6,42 @@ "variant": "", "details": { "name": "From Position Rotation And Half Lengths", - "category": "Math/Oriented Bounding Box", - "tooltip": "returns an Oriented Bounding Box from the position, rotation and half lengths" + "category": "Math/OBB", + "tooltip": "returns an OBB from the position, rotation and half lengths" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Position", + "base": "DataInput_Position_0", "details": { "name": "Position" } }, { - "base": "DataInput_Rotation", + "base": "DataInput_Rotation_1", "details": { "name": "Rotation" } }, { - "base": "DataInput_HalfLengths", + "base": "DataInput_HalfLengths_2", "details": { - "name": "Half Lengths" + "name": "HalfLengths" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisX.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisX.names index 5c2860e739..acc9b81354 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisX.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisX.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Get Axis X", - "category": "Math/Oriented Bounding Box", - "tooltip": "Returns the X-Axis of Source" + "name": "Get AxisX", + "category": "Math/OBB", + "tooltip": "returns the X-Axis of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisY.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisY.names index d8d58baa9b..6e5fdd5fe0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisY.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisY.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Get Axis Y", - "category": "Math/Oriented Bounding Box", - "tooltip": "Returns the Y-Axis of Source" + "name": "Get AxisY", + "category": "Math/OBB", + "tooltip": "returns the Y-Axis of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisZ.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisZ.names index 3f10c5cb1b..fd17b6ab97 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisZ.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisZ.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Get Axis Z", - "category": "Math/Oriented Bounding Box", - "tooltip": "Returns the Z-Axis of Source" + "name": "Get AxisZ", + "category": "Math/OBB", + "tooltip": "returns the Z-Axis of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetPosition.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetPosition.names index 8165f22a9c..d1f99364fb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetPosition.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetPosition.names @@ -6,30 +6,30 @@ "variant": "", "details": { "name": "Get Position", - "category": "Math/Oriented Bounding Box", - "tooltip": "Returns the position of Source" + "category": "Math/OBB", + "tooltip": "returns the position of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_IsFinite.names index 6a60006d56..eb0f6401c5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_IsFinite.names @@ -6,30 +6,30 @@ "variant": "", "details": { "name": "Is Finite", - "category": "Math/Oriented Bounding Box", - "tooltip": "Returns true if every element in Source is finite, is false" + "category": "Math/OBB", + "tooltip": "returns true if every element in Source is finite, is false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_DistanceToPoint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_DistanceToPoint.names index 5353e147be..9a11d578ab 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_DistanceToPoint.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_DistanceToPoint.names @@ -7,35 +7,35 @@ "details": { "name": "Distance To Point", "category": "Math/Plane", - "tooltip": "Returns the closest distance from Source to Point" + "tooltip": "returns the closest distance from Source to Point" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Point", + "base": "DataInput_Point_1", "details": { "name": "Point" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromCoefficients.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromCoefficients.names index 8fc08635fd..9e201a9994 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromCoefficients.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromCoefficients.names @@ -7,47 +7,47 @@ "details": { "name": "From Coefficients", "category": "Math/Plane", - "tooltip": "Returns the plane that satisfies the equation Ax + By + Cz + D = 0" + "tooltip": "returns the plane that satisfies the equation Ax + By + Cz + D = 0" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataInput_C", + "base": "DataInput_C_2", "details": { "name": "C" } }, { - "base": "DataInput_D", + "base": "DataInput_D_3", "details": { "name": "D" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndDistance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndDistance.names index 52e5389e0f..4a0689cd17 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndDistance.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndDistance.names @@ -7,35 +7,35 @@ "details": { "name": "From Normal And Distance", "category": "Math/Plane", - "tooltip": "Returns the plane with the specified Normal and Distance from the origin" + "tooltip": "returns the plane with the specified Normal and Distance from the origin" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Normal", + "base": "DataInput_Normal_0", "details": { "name": "Normal" } }, { - "base": "DataInput_Distance", + "base": "DataInput_Distance_1", "details": { "name": "Distance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndPoint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndPoint.names index 3c33889597..a1b4402320 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndPoint.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndPoint.names @@ -7,35 +7,35 @@ "details": { "name": "From Normal And Point", "category": "Math/Plane", - "tooltip": "Returns the plane which includes the Point with the specified Normal" + "tooltip": "returns the plane which includes the Point with the specified Normal" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Normal", + "base": "DataInput_Normal_0", "details": { "name": "Normal" } }, { - "base": "DataInput_Point", + "base": "DataInput_Point_1", "details": { "name": "Point" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetDistance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetDistance.names index 5673a596f7..f2af07c680 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetDistance.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetDistance.names @@ -7,29 +7,29 @@ "details": { "name": "Get Distance", "category": "Math/Plane", - "tooltip": "Returns the Source's distance from the origin" + "tooltip": "returns the Source's distance from the origin" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetNormal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetNormal.names index 4db582ee90..a8e548c0c9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetNormal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetNormal.names @@ -7,29 +7,29 @@ "details": { "name": "Get Normal", "category": "Math/Plane", - "tooltip": "Returns the surface normal of Source" + "tooltip": "returns the surface normal of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetPlaneEquationCoefficients.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetPlaneEquationCoefficients.names index 36c6e35769..82162af98c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetPlaneEquationCoefficients.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetPlaneEquationCoefficients.names @@ -7,47 +7,47 @@ "details": { "name": "Get Plane Equation Coefficients", "category": "Math/Plane", - "tooltip": "Returns Source's coefficient's (A, B, C, D) in the equation Ax + By + Cz + D = 0" + "tooltip": "returns Source's coefficient's (A, B, C, D) in the equation Ax + By + Cz + D = 0" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_A", + "base": "DataOutput_A_0", "details": { "name": "A" } }, { - "base": "DataOutput_B", + "base": "DataOutput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_C", + "base": "DataOutput_C_2", "details": { "name": "C" } }, { - "base": "DataOutput_D", + "base": "DataOutput_D_3", "details": { "name": "D" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_IsFinite.names index 6bf24dfac5..ec8d1c181b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_IsFinite.names @@ -7,29 +7,29 @@ "details": { "name": "Is Finite", "category": "Math/Plane", - "tooltip": "Returns true if Source is finite, else false" + "tooltip": "returns true if Source is finite, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Project.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Project.names index 8ff3251e3b..49d1fe077b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Project.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Project.names @@ -7,35 +7,35 @@ "details": { "name": "Project", "category": "Math/Plane", - "tooltip": "Returns the projection of Point onto Source" + "tooltip": "returns the projection of Point onto Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Point", + "base": "DataInput_Point_1", "details": { "name": "Point" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Transform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Transform.names index d06be76f8c..f1a7d85fd0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Transform.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Transform.names @@ -7,35 +7,35 @@ "details": { "name": "Transform", "category": "Math/Plane", - "tooltip": "Returns Source transformed by Transform" + "tooltip": "returns Source transformed by Transform" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Transform", + "base": "DataInput_Transform_1", "details": { "name": "Transform" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Conjugate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Conjugate.names index 13f58a276b..cf5021610f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Conjugate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Conjugate.names @@ -7,29 +7,29 @@ "details": { "name": "Conjugate", "category": "Math/Quaternion", - "tooltip": "Returns the conjugate of the source, (-x, -y, -z, w)" + "tooltip": "returns the conjugate of the source, (-x, -y, -z, w)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ConvertTransformToRotation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ConvertTransformToRotation.names index bdf1980570..52a1be1d0c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ConvertTransformToRotation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ConvertTransformToRotation.names @@ -10,25 +10,25 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Transform", + "base": "DataInput_Transform_0", "details": { "name": "Transform" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_CreateFromEulerAngles.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_CreateFromEulerAngles.names index 3ea8425186..f8c8f89710 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_CreateFromEulerAngles.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_CreateFromEulerAngles.names @@ -11,37 +11,37 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Pitch", + "base": "DataInput_Pitch_0", "details": { "name": "Pitch" } }, { - "base": "DataInput_Roll", + "base": "DataInput_Roll_1", "details": { "name": "Roll" } }, { - "base": "DataInput_Yaw", + "base": "DataInput_Yaw_2", "details": { "name": "Yaw" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Dot.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Dot.names index dce76a8cc0..d17ba8d861 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Dot.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Dot.names @@ -7,35 +7,35 @@ "details": { "name": "Dot", "category": "Math/Quaternion", - "tooltip": "Returns the Dot product of A and B" + "tooltip": "returns the Dot product of A and B" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromAxisAngleDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromAxisAngleDegrees.names index 2007847335..6921811814 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromAxisAngleDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromAxisAngleDegrees.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Axis Angle (Degrees)", + "name": "From Axis Angle Degrees", "category": "Math/Quaternion", - "tooltip": "Returns the rotation created from Axis the angle Degrees" + "tooltip": "returns the rotation created from Axis the angle Degrees" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Axis", + "base": "DataInput_Axis_0", "details": { "name": "Axis" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_1", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix3x3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix3x3.names index 646714b48d..00dea8ed2c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix3x3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix3x3.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Matrix3x3", + "name": "From Matrix 3x 3", "category": "Math/Quaternion", - "tooltip": "Returns a rotation created from the 3x3 matrix source" + "tooltip": "returns a rotation created from the 3x3 matrix source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix4x4.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix4x4.names index b6b38f7297..793b3535e7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix4x4.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix4x4.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Matrix4x4", + "name": "From Matrix 4x 4", "category": "Math/Quaternion", - "tooltip": "Returns a rotation created from the 4x4 matrix source" + "tooltip": "returns a rotation created from the 4x4 matrix source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromTransform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromTransform.names index 9fb08ffa2b..7961a836fe 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromTransform.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromTransform.names @@ -7,29 +7,29 @@ "details": { "name": "From Transform", "category": "Math/Quaternion", - "tooltip": "Returns a rotation created from the rotation part of the transform source" + "tooltip": "returns a rotation created from the rotation part of the transform source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_InvertFull.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_InvertFull.names index ceeebae083..80bf8b6d94 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_InvertFull.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_InvertFull.names @@ -7,29 +7,29 @@ "details": { "name": "Invert Full", "category": "Math/Quaternion", - "tooltip": "Returns the inverse for any rotation, not just unit rotations" + "tooltip": "returns the inverse for any rotation, not just unit rotations" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsClose.names index 302acb0e94..962de452f1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsClose.names @@ -7,41 +7,41 @@ "details": { "name": "Is Close", "category": "Math/Quaternion", - "tooltip": "Returns true if A and B are within Tolerance of each other" + "tooltip": "returns true if A and B are within Tolerance of each other" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_2", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsFinite.names index deda4ab105..53e98df1ca 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsFinite.names @@ -7,29 +7,29 @@ "details": { "name": "Is Finite", "category": "Math/Quaternion", - "tooltip": "Returns true if every element in Source is finite" + "tooltip": "returns true if every element in Source is finite" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsIdentity.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsIdentity.names index b4cda49248..dbede4c06f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsIdentity.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsIdentity.names @@ -7,35 +7,35 @@ "details": { "name": "Is Identity", "category": "Math/Quaternion", - "tooltip": "Returns true if Source is within Tolerance of the Identity rotation" + "tooltip": "returns true if Source is within Tolerance of the Identity rotation" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_1", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsZero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsZero.names index 99bde6bd2b..94158d1744 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsZero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsZero.names @@ -7,35 +7,35 @@ "details": { "name": "Is Zero", "category": "Math/Quaternion", - "tooltip": "Returns true if Source is within Tolerance of the Zero rotation" + "tooltip": "returns true if Source is within Tolerance of the Zero rotation" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_1", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthReciprocal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthReciprocal.names index 591b61fb3a..00b3b45081 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthReciprocal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthReciprocal.names @@ -7,29 +7,29 @@ "details": { "name": "Length Reciprocal", "category": "Math/Quaternion", - "tooltip": "Returns the reciprocal length of Source" + "tooltip": "returns the reciprocal length of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthSquared.names index 1c50bdc5e6..4a5dff7480 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthSquared.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthSquared.names @@ -7,29 +7,29 @@ "details": { "name": "Length Squared", "category": "Math/Quaternion", - "tooltip": "Returns the square of the length of Source" + "tooltip": "returns the square of the length of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Lerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Lerp.names index 11bb5d0816..c85e98643f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Lerp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Lerp.names @@ -7,41 +7,41 @@ "details": { "name": "Lerp", "category": "Math/Quaternion", - "tooltip": "Returns a the linear interpolation between From and To by the amount T" + "tooltip": "returns a the linear interpolation between From and To by the amount T" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_From", + "base": "DataInput_From_0", "details": { "name": "From" } }, { - "base": "DataInput_To", + "base": "DataInput_To_1", "details": { "name": "To" } }, { - "base": "DataInput_T", + "base": "DataInput_T_2", "details": { "name": "T" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_MultiplyByNumber.names index d632a64250..0515825242 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_MultiplyByNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_MultiplyByNumber.names @@ -7,35 +7,35 @@ "details": { "name": "Multiply By Number", "category": "Math/Quaternion", - "tooltip": "Returns the Source with each element multiplied by Multiplier" + "tooltip": "returns the Source with each element multiplied by Multiplier" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Multiplier", + "base": "DataInput_Multiplier_1", "details": { "name": "Multiplier" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Negate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Negate.names index effceed57e..bfb9c642bd 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Negate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Negate.names @@ -7,29 +7,29 @@ "details": { "name": "Negate", "category": "Math/Quaternion", - "tooltip": "Returns the Source with each element negated" + "tooltip": "returns the Source with each element negated" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Normalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Normalize.names index 83adfd8e38..38d4ab42ec 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Normalize.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Normalize.names @@ -7,29 +7,29 @@ "details": { "name": "Normalize", "category": "Math/Quaternion", - "tooltip": "Returns the normalized version of Source" + "tooltip": "returns the normalized version of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotateVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotateVector3.names index a18c86703c..17098ac745 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotateVector3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotateVector3.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Rotate Vector3", + "name": "Rotate Vector 3", "category": "Math/Quaternion", "tooltip": "Returns a new Vector3 that is the source vector3 rotated by the given Quaternion" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Quaternion", + "base": "DataInput_Quaternion_0", "details": { "name": "Quaternion" } }, { - "base": "DataInput_Vector", + "base": "DataInput_Vector_1", "details": { "name": "Vector" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationXDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationXDegrees.names index ad554e2364..6b44d7cb7b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationXDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationXDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Rotation X (Degrees)", + "name": "RotationX Degrees", "category": "Math/Quaternion", - "tooltip": "Creates a rotation of Degrees around the x-axis" + "tooltip": "creates a rotation of Degrees around the x-axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationYDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationYDegrees.names index 047af94ec0..5821211706 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationYDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationYDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Rotation Y (Degrees)", + "name": "RotationY Degrees", "category": "Math/Quaternion", - "tooltip": "Creates a rotation of Degrees around the y-axis" + "tooltip": "creates a rotation of Degrees around the y-axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationZDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationZDegrees.names index abd872aa1c..0e48e214a1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationZDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationZDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Rotation Z (Degrees)", + "name": "RotationZ Degrees", "category": "Math/Quaternion", - "tooltip": "Creates a rotation of Degrees around the z-axis" + "tooltip": "creates a rotation of Degrees around the z-axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ShortestArc.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ShortestArc.names index 7bed39e779..e08982faeb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ShortestArc.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ShortestArc.names @@ -7,35 +7,35 @@ "details": { "name": "Shortest Arc", "category": "Math/Quaternion", - "tooltip": "Creates a rotation representing the shortest arc between From and To" + "tooltip": "creates a rotation representing the shortest arc between From and To" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_From", + "base": "DataInput_From_0", "details": { "name": "From" } }, { - "base": "DataInput_To", + "base": "DataInput_To_1", "details": { "name": "To" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Slerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Slerp.names index f5a9f2333c..eccaf84a6f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Slerp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Slerp.names @@ -7,41 +7,41 @@ "details": { "name": "Slerp", "category": "Math/Quaternion", - "tooltip": "Returns the spherical linear interpolation between From and To by the amount T, the result is NOT normalized" + "tooltip": "returns the spherical linear interpolation between From and To by the amount T, the result is NOT normalized" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_From", + "base": "DataInput_From_0", "details": { "name": "From" } }, { - "base": "DataInput_To", + "base": "DataInput_To_1", "details": { "name": "To" } }, { - "base": "DataInput_T", + "base": "DataInput_T_2", "details": { "name": "T" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Squad.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Squad.names index 2c0915cb83..1205b6cb84 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Squad.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Squad.names @@ -7,53 +7,53 @@ "details": { "name": "Squad", "category": "Math/Quaternion", - "tooltip": "Returns the quadratic interpolation, that is: Squad(From, To, In, Out, T) = Slerp(Slerp(From, Out, T), Slerp(To, In, T), 2(1 - T)T)" + "tooltip": "returns the quadratic interpolation, that is: Squad(From, To, In, Out, T) = Slerp(Slerp(From, Out, T), Slerp(To, In, T), 2(1 - T)T)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_From", + "base": "DataInput_From_0", "details": { "name": "From" } }, { - "base": "DataInput_To", + "base": "DataInput_To_1", "details": { "name": "To" } }, { - "base": "DataInput_In", + "base": "DataInput_In_2", "details": { "name": "In" } }, { - "base": "DataInput_Out", + "base": "DataInput_Out_3", "details": { "name": "Out" } }, { - "base": "DataInput_T", + "base": "DataInput_T_4", "details": { "name": "T" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ToAngleDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ToAngleDegrees.names index cdfeaaa8e7..cc57f52606 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ToAngleDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ToAngleDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "To Angle (Degrees)", + "name": "To Angle Degrees", "category": "Math/Quaternion", - "tooltip": "Returns the angle of angle-axis pair that Source represents in degrees" + "tooltip": "returns the angle of angle-axis pair that Source represents in degrees" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomColor.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomColor.names index 74c0f7e2e3..74a47ea568 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomColor.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomColor.names @@ -11,31 +11,31 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Min", + "base": "DataInput_Min_0", "details": { "name": "Min" } }, { - "base": "DataInput_Max", + "base": "DataInput_Max_1", "details": { "name": "Max" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomGrayscale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomGrayscale.names index 3fa603ca9a..3b32743229 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomGrayscale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomGrayscale.names @@ -11,31 +11,31 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Min", + "base": "DataInput_Min_0", "details": { "name": "Min" } }, { - "base": "DataInput_Max", + "base": "DataInput_Max_1", "details": { "name": "Max" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomInteger.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomInteger.names index 0e3131a398..009fd55a8a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomInteger.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomInteger.names @@ -7,35 +7,35 @@ "details": { "name": "Random Integer", "category": "Math/Random", - "tooltip": "Returns a random integer [Min, Max]" + "tooltip": "returns a random integer [Min, Max]" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Min", + "base": "DataInput_Min_0", "details": { "name": "Min" } }, { - "base": "DataInput_Max", + "base": "DataInput_Max_1", "details": { "name": "Max" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomNumber.names index f2208525d2..e441a5011e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomNumber.names @@ -7,35 +7,35 @@ "details": { "name": "Random Number", "category": "Math/Random", - "tooltip": "Returns a random real number [Min, Max]" + "tooltip": "returns a random real number [Min, Max]" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Min", + "base": "DataInput_Min_0", "details": { "name": "Min" } }, { - "base": "DataInput_Max", + "base": "DataInput_Max_1", "details": { "name": "Max" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInArc.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInArc.names index fb23ddf7c2..fc877f24aa 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInArc.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInArc.names @@ -7,53 +7,53 @@ "details": { "name": "Random Point In Arc", "category": "Math/Random", - "tooltip": "Returns a random point in the specified arc" + "tooltip": "returns a random point in the specified arc" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Origin", + "base": "DataInput_Origin_0", "details": { "name": "Origin" } }, { - "base": "DataInput_Direction", + "base": "DataInput_Direction_1", "details": { "name": "Direction" } }, { - "base": "DataInput_Normal", + "base": "DataInput_Normal_2", "details": { "name": "Normal" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_3", "details": { "name": "Radius" } }, { - "base": "DataInput_Angle", + "base": "DataInput_Angle_4", "details": { "name": "Angle" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInBox.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInBox.names index a5cd2fdeac..6b65ca9940 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInBox.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInBox.names @@ -7,29 +7,29 @@ "details": { "name": "Random Point In Box", "category": "Math/Random", - "tooltip": "Returns a random point in a box" + "tooltip": "returns a random point in a box" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Dimensions", + "base": "DataInput_Dimensions_0", "details": { "name": "Dimensions" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCircle.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCircle.names index e4dbeb4dd3..c87ca2880a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCircle.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCircle.names @@ -7,29 +7,29 @@ "details": { "name": "Random Point In Circle", "category": "Math/Random", - "tooltip": "Returns a random point inside the area of a circle" + "tooltip": "returns a random point inside the area of a circle" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_0", "details": { "name": "Radius" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCone.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCone.names index 4c7270d0f4..756ae87ce1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCone.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCone.names @@ -7,35 +7,35 @@ "details": { "name": "Random Point In Cone", "category": "Math/Random", - "tooltip": "Returns a random point in a cone" + "tooltip": "returns a random point in a cone" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_0", "details": { "name": "Radius" } }, { - "base": "DataInput_Angle", + "base": "DataInput_Angle_1", "details": { "name": "Angle" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCylinder.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCylinder.names index 92dcefe8c7..655e5512ee 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCylinder.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCylinder.names @@ -7,35 +7,35 @@ "details": { "name": "Random Point In Cylinder", "category": "Math/Random", - "tooltip": "Returns a random point in a cylinder" + "tooltip": "returns a random point in a cylinder" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_0", "details": { "name": "Radius" } }, { - "base": "DataInput_Height", + "base": "DataInput_Height_1", "details": { "name": "Height" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInEllipsoid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInEllipsoid.names index 21d3ca2f96..67e9387d22 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInEllipsoid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInEllipsoid.names @@ -7,29 +7,29 @@ "details": { "name": "Random Point In Ellipsoid", "category": "Math/Random", - "tooltip": "Returns a random point in an ellipsoid" + "tooltip": "returns a random point in an ellipsoid" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Dimensions", + "base": "DataInput_Dimensions_0", "details": { "name": "Dimensions" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSphere.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSphere.names index 60d4a9cbd8..b135084d49 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSphere.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSphere.names @@ -7,29 +7,29 @@ "details": { "name": "Random Point In Sphere", "category": "Math/Random", - "tooltip": "Returns a random point in a sphere" + "tooltip": "returns a random point in a sphere" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_0", "details": { "name": "Radius" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSquare.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSquare.names index 82d6f6e156..0c176a2897 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSquare.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSquare.names @@ -7,29 +7,29 @@ "details": { "name": "Random Point In Square", "category": "Math/Random", - "tooltip": "Returns a random point in a square" + "tooltip": "returns a random point in a square" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Dimensions", + "base": "DataInput_Dimensions_0", "details": { "name": "Dimensions" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInWedge.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInWedge.names index 401c3afcb4..33c2b9eec3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInWedge.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInWedge.names @@ -7,59 +7,59 @@ "details": { "name": "Random Point In Wedge", "category": "Math/Random", - "tooltip": "Returns a random point in the specified wedge" + "tooltip": "returns a random point in the specified wedge" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Origin", + "base": "DataInput_Origin_0", "details": { "name": "Origin" } }, { - "base": "DataInput_Direction", + "base": "DataInput_Direction_1", "details": { "name": "Direction" } }, { - "base": "DataInput_Normal", + "base": "DataInput_Normal_2", "details": { "name": "Normal" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_3", "details": { "name": "Radius" } }, { - "base": "DataInput_Height", + "base": "DataInput_Height_4", "details": { "name": "Height" } }, { - "base": "DataInput_Angle", + "base": "DataInput_Angle_5", "details": { "name": "Angle" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnCircle.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnCircle.names index 39433c405e..16a3a0f396 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnCircle.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnCircle.names @@ -7,29 +7,29 @@ "details": { "name": "Random Point On Circle", "category": "Math/Random", - "tooltip": "Returns a random point on the circumference of a circle" + "tooltip": "returns a random point on the circumference of a circle" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_0", "details": { "name": "Radius" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnSphere.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnSphere.names index 6e54bb7d72..e2f6db1112 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnSphere.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnSphere.names @@ -7,29 +7,29 @@ "details": { "name": "Random Point On Sphere", "category": "Math/Random", - "tooltip": "Returns a random point on the surface of a sphere" + "tooltip": "returns a random point on the surface of a sphere" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_0", "details": { "name": "Radius" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomQuaternion.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomQuaternion.names index ccae17450c..e4813c0dc5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomQuaternion.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomQuaternion.names @@ -7,35 +7,35 @@ "details": { "name": "Random Quaternion", "category": "Math/Random", - "tooltip": "Returns a random quaternion" + "tooltip": "returns a random quaternion" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Min", + "base": "DataInput_Min_0", "details": { "name": "Min" } }, { - "base": "DataInput_Max", + "base": "DataInput_Max_1", "details": { "name": "Max" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector2.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector2.names index e1b9340392..22c7e14c01 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector2.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector2.names @@ -5,25 +5,25 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Random Unit Vector2", + "name": "Random Unit Vector 2", "category": "Math/Random", - "tooltip": "Returns a random Vector2 direction" + "tooltip": "returns a random Vector2 direction" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector3.names index 06990bde99..e5a11144d9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector3.names @@ -5,25 +5,25 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Random Unit Vector3", + "name": "Random Unit Vector 3", "category": "Math/Random", - "tooltip": "Returns a random Vector3 direction" + "tooltip": "returns a random Vector3 direction" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector2.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector2.names index 0128628cb4..07b1d1930d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector2.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector2.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Random Vector2", + "name": "Random Vector 2", "category": "Math/Random", - "tooltip": "Returns a random Vector2" + "tooltip": "returns a random Vector2" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Min", + "base": "DataInput_Min_0", "details": { "name": "Min" } }, { - "base": "DataInput_Max", + "base": "DataInput_Max_1", "details": { "name": "Max" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector3.names index d77f6e96c6..8711307413 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector3.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Random Vector3", + "name": "Random Vector 3", "category": "Math/Random", - "tooltip": "Returns a random Vector3" + "tooltip": "returns a random Vector3" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Min", + "base": "DataInput_Min_0", "details": { "name": "Min" } }, { - "base": "DataInput_Max", + "base": "DataInput_Max_1", "details": { "name": "Max" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector4.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector4.names index df7bd9384f..045f653c45 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector4.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector4.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Random Vector4", + "name": "Random Vector 4", "category": "Math/Random", - "tooltip": "Returns a random Vector4" + "tooltip": "returns a random Vector4" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Min", + "base": "DataInput_Min_0", "details": { "name": "Min" } }, { - "base": "DataInput_Max", + "base": "DataInput_Max_1", "details": { "name": "Max" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3.names index 70826cd581..8c3f7f8cfa 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Matrix3x3", + "name": "From Matrix 3x 3", "category": "Math/Transform", - "tooltip": "Returns a transform with from 3x3 matrix and with the translation set to zero" + "tooltip": "returns a transform with from 3x3 matrix and with the translation set to zero" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3AndTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3AndTranslation.names index a64be79b93..583e0aa059 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3AndTranslation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3AndTranslation.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Matrix3x3 And Translation", + "name": "From Matrix 3x 3 And Translation", "category": "Math/Transform", - "tooltip": "Returns a transform from the 3x3 matrix and the translation" + "tooltip": "returns a transform from the 3x3 matrix and the translation" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Matrix", + "base": "DataInput_Matrix_0", "details": { "name": "Matrix" } }, { - "base": "DataInput_Translation", + "base": "DataInput_Translation_1", "details": { "name": "Translation" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotation.names index db1f5d7706..f8cb3a7033 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotation.names @@ -7,29 +7,29 @@ "details": { "name": "From Rotation", "category": "Math/Transform", - "tooltip": "Returns a transform from the rotation and with the translation set to zero" + "tooltip": "returns a transform from the rotation and with the translation set to zero" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotationAndTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotationAndTranslation.names index 0a44bbe29f..3474a53f52 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotationAndTranslation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotationAndTranslation.names @@ -7,35 +7,35 @@ "details": { "name": "From Rotation And Translation", "category": "Math/Transform", - "tooltip": "Returns a transform from the rotation and the translation" + "tooltip": "returns a transform from the rotation and the translation" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Rotation", + "base": "DataInput_Rotation_0", "details": { "name": "Rotation" } }, { - "base": "DataInput_Translation", + "base": "DataInput_Translation_1", "details": { "name": "Translation" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromScale.names index 071ead3598..59bbce441f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromScale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromScale.names @@ -7,29 +7,29 @@ "details": { "name": "From Scale", "category": "Math/Transform", - "tooltip": "Returns a transform which applies the specified uniform Scale, but no rotation or translation" + "tooltip": "returns a transform which applies the specified uniform Scale, but no rotation or translation" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_0", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromTranslation.names index 391dfd9bee..20cad0b8f5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromTranslation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromTranslation.names @@ -7,29 +7,29 @@ "details": { "name": "From Translation", "category": "Math/Transform", - "tooltip": "Returns a translation matrix and the rotation set to zero" + "tooltip": "returns a translation matrix and the rotation set to zero" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Translation", + "base": "DataInput_Translation_0", "details": { "name": "Translation" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetForward.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetForward.names index 9356423bc4..1894819e38 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetForward.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetForward.names @@ -7,35 +7,35 @@ "details": { "name": "Get Forward", "category": "Math/Transform", - "tooltip": "Returns the forward direction vector from the specified transform scaled by a given value (O3DE uses Z up, right handed)" + "tooltip": "returns the forward direction vector from the specified transform scaled by a given value (O3DE uses Z up, right handed)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_1", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetRight.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetRight.names index 8723a54349..5a3d979a9d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetRight.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetRight.names @@ -7,35 +7,35 @@ "details": { "name": "Get Right", "category": "Math/Transform", - "tooltip": "Returns the right direction vector from the specified transform scaled by a given value (O3DE uses Z up, right handed)" + "tooltip": "returns the right direction vector from the specified transform scaled by a given value (O3DE uses Z up, right handed)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_1", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetTranslation.names index 276db70fa1..0d56cee4df 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetTranslation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetTranslation.names @@ -7,29 +7,29 @@ "details": { "name": "Get Translation", "category": "Math/Transform", - "tooltip": "Returns the translation of Source" + "tooltip": "returns the translation of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetUp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetUp.names index cf3dbd3e8c..a1baecdfdb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetUp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetUp.names @@ -7,35 +7,35 @@ "details": { "name": "Get Up", "category": "Math/Transform", - "tooltip": "Returns the up direction vector from the specified transform scaled by a given value (O3DE uses Z up, right handed)" + "tooltip": "returns the up direction vector from the specified transform scaled by a given value (O3DE uses Z up, right handed)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_1", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsClose.names index 65af93c3d0..936f1f52cb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsClose.names @@ -7,41 +7,41 @@ "details": { "name": "Is Close", "category": "Math/Transform", - "tooltip": "Returns true if every row of A is within Tolerance of corresponding row in B, else false" + "tooltip": "returns true if every row of A is within Tolerance of corresponding row in B, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_2", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsFinite.names index f98506dd62..38a8b05377 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsFinite.names @@ -7,29 +7,29 @@ "details": { "name": "Is Finite", "category": "Math/Transform", - "tooltip": "Returns true if every row of source is finite, else false" + "tooltip": "returns true if every row of source is finite, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsOrthogonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsOrthogonal.names index f4dd80a4a2..f55e2af0bd 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsOrthogonal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsOrthogonal.names @@ -7,35 +7,35 @@ "details": { "name": "Is Orthogonal", "category": "Math/Transform", - "tooltip": "Returns true if the upper 3x3 matrix of Source is within Tolerance of orthogonal, else false" + "tooltip": "returns true if the upper 3x3 matrix of Source is within Tolerance of orthogonal, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_1", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByUniformScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByUniformScale.names index f8bcbc41a7..6e38a48fee 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByUniformScale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByUniformScale.names @@ -7,35 +7,35 @@ "details": { "name": "Multiply By Uniform Scale", "category": "Math/Transform", - "tooltip": "Returns Source multiplied uniformly by Scale" + "tooltip": "returns Source multiplied uniformly by Scale" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_1", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector3.names index d51e766840..ae3f713886 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector3.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Multiply By Vector3", + "name": "Multiply By Vector 3", "category": "Math/Transform", - "tooltip": "Returns Source post multiplied by Multiplier" + "tooltip": "returns Source post multiplied by Multiplier" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Multiplier", + "base": "DataInput_Multiplier_1", "details": { "name": "Multiplier" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector4.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector4.names index 2e11891d0f..9ccc2c12ff 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector4.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector4.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Multiply By Vector4", + "name": "Multiply By Vector 4", "category": "Math/Transform", - "tooltip": "Returns Source post multiplied by Multiplier" + "tooltip": "returns Source post multiplied by Multiplier" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Multiplier", + "base": "DataInput_Multiplier_1", "details": { "name": "Multiplier" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_Orthogonalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_Orthogonalize.names index 94598629b6..6a4691eb4d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_Orthogonalize.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_Orthogonalize.names @@ -7,29 +7,29 @@ "details": { "name": "Orthogonalize", "category": "Math/Transform", - "tooltip": "Returns an orthogonal matrix if the Source is almost orthogonal" + "tooltip": "returns an orthogonal matrix if the Source is almost orthogonal" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationXDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationXDegrees.names index 353eb26615..3483c6b3ce 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationXDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationXDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Rotation X (Degrees)", + "name": "RotationX Degrees", "category": "Math/Transform", - "tooltip": "Returns a transform representing a rotation Degrees around the X-Axis" + "tooltip": "returns a transform representing a rotation Degrees around the X-Axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationYDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationYDegrees.names index d5f5469593..57d72f8e16 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationYDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationYDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Rotation Y (Degrees)", + "name": "RotationY Degrees", "category": "Math/Transform", - "tooltip": "Returns a transform representing a rotation Degrees around the Y-Axis" + "tooltip": "returns a transform representing a rotation Degrees around the Y-Axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationZDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationZDegrees.names index 8431b15578..8564b42541 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationZDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationZDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Rotation Z (Degrees)", + "name": "RotationZ Degrees", "category": "Math/Transform", - "tooltip": "Returns a transform representing a rotation Degrees around the Z-Axis" + "tooltip": "returns a transform representing a rotation Degrees around the Z-Axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_ToScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_ToScale.names index 531f0b1b38..a18853d95d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_ToScale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_ToScale.names @@ -7,29 +7,29 @@ "details": { "name": "To Scale", "category": "Math/Transform", - "tooltip": "Returns the uniform scale of the Source" + "tooltip": "returns the uniform scale of the Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Absolute.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Absolute.names index bd72341c6d..49c80b7cab 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Absolute.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Absolute.names @@ -7,29 +7,29 @@ "details": { "name": "Absolute", "category": "Math/Vector2", - "tooltip": "Returns a vector with the absolute values of the elements of the source" + "tooltip": "returns a vector with the absolute values of the elements of the source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Angle.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Angle.names index 7efe070c80..cdf2bbcdb7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Angle.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Angle.names @@ -7,29 +7,29 @@ "details": { "name": "Angle", "category": "Math/Vector2", - "tooltip": "Returns a unit length vector from an angle in radians" + "tooltip": "returns a unit length vector from an angle in radians" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Angle", + "base": "DataInput_Angle_0", "details": { "name": "Angle" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Clamp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Clamp.names index 2a4f580d95..57e7569bc2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Clamp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Clamp.names @@ -7,41 +7,41 @@ "details": { "name": "Clamp", "category": "Math/Vector2", - "tooltip": "Returns vector clamped to [min, max] and equal to source if possible" + "tooltip": "returns vector clamped to [min, max] and equal to source if possible" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Min", + "base": "DataInput_Min_1", "details": { "name": "Min" } }, { - "base": "DataInput_Max", + "base": "DataInput_Max_2", "details": { "name": "Max" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DirectionTo.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DirectionTo.names index 58ef596560..d6eb1a6b5f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DirectionTo.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DirectionTo.names @@ -11,37 +11,37 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_From", + "base": "DataInput_From_0", "details": { "name": "From" } }, { - "base": "DataInput_To", + "base": "DataInput_To_1", "details": { "name": "To" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_2", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Distance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Distance.names index 5d6b79ef69..787b44de82 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Distance.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Distance.names @@ -7,35 +7,35 @@ "details": { "name": "Distance", "category": "Math/Vector2", - "tooltip": "Returns the distance from B to A, that is the magnitude of the vector (A - B)" + "tooltip": "returns the distance from B to A, that is the magnitude of the vector (A - B)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DistanceSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DistanceSquared.names index cc12b409ee..43fab99734 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DistanceSquared.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DistanceSquared.names @@ -7,35 +7,35 @@ "details": { "name": "Distance Squared", "category": "Math/Vector2", - "tooltip": "Returns the distance squared from B to A, (generally faster than the actual distance if only needed for comparison)" + "tooltip": "returns the distance squared from B to A, (generally faster than the actual distance if only needed for comparison)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Dot.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Dot.names index 19db3eb635..08578bdf77 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Dot.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Dot.names @@ -7,35 +7,35 @@ "details": { "name": "Dot", "category": "Math/Vector2", - "tooltip": "Returns the vector dot product of A dot B" + "tooltip": "returns the vector dot product of A dot B" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_FromValues.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_FromValues.names index d68a9ffc30..b6078271fe 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_FromValues.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_FromValues.names @@ -7,35 +7,35 @@ "details": { "name": "From Values", "category": "Math/Vector2", - "tooltip": "Returns a vector from elements" + "tooltip": "returns a vector from elements" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_X", + "base": "DataInput_X_0", "details": { "name": "X" } }, { - "base": "DataInput_Y", + "base": "DataInput_Y_1", "details": { "name": "Y" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_GetElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_GetElement.names index bcd119556c..fb5cc44f25 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_GetElement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_GetElement.names @@ -7,35 +7,35 @@ "details": { "name": "Get Element", "category": "Math/Vector2", - "tooltip": "Returns the element corresponding to the index (0 -> x) (1 -> y)" + "tooltip": "returns the element corresponding to the index (0 -> x) (1 -> y)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Index", + "base": "DataInput_Index_1", "details": { "name": "Index" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsClose.names index 4146bc08de..caf90e9d61 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsClose.names @@ -7,41 +7,41 @@ "details": { "name": "Is Close", "category": "Math/Vector2", - "tooltip": "Returns true if the difference between A and B is less than tolerance, else false" + "tooltip": "returns true if the difference between A and B is less than tolerance, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_2", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsFinite.names index 9b45bb21b7..050662feff 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsFinite.names @@ -7,29 +7,29 @@ "details": { "name": "Is Finite", "category": "Math/Vector2", - "tooltip": "Returns true if every element in the source is finite, else false" + "tooltip": "returns true if every element in the source is finite, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsNormalized.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsNormalized.names index 151baa29b0..9d8dbff14d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsNormalized.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsNormalized.names @@ -7,35 +7,35 @@ "details": { "name": "Is Normalized", "category": "Math/Vector2", - "tooltip": "Returns true if the length of the source is within tolerance of 1.0, else false" + "tooltip": "returns true if the length of the source is within tolerance of 1.0, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_1", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsZero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsZero.names index 3f183cfe56..f0b7d32768 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsZero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsZero.names @@ -7,35 +7,35 @@ "details": { "name": "Is Zero", "category": "Math/Vector2", - "tooltip": "Returns true if A is within tolerance of the zero vector, else false" + "tooltip": "returns true if A is within tolerance of the zero vector, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_1", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Length.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Length.names index cb76ac347b..f88ed3b3f7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Length.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Length.names @@ -7,29 +7,29 @@ "details": { "name": "Length", "category": "Math/Vector2", - "tooltip": "Returns the magnitude of source" + "tooltip": "returns the magnitude of source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_LengthSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_LengthSquared.names index 112d82d5e3..8691e634d2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_LengthSquared.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_LengthSquared.names @@ -7,29 +7,29 @@ "details": { "name": "Length Squared", "category": "Math/Vector2", - "tooltip": "Returns the magnitude squared of the source, generally faster than getting the exact length" + "tooltip": "returns the magnitude squared of the source, generally faster than getting the exact length" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Lerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Lerp.names index 49711526b7..a1e6ebf739 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Lerp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Lerp.names @@ -7,41 +7,41 @@ "details": { "name": "Lerp", "category": "Math/Vector2", - "tooltip": "Returns the linear interpolation (From + ((To - From) * T)" + "tooltip": "returns the linear interpolation (From + ((To - From) * T)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_From", + "base": "DataInput_From_0", "details": { "name": "From" } }, { - "base": "DataInput_To", + "base": "DataInput_To_1", "details": { "name": "To" } }, { - "base": "DataInput_T", + "base": "DataInput_T_2", "details": { "name": "T" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Max.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Max.names index d6ff44c21c..5f76551e9d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Max.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Max.names @@ -7,35 +7,35 @@ "details": { "name": "Max", "category": "Math/Vector2", - "tooltip": "Returns the vector (max(A.x, B.x), max(A.y, B.y))" + "tooltip": "returns the vector (max(A.x, B.x), max(A.y, B.y))" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Min.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Min.names index 5563f69c00..737ae89554 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Min.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Min.names @@ -7,35 +7,35 @@ "details": { "name": "Min", "category": "Math/Vector2", - "tooltip": "Returns the vector (min(A.x, B.x), min(A.y, B.y))" + "tooltip": "returns the vector (min(A.x, B.x), min(A.y, B.y))" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_MultiplyByNumber.names index f63137d25f..cf592cd151 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_MultiplyByNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_MultiplyByNumber.names @@ -7,35 +7,35 @@ "details": { "name": "Multiply By Number", "category": "Math/Vector2", - "tooltip": "Returns the vector Source with each element multiplied by Multiplier" + "tooltip": "returns the vector Source with each element multiplied by Multiplier" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Multiplier", + "base": "DataInput_Multiplier_1", "details": { "name": "Multiplier" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Negate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Negate.names index 1eb48cf3a5..5aa72fe327 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Negate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Negate.names @@ -7,29 +7,29 @@ "details": { "name": "Negate", "category": "Math/Vector2", - "tooltip": "Returns the vector Source with each element multiplied by -1" + "tooltip": "returns the vector Source with each element multiplied by -1" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Normalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Normalize.names index ae4ee365ef..1dc7e0ac99 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Normalize.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Normalize.names @@ -7,29 +7,29 @@ "details": { "name": "Normalize", "category": "Math/Vector2", - "tooltip": "Returns a unit length vector in the same direction as the source, or (1,0,0) if the source length is too small" + "tooltip": "returns a unit length vector in the same direction as the source, or (1,0,0) if the source length is too small" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Project.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Project.names index e6bd531852..2aba28f2ed 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Project.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Project.names @@ -7,35 +7,35 @@ "details": { "name": "Project", "category": "Math/Vector2", - "tooltip": "Returns the vector of A projected onto B, (Dot(A, B)/(Dot(B, B)) * B" + "tooltip": "returns the vector of A projected onto B, (Dot(A, B)/(Dot(B, B)) * B" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetX.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetX.names index 4a96a8154e..d2e7b90095 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetX.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetX.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Set X", + "name": "SetX", "category": "Math/Vector2", - "tooltip": "Returns a the vector(X, Source.Y)" + "tooltip": "returns a the vector(X, Source.Y)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_X", + "base": "DataInput_X_1", "details": { "name": "X" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetY.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetY.names index bdde07b53c..db6c5072a4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetY.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetY.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Set Y", + "name": "SetY", "category": "Math/Vector2", - "tooltip": "Returns a the vector(Source.X, Y)" + "tooltip": "returns a the vector(Source.X, Y)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Y", + "base": "DataInput_Y_1", "details": { "name": "Y" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Slerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Slerp.names index 26b5579174..24ad2a5b8e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Slerp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Slerp.names @@ -7,41 +7,41 @@ "details": { "name": "Slerp", "category": "Math/Vector2", - "tooltip": "Returns a vector that is the spherical linear interpolation T, between From and To" + "tooltip": "returns a vector that is the spherical linear interpolation T, between From and To" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_From", + "base": "DataInput_From_0", "details": { "name": "From" } }, { - "base": "DataInput_To", + "base": "DataInput_To_1", "details": { "name": "To" } }, { - "base": "DataInput_T", + "base": "DataInput_T_2", "details": { "name": "T" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_ToPerpendicular.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_ToPerpendicular.names index f78ec6a232..64488f330a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_ToPerpendicular.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_ToPerpendicular.names @@ -7,29 +7,29 @@ "details": { "name": "To Perpendicular", "category": "Math/Vector2", - "tooltip": "Returns the vector (-Source.y, Source.x), a 90 degree, positive rotation" + "tooltip": "returns the vector (-Source.y, Source.x), a 90 degree, positive rotation" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Absolute.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Absolute.names index a20c7413d7..4281eb162b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Absolute.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Absolute.names @@ -7,29 +7,29 @@ "details": { "name": "Absolute", "category": "Math/Vector3", - "tooltip": "Returns a vector with the absolute values of the elements of the source" + "tooltip": "returns a vector with the absolute values of the elements of the source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_BuildTangentBasis.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_BuildTangentBasis.names index 8f08fb24c2..7f93c15e41 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_BuildTangentBasis.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_BuildTangentBasis.names @@ -7,35 +7,35 @@ "details": { "name": "Build Tangent Basis", "category": "Math/Vector3", - "tooltip": "Returns a tangent basis from the normal" + "tooltip": "returns a tangent basis from the normal" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Normal", + "base": "DataInput_Normal_0", "details": { "name": "Normal" } }, { - "base": "DataOutput_Tangent", + "base": "DataOutput_Tangent_0", "details": { "name": "Tangent" } }, { - "base": "DataOutput_Bitangent", + "base": "DataOutput_Bitangent_1", "details": { "name": "Bitangent" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Clamp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Clamp.names index 15109364fd..a5ccbaa27d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Clamp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Clamp.names @@ -7,41 +7,41 @@ "details": { "name": "Clamp", "category": "Math/Vector3", - "tooltip": "Returns vector clamped to [min, max] and equal to source if possible" + "tooltip": "returns vector clamped to [min, max] and equal to source if possible" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Min", + "base": "DataInput_Min_1", "details": { "name": "Min" } }, { - "base": "DataInput_Max", + "base": "DataInput_Max_2", "details": { "name": "Max" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Cross.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Cross.names index a23b88920e..c14d744da9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Cross.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Cross.names @@ -7,35 +7,35 @@ "details": { "name": "Cross", "category": "Math/Vector3", - "tooltip": "Returns the vector cross product of A X B" + "tooltip": "returns the vector cross product of A X B" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DirectionTo.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DirectionTo.names index 5071b5d52c..4d663478aa 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DirectionTo.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DirectionTo.names @@ -11,37 +11,37 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_From", + "base": "DataInput_From_0", "details": { "name": "From" } }, { - "base": "DataInput_To", + "base": "DataInput_To_1", "details": { "name": "To" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_2", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Distance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Distance.names index 3d38a8d9d1..f21bd649b9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Distance.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Distance.names @@ -7,35 +7,35 @@ "details": { "name": "Distance", "category": "Math/Vector3", - "tooltip": "Returns the distance from B to A, that is the magnitude of the vector (A - B)" + "tooltip": "returns the distance from B to A, that is the magnitude of the vector (A - B)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DistanceSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DistanceSquared.names index 56f45fbec4..d955098b71 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DistanceSquared.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DistanceSquared.names @@ -7,35 +7,35 @@ "details": { "name": "Distance Squared", "category": "Math/Vector3", - "tooltip": "Returns the distance squared from B to A, (generally faster than the actual distance if only needed for comparison)" + "tooltip": "returns the distance squared from B to A, (generally faster than the actual distance if only needed for comparison)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Dot.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Dot.names index c86dac30a0..95ab3e2d3d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Dot.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Dot.names @@ -7,35 +7,35 @@ "details": { "name": "Dot", "category": "Math/Vector3", - "tooltip": "Returns the vector dot product of A dot B" + "tooltip": "returns the vector dot product of A dot B" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_FromValues.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_FromValues.names index 10831f85ed..e640a3b0e0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_FromValues.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_FromValues.names @@ -7,41 +7,41 @@ "details": { "name": "From Values", "category": "Math/Vector3", - "tooltip": "Returns a vector from elements" + "tooltip": "returns a vector from elements" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_X", + "base": "DataInput_X_0", "details": { "name": "X" } }, { - "base": "DataInput_Y", + "base": "DataInput_Y_1", "details": { "name": "Y" } }, { - "base": "DataInput_Z", + "base": "DataInput_Z_2", "details": { "name": "Z" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_GetElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_GetElement.names index ae6ce083ac..1e683d24a2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_GetElement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_GetElement.names @@ -7,35 +7,35 @@ "details": { "name": "Get Element", "category": "Math/Vector3", - "tooltip": "Returns the element corresponding to the index (0 -> x) (1 -> y) (2 -> z)" + "tooltip": "returns the element corresponding to the index (0 -> x) (1 -> y) (2 -> z)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Index", + "base": "DataInput_Index_1", "details": { "name": "Index" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsClose.names index 5e5c09923c..e1278a293d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsClose.names @@ -7,41 +7,41 @@ "details": { "name": "Is Close", "category": "Math/Vector3", - "tooltip": "Returns true if the difference between A and B is less than tolerance, else false" + "tooltip": "returns true if the difference between A and B is less than tolerance, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_2", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsFinite.names index e527e8bf35..c916809a96 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsFinite.names @@ -7,29 +7,29 @@ "details": { "name": "Is Finite", "category": "Math/Vector3", - "tooltip": "Returns true if every element in the source is finite, else false" + "tooltip": "returns true if every element in the source is finite, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsNormalized.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsNormalized.names index e9f64e84fb..84ffdc22f2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsNormalized.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsNormalized.names @@ -7,35 +7,35 @@ "details": { "name": "Is Normalized", "category": "Math/Vector3", - "tooltip": "Returns true if the length of the source is within tolerance of 1.0, else false" + "tooltip": "returns true if the length of the source is within tolerance of 1.0, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_1", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsPerpendicular.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsPerpendicular.names index c4adec6436..2a08ec2a0f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsPerpendicular.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsPerpendicular.names @@ -7,41 +7,41 @@ "details": { "name": "Is Perpendicular", "category": "Math/Vector3", - "tooltip": "Returns true if A is within tolerance of perpendicular with B, that is if Dot(A, B) < tolerance, else false" + "tooltip": "returns true if A is within tolerance of perpendicular with B, that is if Dot(A, B) < tolerance, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_2", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsZero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsZero.names index f65485eb78..22369c83eb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsZero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsZero.names @@ -7,35 +7,35 @@ "details": { "name": "Is Zero", "category": "Math/Vector3", - "tooltip": "Returns true if A is within tolerance of the zero vector, else false" + "tooltip": "returns true if A is within tolerance of the zero vector, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_1", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Length.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Length.names index 6861dab138..1048e34e55 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Length.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Length.names @@ -7,29 +7,29 @@ "details": { "name": "Length", "category": "Math/Vector3", - "tooltip": "Returns the magnitude of source" + "tooltip": "returns the magnitude of source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthReciprocal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthReciprocal.names index 12ded27f2e..26d305ab5a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthReciprocal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthReciprocal.names @@ -7,29 +7,29 @@ "details": { "name": "Length Reciprocal", "category": "Math/Vector3", - "tooltip": "Returns the 1 / magnitude of the source" + "tooltip": "returns the 1 / magnitude of the source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthSquared.names index 9a97dbb263..81bc413403 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthSquared.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthSquared.names @@ -7,29 +7,29 @@ "details": { "name": "Length Squared", "category": "Math/Vector3", - "tooltip": "Returns the magnitude squared of the source, generally faster than getting the exact length" + "tooltip": "returns the magnitude squared of the source, generally faster than getting the exact length" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Lerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Lerp.names index c320ce31a5..4dfc86f953 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Lerp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Lerp.names @@ -7,41 +7,41 @@ "details": { "name": "Lerp", "category": "Math/Vector3", - "tooltip": "Returns the linear interpolation (From + ((To - From) * T)" + "tooltip": "returns the linear interpolation (From + ((To - From) * T)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_From", + "base": "DataInput_From_0", "details": { "name": "From" } }, { - "base": "DataInput_To", + "base": "DataInput_To_1", "details": { "name": "To" } }, { - "base": "DataInput_T", + "base": "DataInput_T_2", "details": { "name": "T" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Max.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Max.names index d429e45202..9377255408 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Max.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Max.names @@ -7,35 +7,35 @@ "details": { "name": "Max", "category": "Math/Vector3", - "tooltip": "Returns the vector (max(A.x, B.x), max(A.y, B.y), max(A.z, B.z))" + "tooltip": "returns the vector (max(A.x, B.x), max(A.y, B.y), max(A.z, B.z))" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Min.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Min.names index eef2baf012..ae84d7da5e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Min.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Min.names @@ -7,35 +7,35 @@ "details": { "name": "Min", "category": "Math/Vector3", - "tooltip": "Returns the vector (min(A.x, B.x), min(A.y, B.y), min(A.z, B.z))" + "tooltip": "returns the vector (min(A.x, B.x), min(A.y, B.y), min(A.z, B.z))" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_MultiplyByNumber.names index 9637449b22..d000076f9c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_MultiplyByNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_MultiplyByNumber.names @@ -7,35 +7,35 @@ "details": { "name": "Multiply By Number", "category": "Math/Vector3", - "tooltip": "Returns the vector Source with each element multiplied by Multipler" + "tooltip": "returns the vector Source with each element multiplied by Multipler" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Multiplier", + "base": "DataInput_Multiplier_1", "details": { "name": "Multiplier" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Negate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Negate.names index b0fa0beae4..4e71256752 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Negate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Negate.names @@ -7,29 +7,29 @@ "details": { "name": "Negate", "category": "Math/Vector3", - "tooltip": "Returns the vector Source with each element multiplied by -1" + "tooltip": "returns the vector Source with each element multiplied by -1" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Normalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Normalize.names index a0f535b4d4..73cbdbb7b3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Normalize.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Normalize.names @@ -7,29 +7,29 @@ "details": { "name": "Normalize", "category": "Math/Vector3", - "tooltip": "Returns a unit length vector in the same direction as the source, or (1,0,0) if the source length is too small" + "tooltip": "returns a unit length vector in the same direction as the source, or (1,0,0) if the source length is too small" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Project.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Project.names index ff18755ecb..862d7c06a6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Project.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Project.names @@ -7,35 +7,35 @@ "details": { "name": "Project", "category": "Math/Vector3", - "tooltip": "Returns the vector of A projected onto B, (Dot(A, B)/(Dot(B, B)) * B" + "tooltip": "returns the vector of A projected onto B, (Dot(A, B)/(Dot(B, B)) * B" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Reciprocal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Reciprocal.names index de65bf82ea..a5120d6279 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Reciprocal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Reciprocal.names @@ -7,29 +7,29 @@ "details": { "name": "Reciprocal", "category": "Math/Vector3", - "tooltip": "Returns the vector (1/x, 1/y, 1/z) with elements from Source" + "tooltip": "returns the vector (1/x, 1/y, 1/z) with elements from Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetX.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetX.names index 7db313ffca..a70f83b745 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetX.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetX.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Set X", + "name": "SetX", "category": "Math/Vector3", - "tooltip": "Returns a the vector(X, Source.Y, Source.Z)" + "tooltip": "returns a the vector(X, Source.Y, Source.Z)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_X", + "base": "DataInput_X_1", "details": { "name": "X" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetY.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetY.names index db5299df5b..f5c78805c2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetY.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetY.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Set Y", + "name": "SetY", "category": "Math/Vector3", - "tooltip": "Returns a the vector(Source.X, Y, Source.Z)" + "tooltip": "returns a the vector(Source.X, Y, Source.Z)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Y", + "base": "DataInput_Y_1", "details": { "name": "Y" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetZ.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetZ.names index c8239d2d46..870826d84b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetZ.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetZ.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Set Z", + "name": "SetZ", "category": "Math/Vector3", - "tooltip": "Returns a the vector(Source.X, Source.Y, Z)" + "tooltip": "returns a the vector(Source.X, Source.Y, Z)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Z", + "base": "DataInput_Z_1", "details": { "name": "Z" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Slerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Slerp.names index 5052d03400..3eee6e3d05 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Slerp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Slerp.names @@ -7,41 +7,41 @@ "details": { "name": "Slerp", "category": "Math/Vector3", - "tooltip": "Returns a vector that is the spherical linear interpolation T, between From and To" + "tooltip": "returns a vector that is the spherical linear interpolation T, between From and To" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_From", + "base": "DataInput_From_0", "details": { "name": "From" } }, { - "base": "DataInput_To", + "base": "DataInput_To_1", "details": { "name": "To" } }, { - "base": "DataInput_T", + "base": "DataInput_T_2", "details": { "name": "T" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Absolute.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Absolute.names index c5ebee0f5a..5f955d54b6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Absolute.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Absolute.names @@ -7,29 +7,29 @@ "details": { "name": "Absolute", "category": "Math/Vector4", - "tooltip": "Returns a vector with the absolute values of the elements of the source" + "tooltip": "returns a vector with the absolute values of the elements of the source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_DirectionTo.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_DirectionTo.names index e8ab09461e..55c3f0dc5f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_DirectionTo.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_DirectionTo.names @@ -11,37 +11,37 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_From", + "base": "DataInput_From_0", "details": { "name": "From" } }, { - "base": "DataInput_To", + "base": "DataInput_To_1", "details": { "name": "To" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_2", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Dot.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Dot.names index d780f4379b..b4022c9aad 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Dot.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Dot.names @@ -7,35 +7,35 @@ "details": { "name": "Dot", "category": "Math/Vector4", - "tooltip": "Returns the vector dot product of A dot B" + "tooltip": "returns the vector dot product of A dot B" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_FromValues.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_FromValues.names index 1f362d71f9..8e0f291742 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_FromValues.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_FromValues.names @@ -7,47 +7,47 @@ "details": { "name": "From Values", "category": "Math/Vector4", - "tooltip": "Returns a vector from elements" + "tooltip": "returns a vector from elements" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_X", + "base": "DataInput_X_0", "details": { "name": "X" } }, { - "base": "DataInput_Y", + "base": "DataInput_Y_1", "details": { "name": "Y" } }, { - "base": "DataInput_Z", + "base": "DataInput_Z_2", "details": { "name": "Z" } }, { - "base": "DataInput_W", + "base": "DataInput_W_3", "details": { "name": "W" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_GetElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_GetElement.names index f09bda9acf..4d8ee5cc43 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_GetElement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_GetElement.names @@ -7,35 +7,35 @@ "details": { "name": "Get Element", "category": "Math/Vector4", - "tooltip": "Returns the element corresponding to the index (0 -> x) (1 -> y) (2 -> z) (3 -> w)" + "tooltip": "returns the element corresponding to the index (0 -> x) (1 -> y) (2 -> z) (3 -> w)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Index", + "base": "DataInput_Index_1", "details": { "name": "Index" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsClose.names index 5881c02adb..a94b2e24fd 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsClose.names @@ -7,41 +7,41 @@ "details": { "name": "Is Close", "category": "Math/Vector4", - "tooltip": "Returns true if the difference between A and B is less than tolerance, else false" + "tooltip": "returns true if the difference between A and B is less than tolerance, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_2", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsFinite.names index 9e1c8e5ba0..6a24bbc17a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsFinite.names @@ -7,29 +7,29 @@ "details": { "name": "Is Finite", "category": "Math/Vector4", - "tooltip": "Returns true if every element in the source is finite, else false" + "tooltip": "returns true if every element in the source is finite, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsNormalized.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsNormalized.names index 92b367b6e2..800ff856e2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsNormalized.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsNormalized.names @@ -7,35 +7,35 @@ "details": { "name": "Is Normalized", "category": "Math/Vector4", - "tooltip": "Returns true if the length of the source is within tolerance of 1.0, else false" + "tooltip": "returns true if the length of the source is within tolerance of 1.0, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_1", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsZero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsZero.names index 6d2bacb0b2..2d6526e973 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsZero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsZero.names @@ -7,35 +7,35 @@ "details": { "name": "Is Zero", "category": "Math/Vector4", - "tooltip": "Returns true if A is within tolerance of the zero vector, else false" + "tooltip": "returns true if A is within tolerance of the zero vector, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_1", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Length.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Length.names index 2aa5585b43..c9c6c5fb45 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Length.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Length.names @@ -7,29 +7,29 @@ "details": { "name": "Length", "category": "Math/Vector4", - "tooltip": "Returns the magnitude of source" + "tooltip": "returns the magnitude of source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthReciprocal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthReciprocal.names index 4affd32f7c..9f34b605c0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthReciprocal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthReciprocal.names @@ -7,29 +7,29 @@ "details": { "name": "Length Reciprocal", "category": "Math/Vector4", - "tooltip": "Returns the 1 / magnitude of the source" + "tooltip": "returns the 1 / magnitude of the source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthSquared.names index 1abb6d4e9b..2404613170 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthSquared.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthSquared.names @@ -7,29 +7,29 @@ "details": { "name": "Length Squared", "category": "Math/Vector4", - "tooltip": "Returns the magnitude squared of the source, generally faster than getting the exact length" + "tooltip": "returns the magnitude squared of the source, generally faster than getting the exact length" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_MultiplyByNumber.names index c9cd4b2513..68624b8316 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_MultiplyByNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_MultiplyByNumber.names @@ -7,35 +7,35 @@ "details": { "name": "Multiply By Number", "category": "Math/Vector4", - "tooltip": "Returns the vector Source with each element multiplied by Multipler" + "tooltip": "returns the vector Source with each element multiplied by Multipler" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Multiplier", + "base": "DataInput_Multiplier_1", "details": { "name": "Multiplier" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Negate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Negate.names index 74da5c724d..d2cf095379 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Negate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Negate.names @@ -7,29 +7,29 @@ "details": { "name": "Negate", "category": "Math/Vector4", - "tooltip": "Returns the vector Source with each element multiplied by -1" + "tooltip": "returns the vector Source with each element multiplied by -1" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Normalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Normalize.names index 9d51b0e78d..b8159887c2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Normalize.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Normalize.names @@ -7,29 +7,29 @@ "details": { "name": "Normalize", "category": "Math/Vector4", - "tooltip": "Returns a unit length vector in the same direction as the source, or (1,0,0,0) if the source length is too small" + "tooltip": "returns a unit length vector in the same direction as the source, or (1,0,0,0) if the source length is too small" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Reciprocal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Reciprocal.names index f493b7bf20..502cd22c37 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Reciprocal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Reciprocal.names @@ -7,29 +7,29 @@ "details": { "name": "Reciprocal", "category": "Math/Vector4", - "tooltip": "Returns the vector (1/x, 1/y, 1/z, 1/w) with elements from Source" + "tooltip": "returns the vector (1/x, 1/y, 1/z, 1/w) with elements from Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetW.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetW.names index c89ebd7840..1797b85b69 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetW.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetW.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Set W", + "name": "SetW", "category": "Math/Vector4", - "tooltip": "Returns a the vector(Source.X, Source.Y, Source.Z, W)" + "tooltip": "returns a the vector(Source.X, Source.Y, Source.Z, W)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_W", + "base": "DataInput_W_1", "details": { "name": "W" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetX.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetX.names index b9b9e96845..b1a2f8d94f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetX.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetX.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Set X", + "name": "SetX", "category": "Math/Vector4", - "tooltip": "Returns a the vector(X, Source.Y, Source.Z, Source.W)" + "tooltip": "returns a the vector(X, Source.Y, Source.Z, Source.W)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_X", + "base": "DataInput_X_1", "details": { "name": "X" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetY.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetY.names index f0f2b04cf8..533a7178bd 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetY.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetY.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Set Y", + "name": "SetY", "category": "Math/Vector4", - "tooltip": "Returns a the vector(Source.X, Y, Source.Z, Source.W)" + "tooltip": "returns a the vector(Source.X, Y, Source.Z, Source.W)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Y", + "base": "DataInput_Y_1", "details": { "name": "Y" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetZ.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetZ.names index 3467d2ca52..d631cef009 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetZ.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetZ.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Set Z", + "name": "SetZ", "category": "Math/Vector4", - "tooltip": "Returns a the vector(Source.X, Source.Y, Z, Source.W)" + "tooltip": "returns a the vector(Source.X, Source.Y, Z, Source.W)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Z", + "base": "DataInput_Z_1", "details": { "name": "Z" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Add_+_.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Add_+_.names index fb9b199a4d..b50bb39aaf 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Add_+_.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Add_+_.names @@ -7,36 +7,35 @@ "details": { "name": "Add (+)", "category": "Math", - "tooltip": "Adds two or more values", - "subtitle": "Math" + "tooltip": "Adds two or more values" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { "name": "Value" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_1", "details": { "name": "Value" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Divide__.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Divide__.names index 40d1552274..c0891eb923 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Divide__.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Divide__.names @@ -7,36 +7,35 @@ "details": { "name": "Divide (/)", "category": "Math", - "tooltip": "Divides two or more values", - "subtitle": "Math" + "tooltip": "Divides two or more values" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { "name": "Value" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_1", "details": { "name": "Value" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_DividebyNumber__.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_DividebyNumber__.names index 45005dc5c4..01a061eae9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_DividebyNumber__.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_DividebyNumber__.names @@ -7,36 +7,35 @@ "details": { "name": "Divide by Number (/)", "category": "Math", - "tooltip": "Divides certain types by a given number", - "subtitle": "Math" + "tooltip": "Divides certain types by a given number" }, "slots": [ { - "base": "DataInput_Divisor", + "base": "DataInput_Divisor_0", "details": { "name": "Divisor" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_1", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Length.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Length.names index 3f2a833f95..80a5a6a356 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Length.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Length.names @@ -7,30 +7,29 @@ "details": { "name": "Length", "category": "Math", - "tooltip": "Given a vector this returns the magnitude (length) of the vector. For a quaternion, magnitude is the cosine of half the angle of rotation.", - "subtitle": "Math" + "tooltip": "Given a vector this returns the magnitude (length) of the vector. For a quaternion, magnitude is the cosine of half the angle of rotation." }, "slots": [ { - "base": "DataOutput_Length", + "base": "DataOutput_Length_0", "details": { "name": "Length" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_LerpBetween.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_LerpBetween.names index 53eaa8ebb6..1cb015b756 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_LerpBetween.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_LerpBetween.names @@ -6,83 +6,82 @@ "variant": "", "details": { "name": "Lerp Between", - "category": "Math", - "subtitle": "Math" + "category": "Math" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Starts the lerp action from the beginning." } }, { - "base": "DataInput_Start", + "base": "DataInput_Start_0", "details": { "name": "Start" } }, { - "base": "DataInput_Stop", + "base": "DataInput_Stop_1", "details": { "name": "Stop" } }, { - "base": "DataInput_Speed", + "base": "DataInput_Speed_2", "details": { "name": "Speed" } }, { - "base": "DataInput_Maximum Duration", + "base": "DataInput_Maximum Duration_3", "details": { "name": "Maximum Duration" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Executes immediately after the lerp action is started." } }, { - "base": "Input_Cancel", + "base": "Input_Cancel_1", "details": { "name": "Cancel", "tooltip": "Stops the lerp action immediately." } }, { - "base": "Output_Canceled", + "base": "Output_Canceled_1", "details": { "name": "Canceled", "tooltip": "Executes immediately after the operation is canceled." } }, { - "base": "Output_Tick", + "base": "Output_Tick_2", "details": { "name": "Tick", "tooltip": "Signaled at each step of the lerp." } }, { - "base": "DataOutput_Step", + "base": "DataOutput_Step_0", "details": { "name": "Step" } }, { - "base": "DataOutput_Percent", + "base": "DataOutput_Percent_1", "details": { "name": "Percent" } }, { - "base": "Output_Lerp Complete", + "base": "Output_Lerp Complete_3", "details": { "name": "Lerp Complete", "tooltip": "Signaled after the last Tick, when the lerp is complete" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MathExpression.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MathExpression.names index 4928054d0e..36d0aeac01 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MathExpression.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MathExpression.names @@ -7,25 +7,24 @@ "details": { "name": "Math Expression", "category": "Math", - "tooltip": "Will evaluate a series of math operations, allowing users to specify inputs using {}.", - "subtitle": "Math" + "tooltip": "Will evaluate a series of math operations, allowing users to specify inputs using {}." }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Output signal" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MultiplyAndAdd.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MultiplyAndAdd.names index f8af2d0c67..0e452f6f36 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MultiplyAndAdd.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MultiplyAndAdd.names @@ -10,37 +10,37 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Multiplicand", + "base": "DataInput_Multiplicand_0", "details": { "name": "Multiplicand" } }, { - "base": "DataInput_Multiplier", + "base": "DataInput_Multiplier_1", "details": { "name": "Multiplier" } }, { - "base": "DataInput_Addend", + "base": "DataInput_Addend_2", "details": { "name": "Addend" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Multiply_x_.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Multiply_x_.names index 6293bab799..3ce427647d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Multiply_x_.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Multiply_x_.names @@ -7,36 +7,35 @@ "details": { "name": "Multiply (*)", "category": "Math", - "tooltip": "Multiplies two of more values", - "subtitle": "Math" + "tooltip": "Multiplies two of more values" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { "name": "Value" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_1", "details": { "name": "Value" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_StringToNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_StringToNumber.names index 534d469271..45b8ba8cb5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_StringToNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_StringToNumber.names @@ -11,19 +11,19 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Subtract_-_.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Subtract_-_.names index 423ec056ea..cec6c3ec91 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Subtract_-_.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Subtract_-_.names @@ -7,36 +7,35 @@ "details": { "name": "Subtract (-)", "category": "Math", - "tooltip": "Subtracts two of more elements", - "subtitle": "Math" + "tooltip": "Subtracts two of more elements" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { "name": "Value" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_1", "details": { "name": "Value" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_ThreeGeneric.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_ThreeGeneric.names index 9b73829ea8..b76b0099d3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_ThreeGeneric.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_ThreeGeneric.names @@ -5,58 +5,57 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ThreeGeneric", + "name": "Three Generic", "category": "Math", - "tooltip": "returns all columns from matrix", - "subtitle": "Math" + "tooltip": "returns all columns from matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector3: One", + "base": "DataInput_One_0", "details": { - "name": "Vector3: One" + "name": "One" } }, { - "base": "DataInput_String: Two", + "base": "DataInput_Two_1", "details": { - "name": "String: Two" + "name": "Two" } }, { - "base": "DataInput_Boolean: Three", + "base": "DataInput_Three_2", "details": { - "name": "Boolean: Three" + "name": "Three" } }, { - "base": "DataOutput_One: Vector3", + "base": "DataOutput_One_0", "details": { - "name": "One: Vector3" + "name": "One" } }, { - "base": "DataOutput_Two: String", + "base": "DataOutput_Two_1", "details": { - "name": "Two: String" + "name": "Two" } }, { - "base": "DataOutput_Three: Boolean", + "base": "DataOutput_Three_2", "details": { - "name": "Three: Boolean" + "name": "Three" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Duration.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Duration.names index a1153b6eac..009ef7cd75 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Duration.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Duration.names @@ -6,43 +6,43 @@ "variant": "", "details": { "name": "Duration", - "category": "Timing", + "category": "Nodeables", "tooltip": "Triggers a signal every frame during the specified duration." }, "slots": [ { - "base": "Input_Start", + "base": "Input_Start_0", "details": { "name": "Start" } }, { - "base": "DataInput_Duration", + "base": "DataInput_Duration_0", "details": { "name": "Duration" } }, { - "base": "Output_On Start", + "base": "Output_On Start_0", "details": { "name": "On Start" } }, { - "base": "Output_OnTick", + "base": "Output_OnTick_1", "details": { "name": "OnTick", "tooltip": "Signaled every frame while the duration is active." } }, { - "base": "DataOutput_Elapsed", + "base": "DataOutput_Elapsed_0", "details": { "name": "Elapsed" } }, { - "base": "Output_Done", + "base": "Output_Done_2", "details": { "name": "Done", "tooltip": "Signaled after waiting for the specified amount of times." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Repeater.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Repeater.names index 21f18b994f..ae4868ad60 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Repeater.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Repeater.names @@ -6,43 +6,43 @@ "variant": "", "details": { "name": "Repeater", - "category": "Timing", + "category": "Nodeables", "tooltip": "Repeats the output signal the given number of times using the specified delay to space the signals out." }, "slots": [ { - "base": "Input_Start", + "base": "Input_Start_0", "details": { "name": "Start" } }, { - "base": "DataInput_Repetitions", + "base": "DataInput_Repetitions_0", "details": { "name": "Repetitions" } }, { - "base": "DataInput_Interval", + "base": "DataInput_Interval_1", "details": { "name": "Interval" } }, { - "base": "Output_On Start", + "base": "Output_On Start_0", "details": { "name": "On Start" } }, { - "base": "Output_Complete", + "base": "Output_Complete_1", "details": { "name": "Complete", "tooltip": "Signaled upon node exit" } }, { - "base": "Output_Action", + "base": "Output_Action_2", "details": { "name": "Action", "tooltip": "Signaled every repetition" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_TimeDelay.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_TimeDelay.names index dd4c6412f3..618f0c3378 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_TimeDelay.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_TimeDelay.names @@ -6,30 +6,30 @@ "variant": "", "details": { "name": "Time Delay", - "category": "Timing", + "category": "Nodeables", "tooltip": "Delays all incoming execution for the specified number of ticks" }, "slots": [ { - "base": "Input_Start", + "base": "Input_Start_0", "details": { "name": "Start" } }, { - "base": "DataInput_Delay", + "base": "DataInput_Delay_0", "details": { "name": "Delay" } }, { - "base": "Output_On Start", + "base": "Output_On Start_0", "details": { "name": "On Start" } }, { - "base": "Output_Done", + "base": "Output_Done_1", "details": { "name": "Done", "tooltip": "Signaled after waiting for the specified amount of times." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/OperatorsMath_OperatorArithmeticUnary.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/OperatorsMath_OperatorArithmeticUnary.names index 8f3826e4f0..c7bfae7988 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/OperatorsMath_OperatorArithmeticUnary.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/OperatorsMath_OperatorArithmeticUnary.names @@ -5,37 +5,36 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "OperatorArithmeticUnary", - "category": "Operators/Math", - "subtitle": "Math" + "name": "Operator Arithmetic Unary", + "category": "Operators/Math" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { "name": "Value" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_1", "details": { "name": "Value" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Operators_OperatorArithmetic.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Operators_OperatorArithmetic.names index 20913eedaf..6f3ef18469 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Operators_OperatorArithmetic.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Operators_OperatorArithmetic.names @@ -5,37 +5,36 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "OperatorArithmetic", - "category": "Operators", - "subtitle": "Operators" + "name": "Operator Arithmetic", + "category": "Operators" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { "name": "Value" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_1", "details": { "name": "Value" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Operators_OperatorBase.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Operators_OperatorBase.names index 9b62348cdc..179ead79e9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Operators_OperatorBase.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Operators_OperatorBase.names @@ -5,20 +5,19 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "OperatorBase", - "category": "Operators", - "subtitle": "Operators" + "name": "Operator Base", + "category": "Operators" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Output signal" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_BoxCastWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_BoxCastWithGroup.names index 671fdd730e..62f08e481e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_BoxCastWithGroup.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_BoxCastWithGroup.names @@ -7,89 +7,89 @@ "details": { "name": "Box Cast With Group", "category": "PhysX/World", - "tooltip": "Box Cast" + "tooltip": "BoxCast" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Distance", + "base": "DataInput_Distance_0", "details": { "name": "Distance" } }, { - "base": "DataInput_Pose", + "base": "DataInput_Pose_1", "details": { "name": "Pose" } }, { - "base": "DataInput_Direction", + "base": "DataInput_Direction_2", "details": { "name": "Direction" } }, { - "base": "DataInput_Dimensions", + "base": "DataInput_Dimensions_3", "details": { "name": "Dimensions" } }, { - "base": "DataInput_Collision group", + "base": "DataInput_Collision group_4", "details": { "name": "Collision group" } }, { - "base": "DataInput_Ignore", + "base": "DataInput_Ignore_5", "details": { "name": "Ignore" } }, { - "base": "DataOutput_Object Hit", + "base": "DataOutput_Object Hit_0", "details": { "name": "Object Hit" } }, { - "base": "DataOutput_Position", + "base": "DataOutput_Position_1", "details": { "name": "Position" } }, { - "base": "DataOutput_Normal", + "base": "DataOutput_Normal_2", "details": { "name": "Normal" } }, { - "base": "DataOutput_Distance", + "base": "DataOutput_Distance_3", "details": { "name": "Distance" } }, { - "base": "DataOutput_EntityId", + "base": "DataOutput_EntityId_4", "details": { "name": "EntityId" } }, { - "base": "DataOutput_Surface", + "base": "DataOutput_Surface_5", "details": { "name": "Surface" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_CapsuleCastWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_CapsuleCastWithGroup.names index 4dfca63478..cd8fd7f240 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_CapsuleCastWithGroup.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_CapsuleCastWithGroup.names @@ -11,91 +11,91 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Distance", + "base": "DataInput_Distance_0", "details": { "name": "Distance" } }, { - "base": "DataInput_Pose", + "base": "DataInput_Pose_1", "details": { "name": "Pose" } }, { - "base": "DataInput_Direction", + "base": "DataInput_Direction_2", "details": { "name": "Direction" } }, { - "base": "DataInput_Height", + "base": "DataInput_Height_3", "details": { "name": "Height" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_4", "details": { "name": "Radius" } }, { - "base": "DataInput_Collision group", + "base": "DataInput_Collision group_5", "details": { "name": "Collision group" } }, { - "base": "DataInput_Ignore", + "base": "DataInput_Ignore_6", "details": { "name": "Ignore" } }, { - "base": "DataOutput_Object Hit", + "base": "DataOutput_Object Hit_0", "details": { "name": "Object Hit" } }, { - "base": "DataOutput_Position", + "base": "DataOutput_Position_1", "details": { "name": "Position" } }, { - "base": "DataOutput_Normal", + "base": "DataOutput_Normal_2", "details": { "name": "Normal" } }, { - "base": "DataOutput_Distance", + "base": "DataOutput_Distance_3", "details": { "name": "Distance" } }, { - "base": "DataOutput_EntityId", + "base": "DataOutput_EntityId_4", "details": { "name": "EntityId" } }, { - "base": "DataOutput_Surface", + "base": "DataOutput_Surface_5", "details": { "name": "Surface" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapBoxWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapBoxWithGroup.names index f49e3d2461..d01ae23354 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapBoxWithGroup.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapBoxWithGroup.names @@ -11,43 +11,43 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Pose", + "base": "DataInput_Pose_0", "details": { "name": "Pose" } }, { - "base": "DataInput_Dimensions", + "base": "DataInput_Dimensions_1", "details": { "name": "Dimensions" } }, { - "base": "DataInput_Collision group", + "base": "DataInput_Collision group_2", "details": { "name": "Collision group" } }, { - "base": "DataInput_Ignore", + "base": "DataInput_Ignore_3", "details": { "name": "Ignore" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapCapsuleWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapCapsuleWithGroup.names index 291dc8ea75..e1ac954107 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapCapsuleWithGroup.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapCapsuleWithGroup.names @@ -11,49 +11,49 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Pose", + "base": "DataInput_Pose_0", "details": { "name": "Pose" } }, { - "base": "DataInput_Height", + "base": "DataInput_Height_1", "details": { "name": "Height" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_2", "details": { "name": "Radius" } }, { - "base": "DataInput_Collision group", + "base": "DataInput_Collision group_3", "details": { "name": "Collision group" } }, { - "base": "DataInput_Ignore", + "base": "DataInput_Ignore_4", "details": { "name": "Ignore" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapSphereWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapSphereWithGroup.names index bd48cbf7ad..2d7cad3dce 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapSphereWithGroup.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapSphereWithGroup.names @@ -11,43 +11,43 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Position", + "base": "DataInput_Position_0", "details": { "name": "Position" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_1", "details": { "name": "Radius" } }, { - "base": "DataInput_Collision group", + "base": "DataInput_Collision group_2", "details": { "name": "Collision group" } }, { - "base": "DataInput_Ignore", + "base": "DataInput_Ignore_3", "details": { "name": "Ignore" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastLocalSpaceWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastLocalSpaceWithGroup.names index a61a7a1579..68a432668f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastLocalSpaceWithGroup.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastLocalSpaceWithGroup.names @@ -11,79 +11,79 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Direction", + "base": "DataInput_Direction_1", "details": { "name": "Direction" } }, { - "base": "DataInput_Distance", + "base": "DataInput_Distance_2", "details": { "name": "Distance" } }, { - "base": "DataInput_Collision group", + "base": "DataInput_Collision group_3", "details": { "name": "Collision group" } }, { - "base": "DataInput_Ignore", + "base": "DataInput_Ignore_4", "details": { "name": "Ignore" } }, { - "base": "DataOutput_Object hit", + "base": "DataOutput_Object hit_0", "details": { "name": "Object hit" } }, { - "base": "DataOutput_Position", + "base": "DataOutput_Position_1", "details": { "name": "Position" } }, { - "base": "DataOutput_Normal", + "base": "DataOutput_Normal_2", "details": { "name": "Normal" } }, { - "base": "DataOutput_Distance", + "base": "DataOutput_Distance_3", "details": { "name": "Distance" } }, { - "base": "DataOutput_EntityId", + "base": "DataOutput_EntityId_4", "details": { "name": "EntityId" } }, { - "base": "DataOutput_Surface", + "base": "DataOutput_Surface_5", "details": { "name": "Surface" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastMultipleLocalSpaceWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastMultipleLocalSpaceWithGroup.names index f2d2934035..2744ac87d5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastMultipleLocalSpaceWithGroup.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastMultipleLocalSpaceWithGroup.names @@ -11,49 +11,49 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Direction", + "base": "DataInput_Direction_1", "details": { "name": "Direction" } }, { - "base": "DataInput_Distance", + "base": "DataInput_Distance_2", "details": { "name": "Distance" } }, { - "base": "DataInput_Collision group", + "base": "DataInput_Collision group_3", "details": { "name": "Collision group" } }, { - "base": "DataInput_Ignore", + "base": "DataInput_Ignore_4", "details": { "name": "Ignore" } }, { - "base": "DataOutput_Objects hit", + "base": "DataOutput_Objects hit_0", "details": { "name": "Objects hit" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastWorldSpaceWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastWorldSpaceWithGroup.names index 8051204ab7..98b20ea4f5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastWorldSpaceWithGroup.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastWorldSpaceWithGroup.names @@ -11,79 +11,79 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Start", + "base": "DataInput_Start_0", "details": { "name": "Start" } }, { - "base": "DataInput_Direction", + "base": "DataInput_Direction_1", "details": { "name": "Direction" } }, { - "base": "DataInput_Distance", + "base": "DataInput_Distance_2", "details": { "name": "Distance" } }, { - "base": "DataInput_Collision group", + "base": "DataInput_Collision group_3", "details": { "name": "Collision group" } }, { - "base": "DataInput_Ignore", + "base": "DataInput_Ignore_4", "details": { "name": "Ignore" } }, { - "base": "DataOutput_Object hit", + "base": "DataOutput_Object hit_0", "details": { "name": "Object hit" } }, { - "base": "DataOutput_Position", + "base": "DataOutput_Position_1", "details": { "name": "Position" } }, { - "base": "DataOutput_Normal", + "base": "DataOutput_Normal_2", "details": { "name": "Normal" } }, { - "base": "DataOutput_Distance", + "base": "DataOutput_Distance_3", "details": { "name": "Distance" } }, { - "base": "DataOutput_EntityId", + "base": "DataOutput_EntityId_4", "details": { "name": "EntityId" } }, { - "base": "DataOutput_Surface", + "base": "DataOutput_Surface_5", "details": { "name": "Surface" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_SphereCastWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_SphereCastWithGroup.names index 705fa25d66..7b6c389171 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_SphereCastWithGroup.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_SphereCastWithGroup.names @@ -11,85 +11,85 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Distance", + "base": "DataInput_Distance_0", "details": { "name": "Distance" } }, { - "base": "DataInput_Pose", + "base": "DataInput_Pose_1", "details": { "name": "Pose" } }, { - "base": "DataInput_Direction", + "base": "DataInput_Direction_2", "details": { "name": "Direction" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_3", "details": { "name": "Radius" } }, { - "base": "DataInput_Collision group", + "base": "DataInput_Collision group_4", "details": { "name": "Collision group" } }, { - "base": "DataInput_Ignore", + "base": "DataInput_Ignore_5", "details": { "name": "Ignore" } }, { - "base": "DataOutput_Object Hit", + "base": "DataOutput_Object Hit_0", "details": { "name": "Object Hit" } }, { - "base": "DataOutput_Position", + "base": "DataOutput_Position_1", "details": { "name": "Position" } }, { - "base": "DataOutput_Normal", + "base": "DataOutput_Normal_2", "details": { "name": "Normal" } }, { - "base": "DataOutput_Distance", + "base": "DataOutput_Distance_3", "details": { "name": "Distance" } }, { - "base": "DataOutput_EntityId", + "base": "DataOutput_EntityId_4", "details": { "name": "EntityId" } }, { - "base": "DataOutput_Surface", + "base": "DataOutput_Surface_5", "details": { "name": "Surface" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Spawning_Spawn.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Spawning_Spawn.names index 3f099577f9..5588c71675 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Spawning_Spawn.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Spawning_Spawn.names @@ -7,48 +7,47 @@ "details": { "name": "Spawn", "category": "Spawning", - "tooltip": "Spawns a selected prefab, positioned using the provided transform inputs", - "subtitle": "Spawning" + "tooltip": "Spawns a selected prefab, positioned using the provided transform inputs" }, "slots": [ { - "base": "Input_Request Spawn", + "base": "Input_Request Spawn_0", "details": { "name": "Request Spawn" } }, { - "base": "DataInput_Translation", + "base": "DataInput_Translation_0", "details": { "name": "Translation" } }, { - "base": "DataInput_Rotation", + "base": "DataInput_Rotation_1", "details": { "name": "Rotation" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_2", "details": { "name": "Scale" } }, { - "base": "Output_Spawn Requested", + "base": "Output_Spawn Requested_0", "details": { "name": "Spawn Requested" } }, { - "base": "Output_On Spawn", + "base": "Output_On Spawn_1", "details": { "name": "On Spawn" } }, { - "base": "DataOutput_SpawnedEntitiesList", + "base": "DataOutput_SpawnedEntitiesList_0", "details": { "name": "SpawnedEntitiesList" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_BuildString.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_BuildString.names index 4576c21318..6eaa6a08b4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_BuildString.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_BuildString.names @@ -7,31 +7,30 @@ "details": { "name": "Build String", "category": "String", - "tooltip": "Formats and creates a string from the provided text.\nAny word within {} will create a data pin on this node.", - "subtitle": "String" + "tooltip": "Formats and creates a string from the provided text.\nAny word within {} will create a data pin on this node." }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { "name": "Value" } }, { - "base": "DataOutput_String", + "base": "DataOutput_String_0", "details": { "name": "String" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ContainsString.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ContainsString.names index 7cb1b668d4..b882e8a505 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ContainsString.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ContainsString.names @@ -7,56 +7,55 @@ "details": { "name": "Contains String", "category": "String", - "tooltip": "Checks if a string contains an instance of a specified string, if true, it returns the index to the first instance matched.", - "subtitle": "String" + "tooltip": "Checks if a string contains an instance of a specified string, if true, it returns the index to the first instance matched." }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Pattern", + "base": "DataInput_Pattern_1", "details": { "name": "Pattern" } }, { - "base": "DataInput_Search From End", + "base": "DataInput_Search From End_2", "details": { "name": "Search From End" } }, { - "base": "DataInput_Case Sensitive", + "base": "DataInput_Case Sensitive_3", "details": { "name": "Case Sensitive" } }, { - "base": "DataOutput_Index", + "base": "DataOutput_Index_0", "details": { "name": "Index" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "The string contains the provided pattern." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "The string did not contain the provided pattern." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_EndsWith.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_EndsWith.names index 35ba6f17b4..22857d3f5e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_EndsWith.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_EndsWith.names @@ -7,43 +7,42 @@ "details": { "name": "Ends With", "category": "String", - "tooltip": ".", - "subtitle": "String" + "tooltip": "." }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Pattern", + "base": "DataInput_Pattern_1", "details": { "name": "Pattern" } }, { - "base": "DataInput_Case Sensitive", + "base": "DataInput_Case Sensitive_2", "details": { "name": "Case Sensitive" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True" } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Join.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Join.names index fd379e063c..ef38e1a991 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Join.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Join.names @@ -7,37 +7,36 @@ "details": { "name": "Join", "category": "String", - "tooltip": ".", - "subtitle": "String" + "tooltip": "." }, "slots": [ { - "base": "DataInput_String Array", + "base": "DataInput_String Array_0", "details": { "name": "String Array" } }, { - "base": "DataInput_Separator", + "base": "DataInput_Separator_1", "details": { "name": "Separator" } }, { - "base": "DataOutput_String", + "base": "DataOutput_String_0", "details": { "name": "String" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ReplaceString.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ReplaceString.names index 2edaaa842e..601c05c89c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ReplaceString.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ReplaceString.names @@ -7,49 +7,48 @@ "details": { "name": "Replace String", "category": "String", - "tooltip": "Allows replacing a substring from a given string.", - "subtitle": "String" + "tooltip": "Allows replacing a substring from a given string." }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Replace", + "base": "DataInput_Replace_1", "details": { "name": "Replace" } }, { - "base": "DataInput_With", + "base": "DataInput_With_2", "details": { "name": "With" } }, { - "base": "DataInput_Case Sensitive", + "base": "DataInput_Case Sensitive_3", "details": { "name": "Case Sensitive" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Split.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Split.names index a16adf32b8..6a2943bf0f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Split.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Split.names @@ -7,37 +7,36 @@ "details": { "name": "Split", "category": "String", - "tooltip": ".", - "subtitle": "String" + "tooltip": "." }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Delimiters", + "base": "DataInput_Delimiters_1", "details": { "name": "Delimiters" } }, { - "base": "DataOutput_String Array", + "base": "DataOutput_String Array_0", "details": { "name": "String Array" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_StartsWith.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_StartsWith.names index 0538597e7a..a3a17b4ff7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_StartsWith.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_StartsWith.names @@ -7,43 +7,42 @@ "details": { "name": "Starts With", "category": "String", - "tooltip": ".", - "subtitle": "String" + "tooltip": "." }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Pattern", + "base": "DataInput_Pattern_1", "details": { "name": "Pattern" } }, { - "base": "DataInput_Case Sensitive", + "base": "DataInput_Case Sensitive_2", "details": { "name": "Case Sensitive" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True" } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Substring.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Substring.names index ff14a4fe42..5f489934bd 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Substring.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Substring.names @@ -7,44 +7,43 @@ "details": { "name": "Substring", "category": "String", - "tooltip": "Returns a sub string from a given string", - "subtitle": "String" + "tooltip": "Returns a sub string from a given string" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_String: Source", + "base": "DataInput_Source_0", "details": { - "name": "String: Source" + "name": "Source" } }, { - "base": "DataInput_Number: From", + "base": "DataInput_From_1", "details": { - "name": "Number: From" + "name": "From" } }, { - "base": "DataInput_Number: Length", + "base": "DataInput_Length_2", "details": { - "name": "Number: Length" + "name": "Length" } }, { - "base": "DataOutput_Result: String", + "base": "DataOutput_Result_0", "details": { - "name": "Result: String" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToLower.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToLower.names index 1d761cd3cf..3ec07352e0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToLower.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToLower.names @@ -11,25 +11,25 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToUpper.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToUpper.names index bee39e0683..62089de059 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToUpper.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToUpper.names @@ -11,25 +11,25 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_BranchMethodSharedDataSlotExample.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_BranchMethodSharedDataSlotExample.names index cb1b376ffa..6b966bfb55 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_BranchMethodSharedDataSlotExample.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_BranchMethodSharedDataSlotExample.names @@ -5,68 +5,67 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "BranchMethodSharedDataSlotExample", + "name": "Branch Method Shared Data Slot Example", "category": "Tests", - "tooltip": "Branch Test", - "subtitle": "Tests" + "tooltip": "Branch Test" }, "slots": [ { - "base": "Output_One String", + "base": "Output_One String_0", "details": { "name": "One String" } }, { - "base": "DataOutput_string", + "base": "DataOutput_string_0", "details": { "name": "string" } }, { - "base": "Output_Two Strings", + "base": "Output_Two Strings_1", "details": { "name": "Two Strings" } }, { - "base": "DataOutput_string1", + "base": "DataOutput_string1_1", "details": { "name": "string1" } }, { - "base": "DataOutput_string2", + "base": "DataOutput_string2_2", "details": { "name": "string2" } }, { - "base": "Output_Three Strings", + "base": "Output_Three Strings_2", "details": { "name": "Three Strings" } }, { - "base": "DataOutput_string3", + "base": "DataOutput_string3_3", "details": { "name": "string3" } }, { - "base": "Output_Square", + "base": "Output_Square_3", "details": { "name": "Square" } }, { - "base": "Output_Pants", + "base": "Output_Pants_4", "details": { "name": "Pants" } }, { - "base": "Output_Hello", + "base": "Output_Hello_5", "details": { "name": "Hello" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_InputMethodSharedDataSlotExample.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_InputMethodSharedDataSlotExample.names index 2ea2b7c637..c88f0fea97 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_InputMethodSharedDataSlotExample.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_InputMethodSharedDataSlotExample.names @@ -5,74 +5,73 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "InputMethodSharedDataSlotExample", + "name": "Input Method Shared Data Slot Example", "category": "Tests", - "tooltip": "Input Method Shared Data", - "subtitle": "Tests" + "tooltip": "Input Method Shared Data" }, "slots": [ { - "base": "Input_Append Hello", + "base": "Input_Append Hello_0", "details": { "name": "Append Hello" } }, { - "base": "DataInput_str", + "base": "DataInput_str_0", "details": { "name": "str" } }, { - "base": "Output_On Append Hello", + "base": "Output_On Append Hello_0", "details": { "name": "On Append Hello" } }, { - "base": "DataOutput_Output", + "base": "DataOutput_Output_0", "details": { "name": "Output" } }, { - "base": "Input_Concatenate Two", + "base": "Input_Concatenate Two_1", "details": { "name": "Concatenate Two" } }, { - "base": "DataInput_a", + "base": "DataInput_a_1", "details": { "name": "a" } }, { - "base": "DataInput_b", + "base": "DataInput_b_2", "details": { "name": "b" } }, { - "base": "Output_On Concatenate Two", + "base": "Output_On Concatenate Two_1", "details": { "name": "On Concatenate Two" } }, { - "base": "Input_Concatenate Three", + "base": "Input_Concatenate Three_2", "details": { "name": "Concatenate Three" } }, { - "base": "DataInput_c", + "base": "DataInput_c_3", "details": { "name": "c" } }, { - "base": "Output_On Concatenate Three", + "base": "Output_On Concatenate Three_2", "details": { "name": "On Concatenate Three" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Delay.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Delay.names index 7d9f1d9d64..ac6387256c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Delay.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Delay.names @@ -7,97 +7,96 @@ "details": { "name": "Delay", "category": "Timing", - "tooltip": "While active, will signal the output at the given interval.", - "subtitle": "Timing" + "tooltip": "While active, will signal the output at the given interval." }, "slots": [ { - "base": "Input_Start", + "base": "Input_Start_0", "details": { "name": "Start", "tooltip": "When signaled, execution is delayed at this node according to the specified properties." } }, { - "base": "DataInput_Start: Time", + "base": "DataInput_Start: Time_0", "details": { "name": "Start: Time" } }, { - "base": "DataInput_Start: Loop", + "base": "DataInput_Start: Loop_1", "details": { "name": "Start: Loop" } }, { - "base": "DataInput_Start: Hold", + "base": "DataInput_Start: Hold_2", "details": { "name": "Start: Hold" } }, { - "base": "Output_On Start", + "base": "Output_On Start_0", "details": { "name": "On Start", "tooltip": "When signaled, execution is delayed at this node according to the specified properties." } }, { - "base": "Input_Reset", + "base": "Input_Reset_1", "details": { "name": "Reset", "tooltip": "When signaled, execution is delayed at this node according to the specified properties." } }, { - "base": "DataInput_Reset: Time", + "base": "DataInput_Reset: Time_3", "details": { "name": "Reset: Time" } }, { - "base": "DataInput_Reset: Loop", + "base": "DataInput_Reset: Loop_4", "details": { "name": "Reset: Loop" } }, { - "base": "DataInput_Reset: Hold", + "base": "DataInput_Reset: Hold_5", "details": { "name": "Reset: Hold" } }, { - "base": "Output_On Reset", + "base": "Output_On Reset_1", "details": { "name": "On Reset", "tooltip": "When signaled, execution is delayed at this node according to the specified properties." } }, { - "base": "Input_Cancel", + "base": "Input_Cancel_2", "details": { "name": "Cancel", "tooltip": "Cancels the current delay." } }, { - "base": "Output_On Cancel", + "base": "Output_On Cancel_2", "details": { "name": "On Cancel", "tooltip": "Cancels the current delay." } }, { - "base": "Output_Done", + "base": "Output_Done_3", "details": { "name": "Done", "tooltip": "Signaled when the delay reaches zero." } }, { - "base": "DataOutput_Elapsed", + "base": "DataOutput_Elapsed_0", "details": { "name": "Elapsed" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Duration.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Duration.names index d3ef973ec7..280ef54ea0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Duration.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Duration.names @@ -11,33 +11,33 @@ }, "slots": [ { - "base": "DataInput_Duration", + "base": "DataInput_Duration_0", "details": { "name": "Duration" } }, { - "base": "DataOutput_Elapsed", + "base": "DataOutput_Elapsed_0", "details": { "name": "Elapsed" } }, { - "base": "Input_Start", + "base": "Input_Start_0", "details": { "name": "Start", "tooltip": "Starts the countdown" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled every frame while the duration is active." } }, { - "base": "Output_Done", + "base": "Output_Done_1", "details": { "name": "Done", "tooltip": "Signaled once the duration is complete." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_HeartBeat.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_HeartBeat.names index c024e58c31..6f5f2a3f24 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_HeartBeat.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_HeartBeat.names @@ -1,7 +1,7 @@ { "entries": [ { - "base": "{E73DB180-A325-763B-A1FE-517B548AF66E}", + "base": "{BA107060-249D-4818-9CEC-7573718273FC}", "context": "ScriptCanvas::Node", "variant": "", "details": { @@ -11,40 +11,27 @@ }, "slots": [ { - "base": "Input_Start", + "base": "Input_Start_0", "details": { "name": "Start" } }, { - "base": "DataInput_Interval", - "details": { - "name": "Interval" - } - }, - { - "base": "Output_On Start", - "details": { - "name": "On Start" - } - }, - { - "base": "Input_Stop", + "base": "Input_Stop_1", "details": { "name": "Stop" } }, { - "base": "Output_On Stop", + "base": "Output_Pulse_0", "details": { - "name": "On Stop" + "name": "Pulse" } }, { - "base": "Output_Pulse", + "base": "DataInput_Interval_0", "details": { - "name": "Pulse", - "tooltip": "Signaled at each specified interval." + "name": "Interval" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_OnGraphStart.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_OnGraphStart.names index d5162caf05..b723bc06e1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_OnGraphStart.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_OnGraphStart.names @@ -7,12 +7,11 @@ "details": { "name": "On Graph Start", "category": "Timing", - "tooltip": "Starts executing the graph when the entity that owns the graph is fully activated.", - "subtitle": "Timing" + "tooltip": "Starts executing the graph when the entity that owns the graph is fully activated." }, "slots": [ { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled when the entity that owns this graph is fully activated." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_TickDelay.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_TickDelay.names index a682f2b7ec..d0dcd75f85 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_TickDelay.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_TickDelay.names @@ -11,26 +11,26 @@ }, "slots": [ { - "base": "DataInput_Ticks", + "base": "DataInput_Ticks_0", "details": { "name": "Ticks" } }, { - "base": "DataInput_Tick Order", + "base": "DataInput_Tick Order_1", "details": { "name": "Tick Order" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "When signaled, execution is delayed at this node for the specified amount of frames." } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled after waiting for the specified amount of frames." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_TimeDelay.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_TimeDelay.names index bfe267f227..3a83df9031 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_TimeDelay.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_TimeDelay.names @@ -11,21 +11,21 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "When signaled, execution is delayed at this node for the specified amount of times." } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled after waiting for the specified amount of times." } }, { - "base": "DataInput_Delay", + "base": "DataInput_Delay_0", "details": { "name": "Delay" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Timer.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Timer.names index 87b2c1cefa..8d5bc6e536 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Timer.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Timer.names @@ -1,46 +1,60 @@ { "entries": [ { - "base": "{60CF8540-E51A-434D-A32C-461C41D68AF9}", + "base": "{32A4BEDC-C207-4472-61DE-9A716402620A}", "context": "ScriptCanvas::Node", "variant": "", "details": { "name": "Timer", "category": "Timing", - "tooltip": "Provides a time value." + "tooltip": "While active, will signal the output at the given interval." }, "slots": [ { - "base": "DataOutput_Milliseconds", + "base": "Input_Start_0", "details": { - "name": "Milliseconds" + "name": "Start", + "tooltip": "Starts the timer" } }, { - "base": "DataOutput_Seconds", + "base": "Output_On Start_0", "details": { - "name": "Seconds" + "name": "On Start", + "tooltip": "Starts the timer" } }, { - "base": "Input_Start", + "base": "Input_Stop_1", "details": { - "name": "Start", - "tooltip": "Starts the timer." + "name": "Stop", + "tooltip": "Stops the timer" } }, { - "base": "Input_Stop", + "base": "Output_On Stop_1", "details": { - "name": "Stop", - "tooltip": "Stops the timer." + "name": "On Stop", + "tooltip": "Stops the timer" + } + }, + { + "base": "Output_On Tick_2", + "details": { + "name": "On Tick", + "tooltip": "Signaled at each tick while the timer is in operation." + } + }, + { + "base": "DataOutput_Milliseconds_0", + "details": { + "name": "Milliseconds" } }, { - "base": "Output_Out", + "base": "DataOutput_Seconds_1", "details": { - "name": "Out", - "tooltip": "Signaled every frame while the timer is running." + "name": "Seconds" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_ArithmeticExpression.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_ArithmeticExpression.names index 8412a5383d..4b867599f9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_ArithmeticExpression.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_ArithmeticExpression.names @@ -5,38 +5,38 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ArithmeticExpression", + "name": "Arithmetic Expression", "tooltip": "ArithmeticExpression" }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled after the arithmetic operation is done." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_BinaryOperator.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_BinaryOperator.names index e07670e988..44eaa0b48f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_BinaryOperator.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_BinaryOperator.names @@ -5,12 +5,12 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "BinaryOperator", + "name": "Binary Operator", "tooltip": "BinaryOperator" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_BooleanExpression.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_BooleanExpression.names index 7df3ca9423..6309542f71 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_BooleanExpression.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_BooleanExpression.names @@ -5,32 +5,32 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "BooleanExpression", + "name": "Boolean Expression", "tooltip": "BooleanExpression" }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_ComparisonExpression.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_ComparisonExpression.names index f59d822ffb..a99ea08c00 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_ComparisonExpression.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_ComparisonExpression.names @@ -5,45 +5,45 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ComparisonExpression", + "name": "Comparison Expression", "tooltip": "ComparisonExpression" }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_EqualityExpression.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_EqualityExpression.names index f8404345b7..d53cb9357a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_EqualityExpression.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_EqualityExpression.names @@ -5,45 +5,45 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "EqualityExpression", + "name": "Equality Expression", "tooltip": "EqualityExpression" }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_GetVariable.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_GetVariable.names index a2a6475525..1f2b2061f4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_GetVariable.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_GetVariable.names @@ -10,14 +10,14 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "When signaled sends the property referenced by this node to a Data Output slot" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled after the referenced property has been pushed to the Data Output slot" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_NodeableNode.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_NodeableNode.names index d884e287da..3122d622eb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_NodeableNode.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_NodeableNode.names @@ -5,7 +5,7 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "NodeableNode", + "name": "Nodeable Node", "tooltip": "NodeableNode" } } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_NodeableNodeOverloaded.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_NodeableNodeOverloaded.names index fa7c4723e1..0628ef14b2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_NodeableNodeOverloaded.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_NodeableNodeOverloaded.names @@ -5,7 +5,7 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "NodeableNodeOverloaded", + "name": "Nodeable Node Overloaded", "tooltip": "NodeableNode" } } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_SetVariable.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_SetVariable.names index b4e5f12867..e4050ce1f7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_SetVariable.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_SetVariable.names @@ -10,14 +10,14 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "When signaled sends the variable referenced by this node to a Data Output slot" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled after the referenced variable has been pushed to the Data Output slot" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_UnaryExpression.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_UnaryExpression.names index 4933d2d9bc..33fab189e4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_UnaryExpression.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_UnaryExpression.names @@ -5,38 +5,38 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "UnaryExpression", + "name": "Unary Expression", "tooltip": "UnaryExpression" }, "slots": [ { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { "name": "Value" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_UnaryOperator.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_UnaryOperator.names index b18fe07c1f..6b51a011d9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_UnaryOperator.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_UnaryOperator.names @@ -5,12 +5,12 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "UnaryOperator", + "name": "Unary Operator", "tooltip": "UnaryOperator" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesDebug_Print.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesDebug_Print.names index 0b238ad007..a78f033284 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesDebug_Print.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesDebug_Print.names @@ -7,25 +7,24 @@ "details": { "name": "Print", "category": "Utilities/Debug", - "tooltip": "Formats and prints the provided text in the debug console.\nAny word within {} will create a data pin on this node.", - "subtitle": "Debug" + "tooltip": "Formats and prints the provided text in the debug console.\nAny word within {} will create a data pin on this node." }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { "name": "Value" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_AddFailure.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_AddFailure.names index f1e851bd4d..7029cc839b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_AddFailure.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_AddFailure.names @@ -11,20 +11,20 @@ }, "slots": [ { - "base": "DataInput_Report", + "base": "DataInput_Report_0", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_AddSuccess.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_AddSuccess.names index 5ebb61abdb..fb81c2fdef 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_AddSuccess.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_AddSuccess.names @@ -11,20 +11,20 @@ }, "slots": [ { - "base": "DataInput_Report", + "base": "DataInput_Report_0", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_Checkpoint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_Checkpoint.names index c87e917ec6..c80f59964a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_Checkpoint.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_Checkpoint.names @@ -11,20 +11,20 @@ }, "slots": [ { - "base": "DataInput_Report", + "base": "DataInput_Report_0", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectEqual.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectEqual.names index 82e29a3761..1ce3b3b1f2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectEqual.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectEqual.names @@ -11,32 +11,32 @@ }, "slots": [ { - "base": "DataInput_Report", + "base": "DataInput_Report_0", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Candidate", + "base": "DataInput_Candidate_1", "details": { "name": "Candidate" } }, { - "base": "DataInput_Reference", + "base": "DataInput_Reference_2", "details": { "name": "Reference" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectFalse.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectFalse.names index 0ece11c5d3..cd6aca7679 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectFalse.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectFalse.names @@ -11,26 +11,26 @@ }, "slots": [ { - "base": "DataInput_Candidate", + "base": "DataInput_Candidate_0", "details": { "name": "Candidate" } }, { - "base": "DataInput_Report", + "base": "DataInput_Report_1", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectGreaterThan.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectGreaterThan.names index b5e85fc361..fd1feee008 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectGreaterThan.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectGreaterThan.names @@ -11,32 +11,32 @@ }, "slots": [ { - "base": "DataInput_Report", + "base": "DataInput_Report_0", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Candidate", + "base": "DataInput_Candidate_1", "details": { "name": "Candidate" } }, { - "base": "DataInput_Reference", + "base": "DataInput_Reference_2", "details": { "name": "Reference" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectGreaterThanEqual.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectGreaterThanEqual.names index 3d82f05c18..35a1123f77 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectGreaterThanEqual.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectGreaterThanEqual.names @@ -11,32 +11,32 @@ }, "slots": [ { - "base": "DataInput_Report", + "base": "DataInput_Report_0", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Candidate", + "base": "DataInput_Candidate_1", "details": { "name": "Candidate" } }, { - "base": "DataInput_Reference", + "base": "DataInput_Reference_2", "details": { "name": "Reference" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectLessThan.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectLessThan.names index f3a875700a..e2d3cb289d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectLessThan.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectLessThan.names @@ -11,32 +11,32 @@ }, "slots": [ { - "base": "DataInput_Report", + "base": "DataInput_Report_0", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Candidate", + "base": "DataInput_Candidate_1", "details": { "name": "Candidate" } }, { - "base": "DataInput_Reference", + "base": "DataInput_Reference_2", "details": { "name": "Reference" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectLessThanEqual.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectLessThanEqual.names index 1897bf12fe..e5078ea233 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectLessThanEqual.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectLessThanEqual.names @@ -11,32 +11,32 @@ }, "slots": [ { - "base": "DataInput_Report", + "base": "DataInput_Report_0", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Candidate", + "base": "DataInput_Candidate_1", "details": { "name": "Candidate" } }, { - "base": "DataInput_Reference", + "base": "DataInput_Reference_2", "details": { "name": "Reference" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectNotEqual.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectNotEqual.names index cbe4045c11..518adf430e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectNotEqual.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectNotEqual.names @@ -11,32 +11,32 @@ }, "slots": [ { - "base": "DataInput_Report", + "base": "DataInput_Report_0", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Candidate", + "base": "DataInput_Candidate_1", "details": { "name": "Candidate" } }, { - "base": "DataInput_Reference", + "base": "DataInput_Reference_2", "details": { "name": "Reference" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectTrue.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectTrue.names index 71bf43b22a..b78afd825a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectTrue.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectTrue.names @@ -11,26 +11,26 @@ }, "slots": [ { - "base": "DataInput_Candidate", + "base": "DataInput_Candidate_0", "details": { "name": "Candidate" } }, { - "base": "DataInput_Report", + "base": "DataInput_Report_1", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_MarkComplete.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_MarkComplete.names index 67c838c832..b8b33eeff2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_MarkComplete.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_MarkComplete.names @@ -11,20 +11,20 @@ }, "slots": [ { - "base": "DataInput_Report", + "base": "DataInput_Report_0", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_BaseTimerNode.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_BaseTimerNode.names index 4a46770857..88167b2d3e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_BaseTimerNode.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_BaseTimerNode.names @@ -5,14 +5,13 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "BaseTimerNode", + "name": "Base Timer Node", "category": "Utilities", - "tooltip": "Provides a basic interaction layer for all time based nodes for users(handles swapping between ticks and seconds).", - "subtitle": "Utilities" + "tooltip": "Provides a basic interaction layer for all time based nodes for users(handles swapping between ticks and seconds)." }, "slots": [ { - "base": "DataInput_Delay", + "base": "DataInput_Delay_0", "details": { "name": "Delay" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_ExtractProperties.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_ExtractProperties.names index 3ce4ed1f67..6a2884f972 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_ExtractProperties.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_ExtractProperties.names @@ -7,26 +7,25 @@ "details": { "name": "Extract Properties", "category": "Utilities", - "tooltip": "Extracts property values from connected input", - "subtitle": "Utilities" + "tooltip": "Extracts property values from connected input" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "When signaled assigns property values using the supplied source input" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled after all property haves have been pushed to the output slots" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_Repeater.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_Repeater.names index e34c059680..ee6eacf751 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_Repeater.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_Repeater.names @@ -7,39 +7,38 @@ "details": { "name": "Repeater", "category": "Utilities", - "tooltip": "Repeats the output signal the given number of times using the specified delay to space the signals out", - "subtitle": "Utilities" + "tooltip": "Repeats the output signal the given number of times using the specified delay to space the signals out" }, "slots": [ { - "base": "DataInput_Repetitions", + "base": "DataInput_Repetitions_0", "details": { "name": "Repetitions" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Complete", + "base": "Output_Complete_0", "details": { "name": "Complete", "tooltip": "Signaled upon node exit" } }, { - "base": "Output_Action", + "base": "Output_Action_1", "details": { "name": "Action", "tooltip": "The signal that will be repeated" } }, { - "base": "DataInput_Interval", + "base": "DataInput_Interval_1", "details": { "name": "Interval" } diff --git a/Gems/ScriptCanvas/Code/Asset/EditorAssetConversionBus.h b/Gems/ScriptCanvas/Code/Asset/EditorAssetConversionBus.h index 12313021f7..3b120af5da 100644 --- a/Gems/ScriptCanvas/Code/Asset/EditorAssetConversionBus.h +++ b/Gems/ScriptCanvas/Code/Asset/EditorAssetConversionBus.h @@ -26,17 +26,14 @@ namespace ScriptCanvas namespace ScriptCanvasEditor { - class ScriptCanvasAsset; - class EditorAssetConversionBusTraits : public AZ::EBusTraits { public: static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; - virtual AZ::Data::Asset LoadAsset(AZStd::string_view graphPath) = 0; - virtual AZ::Outcome CreateLuaAsset(const AZ::Data::Asset& editAsset, AZStd::string_view graphPathForRawLuaFile) = 0; - virtual AZ::Outcome, AZStd::string> CreateRuntimeAsset(const AZ::Data::Asset& editAsset) = 0; + virtual AZ::Outcome CreateLuaAsset(const SourceHandle& editAsset, AZStd::string_view graphPathForRawLuaFile) = 0; + virtual AZ::Outcome, AZStd::string> CreateRuntimeAsset(const SourceHandle& editAsset) = 0; }; using EditorAssetConversionBus = AZ::EBus; diff --git a/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.cpp b/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.cpp index 4df2a57c36..1f614a5a87 100644 --- a/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.cpp +++ b/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.cpp @@ -64,7 +64,6 @@ namespace ScriptCanvasEditor void EditorAssetSystemComponent::Activate() { - m_editorAssetRegistry.Register(); m_editorAssetRegistry.Register(); AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotificationBus::Handler::BusConnect(); @@ -98,35 +97,25 @@ namespace ScriptCanvasEditor return false; } - AZ::Data::Asset EditorAssetSystemComponent::LoadAsset(AZStd::string_view graphPath) - { - auto outcome = ScriptCanvasBuilder::LoadEditorAsset(graphPath, AZ::Data::AssetId(AZ::Uuid::CreateRandom())); - - if (outcome.IsSuccess()) - { - return outcome.GetValue(); - } - else - { - return {}; - } - } - - AZ::Outcome, AZStd::string> EditorAssetSystemComponent::CreateRuntimeAsset(const AZ::Data::Asset& editAsset) + AZ::Outcome, AZStd::string> EditorAssetSystemComponent::CreateRuntimeAsset(const SourceHandle& editAsset) { return ScriptCanvasBuilder::CreateRuntimeAsset(editAsset); } - AZ::Outcome EditorAssetSystemComponent::CreateLuaAsset(const AZ::Data::Asset& editAsset, AZStd::string_view graphPathForRawLuaFile) + AZ::Outcome EditorAssetSystemComponent::CreateLuaAsset(const SourceHandle& editAsset, AZStd::string_view graphPathForRawLuaFile) { - return ScriptCanvasBuilder::CreateLuaAsset(editAsset->GetScriptCanvasEntity(), editAsset->GetId(), graphPathForRawLuaFile); + return ScriptCanvasBuilder::CreateLuaAsset(editAsset, graphPathForRawLuaFile); } - void EditorAssetSystemComponent::AddSourceFileOpeners([[maybe_unused]] const char* fullSourceFileName, const AZ::Uuid& sourceUuid, AzToolsFramework::AssetBrowser::SourceFileOpenerList& openers) + void EditorAssetSystemComponent::AddSourceFileOpeners + ( [[maybe_unused]] const char* fullSourceFileName + , const AZ::Uuid& sourceUuid + , AzToolsFramework::AssetBrowser::SourceFileOpenerList& openers) { using namespace AzToolsFramework; using namespace AzToolsFramework::AssetBrowser; - if (const SourceAssetBrowserEntry* source = SourceAssetBrowserEntry::GetSourceByUuid(sourceUuid)) // get the full details of the source file based on its UUID. + // get the full details of the source file based on its UUID. + if (const SourceAssetBrowserEntry* source = SourceAssetBrowserEntry::GetSourceByUuid(sourceUuid)) { if (!HandlesSource(source)) { @@ -138,22 +127,31 @@ namespace ScriptCanvasEditor // has no UUID / Not a source file. return; } - // You can push back any number of "Openers" - choose a unique identifier, and icon, and then a lambda which will be activated if the user chooses to open it with your opener: - openers.push_back({ "ScriptCanvas_Editor_Asset_Edit", "Script Canvas Editor...", QIcon(), + + // You can push back any number of "Openers" - choose a unique identifier, and icon, + // and then a lambda which will be activated if the user chooses to open it with your opener: + + openers.push_back({ "ScriptCanvas_Editor_Asset_Edit", "Script Canvas Editor..." + , QIcon(ScriptCanvasAssetDescription().GetIconPathImpl()), [](const char*, const AZ::Uuid& scSourceUuid) - { - AzToolsFramework::OpenViewPane(LyViewPane::ScriptCanvas); - AZ::Data::AssetId sourceAssetId(scSourceUuid, 0); - - auto& assetManager = AZ::Data::AssetManager::Instance(); - AZ::Data::Asset scriptCanvasAsset = assetManager.GetAsset(sourceAssetId, azrtti_typeid(), AZ::Data::AssetLoadBehavior::Default); - AZ::Outcome openOutcome = AZ::Failure(AZStd::string()); - GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAsset, scriptCanvasAsset.GetId(), -1); - if (!openOutcome) { - AZ_Warning("Script Canvas", openOutcome, "%s", openOutcome.GetError().data()); - } - } }); - + AzToolsFramework::OpenViewPane(LyViewPane::ScriptCanvas); + + if (auto sourceHandle = CompleteDescription(SourceHandle(nullptr, scSourceUuid, {}))) + { + AZ::Outcome openOutcome = AZ::Failure(AZStd::string()); + GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAsset + , *sourceHandle, Tracker::ScriptCanvasFileState::UNMODIFIED, -1); + if (!openOutcome) + { + AZ_Warning("ScriptCanvas", openOutcome, "%s", openOutcome.GetError().data()); + } + } + else + { + AZ_Warning("ScriptCanvas", false + , "Unabled to find full path for Source UUid %s", scSourceUuid.ToString().c_str()); + } + }}); } } diff --git a/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.h b/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.h index 96e1280cbc..7937950a05 100644 --- a/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.h +++ b/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.h @@ -49,9 +49,8 @@ namespace ScriptCanvasEditor ////////////////////////////////////////////////////////////////////////// // EditorAssetConversionBus::Handler... - AZ::Data::Asset LoadAsset(AZStd::string_view graphPath) override; - AZ::Outcome, AZStd::string> CreateRuntimeAsset(const AZ::Data::Asset& editAsset) override; - AZ::Outcome CreateLuaAsset(const AZ::Data::Asset& editAsset, AZStd::string_view graphPathForRawLuaFile) override; + AZ::Outcome, AZStd::string> CreateRuntimeAsset(const SourceHandle& editAsset) override; + AZ::Outcome CreateLuaAsset(const SourceHandle& editAsset, AZStd::string_view graphPathForRawLuaFile) override; ////////////////////////////////////////////////////////////////////////// ScriptCanvas::AssetRegistry& GetAssetRegistry(); diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilder.cpp b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilder.cpp index 0eb748b2f1..00df5ad07b 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilder.cpp +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilder.cpp @@ -13,15 +13,50 @@ #include #include #include +#include +#include -namespace ScriptCanvasBuilderCpp +namespace BuildVariableOverridesCpp { - void AppendTabs(AZStd::string& result, size_t depth) + enum Version { - for (size_t i = 0; i < depth; ++i) + Original = 1, + EditorAssetRedux, + + // add description above + Current + }; + + bool VersionConverter + ( AZ::SerializeContext& serializeContext + , AZ::SerializeContext::DataElementNode& rootElement) + { + if (rootElement.GetVersion() < BuildVariableOverridesCpp::Version::EditorAssetRedux) { - result += "\t"; + auto sourceIndex = rootElement.FindElement(AZ_CRC_CE("source")); + if (sourceIndex == -1) + { + AZ_Error("ScriptCanvas", false, "BuildVariableOverrides coversion failed: 'source' was missing"); + return false; + } + + auto& sourceElement = rootElement.GetSubElement(sourceIndex); + AZ::Data::Asset asset; + if (!sourceElement.GetData(asset)) + { + AZ_Error("ScriptCanvas", false, "BuildVariableOverrides coversion failed: could not retrieve 'source' data"); + return false; + } + + ScriptCanvasEditor::SourceHandle sourceHandle(nullptr, asset.GetId().m_guid, {}); + if (!rootElement.AddElementWithData(serializeContext, "source", sourceHandle)) + { + AZ_Error("ScriptCanvas", false, "BuildVariableOverrides coversion failed: could not add updated 'source' data"); + return false; + } } + + return true; } } @@ -29,7 +64,7 @@ namespace ScriptCanvasBuilder { void BuildVariableOverrides::Clear() { - m_source.Reset(); + m_source = {}; m_variables.clear(); m_overrides.clear(); m_overridesUnused.clear(); @@ -39,12 +74,20 @@ namespace ScriptCanvasBuilder void BuildVariableOverrides::CopyPreviousOverriddenValues(const BuildVariableOverrides& source) { - auto copyPreviousIfFound = [](ScriptCanvas::GraphVariable& overriddenValue, const AZStd::vector& source) + auto isEqual = [](const ScriptCanvas::GraphVariable& lhs, const ScriptCanvas::GraphVariable& rhs) { - if (auto iter = AZStd::find_if(source.begin(), source.end(), [&overriddenValue](const auto& candidate) { return candidate.GetVariableId() == overriddenValue.GetVariableId(); }); - iter != source.end()) + return (lhs.GetVariableId() == rhs.GetVariableId() && lhs.GetDataType() == rhs.GetDataType()) + || (lhs.GetVariableName() == rhs.GetVariableName() && lhs.GetDataType() == rhs.GetDataType()); + }; + + auto copyPreviousIfFound = [isEqual](ScriptCanvas::GraphVariable& overriddenValue, const AZStd::vector& source) + { + auto iter = AZStd::find_if(source.begin(), source.end() + , [&overriddenValue, isEqual](const auto& candidate) { return isEqual(candidate, overriddenValue); }); + + if (iter != source.end()) { - overriddenValue.DeepCopy(*iter); + overriddenValue.ModDatum().DeepCopyDatum(*iter->GetDatum()); overriddenValue.SetScriptInputControlVisibility(AZ::Edit::PropertyVisibility::Hide); overriddenValue.SetAllowSignalOnChange(false); return true; @@ -64,6 +107,15 @@ namespace ScriptCanvasBuilder } } + for (auto& overriddenValue : m_overridesUnused) + { + if (!copyPreviousIfFound(overriddenValue, source.m_overridesUnused)) + { + // the variable in question may have been previously used, and is now unused, so copy the previous value over + copyPreviousIfFound(overriddenValue, source.m_overrides); + } + } + ////////////////////////////////////////////////////////////////////////// // #functions2 provide an identifier for the node/variable in the source that caused the dependency. the root will not have one. // the above will provide the data to handle the cases where only certain dependency nodes were removed @@ -100,7 +152,7 @@ namespace ScriptCanvasBuilder if (auto serializeContext = azrtti_cast(reflectContext)) { serializeContext->Class() - ->Version(1) + ->Version(BuildVariableOverridesCpp::Version::Current, &BuildVariableOverridesCpp::VersionConverter) ->Field("source", &BuildVariableOverrides::m_source) ->Field("variables", &BuildVariableOverrides::m_variables) ->Field("entityId", &BuildVariableOverrides::m_entityIds) @@ -194,45 +246,12 @@ namespace ScriptCanvasBuilder } } - EditorAssetTree* EditorAssetTree::ModRoot() - { - if (!m_parent) - { - return this; - } - - return m_parent->ModRoot(); - } - - void EditorAssetTree::SetParent(EditorAssetTree& parent) - { - m_parent = &parent; - } - - AZStd::string EditorAssetTree::ToString(size_t depth) const - { - AZStd::string result; - ScriptCanvasBuilderCpp::AppendTabs(result, depth); - result += m_asset.GetId().ToString(); - result += m_asset.GetHint(); - depth += m_dependencies.empty() ? 0 : 1; - - for (const auto& dependency : m_dependencies) - { - result += "\n"; - ScriptCanvasBuilderCpp::AppendTabs(result, depth); - result += dependency.ToString(depth); - } - - return result; - } - ScriptCanvas::RuntimeDataOverrides ConvertToRuntime(const BuildVariableOverrides& buildOverrides) { ScriptCanvas::RuntimeDataOverrides runtimeOverrides; runtimeOverrides.m_runtimeAsset = AZ::Data::Asset - (AZ::Data::AssetId(buildOverrides.m_source.GetId().m_guid, AZ_CRC("RuntimeData", 0x163310ae)), azrtti_typeid(), {}); + (AZ::Data::AssetId(buildOverrides.m_source.Id(), AZ_CRC("RuntimeData", 0x163310ae)), azrtti_typeid(), {}); runtimeOverrides.m_runtimeAsset.SetAutoLoadBehavior(AZ::Data::AssetLoadBehavior::PreLoad); runtimeOverrides.m_variableIndices.resize(buildOverrides.m_variables.size()); @@ -295,76 +314,9 @@ namespace ScriptCanvasBuilder return runtimeOverrides; } - AZ::Outcome LoadEditorAssetTree(AZ::Data::AssetId editorAssetId, AZStd::string_view assetHint, EditorAssetTree* parent) - { - EditorAssetTree result; - AZ::Data::AssetInfo assetInfo; - AZStd::string watchFolder; - bool resultFound = false; - - if (!AzToolsFramework::AssetSystemRequestBus::FindFirstHandler()) - { - return AZ::Failure(AZStd::string("LoadEditorAssetTree found no handler for AzToolsFramework::AssetSystemRequestBus.")); - } - - AzToolsFramework::AssetSystemRequestBus::BroadcastResult - ( resultFound - , &AzToolsFramework::AssetSystem::AssetSystemRequest::GetSourceInfoBySourceUUID - , editorAssetId.m_guid - , assetInfo - , watchFolder); - - if (!resultFound) - { - return AZ::Failure(AZStd::string::format("LoadEditorAssetTree failed to get engine relative path from %s-%.*s.", editorAssetId.ToString().c_str(), aznumeric_cast(assetHint.size()), assetHint.data())); - } - - AZStd::vector dependentAssets; - - auto filterCB = [&dependentAssets](const AZ::Data::AssetFilterInfo& filterInfo)->bool - { - if (filterInfo.m_assetType == azrtti_typeid()) - { - dependentAssets.push_back(AZ::Data::AssetId(filterInfo.m_assetId.m_guid, 0)); - } - else if (filterInfo.m_assetType == azrtti_typeid()) - { - dependentAssets.push_back(filterInfo.m_assetId); - } - - return true; - }; - - auto loadAssetOutcome = ScriptCanvasBuilder::LoadEditorAsset(assetInfo.m_relativePath, editorAssetId, filterCB); - if (!loadAssetOutcome.IsSuccess()) - { - return AZ::Failure(AZStd::string::format("LoadEditorAssetTree failed to load graph from %s-%s: %s", editorAssetId.ToString().c_str(), assetHint.data(), loadAssetOutcome.GetError().c_str())); - } - - for (auto& dependentAsset : dependentAssets) - { - auto loadDependentOutcome = LoadEditorAssetTree(dependentAsset, "", &result); - if (!loadDependentOutcome.IsSuccess()) - { - return AZ::Failure(AZStd::string::format("LoadEditorAssetTree failed to load dependent graph from %s-%s: %s", editorAssetId.ToString().c_str(), assetHint.data(), loadDependentOutcome.GetError().c_str())); - } - - result.m_dependencies.push_back(loadDependentOutcome.TakeValue()); - } - - if (parent) - { - result.SetParent(*parent); - } - - result.m_asset = loadAssetOutcome.TakeValue(); - - return AZ::Success(result); - } - - AZ::Outcome ParseEditorAssetTree(const EditorAssetTree& editorAssetTree) + AZ::Outcome ParseEditorAssetTree(const ScriptCanvasEditor::EditorAssetTree& editorAssetTree) { - auto buildEntity = editorAssetTree.m_asset->GetScriptCanvasEntity(); + auto buildEntity = editorAssetTree.m_asset.Get()->GetEntity(); if (!buildEntity) { return AZ::Failure(AZStd::string("No entity from source asset")); @@ -400,9 +352,8 @@ namespace ScriptCanvasBuilder if (!parseDependentOutcome.IsSuccess()) { return AZ::Failure(AZStd::string::format - ( "ParseEditorAssetTree failed to parse dependent graph from %s-%s: %s" - , dependentAsset.m_asset.GetId().ToString().c_str() - , dependentAsset.m_asset.GetHint().c_str() + ( "ParseEditorAssetTree failed to parse dependent graph from %s: %s" + , dependentAsset.m_asset.ToString().c_str() , parseDependentOutcome.GetError().c_str())); } diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilder.h b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilder.h index f03e78bc3e..5cffa823dc 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilder.h +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilder.h @@ -16,6 +16,7 @@ namespace ScriptCanvasEditor { class ScriptCanvasAsset; + class EditorAssetTree; } namespace ScriptCanvasBuilder @@ -39,8 +40,8 @@ namespace ScriptCanvasBuilder void PopulateFromParsedResults(ScriptCanvas::Grammar::AbstractCodeModelConstPtr abstractCodeModel, const ScriptCanvas::VariableData& variables); // #functions2 provide an identifier for the node/variable in the source that caused the dependency. the root will not have one. - AZ::Data::Asset m_source; - + ScriptCanvasEditor::SourceHandle m_source; + // all of the variables here are overrides AZStd::vector m_variables; // the values here may or may not be overrides @@ -48,30 +49,11 @@ namespace ScriptCanvasBuilder // these two variable lists are all that gets exposed to the edit context AZStd::vector m_overrides; AZStd::vector m_overridesUnused; - // AZStd::vector m_entityIdRuntimeInputIndices; since all of the entity ids need to go in, they may not need indices AZStd::vector m_dependencies; }; - class EditorAssetTree - { - public: - AZ_CLASS_ALLOCATOR(EditorAssetTree, AZ::SystemAllocator, 0); - - EditorAssetTree* m_parent = nullptr; - AZStd::vector m_dependencies; - AZ::Data::Asset m_asset; - - EditorAssetTree* ModRoot(); - - void SetParent(EditorAssetTree& parent); - - AZStd::string ToString(size_t depth = 0) const; - }; - // copy the variables overridden during editor / prefab build time back to runtime data ScriptCanvas::RuntimeDataOverrides ConvertToRuntime(const BuildVariableOverrides& overrides); - AZ::Outcome LoadEditorAssetTree(AZ::Data::AssetId editorAssetId, AZStd::string_view assetHint, EditorAssetTree* parent = nullptr); - - AZ::Outcome ParseEditorAssetTree(const EditorAssetTree& editorAssetTree); + AZ::Outcome ParseEditorAssetTree(const ScriptCanvasEditor::EditorAssetTree& editorAssetTree); } diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp index a37fa47b62..019dd4f5e3 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp @@ -48,7 +48,6 @@ namespace ScriptCanvasBuilder SharedHandlers HandleAssetTypes() { SharedHandlers handlers; - handlers.m_editorAssetHandler = RegisterHandler("scriptcanvas", false); handlers.m_subgraphInterfaceHandler = RegisterHandler("scriptcanvas_fn_compiled", true); handlers.m_runtimeAssetHandler = RegisterHandler("scriptcanvas_compiled", true); diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.cpp b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.cpp index f474c10532..ac7bd4406a 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.cpp +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -27,12 +28,12 @@ #include #include #include +#include namespace ScriptCanvasBuilder { void Worker::Activate(const AssetHandlers& handlers) { - m_editorAssetHandler = handlers.m_editorAssetHandler; m_runtimeAssetHandler = handlers.m_runtimeAssetHandler; m_subgraphInterfaceHandler = handlers.m_subgraphInterfaceHandler; } @@ -44,54 +45,22 @@ namespace ScriptCanvasBuilder AzFramework::StringFunc::Path::ConstructFull(request.m_watchFolder.data(), request.m_sourceFile.data(), fullPath, false); AzFramework::StringFunc::Path::Normalize(fullPath); - if (!m_editorAssetHandler) - { - AZ_Error(s_scriptCanvasBuilder, false, R"(CreateJobs for %s failed because the ScriptCanvas Editor Asset handler is missing.)", fullPath.data()); - } - - AZStd::shared_ptr assetDataStream = AZStd::make_shared(); - - AZ::IO::FileIOStream stream(fullPath.c_str(), AZ::IO::OpenMode::ModeRead); - if (!AZ::IO::RetryOpenStream(stream)) - { - AZ_Warning(s_scriptCanvasBuilder, false, "CreateJobs for \"%s\" failed because the source file could not be opened.", fullPath.data()); - return; - } - - // Read the asset into a memory buffer, then hand ownership of the buffer to assetDataStream - { - AZ::IO::FileIOStream ioStream; - if (!ioStream.Open(fullPath.data(), AZ::IO::OpenMode::ModeRead)) - { - AZ_Warning(s_scriptCanvasBuilder, false, "CreateJobs for \"%s\" failed because the source file could not be opened.", fullPath.data()); - return; - } - - AZStd::vector fileBuffer(ioStream.GetLength()); - size_t bytesRead = ioStream.Read(fileBuffer.size(), fileBuffer.data()); - if (bytesRead != ioStream.GetLength()) - { - AZ_Warning(s_scriptCanvasBuilder, false, AZStd::string::format("File failed to read completely: %s", fullPath.data()).c_str()); - return; - } - - assetDataStream->Open(AZStd::move(fileBuffer)); - } + AZ::Data::Asset asset; + const ScriptCanvasEditor::Graph* sourceGraph = nullptr; + const ScriptCanvas::GraphData* graphData = nullptr; - m_processEditorAssetDependencies.clear(); + ScriptCanvasEditor::SourceHandle sourceHandle; - AZ::Data::Asset asset; - asset.Create(AZ::Data::AssetId(AZ::Uuid::CreateRandom())); - if (m_editorAssetHandler->LoadAssetDataFromStream(asset, assetDataStream, {}) != AZ::Data::AssetHandler::LoadResult::LoadComplete) + auto sourceOutcome = ScriptCanvasEditor::LoadFromFile(fullPath); + if (sourceOutcome.IsSuccess()) { - AZ_Warning(s_scriptCanvasBuilder, false, "CreateJobs for \"%s\" failed because the asset data could not be loaded from the file", fullPath.data()); - return; + sourceHandle = sourceOutcome.TakeValue(); + sourceGraph = sourceHandle.Get(); + graphData = sourceGraph->GetGraphDataConst(); } - - auto* scriptCanvasEntity = asset.Get()->GetScriptCanvasEntity(); - auto* sourceGraph = AZ::EntityUtils::FindFirstDerivedComponent(scriptCanvasEntity); + AZ_Assert(sourceGraph, "Graph component is missing from entity."); - AZ_Assert(sourceGraph->GetGraphData(), "GraphData is missing from entity"); + AZ_Assert(graphData, "GraphData is missing from entity"); struct EntityIdComparer { @@ -102,7 +71,7 @@ namespace ScriptCanvasBuilder return lhsEntityId < rhsEntityId; } }; - const AZStd::set sortedEntities(sourceGraph->GetGraphData()->m_nodes.begin(), sourceGraph->GetGraphData()->m_nodes.end()); + const AZStd::set sortedEntities(graphData->m_nodes.begin(), graphData->m_nodes.end()); size_t fingerprint = 0; for (const auto& nodeEntity : sortedEntities) @@ -155,7 +124,7 @@ namespace ScriptCanvasBuilder }; AZ_Verify(serializeContext->EnumerateInstanceConst - ( sourceGraph->GetGraphData() + ( graphData , azrtti_typeid() , assetFilter , {} @@ -168,17 +137,6 @@ namespace ScriptCanvasBuilder for (const AssetBuilderSDK::PlatformInfo& info : request.m_enabledPlatforms) { - if (info.HasTag("tools")) - { - AssetBuilderSDK::JobDescriptor copyDescriptor; - copyDescriptor.m_priority = 2; - copyDescriptor.m_critical = true; - copyDescriptor.m_jobKey = s_scriptCanvasCopyJobKey; - copyDescriptor.SetPlatformIdentifier(info.m_identifier.c_str()); - copyDescriptor.m_additionalFingerprintInfo = AZStd::string(GetFingerprintString()).append("|").append(AZStd::to_string(static_cast(fingerprint))); - response.m_createJobOutputs.push_back(copyDescriptor); - } - AssetBuilderSDK::JobDescriptor jobDescriptor; jobDescriptor.m_priority = 2; jobDescriptor.m_critical = true; @@ -244,49 +202,14 @@ namespace ScriptCanvasBuilder return; } - if (!m_editorAssetHandler) - { - AZ_Error(s_scriptCanvasBuilder, false, R"(Exporting of .scriptcanvas for "%s" file failed as no editor asset handler was registered for script canvas. The ScriptCanvas Gem might not be enabled.)", fullPath.data()); - return; - } - if (!m_runtimeAssetHandler) { AZ_Error(s_scriptCanvasBuilder, false, R"(Exporting of .scriptcanvas for "%s" file failed as no runtime asset handler was registered for script canvas.)", fullPath.data()); return; } - AZStd::shared_ptr assetDataStream = AZStd::make_shared(); - - AZ::IO::FileIOStream stream(fullPath.c_str(), AZ::IO::OpenMode::ModeRead); - if (!AZ::IO::RetryOpenStream(stream)) - { - AZ_Warning(s_scriptCanvasBuilder, false, "CreateJobs for \"%s\" failed because the source file could not be opened.", fullPath.data()); - return; - } - - // Read the asset into a memory buffer, then hand ownership of the buffer to assetDataStream - { - AZ::IO::FileIOStream ioStream; - if (!ioStream.Open(fullPath.data(), AZ::IO::OpenMode::ModeRead)) - { - AZ_Warning(s_scriptCanvasBuilder, false, "CreateJobs for \"%s\" failed because the source file could not be opened.", fullPath.data()); - return; - } - AZStd::vector fileBuffer(ioStream.GetLength()); - size_t bytesRead = ioStream.Read(fileBuffer.size(), fileBuffer.data()); - if (bytesRead != ioStream.GetLength()) - { - AZ_Warning(s_scriptCanvasBuilder, false, AZStd::string::format("File failed to read completely: %s", fullPath.data()).c_str()); - return; - } - - assetDataStream->Open(AZStd::move(fileBuffer)); - } - - AZ::Data::Asset asset; - asset.Create(request.m_sourceFileUUID); - if (m_editorAssetHandler->LoadAssetDataFromStream(asset, assetDataStream, nullptr) != AZ::Data::AssetHandler::LoadResult::LoadComplete) + auto loadOutcome = ScriptCanvasEditor::LoadFromFile(request.m_fullPath); + if (!loadOutcome.IsSuccess()) { AZ_Error(s_scriptCanvasBuilder, false, R"(Loading of ScriptCanvas asset for source file "%s" has failed)", fullPath.data()); return; @@ -299,23 +222,11 @@ namespace ScriptCanvasBuilder AzFramework::StringFunc::Path::Join(request.m_tempDirPath.c_str(), fileNameOnly.c_str(), runtimeScriptCanvasOutputPath, true, true); AzFramework::StringFunc::Path::ReplaceExtension(runtimeScriptCanvasOutputPath, ScriptCanvas::RuntimeAsset::GetFileExtension()); - if (request.m_jobDescription.m_jobKey == s_scriptCanvasCopyJobKey) - { - // ScriptCanvas Editor Asset Copy job - // The SubID is zero as this represents the main asset - AssetBuilderSDK::JobProduct jobProduct; - jobProduct.m_productFileName = fullPath; - jobProduct.m_productAssetType = azrtti_typeid(); - jobProduct.m_productSubID = 0; - jobProduct.m_dependenciesHandled = true; - jobProduct.m_dependencies.clear(); - response.m_outputProducts.push_back(AZStd::move(jobProduct)); - response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Success; - } - else - { - AZ::Entity* buildEntity = asset.Get()->GetScriptCanvasEntity(); + auto sourceHandle = loadOutcome.TakeValue(); + if (request.m_jobDescription.m_jobKey == s_scriptCanvasProcessJobKey) + { + AZ::Entity* buildEntity = sourceHandle.Get()->GetEntity(); ProcessTranslationJobInput input; input.assetID = AZ::Data::AssetId(request.m_sourceFileUUID, AZ_CRC("RuntimeData", 0x163310ae)); input.request = &request; diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.h b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.h index 668e1a0bcd..817fe5d294 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.h +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.h @@ -37,12 +37,12 @@ namespace ScriptCanvasEditor { class Graph; class ScriptCanvasAsset; + class SourceHandle; } namespace ScriptCanvasBuilder { constexpr const char* s_scriptCanvasBuilder = "ScriptCanvasBuilder"; - constexpr const char* s_scriptCanvasCopyJobKey = "Script Canvas Copy Job"; constexpr const char* s_scriptCanvasProcessJobKey = "Script Canvas Process Job"; constexpr const char* s_unitTestParseErrorPrefix = "LY_SC_UnitTest"; @@ -59,6 +59,8 @@ namespace ScriptCanvasBuilder PrefabIntegration, CorrectGraphVariableVersion, ReflectEntityIdNodes, + FixExecutionStateNodeableConstruction, + // add new entries above Current, }; @@ -69,7 +71,6 @@ namespace ScriptCanvasBuilder struct AssetHandlers { - AZ::Data::AssetHandler* m_editorAssetHandler = nullptr; AZ::Data::AssetHandler* m_editorFunctionAssetHandler = nullptr; AZ::Data::AssetHandler* m_runtimeAssetHandler = nullptr; AZ::Data::AssetHandler* m_subgraphInterfaceHandler = nullptr; @@ -80,7 +81,6 @@ namespace ScriptCanvasBuilder struct SharedHandlers { - HandlerOwnership m_editorAssetHandler{}; HandlerOwnership m_editorFunctionAssetHandler{}; HandlerOwnership m_runtimeAssetHandler{}; HandlerOwnership m_subgraphInterfaceHandler{}; @@ -122,13 +122,13 @@ namespace ScriptCanvasBuilder } }; - AZ::Outcome, AZStd::string> CreateRuntimeAsset(const AZ::Data::Asset& asset); + AZ::Outcome, AZStd::string> CreateRuntimeAsset(const ScriptCanvasEditor::SourceHandle& asset); AZ::Outcome CompileGraphData(AZ::Entity* scriptCanvasEntity); AZ::Outcome CompileVariableData(AZ::Entity* scriptCanvasEntity); - AZ::Outcome CreateLuaAsset(AZ::Entity* buildEntity, AZ::Data::AssetId scriptAssetId, AZStd::string_view rawLuaFilePath); + AZ::Outcome CreateLuaAsset(const ScriptCanvasEditor::SourceHandle& editAsset, AZStd::string_view rawLuaFilePath); int GetBuilderVersion(); @@ -169,7 +169,6 @@ namespace ScriptCanvasBuilder void ShutDown() override {}; private: - AZ::Data::AssetHandler* m_editorAssetHandler = nullptr; AZ::Data::AssetHandler* m_runtimeAssetHandler = nullptr; AZ::Data::AssetHandler* m_subgraphInterfaceHandler = nullptr; diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp index 7d4cfec909..fb7b5e7a4a 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp @@ -29,19 +29,20 @@ #include #include #include +#include +#include + namespace ScriptCanvasBuilder { AssetHandlers::AssetHandlers(SharedHandlers& source) - : m_editorAssetHandler(source.m_editorAssetHandler.first) - , m_editorFunctionAssetHandler(source.m_editorFunctionAssetHandler.first) + : m_editorFunctionAssetHandler(source.m_editorFunctionAssetHandler.first) , m_runtimeAssetHandler(source.m_runtimeAssetHandler.first) , m_subgraphInterfaceHandler(source.m_subgraphInterfaceHandler.first) {} void SharedHandlers::DeleteOwnedHandlers() { - DeleteIfOwned(m_editorAssetHandler); DeleteIfOwned(m_editorFunctionAssetHandler); DeleteIfOwned(m_runtimeAssetHandler); DeleteIfOwned(m_subgraphInterfaceHandler); @@ -77,36 +78,23 @@ namespace ScriptCanvasBuilder return ScriptCanvas::Translation::ParseGraph(request); } - AZ::Outcome CreateLuaAsset(AZ::Entity* buildEntity, AZ::Data::AssetId scriptAssetId, AZStd::string_view rawLuaFilePath) + AZ::Outcome CreateLuaAsset(const ScriptCanvasEditor::SourceHandle& editAsset, AZStd::string_view rawLuaFilePath) { AZStd::string fullPath(rawLuaFilePath); AZStd::string fileNameOnly; AzFramework::StringFunc::Path::GetFullFileName(rawLuaFilePath.data(), fileNameOnly); AzFramework::StringFunc::Path::Normalize(fullPath); - auto sourceGraph = PrepareSourceGraph(buildEntity); + auto sourceGraph = PrepareSourceGraph(editAsset.Mod()->GetEntity()); ScriptCanvas::Grammar::Request request; - request.scriptAssetId = scriptAssetId; + request.scriptAssetId = editAsset.Id(); request.graph = sourceGraph; request.name = fileNameOnly; request.rawSaveDebugOutput = ScriptCanvas::Grammar::g_saveRawTranslationOuputToFile; request.printModelToConsole = ScriptCanvas::Grammar::g_printAbstractCodeModel; request.path = fullPath; - bool pathFound = false; - AZStd::string relativePath; - AzToolsFramework::AssetSystemRequestBus::BroadcastResult - ( pathFound - , &AzToolsFramework::AssetSystem::AssetSystemRequest::GetRelativeProductPathFromFullSourceOrProductPath - , fullPath.c_str(), relativePath); - - if (!pathFound) - { - AZ::Failure(AZStd::string::format("Failed to get engine relative path from %s", fullPath.c_str())); - } - - request.namespacePath = relativePath; const ScriptCanvas::Translation::Result translationResult = TranslateToLua(request); auto isSuccessOutcome = translationResult.IsSuccess(ScriptCanvas::Translation::TargetFlags::Lua); @@ -117,7 +105,7 @@ namespace ScriptCanvasBuilder auto& translation = translationResult.m_translations.find(ScriptCanvas::Translation::TargetFlags::Lua)->second; AZ::Data::Asset asset; - scriptAssetId.m_subId = AZ::ScriptAsset::CompiledAssetSubId; + AZ::Data::AssetId scriptAssetId(editAsset.Id(), AZ::ScriptAsset::CompiledAssetSubId); asset.Create(scriptAssetId); auto writeStream = asset.Get()->CreateWriteStream(); @@ -144,12 +132,12 @@ namespace ScriptCanvasBuilder return AZ::Success(result); } - AZ::Outcome, AZStd::string> CreateRuntimeAsset(const AZ::Data::Asset& editAsset) + AZ::Outcome, AZStd::string> CreateRuntimeAsset(const ScriptCanvasEditor::SourceHandle& editAsset) { // Flush asset manager events to ensure no asset references are held by closures queued on Ebuses. AZ::Data::AssetManager::Instance().DispatchEvents(); - auto runtimeAssetId = editAsset.GetId(); + AZ::Data::AssetId runtimeAssetId = editAsset.Id(); runtimeAssetId.m_subId = AZ_CRC("RuntimeData", 0x163310ae); AZ::Data::Asset runtimeAsset; runtimeAsset.Create(runtimeAssetId); diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHandler.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHandler.cpp index dea63ab852..896d285054 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHandler.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHandler.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -93,49 +94,6 @@ namespace ScriptCanvasEditor } } - AZ::Outcome LoadScriptCanvasDataFromJson - ( ScriptCanvas::ScriptCanvasData& dataTarget - , AZStd::string_view source - , AZ::SerializeContext& serializeContext) - { - namespace JSRU = AZ::JsonSerializationUtils; - using namespace ScriptCanvas; - - AZ::JsonDeserializerSettings settings; - settings.m_serializeContext = &serializeContext; - settings.m_metadata.Create(); - - auto loadResult = JSRU::LoadObjectFromStringByType - ( &dataTarget - , azrtti_typeid() - , source - , &settings); - - if (!loadResult.IsSuccess()) - { - return loadResult; - } - - if (auto graphData = dataTarget.ModGraph()) - { - auto listeners = settings.m_metadata.Find(); - AZ_Assert(listeners, "Failed to find SerializationListeners"); - - ScriptCanvasAssetHandlerCpp::CollectNodes(graphData->GetGraphData()->m_nodes, *listeners); - - for (auto listener : *listeners) - { - listener->OnDeserialize(); - } - } - else - { - return AZ::Failure(AZStd::string("Failed to find graph data after loading source")); - } - - return AZ::Success(); - } - AZ::Data::AssetHandler::LoadResult ScriptCanvasAssetHandler::LoadAssetData ( const AZ::Data::Asset& assetTarget , AZStd::shared_ptr streamSource @@ -167,7 +125,7 @@ namespace ScriptCanvasEditor settings.m_serializeContext = m_serializeContext; settings.m_metadata.Create(); // attempt JSON deserialization... - auto jsonResult = LoadScriptCanvasDataFromJson + auto jsonResult = LoadDataFromJson ( scriptCanvasDataTarget , AZStd::string_view{ byteBuffer.begin(), byteBuffer.size() } , *m_serializeContext); @@ -228,6 +186,7 @@ namespace ScriptCanvasEditor , AZ::IO::GenericStream* stream , [[maybe_unused]] AZ::DataStream::StreamType streamType) { + // #sc_editor_asset delete usage of this, and route to ScriptCanvasEditor::SaveToStream namespace JSRU = AZ::JsonSerializationUtils; using namespace ScriptCanvas; diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHolder.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHolder.cpp index a42a9bad48..f8c89ae7e5 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHolder.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHolder.cpp @@ -82,30 +82,6 @@ namespace ScriptCanvasEditor void ScriptCanvasAssetHolder::OpenEditor() const { - AzToolsFramework::OpenViewPane(LyViewPane::ScriptCanvas); - - AZ::Outcome openOutcome = AZ::Failure(AZStd::string()); - - if (m_scriptCanvasAsset.IsReady()) - { - GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAsset, m_scriptCanvasAsset.GetId(), -1); - - if (!openOutcome) - { - AZ_Warning("Script Canvas", openOutcome, "%s", openOutcome.GetError().data()); - } - } - else if (m_ownerId.first.IsValid()) - { - AzToolsFramework::EntityIdList selectedEntityIds; - AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(selectedEntityIds, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities); - - // Going to bypass the multiple selected entities flow for right now. - if (selectedEntityIds.size() == 1) - { - GeneralRequestBus::Broadcast(&GeneralRequests::CreateScriptCanvasAssetFor, m_ownerId); - } - } } ScriptCanvas::ScriptCanvasId ScriptCanvasAssetHolder::GetScriptCanvasId() const diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.cpp index b24e91889e..09b967281d 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.cpp @@ -58,111 +58,8 @@ namespace ScriptCanvasEditor SaveAs(assetId, {}, onSaveCallback); } - void AssetTracker::SaveAs(AZ::Data::AssetId assetId, const AZStd::string& path, Callbacks::OnSave onSaveCallback) + void AssetTracker::SaveAs(AZ::Data::AssetId /*assetId*/, const AZStd::string& /*path*/, Callbacks::OnSave /*onSaveCallback*/) { - auto assetIter = m_assetsInUse.find(assetId); - - if (assetIter != m_assetsInUse.end()) - { - auto onSave = [this, assetId, onSaveCallback](bool saveSuccess, AZ::Data::AssetPtr asset, AZ::Data::AssetId previousFileAssetId) - { - AZ::Data::AssetId signalId = assetId; - AZ::Data::AssetId fileAssetId = asset->GetId(); - - // If there is a previous file Id is valid, it means this is a save-as operation and we need to remap the tracking. - if (previousFileAssetId.IsValid()) - { - if (saveSuccess) - { - fileAssetId = m_assetsInUse[assetId]->GetFileAssetId(); - m_remappedAsset[asset->GetId()] = fileAssetId; - - // Erase the asset first so the smart pointer can deal with it's things. - m_assetsInUse.erase(fileAssetId); - - // Then perform the insert once we know nothing will attempt to delete this while we are operating on it. - m_assetsInUse[fileAssetId] = m_assetsInUse[assetId]; - m_assetsInUse.erase(assetId); - } - - m_savingAssets.erase(assetId); - m_savingAssets.insert(fileAssetId); - - signalId = fileAssetId; - - if (m_queuedCloses.erase(assetId)) - { - m_queuedCloses.insert(fileAssetId); - } - - auto assetIter = m_assetsInUse.find(fileAssetId); - - if (assetIter != m_assetsInUse.end()) - { - AZStd::invoke(onSaveCallback, saveSuccess, m_assetsInUse[fileAssetId]->GetAsset().Get(), previousFileAssetId); - } - else - { - AZ_Error("ScriptCanvas", !saveSuccess, "Unable to find Memory Asset for Asset(%s)", fileAssetId.ToString().c_str()); - AZStd::invoke(onSaveCallback, saveSuccess, asset, previousFileAssetId); - } - } - else - { - if (saveSuccess) - { - // This should be the case when we get a save as from a newly created file. - // - // If we find the 'memory' asset id in the assets in use. This means this was a new file that was saved. - // To maintain all of the look-up stuff, we need to treat this like a remapping stage. - auto assetInUseIter = m_assetsInUse.find(assetId); - if (assetInUseIter != m_assetsInUse.end()) - { - fileAssetId = assetInUseIter->second->GetFileAssetId(); - - if (assetId != fileAssetId) - { - m_remappedAsset[assetId] = fileAssetId; - - m_assetsInUse.erase(fileAssetId); - m_assetsInUse[fileAssetId] = AZStd::move(assetInUseIter->second); - m_assetsInUse.erase(assetId); - - m_savingAssets.erase(assetId); - m_savingAssets.insert(fileAssetId); - - if (m_queuedCloses.erase(assetId)) - { - m_queuedCloses.insert(fileAssetId); - } - } - } - else - { - fileAssetId = CheckAssetId(fileAssetId); - } - - signalId = fileAssetId; - } - - if (onSaveCallback) - { - AZStd::invoke(onSaveCallback, saveSuccess, m_assetsInUse[signalId]->GetAsset().Get(), previousFileAssetId); - } - - AssetTrackerNotificationBus::Broadcast(&AssetTrackerNotifications::OnAssetSaved, m_assetsInUse[signalId], saveSuccess); - } - - SignalSaveComplete(signalId); - }; - - m_savingAssets.insert(assetId); - assetIter->second->SaveAs(path, onSave); - } - else - { - AZ_Assert(false, "Cannot SaveAs into an existing AssetId"); - } } bool AssetTracker::Load(AZ::Data::AssetId fileAssetId, AZ::Data::AssetType assetType, Callbacks::OnAssetReadyCallback onAssetReadyCallback) @@ -541,48 +438,4 @@ namespace ScriptCanvasEditor return AZ::EntityId(); } - void AssetTracker::OnAssetReady(const ScriptCanvasMemoryAsset* asset) - { - AZ::Data::AssetId assetId = CheckAssetId(asset->GetId()); - - auto assetInUseIter = m_assetsInUse.find(assetId); - if (assetInUseIter != m_assetsInUse.end()) - { - AssetTrackerNotificationBus::Broadcast(&AssetTrackerNotifications::OnAssetReady, assetInUseIter->second); - } - } - - void AssetTracker::OnAssetReloaded(const ScriptCanvasMemoryAsset* asset) - { - AZ::Data::AssetId assetId = CheckAssetId(asset->GetId()); - - auto assetInUseIter = m_assetsInUse.find(assetId); - if (assetInUseIter != m_assetsInUse.end()) - { - AssetTrackerNotificationBus::Broadcast(&AssetTrackerNotifications::OnAssetReloaded, assetInUseIter->second); - } - } - - void AssetTracker::OnAssetSaved(const ScriptCanvasMemoryAsset* asset, bool isSuccessful) - { - AZ::Data::AssetId assetId = CheckAssetId(asset->GetId()); - - auto assetInUseIter = m_assetsInUse.find(assetId); - if (assetInUseIter != m_assetsInUse.end()) - { - AssetTrackerNotificationBus::Broadcast(&AssetTrackerNotifications::OnAssetSaved, assetInUseIter->second, isSuccessful); - } - } - - void AssetTracker::OnAssetError(const ScriptCanvasMemoryAsset* asset) - { - AZ::Data::AssetId assetId = CheckAssetId(asset->GetId()); - - auto assetInUseIter = m_assetsInUse.find(assetId); - if (assetInUseIter != m_assetsInUse.end()) - { - AssetTrackerNotificationBus::Broadcast(&AssetTrackerNotifications::OnAssetError, assetInUseIter->second); - } - } - } diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.h b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.h index 78e85651e1..aa06029c98 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.h +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.h @@ -16,6 +16,7 @@ #include #include +#include namespace ScriptCanvasEditor @@ -119,10 +120,5 @@ namespace ScriptCanvasEditor // Invoked when an asset is loaded from file and becomes ready Callbacks::OnAssetReadyCallback m_onAssetReadyCallback; - // Internal::MemoryAssetNotificationBus - void OnAssetReady(const ScriptCanvasMemoryAsset* asset) override; - void OnAssetReloaded(const ScriptCanvasMemoryAsset* asset) override; - void OnAssetSaved(const ScriptCanvasMemoryAsset* asset, bool isSuccessful) override; - void OnAssetError(const ScriptCanvasMemoryAsset* asset) override; }; } diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTrackerBus.h b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTrackerBus.h index 3fecb0aac9..7125cb7d9b 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTrackerBus.h +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTrackerBus.h @@ -17,6 +17,7 @@ #include #include +#include class QWidget; @@ -154,17 +155,5 @@ namespace ScriptCanvasEditor using MemoryAssetSystemNotificationBus = AZ::EBus; } - class MemoryAssetNotifications - : public AZ::EBusTraits - { - public: - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple; - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; - using BusIdType = AZ::Data::AssetId; - - virtual void OnFileStateChanged(Tracker::ScriptCanvasFileState) {} - }; - - using MemoryAssetNotificationBus = AZ::EBus; ////////////////////////////////////////////////////////////////////////////////////////////////////////// } diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTrackerDefinitions.h b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTrackerDefinitions.h index e08ce8b74b..73507112c2 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTrackerDefinitions.h +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTrackerDefinitions.h @@ -18,22 +18,11 @@ namespace ScriptCanvasEditor namespace Callbacks { //! Callback used to know when a save operation failed or succeeded - using OnSave = AZStd::function; + using OnSave = AZStd::function; using OnAssetReadyCallback = AZStd::function; using OnAssetCreatedCallback = OnAssetReadyCallback; } - namespace Tracker - { - enum class ScriptCanvasFileState : AZ::s32 - { - NEW, - MODIFIED, - UNMODIFIED, - SOURCE_REMOVED, - INVALID = -1 - }; - } } diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasFileHandling.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasFileHandling.cpp new file mode 100644 index 0000000000..c4579c9042 --- /dev/null +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasFileHandling.cpp @@ -0,0 +1,329 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace ScriptCanvasFileHandlingCpp +{ + void AppendTabs(AZStd::string& result, size_t depth) + { + for (size_t i = 0; i < depth; ++i) + { + result += "\t"; + } + } + + void CollectNodes(const ScriptCanvas::GraphData::NodeContainer& container, ScriptCanvas::SerializationListeners& listeners) + { + for (auto& nodeEntity : container) + { + if (nodeEntity) + { + if (auto listener = azrtti_cast + ( AZ::EntityUtils::FindFirstDerivedComponent(nodeEntity))) + { + listeners.push_back(listener); + } + } + } + } +} + +namespace ScriptCanvasEditor +{ + EditorAssetTree* EditorAssetTree::ModRoot() + { + if (!m_parent) + { + return this; + } + + return m_parent->ModRoot(); + } + + void EditorAssetTree::SetParent(EditorAssetTree& parent) + { + m_parent = &parent; + } + + AZStd::string EditorAssetTree::ToString(size_t depth) const + { + AZStd::string result; + ScriptCanvasFileHandlingCpp::AppendTabs(result, depth); + result += m_asset.ToString(); + depth += m_dependencies.empty() ? 0 : 1; + + for (const auto& dependency : m_dependencies) + { + result += "\n"; + ScriptCanvasFileHandlingCpp::AppendTabs(result, depth); + result += dependency.ToString(depth); + } + + return result; + } + + AZ::Outcome LoadDataFromJson + ( ScriptCanvas::ScriptCanvasData& dataTarget + , AZStd::string_view source + , AZ::SerializeContext& serializeContext) + { + namespace JSRU = AZ::JsonSerializationUtils; + using namespace ScriptCanvas; + + AZ::JsonDeserializerSettings settings; + settings.m_serializeContext = &serializeContext; + settings.m_metadata.Create(); + + auto loadResult = JSRU::LoadObjectFromStringByType + ( &dataTarget + , azrtti_typeid() + , source + , &settings); + + if (!loadResult.IsSuccess()) + { + return loadResult; + } + + if (auto graphData = dataTarget.ModGraph()) + { + auto listeners = settings.m_metadata.Find(); + AZ_Assert(listeners, "Failed to find SerializationListeners"); + + ScriptCanvasFileHandlingCpp::CollectNodes(graphData->GetGraphData()->m_nodes, *listeners); + + for (auto listener : *listeners) + { + listener->OnDeserialize(); + } + } + else + { + return AZ::Failure(AZStd::string("Failed to find graph data after loading source")); + } + + return AZ::Success(); + } + + + AZ::Outcome LoadEditorAssetTree(SourceHandle handle, EditorAssetTree* parent) + { + if (!CompleteDescriptionInPlace(handle)) + { + return AZ::Failure(AZStd::string::format("LoadEditorAssetTree failed to describe graph from %s", handle.ToString().c_str())); + } + + if (!handle.Get()) + { + auto loadAssetOutcome = LoadFromFile(handle.Path().c_str()); + if (!loadAssetOutcome.IsSuccess()) + { + return AZ::Failure(AZStd::string::format("LoadEditorAssetTree failed to load graph from %s: %s" + , handle.ToString().c_str(), loadAssetOutcome.GetError().c_str())); + } + + handle = SourceHandle(loadAssetOutcome.GetValue(), handle.Id(), handle.Path().c_str()); + } + + AZStd::vector dependentAssets; + const auto subgraphInterfaceAssetTypeID = azrtti_typeid>(); + + auto beginElementCB = [&subgraphInterfaceAssetTypeID, &dependentAssets] + ( void* instance + , const AZ::SerializeContext::ClassData* classData + , const AZ::SerializeContext::ClassElement* classElement) -> bool + { + if (classElement) + { + // if we are a pointer, then we may be pointing to a derived type. + if (classElement->m_flags & AZ::SerializeContext::ClassElement::FLG_POINTER) + { + // if ptr is a pointer-to-pointer, cast its value to a void* (or const void*) and dereference to get to the actual object pointer. + instance = *(void**)(instance); + } + } + + if (classData->m_typeId == subgraphInterfaceAssetTypeID) + { + auto asset = reinterpret_cast*>(instance); + auto id = asset->GetId(); + dependentAssets.push_back(SourceHandle(nullptr, id.m_guid, {})); + } + + return true; + }; + + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + AZ_Assert(serializeContext, "LoadEditorAssetTree() ailed to retrieve serialize context!"); + + const ScriptCanvasEditor::Graph* graph = handle.Get(); + serializeContext->EnumerateObject(graph, beginElementCB, nullptr, AZ::SerializeContext::ENUM_ACCESS_FOR_READ); + + EditorAssetTree result; + + for (auto& dependentAsset : dependentAssets) + { + auto loadDependentOutcome = LoadEditorAssetTree(dependentAsset, &result); + if (!loadDependentOutcome.IsSuccess()) + { + return AZ::Failure(AZStd::string::format("LoadEditorAssetTree failed to load graph from %s: %s" + , dependentAsset.ToString().c_str(), loadDependentOutcome.GetError().c_str())); + } + + result.m_dependencies.push_back(loadDependentOutcome.TakeValue()); + } + + if (parent) + { + result.SetParent(*parent); + } + + result.m_asset = AZStd::move(handle); + return AZ::Success(result); + } + + AZ::Outcome LoadFromFile(AZStd::string_view path) + { + namespace JSRU = AZ::JsonSerializationUtils; + + auto fileStringOutcome = AZ::Utils::ReadFile(path); + if (!fileStringOutcome) + { + return AZ::Failure(fileStringOutcome.TakeError()); + } + + const auto& asString = fileStringOutcome.GetValue(); + ScriptCanvas::DataPtr scriptCanvasData = aznew ScriptCanvas::ScriptCanvasData(); + if (!scriptCanvasData) + { + return AZ::Failure(AZStd::string("failed to allocate ScriptCanvas::ScriptCanvasData after loading source file")); + } + + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + if (!serializeContext) + { + return AZ::Failure(AZStd::string("no serialize context available to properly parse source file")); + } + + // attempt JSON deserialization... + auto jsonResult = LoadDataFromJson(*scriptCanvasData, AZStd::string_view{ asString.begin(), asString.size() }, *serializeContext); + if (!jsonResult.IsSuccess()) + { + // ...try legacy xml as a failsafe + AZ::IO::ByteContainerStream byteStream(&asString); + if (!AZ::Utils::LoadObjectFromStreamInPlace + ( byteStream + , *scriptCanvasData + , serializeContext + , AZ::ObjectStream::FilterDescriptor(nullptr, AZ::ObjectStream::FILTERFLAG_IGNORE_UNKNOWN_CLASSES))) + { + return AZ::Failure(AZStd::string::format("XML and JSON load attempts failed: %s", jsonResult.GetError().c_str())); + } + } + + if (auto entity = scriptCanvasData->GetScriptCanvasEntity()) + { + AZ_Assert(entity->GetState() == AZ::Entity::State::Constructed, "Entity loaded in bad state"); + AZ::u64 entityId = + aznumeric_caster(ScriptCanvas::MathNodeUtilities::GetRandomIntegral(1, std::numeric_limits::max())); + entity->SetId(AZ::EntityId(entityId)); + + auto graph = entity->FindComponent(); + graph->MarkOwnership(*scriptCanvasData); + + entity->Init(); + entity->Activate(); + } + else + { + return AZ::Failure(AZStd::string("Loaded script canvas file was missing a necessary Entity.")); + } + + return AZ::Success(ScriptCanvasEditor::SourceHandle(scriptCanvasData, path)); + } + + AZ::Outcome SaveToStream(const SourceHandle& source, AZ::IO::GenericStream& stream) + { + namespace JSRU = AZ::JsonSerializationUtils; + + if (!source.IsGraphValid()) + { + return AZ::Failure(AZStd::string("no source graph to save")); + } + + if (source.Path().empty()) + { + return AZ::Failure(AZStd::string("no destination path specified")); + } + + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + if (!serializeContext) + { + return AZ::Failure(AZStd::string("no serialize context available to properly save source file")); + } + + auto graphData = source.Get()->GetOwnership(); + if (!graphData) + { + return AZ::Failure(AZStd::string("source is missing save container")); + } + + if (graphData->GetEditorGraph() != source.Get()) + { + return AZ::Failure(AZStd::string("source save container refers to incorrect graph")); + } + + auto saveTarget = graphData->ModGraph(); + if (!saveTarget || !saveTarget->GetGraphData()) + { + return AZ::Failure(AZStd::string("source save container failed to return serializable graph data")); + } + + AZ::JsonSerializerSettings settings; + settings.m_metadata.Create(); + auto listeners = settings.m_metadata.Find(); + AZ_Assert(listeners, "Failed to create SerializationListeners"); + ScriptCanvasFileHandlingCpp::CollectNodes(saveTarget->GetGraphData()->m_nodes, *listeners); + settings.m_keepDefaults = false; + settings.m_serializeContext = serializeContext; + + for (auto listener : *listeners) + { + listener->OnSerialize(); + } + + auto saveOutcome = JSRU::SaveObjectToStream(graphData.get(), stream, nullptr, &settings); + if (!saveOutcome.IsSuccess()) + { + return AZ::Failure(AZStd::string::format("JSON serialization failed to save source: %s", saveOutcome.GetError().c_str())); + } + + return AZ::Success(); + } +} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp index 165007b79b..a20a6e54a1 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp @@ -19,8 +19,7 @@ namespace ScriptCanvasEditor { ScriptCanvasMemoryAsset::ScriptCanvasMemoryAsset() - : m_isSaving(false) - , m_sourceInError(false) + : m_sourceInError(false) { m_undoState = AZStd::make_unique(this); } @@ -279,14 +278,11 @@ namespace ScriptCanvasEditor EditorGraphNotificationBus::Handler::BusDisconnect(); EditorGraphNotificationBus::Handler::BusConnect(m_scriptCanvasId); - - m_undoHelper = AZStd::make_unique(*this); } - ScriptCanvasEditor::Widget::CanvasWidget* ScriptCanvasMemoryAsset::CreateView(QWidget* parent) + ScriptCanvasEditor::Widget::CanvasWidget* ScriptCanvasMemoryAsset::CreateView(QWidget* /*parent*/) { - m_canvasWidget = new Widget::CanvasWidget(m_fileAssetId, parent); - return m_canvasWidget; + return nullptr; } void ScriptCanvasMemoryAsset::ClearView() @@ -430,68 +426,13 @@ namespace ScriptCanvasEditor } } - void ScriptCanvasMemoryAsset::SourceFileFailed(AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid) + void ScriptCanvasMemoryAsset::SourceFileFailed(AZStd::string /*relativePath*/, AZStd::string /*scanFolder*/, AZ::Uuid) { - AZStd::string fullPath; - AzFramework::StringFunc::Path::Join(scanFolder.data(), relativePath.data(), fullPath); - AzFramework::ApplicationRequests::Bus::Broadcast(&AzFramework::ApplicationRequests::NormalizePath, fullPath); - - auto assetPathIdIt = AZStd::find(m_pendingSave.begin(), m_pendingSave.end(), fullPath); - if (assetPathIdIt != m_pendingSave.end()) - { - if (m_onSaveCallback) - { - m_onSaveCallback(false, m_inMemoryAsset.Get(), AZ::Data::AssetId()); - m_onSaveCallback = nullptr; - } - - m_pendingSave.erase(assetPathIdIt); - } } - void ScriptCanvasMemoryAsset::SavingComplete(const AZStd::string& streamName, AZ::Uuid sourceAssetId) + void ScriptCanvasMemoryAsset::SavingComplete(const AZStd::string& /*streamName*/, AZ::Uuid /*sourceAssetId*/) { - AZStd::string normPath = streamName; - AzFramework::ApplicationRequests::Bus::Broadcast(&AzFramework::ApplicationRequests::NormalizePath, normPath); - - auto assetPathIdIt = AZStd::find(m_pendingSave.begin(), m_pendingSave.end(), normPath); - if (assetPathIdIt != m_pendingSave.end()) - { - AZ::Data::AssetId previousFileAssetId; - - if (sourceAssetId != m_fileAssetId.m_guid) - { - previousFileAssetId = m_fileAssetId; - - // The source file has changed, store the AssetId to the canonical asset on file - SetFileAssetId(sourceAssetId); - - } - else if (!m_fileAssetId.IsValid()) - { - SetFileAssetId(sourceAssetId); - } - - m_formerGraphIdPair = AZStd::make_pair(m_scriptCanvasId, m_graphId); - - m_fileState = Tracker::ScriptCanvasFileState::UNMODIFIED; - - m_pendingSave.erase(assetPathIdIt); - - m_absolutePath = m_saveAsPath; - m_saveAsPath.clear(); - - // Connect to the source asset's bus to monitor for situations we may need to handle - AZ::Data::AssetBus::MultiHandler::BusConnect(m_inMemoryAsset.GetId()); - AZ::Data::AssetBus::MultiHandler::BusConnect(m_fileAssetId); - - if (m_onSaveCallback) - { - m_onSaveCallback(true, m_inMemoryAsset.Get(), previousFileAssetId); - m_onSaveCallback = nullptr; - } - } } void ScriptCanvasMemoryAsset::FinalizeAssetSave(bool, const AzToolsFramework::SourceControlFileInfo& fileInfo, const AZ::Data::AssetStreamInfo& saveInfo, Callbacks::OnSave onSaveCallback) @@ -525,19 +466,13 @@ namespace ScriptCanvasEditor UndoNotificationBus::Broadcast(&UndoNotifications::OnCanRedoChanged, m_undoState->m_undoStack->CanRedo()); } - void ScriptCanvasMemoryAsset::SetFileAssetId(const AZ::Data::AssetId& fileAssetId) + void ScriptCanvasMemoryAsset::SetFileAssetId(const AZ::Data::AssetId& /*fileAssetId*/) { - m_fileAssetId = fileAssetId; - if (m_canvasWidget) - { - m_canvasWidget->SetAssetId(fileAssetId); - } } void ScriptCanvasMemoryAsset::SignalFileStateChanged() { - MemoryAssetNotificationBus::Event(m_fileAssetId, &MemoryAssetNotifications::OnFileStateChanged, GetFileState()); } AZStd::string ScriptCanvasMemoryAsset::MakeTemporaryFilePathForSave(AZStd::string_view targetFilename) @@ -604,27 +539,8 @@ namespace ScriptCanvasEditor // AssetSaveFinalizer ////////////////////////////////////// - bool AssetSaveFinalizer::ValidateStatus(const AzToolsFramework::SourceControlFileInfo& fileInfo) + bool AssetSaveFinalizer::ValidateStatus(const AzToolsFramework::SourceControlFileInfo& /*fileInfo*/) { - auto fileIO = AZ::IO::FileIOBase::GetInstance(); - if (fileInfo.IsLockedByOther()) - { - AZ_Error("Script Canvas", !fileInfo.IsLockedByOther(), "The file is already exclusively opened by another user: %s", fileInfo.m_filePath.data()); - AZStd::invoke(m_onSave, false, m_inMemoryAsset, m_fileAssetId); - return false; - } - else if (fileInfo.IsReadOnly() && fileIO->Exists(fileInfo.m_filePath.c_str())) - { - AZ_Error("Script Canvas", !fileInfo.IsReadOnly(), "File %s is read-only. It cannot be saved." - " If this file is in Perforce it may not have been checked out by the Source Control API.", fileInfo.m_filePath.data()); - AZStd::invoke(m_onSave, false, m_inMemoryAsset, m_fileAssetId); - return false; - } - else if (m_saving) - { - AZ_Warning("Script Canvas", false, "Trying to save the same file twice. Will result in one save callback being ignored."); - return false; - } return true; } diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.h b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.h index 9665e8ec64..45647eba1b 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.h +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.h @@ -29,6 +29,8 @@ #include #include +#include + namespace ScriptCanvasEditor { @@ -172,7 +174,6 @@ namespace ScriptCanvasEditor bool IsSourceInError() const; - void OnSourceAssetFinalized(const AZStd::string& fullPath, AZ::Uuid sourceAssetId); void SavingComplete(const AZStd::string& fullPath, AZ::Uuid sourceAssetId); AZ::Data::AssetId GetSourceUuid() const { return m_sourceUuid; } @@ -320,7 +321,6 @@ namespace ScriptCanvasEditor //! The undo helper is an object that implements the Undo behaviors AZStd::unique_ptr m_undoHelper; - bool m_isSaving; bool m_sourceInError; AZ::Data::AssetId m_sourceUuid; diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasUndoHelper.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasUndoHelper.cpp index 388da67987..f125a4cbc9 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasUndoHelper.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasUndoHelper.cpp @@ -9,13 +9,19 @@ #include "ScriptCanvasUndoHelper.h" #include "ScriptCanvasMemoryAsset.h" #include +#include namespace ScriptCanvasEditor { - UndoHelper::UndoHelper(ScriptCanvasMemoryAsset& memoryAsset) - : m_memoryAsset(memoryAsset) + UndoHelper::UndoHelper() + : m_undoState(this) { - UndoRequestBus::Handler::BusConnect(memoryAsset.GetScriptCanvasId()); + } + + UndoHelper::UndoHelper(Graph* graph) + : m_undoState(this) + { + SetSource(graph); } UndoHelper::~UndoHelper() @@ -23,15 +29,21 @@ namespace ScriptCanvasEditor UndoRequestBus::Handler::BusDisconnect(); } + void UndoHelper::SetSource(Graph* graph) + { + m_graph = graph; + UndoRequestBus::Handler::BusConnect(graph->GetScriptCanvasId()); + } + ScriptCanvasEditor::UndoCache* UndoHelper::GetSceneUndoCache() { - return m_memoryAsset.GetUndoState()->m_undoCache.get(); + return m_undoState.m_undoCache.get(); } ScriptCanvasEditor::UndoData UndoHelper::CreateUndoData() { - AZ::EntityId graphCanvasGraphId = m_memoryAsset.GetGraphId(); - ScriptCanvas::ScriptCanvasId scriptCanvasId = m_memoryAsset.GetScriptCanvasId(); + AZ::EntityId graphCanvasGraphId = m_graph->GetGraphCanvasGraphId(); + ScriptCanvas::ScriptCanvasId scriptCanvasId = m_graph->GetScriptCanvasId(); GraphCanvas::GraphModelRequestBus::Event(graphCanvasGraphId, &GraphCanvas::GraphModelRequests::OnSaveDataDirtied, graphCanvasGraphId); @@ -56,17 +68,17 @@ namespace ScriptCanvasEditor void UndoHelper::BeginUndoBatch(AZStd::string_view label) { - m_memoryAsset.GetUndoState()->BeginUndoBatch(label); + m_undoState.BeginUndoBatch(label); } void UndoHelper::EndUndoBatch() { - m_memoryAsset.GetUndoState()->EndUndoBatch(); + m_undoState.EndUndoBatch(); } void UndoHelper::AddUndo(AzToolsFramework::UndoSystem::URSequencePoint* sequencePoint) { - if (SceneUndoState* sceneUndoState = m_memoryAsset.GetUndoState()) + if (SceneUndoState* sceneUndoState = &m_undoState) { if (!sceneUndoState->m_currentUndoBatch) { @@ -82,22 +94,22 @@ namespace ScriptCanvasEditor void UndoHelper::AddGraphItemChangeUndo(AZStd::string_view undoLabel) { GraphItemChangeCommand* command = aznew GraphItemChangeCommand(undoLabel); - command->Capture(m_memoryAsset, true); - command->Capture(m_memoryAsset, false); + command->Capture(m_graph, true); + command->Capture(m_graph, false); AddUndo(command); } void UndoHelper::AddGraphItemAdditionUndo(AZStd::string_view undoLabel) { GraphItemAddCommand* command = aznew GraphItemAddCommand(undoLabel); - command->Capture(m_memoryAsset, false); + command->Capture(m_graph, false); AddUndo(command); } void UndoHelper::AddGraphItemRemovalUndo(AZStd::string_view undoLabel) { GraphItemRemovalCommand* command = aznew GraphItemRemovalCommand(undoLabel); - command->Capture(m_memoryAsset, true); + command->Capture(m_graph, true); AddUndo(command); } @@ -105,7 +117,7 @@ namespace ScriptCanvasEditor { AZ_PROFILE_FUNCTION(ScriptCanvas); - SceneUndoState* sceneUndoState = m_memoryAsset.GetUndoState(); + SceneUndoState* sceneUndoState = &m_undoState; if (sceneUndoState) { AZ_Warning("Script Canvas", !sceneUndoState->m_currentUndoBatch, "Script Canvas Editor has an open undo batch when performing a redo operation"); @@ -125,7 +137,7 @@ namespace ScriptCanvasEditor { AZ_PROFILE_FUNCTION(ScriptCanvas); - SceneUndoState* sceneUndoState = m_memoryAsset.GetUndoState(); + SceneUndoState* sceneUndoState = &m_undoState; if (sceneUndoState) { AZ_Warning("Script Canvas", !sceneUndoState->m_currentUndoBatch, "Script Canvas Editor has an open undo batch when performing a redo operation"); @@ -143,7 +155,7 @@ namespace ScriptCanvasEditor void UndoHelper::Reset() { - if (SceneUndoState* sceneUndoState = m_memoryAsset.GetUndoState()) + if (SceneUndoState* sceneUndoState = &m_undoState) { AZ_Warning("Script Canvas", !sceneUndoState->m_currentUndoBatch, "Script Canvas Editor has an open undo batch when resetting the undo stack"); sceneUndoState->m_undoStack->Reset(); @@ -162,17 +174,23 @@ namespace ScriptCanvasEditor bool UndoHelper::CanUndo() const { - return m_memoryAsset.GetUndoState()->m_undoStack->CanUndo(); + return m_undoState.m_undoStack->CanUndo(); } bool UndoHelper::CanRedo() const { - return m_memoryAsset.GetUndoState()->m_undoStack->CanRedo(); + return m_undoState.m_undoStack->CanRedo(); + } + + void UndoHelper::OnUndoStackChanged() + { + UndoNotificationBus::Broadcast(&UndoNotifications::OnCanUndoChanged, m_undoState.m_undoStack->CanUndo()); + UndoNotificationBus::Broadcast(&UndoNotifications::OnCanRedoChanged, m_undoState.m_undoStack->CanRedo()); } void UndoHelper::UpdateCache() { - ScriptCanvas::ScriptCanvasId scriptCanvasId = m_memoryAsset.GetScriptCanvasId(); + ScriptCanvas::ScriptCanvasId scriptCanvasId = m_graph->GetScriptCanvasId(); UndoCache* undoCache = nullptr; UndoRequestBus::EventResult(undoCache, scriptCanvasId, &UndoRequests::GetSceneUndoCache); diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasUndoHelper.h b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasUndoHelper.h index 7bf5c8b630..e2d4f008fa 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasUndoHelper.h +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasUndoHelper.h @@ -8,22 +8,27 @@ #pragma once #include +#include namespace ScriptCanvasEditor { - class ScriptCanvasMemoryAsset; // Helper class that provides the implementation for UndoRequestBus - class UndoHelper : UndoRequestBus::Handler + class UndoHelper + : public UndoRequestBus::Handler + , public AzToolsFramework::UndoSystem::IUndoNotify { public: - UndoHelper(ScriptCanvasMemoryAsset& memoryAsset); + UndoHelper(); + UndoHelper(Graph* source); ~UndoHelper(); UndoCache* GetSceneUndoCache() override; UndoData CreateUndoData() override; + void SetSource(Graph* source); + void BeginUndoBatch(AZStd::string_view label) override; void EndUndoBatch() override; void AddUndo(AzToolsFramework::UndoSystem::URSequencePoint* seqPoint) override; @@ -41,6 +46,7 @@ namespace ScriptCanvasEditor bool CanRedo() const override; private: + void OnUndoStackChanged() override; void UpdateCache(); @@ -51,7 +57,7 @@ namespace ScriptCanvasEditor }; Status m_status = Status::Idle; - - ScriptCanvasMemoryAsset& m_memoryAsset; + SceneUndoState m_undoState; + Graph* m_graph = nullptr; }; } diff --git a/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp b/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp index 77f791483b..b50457adbf 100644 --- a/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp @@ -77,6 +77,7 @@ AZ_POP_DISABLE_WARNING #include #include #include +#include #include #include #include @@ -480,6 +481,7 @@ namespace ScriptCanvasEditor ScriptCanvas::Graph::Activate(); PostActivate(); + m_undoHelper.SetSource(this); } void Graph::Deactivate() @@ -489,7 +491,7 @@ namespace ScriptCanvasEditor EditorGraphRequestBus::Handler::BusDisconnect(); SceneCounterRequestBus::Handler::BusDisconnect(); NodeCreationNotificationBus::Handler::BusDisconnect(); - + AZ::SystemTickBus::Handler::BusDisconnect(); GraphCanvas::SceneNotificationBus::Handler::BusDisconnect(); GraphCanvas::GraphModelRequestBus::Handler::BusDisconnect(); @@ -1029,16 +1031,48 @@ namespace ScriptCanvasEditor { AZStd::any* connectionUserData = nullptr; GraphCanvas::ConnectionRequestBus::EventResult(connectionUserData, connectionId, &GraphCanvas::ConnectionRequests::GetUserData); - auto scConnectionId = connectionUserData && connectionUserData->is() ? *AZStd::any_cast(connectionUserData) : AZ::EntityId(); + auto scConnectionId = connectionUserData && connectionUserData->is() + ? *AZStd::any_cast(connectionUserData) + : AZ::EntityId(); - ScriptCanvas::Connection* connection = AZ::EntityUtils::FindFirstDerivedComponent(scConnectionId); + if (ScriptCanvas::Connection* connection = AZ::EntityUtils::FindFirstDerivedComponent(scConnectionId)) + { + ScriptCanvas::GraphNotificationBus::Event + ( GetScriptCanvasId() + , &ScriptCanvas::GraphNotifications::OnDisonnectionComplete + , connectionId); + DisconnectById(scConnectionId); + } + } - if (connection) + ScriptCanvas::DataPtr Graph::Create() + { + if (AZ::Entity* entity = aznew AZ::Entity("Script Canvas Graph")) { - ScriptCanvas::GraphNotificationBus::Event(GetScriptCanvasId(), &ScriptCanvas::GraphNotifications::OnDisonnectionComplete, connectionId); + auto graph = entity->CreateComponent(); + entity->CreateComponent(graph->GetScriptCanvasId()); - DisconnectById(scConnectionId); + if (ScriptCanvas::DataPtr data = aznew ScriptCanvas::ScriptCanvasData()) + { + data->m_scriptCanvasEntity.reset(entity); + graph->MarkOwnership(*data); + entity->Init(); + entity->Activate(); + return data; + } } + + return nullptr; + } + + void Graph::MarkOwnership(ScriptCanvas::ScriptCanvasData& owner) + { + m_owner = &owner; + } + + ScriptCanvas::DataPtr Graph::GetOwnership() const + { + return const_cast(this)->m_owner; } bool Graph::CreateConnection(const GraphCanvas::ConnectionId& connectionId, const GraphCanvas::Endpoint& sourcePoint, const GraphCanvas::Endpoint& targetPoint) @@ -1323,7 +1357,8 @@ namespace ScriptCanvasEditor void Graph::SignalDirty() { - GeneralRequestBus::Broadcast(&GeneralRequests::SignalSceneDirty, GetAssetId()); + SourceHandle handle(m_owner, {}, {}); + GeneralRequestBus::Broadcast(&GeneralRequests::SignalSceneDirty, handle); } void Graph::HighlightNodesByType(const ScriptCanvas::NodeTypeIdentifier& nodeTypeIdentifier) @@ -3354,11 +3389,6 @@ namespace ScriptCanvasEditor } } - void Graph::SetAssetType(AZ::Data::AssetType assetType) - { - m_assetType = assetType; - } - void Graph::ReportError(const ScriptCanvas::Node& node, const AZStd::string& errorSource, const AZStd::string& errorMessage) { AzQtComponents::ToastConfiguration toastConfiguration(AzQtComponents::ToastType::Error, errorSource.c_str(), errorMessage.c_str()); @@ -3463,7 +3493,7 @@ namespace ScriptCanvasEditor m_focusHelper.SetActiveGraph(GetGraphCanvasGraphId()); } - bool Graph::UpgradeGraph(const AZ::Data::Asset& asset, UpgradeRequest request, bool isVerbose) + bool Graph::UpgradeGraph(SourceHandle& asset, UpgradeRequest request, bool isVerbose) { m_upgradeSM.SetAsset(asset); m_upgradeSM.SetVerbose(isVerbose); diff --git a/Gems/ScriptCanvas/Code/Editor/Components/EditorScriptCanvasComponent.cpp b/Gems/ScriptCanvas/Code/Editor/Components/EditorScriptCanvasComponent.cpp index 043e034062..9209196873 100644 --- a/Gems/ScriptCanvas/Code/Editor/Components/EditorScriptCanvasComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Components/EditorScriptCanvasComponent.cpp @@ -6,7 +6,6 @@ * */ - #include #include #include @@ -14,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -21,23 +21,27 @@ #include #include #include +#include #include #include #include +#include #include #include #include #include +#include +#include #include #include - namespace EditorScriptCanvasComponentCpp { enum Version { PrefabIntegration = 10, - + InternalDev, + AddSourceHandle, // add description above Current }; @@ -128,7 +132,7 @@ namespace ScriptCanvasEditor } ScriptCanvasBuilder::BuildVariableOverrides overrides; - overrides.m_source = AZ::Data::Asset(assetHolder.GetAssetId(), assetHolder.GetAssetType(), assetHolder.GetAssetHint());; + overrides.m_source = SourceHandle(nullptr, assetHolder.GetAssetId().m_guid, {}); for (auto& variable : editableData.GetVariables()) { @@ -142,6 +146,25 @@ namespace ScriptCanvasEditor } } + if (rootElement.GetVersion() < EditorScriptCanvasComponentCpp::Version::AddSourceHandle) + { + ScriptCanvasAssetHolder assetHolder; + if (!rootElement.FindSubElementAndGetData(AZ_CRC_CE("m_assetHolder"), assetHolder)) + { + AZ_Error("ScriptCanvas", false, "EditorScriptCanvasComponent conversion failed: could not retrieve old 'm_assetHolder'"); + return false; + } + + auto assetId = assetHolder.GetAssetId(); + auto path = assetHolder.GetAssetHint(); + + if (!rootElement.AddElementWithData(serializeContext, "runtimeDataOverrides", SourceHandle(nullptr, assetId.m_guid, path))) + { + AZ_Error("ScriptCanvas", false, "EditorScriptCanvasComponent conversion failed: failed to add 'sourceHandle'"); + return false; + } + } + return true; } @@ -153,9 +176,9 @@ namespace ScriptCanvasEditor serializeContext->Class() ->Version(EditorScriptCanvasComponentCpp::Version::Current, &EditorScriptCanvasComponentVersionConverter) ->Field("m_name", &EditorScriptCanvasComponent::m_name) - ->Field("m_assetHolder", &EditorScriptCanvasComponent::m_scriptCanvasAssetHolder) ->Field("runtimeDataIsValid", &EditorScriptCanvasComponent::m_runtimeDataIsValid) ->Field("runtimeDataOverrides", &EditorScriptCanvasComponent::m_variableOverrides) + ->Field("sourceHandle", &EditorScriptCanvasComponent::m_sourceHandle) ; if (AZ::EditContext* editContext = serializeContext->GetEditContext()) @@ -171,29 +194,34 @@ namespace ScriptCanvasEditor ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("UI", 0x27ff46b0)) ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Level", 0x9aeacc13)) ->Attribute(AZ::Edit::Attributes::HelpPageURL, "https://o3de.org/docs/user-guide/components/reference/scripting/script-canvas/") - ->DataElement(AZ::Edit::UIHandlers::Default, &EditorScriptCanvasComponent::m_scriptCanvasAssetHolder, "Script Canvas Asset", "Script Canvas asset associated with this component") - ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) + ->DataElement(AZ::Edit::UIHandlers::Default, &EditorScriptCanvasComponent::m_sourceHandle, "Script Canvas Source File", "Script Canvas source file associated with this component") + ->Attribute("BrowseIcon", ":/stylesheet/img/UI20/browse-edit-select-files.svg") + ->Attribute("EditButton", "") + ->Attribute("EditDescription", "Open in Script Canvas Editor") + ->Attribute("EditCallback", &EditorScriptCanvasComponent::OpenEditor) + ->Attribute(AZ::Edit::Attributes::AssetPickerTitle, "Script Canvas") + ->Attribute(AZ::Edit::Attributes::SourceAssetFilterPattern, "*.scriptcanvas") + ->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorScriptCanvasComponent::OnFileSelectionChanged) ->DataElement(AZ::Edit::UIHandlers::Default, &EditorScriptCanvasComponent::m_variableOverrides, "Properties", "Script Canvas Graph Properties") - ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) + ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) ; } } + + if (AZ::JsonRegistrationContext* jsonContext = azrtti_cast(context)) + { + jsonContext->Serializer()->HandlesType(); + } } EditorScriptCanvasComponent::EditorScriptCanvasComponent() - : EditorScriptCanvasComponent(AZ::Data::Asset()) + : EditorScriptCanvasComponent(SourceHandle()) { } - EditorScriptCanvasComponent::EditorScriptCanvasComponent(AZ::Data::Asset asset) - : m_scriptCanvasAssetHolder() + EditorScriptCanvasComponent::EditorScriptCanvasComponent(const SourceHandle& sourceHandle) + : m_sourceHandle(sourceHandle) { - if (asset.GetId().IsValid()) - { - m_scriptCanvasAssetHolder.SetAsset(asset.GetId()); - } - - m_scriptCanvasAssetHolder.SetScriptChangedCB([this](AZ::Data::AssetId assetId) { OnScriptCanvasAssetChanged(assetId); }); } EditorScriptCanvasComponent::~EditorScriptCanvasComponent() @@ -209,50 +237,34 @@ namespace ScriptCanvasEditor void EditorScriptCanvasComponent::UpdateName() { - AZ::Data::AssetId assetId = m_scriptCanvasAssetHolder.GetAssetId(); - if (assetId.IsValid()) - { - // Pathname from the asset doesn't seem to return a value unless the asset has been loaded up once(which isn't done until we try to show it). - // Using the Job system to determine the asset name instead. - AZ::Outcome jobOutcome = AZ::Failure(); - AzToolsFramework::AssetSystemJobRequestBus::BroadcastResult(jobOutcome, &AzToolsFramework::AssetSystemJobRequestBus::Events::GetAssetJobsInfoByAssetID, assetId, false, false); - - AZStd::string assetPath; - AZStd::string assetName; + SetName(m_sourceHandle.Path().Filename().Native()); + } - if (jobOutcome.IsSuccess()) + void EditorScriptCanvasComponent::OpenEditor(const AZ::Data::AssetId&, const AZ::Data::AssetType&) + { + AzToolsFramework::OpenViewPane(LyViewPane::ScriptCanvas); + + AZ::Outcome openOutcome = AZ::Failure(AZStd::string()); + + if (m_sourceHandle.IsDescriptionValid()) + { + GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAsset, m_sourceHandle, Tracker::ScriptCanvasFileState::UNMODIFIED, -1); + + if (!openOutcome) { - AzToolsFramework::AssetSystem::JobInfoContainer& jobs = jobOutcome.GetValue(); - - // Get the asset relative path - if (!jobs.empty()) - { - assetPath = jobs[0].m_sourceFile; - } - - // Get the asset file name - assetName = assetPath; - - if (!assetPath.empty()) - { - AzFramework::StringFunc::Path::GetFileName(assetPath.c_str(), assetName); - SetName(assetName); - } + AZ_Warning("Script Canvas", openOutcome, "%s", openOutcome.GetError().data()); } } - } - - void EditorScriptCanvasComponent::OpenEditor() - { - m_scriptCanvasAssetHolder.OpenEditor(); - } - - void EditorScriptCanvasComponent::CloseGraph() - { - AZ::Data::AssetId assetId = m_scriptCanvasAssetHolder.GetAssetId(); - if (assetId.IsValid()) + else if (GetEntityId().IsValid()) { - GeneralRequestBus::Broadcast(&GeneralRequests::CloseScriptCanvasAsset, assetId); + AzToolsFramework::EntityIdList selectedEntityIds; + AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(selectedEntityIds, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities); + + // Going to bypass the multiple selected entities flow for right now. + if (selectedEntityIds.size() == 1) + { + GeneralRequestBus::Broadcast(&GeneralRequests::CreateScriptCanvasAssetFor, AZStd::make_pair(GetEntityId(), GetId())); + } } } @@ -261,7 +273,11 @@ namespace ScriptCanvasEditor EditorComponentBase::Init(); AzFramework::AssetCatalogEventBus::Handler::BusConnect(); AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusConnect(); - m_scriptCanvasAssetHolder.Init(GetEntityId(), GetId()); + } + + void EditorScriptCanvasComponent::InitializeSource(const SourceHandle& sourceHandle) + { + m_sourceHandle = sourceHandle; } //========================================================================= @@ -269,6 +285,8 @@ namespace ScriptCanvasEditor { EditorComponentBase::Activate(); + AzToolsFramework::AssetSystemBus::Handler::BusConnect(); + AZ::EntityId entityId = GetEntityId(); EditorContextMenuRequestBus::Handler::BusConnect(entityId); @@ -277,19 +295,13 @@ namespace ScriptCanvasEditor EditorScriptCanvasComponentLoggingBus::Handler::BusConnect(entityId); EditorLoggingComponentNotificationBus::Broadcast(&EditorLoggingComponentNotifications::OnEditorScriptCanvasComponentActivated, GetNamedEntityId(), GetGraphIdentifier()); - AZ::Data::AssetId fileAssetId = m_scriptCanvasAssetHolder.GetAssetId(); - - if (fileAssetId.IsValid()) - { - AssetTrackerNotificationBus::Handler::BusConnect(fileAssetId); - AzToolsFramework::ToolsApplicationNotificationBus::Broadcast(&AzToolsFramework::ToolsApplicationEvents::InvalidatePropertyDisplay, AzToolsFramework::Refresh_EntireTree_NewContent); - } + AzToolsFramework::ToolsApplicationNotificationBus::Broadcast(&AzToolsFramework::ToolsApplicationEvents::InvalidatePropertyDisplay, AzToolsFramework::Refresh_EntireTree_NewContent); } //========================================================================= void EditorScriptCanvasComponent::Deactivate() { - AssetTrackerNotificationBus::Handler::BusDisconnect(); + AzToolsFramework::AssetSystemBus::Handler::BusDisconnect(); EditorScriptCanvasComponentLoggingBus::Handler::BusDisconnect(); EditorLoggingComponentNotificationBus::Broadcast(&EditorLoggingComponentNotifications::OnEditorScriptCanvasComponentDeactivated, GetNamedEntityId(), GetGraphIdentifier()); @@ -306,7 +318,7 @@ namespace ScriptCanvasEditor m_runtimeDataIsValid = false; - auto assetTreeOutcome = LoadEditorAssetTree(m_scriptCanvasAssetHolder.GetAssetId(), m_scriptCanvasAssetHolder.GetAssetHint()); + auto assetTreeOutcome = LoadEditorAssetTree(m_sourceHandle); if (!assetTreeOutcome.IsSuccess()) { AZ_Warning("ScriptCanvas", false, "EditorScriptCanvasComponent::BuildGameEntityData failed: %s", assetTreeOutcome.GetError().c_str()); @@ -344,7 +356,8 @@ namespace ScriptCanvasEditor if (!m_runtimeDataIsValid) { - AZ_Error("ScriptCanvasBuilder", false, "Runtime information did not build for ScriptCanvas Component using asset: %s", m_scriptCanvasAssetHolder.GetAssetId().ToString().c_str()); + AZ_Error("ScriptCanvasBuilder", false, "Runtime information did not build for ScriptCanvas Component using asset: %s" + , m_sourceHandle.ToString().c_str()); return; } @@ -352,123 +365,66 @@ namespace ScriptCanvasEditor runtimeComponent->TakeRuntimeDataOverrides(ConvertToRuntime(m_variableOverrides)); } - void EditorScriptCanvasComponent::OnCatalogAssetAdded(const AZ::Data::AssetId& assetId) - { - if (m_removedCatalogId == assetId) - { - if (!m_scriptCanvasAssetHolder.GetAssetId().IsValid()) - { - SetPrimaryAsset(assetId); - m_removedCatalogId.SetInvalid(); - } - } - } - void EditorScriptCanvasComponent::OnCatalogAssetRemoved(const AZ::Data::AssetId& removedAssetId, const AZ::Data::AssetInfo& /*assetInfo*/) - { - AZ::Data::AssetId assetId = m_scriptCanvasAssetHolder.GetAssetId(); - if (assetId == removedAssetId) - { - m_removedCatalogId = assetId; - SetPrimaryAsset({}); - } - } - void EditorScriptCanvasComponent::SetPrimaryAsset(const AZ::Data::AssetId& assetId) { - m_scriptCanvasAssetHolder.ClearAsset(); + m_sourceHandle = SourceHandle(nullptr, assetId.m_guid, {}); - if (assetId.IsValid()) + auto completeAsset = CompleteDescription(m_sourceHandle); + if (completeAsset) { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetId); - - if (memoryAsset) - { - m_scriptCanvasAssetHolder.SetAsset(memoryAsset->GetFileAssetId()); - OnScriptCanvasAssetChanged(memoryAsset->GetFileAssetId()); - SetName(memoryAsset->GetTabName()); - } - else - { - auto scriptCanvasAsset = AZ::Data::AssetManager::Instance().FindAsset(assetId, AZ::Data::AssetLoadBehavior::Default); - if (scriptCanvasAsset) - { - m_scriptCanvasAssetHolder.SetAsset(assetId); - } - } + m_sourceHandle = *completeAsset; } + OnScriptCanvasAssetChanged(SourceChangeDescription::SelectionChanged); + SetName(m_sourceHandle.Path().Filename().Native()); AzToolsFramework::ToolsApplicationEvents::Bus::Broadcast(&AzToolsFramework::ToolsApplicationEvents::InvalidatePropertyDisplay, AzToolsFramework::Refresh_AttributesAndValues); } AZ::Data::AssetId EditorScriptCanvasComponent::GetAssetId() const { - return m_scriptCanvasAssetHolder.GetAssetId(); + return m_sourceHandle.Id(); } - AZ::EntityId EditorScriptCanvasComponent::GetGraphEntityId() const + AZ::u32 EditorScriptCanvasComponent::OnFileSelectionChanged() { - AZ::EntityId scriptCanvasEntityId; - AZ::Data::AssetId assetId = m_scriptCanvasAssetHolder.GetAssetId(); - - if (assetId.IsValid()) - { - AssetTrackerRequestBus::BroadcastResult(scriptCanvasEntityId, &AssetTrackerRequests::GetScriptCanvasId, assetId); - } - - return scriptCanvasEntityId; + m_sourceHandle = SourceHandle(nullptr, m_sourceHandle.Path()); + CompleteDescriptionInPlace(m_sourceHandle); + m_previousHandle = {}; + m_removedHandle = {}; + OnScriptCanvasAssetChanged(SourceChangeDescription::SelectionChanged); + return AZ::Edit::PropertyRefreshLevels::EntireTree; } - - void EditorScriptCanvasComponent::OnAssetReady(const ScriptCanvasMemoryAsset::pointer asset) + + void EditorScriptCanvasComponent::OnScriptCanvasAssetChanged(SourceChangeDescription changeDescription) { - OnScriptCanvasAssetReady(asset); - } - - void EditorScriptCanvasComponent::OnAssetSaved(const ScriptCanvasMemoryAsset::pointer asset, bool isSuccessful) - { - if (isSuccessful) - { - OnScriptCanvasAssetReady(asset); - } - } - - void EditorScriptCanvasComponent::OnAssetReloaded(const ScriptCanvasMemoryAsset::pointer asset) - { - OnScriptCanvasAssetReady(asset); - } - - void EditorScriptCanvasComponent::OnScriptCanvasAssetChanged(AZ::Data::AssetId assetId) - { - AssetTrackerNotificationBus::Handler::BusDisconnect(); ScriptCanvas::GraphIdentifier newIdentifier = GetGraphIdentifier(); - newIdentifier.m_assetId = assetId; + newIdentifier.m_assetId = m_sourceHandle.Id(); ScriptCanvas::GraphIdentifier oldIdentifier = GetGraphIdentifier(); - oldIdentifier.m_assetId = m_previousAssetId; + oldIdentifier.m_assetId = m_previousHandle.Id(); EditorLoggingComponentNotificationBus::Broadcast(&EditorLoggingComponentNotifications::OnAssetSwitched, GetNamedEntityId(), newIdentifier, oldIdentifier); - m_previousAssetId = m_scriptCanvasAssetHolder.GetAssetId(); + m_previousHandle = m_sourceHandle.Describe(); - // Only clear our variables when we are given a new asset id - // or when the asset was explicitly set to empty. - // - // i.e. do not clear variables when we lose the catalog asset. - if ((assetId.IsValid() && assetId != m_removedCatalogId) - || (!assetId.IsValid() && !m_removedCatalogId.IsValid())) + if (changeDescription == SourceChangeDescription::SelectionChanged) { ClearVariables(); } - if (assetId.IsValid()) + if (m_sourceHandle.IsDescriptionValid()) { - AssetTrackerNotificationBus::Handler::BusConnect(assetId); + if (!m_sourceHandle.Get()) + { + if (auto loaded = LoadFromFile(m_sourceHandle.Path().c_str()); loaded.IsSuccess()) + { + m_sourceHandle = SourceHandle(loaded.TakeValue(), m_sourceHandle.Id(), m_sourceHandle.Path().c_str()); + } + } - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetId); - if (memoryAsset && memoryAsset->GetAsset().GetStatus() == AZ::Data::AssetData::AssetStatus::Ready) + if (m_sourceHandle.Get()) { - OnScriptCanvasAssetReady(memoryAsset); + UpdatePropertyDisplay(m_sourceHandle); } } @@ -485,35 +441,66 @@ namespace ScriptCanvasEditor AZ::ScriptSystemRequestBus::Broadcast(&AZ::ScriptSystemRequests::GarbageCollect); } - void EditorScriptCanvasComponent::SetAssetId(const AZ::Data::AssetId& assetId) + void EditorScriptCanvasComponent::SetAssetId(const SourceHandle& assetId) { - if (m_scriptCanvasAssetHolder.GetAssetId() != assetId) + if (m_sourceHandle.Describe() != assetId.Describe()) { // Invalidate the previously removed catalog id if we are setting a new asset id - m_removedCatalogId.SetInvalid(); - SetPrimaryAsset(assetId); + m_removedHandle = {}; + SetPrimaryAsset(assetId.Id()); + } + } + + void EditorScriptCanvasComponent::SourceFileChanged([[maybe_unused]] AZStd::string relativePath + , [[maybe_unused]] AZStd::string scanFolder, [[maybe_unused]] AZ::Uuid fileAssetId) + { + if (fileAssetId == m_sourceHandle.Id()) + { + if (auto handle = CompleteDescription(SourceHandle(nullptr, fileAssetId, {}))) + { + m_sourceHandle = *handle; + // consider queueing on tick bus + OnScriptCanvasAssetChanged(SourceChangeDescription::Modified); + } + } + } + + void EditorScriptCanvasComponent::SourceFileRemoved([[maybe_unused]] AZStd::string relativePath + , [[maybe_unused]] AZStd::string scanFolder, [[maybe_unused]] AZ::Uuid fileAssetId) + { + if (fileAssetId == m_sourceHandle.Id()) + { + m_removedHandle = m_sourceHandle; + OnScriptCanvasAssetChanged(SourceChangeDescription::Removed); + } + } + + void EditorScriptCanvasComponent::SourceFileFailed([[maybe_unused]] AZStd::string relativePath + , [[maybe_unused]] AZStd::string scanFolder, [[maybe_unused]] AZ::Uuid fileAssetId) + { + if (fileAssetId == m_sourceHandle.Id()) + { + m_removedHandle = m_sourceHandle; + OnScriptCanvasAssetChanged(SourceChangeDescription::Error); } } bool EditorScriptCanvasComponent::HasAssetId() const { - return m_scriptCanvasAssetHolder.GetAssetId().IsValid(); + return !m_sourceHandle.Id().IsNull(); } ScriptCanvas::GraphIdentifier EditorScriptCanvasComponent::GetGraphIdentifier() const { // For now we don't want to deal with disambiguating duplicates of the same script running on one entity. // Should that change we need to add the component id back into this. - return ScriptCanvas::GraphIdentifier(m_scriptCanvasAssetHolder.GetAssetId(), 0); + return ScriptCanvas::GraphIdentifier(m_sourceHandle.Id(), 0); } - void EditorScriptCanvasComponent::OnScriptCanvasAssetReady(const ScriptCanvasMemoryAsset::pointer memoryAsset) + void EditorScriptCanvasComponent::UpdatePropertyDisplay(const SourceHandle& sourceHandle) { - if (memoryAsset->GetFileAssetId() == m_scriptCanvasAssetHolder.GetAssetId()) + if (sourceHandle.IsGraphValid()) { - auto assetData = memoryAsset->GetAsset(); - [[maybe_unused]] AZ::Entity* scriptCanvasEntity = assetData->GetScriptCanvasEntity(); - AZ_Assert(scriptCanvasEntity, "This graph must have a valid entity"); BuildGameEntityData(); UpdateName(); AzToolsFramework::ToolsApplicationNotificationBus::Broadcast(&AzToolsFramework::ToolsApplicationEvents::InvalidatePropertyDisplay, AzToolsFramework::Refresh_EntireTree_NewContent); diff --git a/Gems/ScriptCanvas/Code/Editor/Components/EditorUtils.cpp b/Gems/ScriptCanvas/Code/Editor/Components/EditorUtils.cpp index 650be01387..2cd2dda89e 100644 --- a/Gems/ScriptCanvas/Code/Editor/Components/EditorUtils.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Components/EditorUtils.cpp @@ -17,6 +17,7 @@ AZ_POP_DISABLE_WARNING #include #include #include +#include #include #include @@ -30,6 +31,62 @@ AZ_POP_DISABLE_WARNING namespace ScriptCanvasEditor { + AZStd::optional CompleteDescription(const SourceHandle& source) + { + if (source.IsDescriptionValid()) + { + return source; + } + + AzToolsFramework::AssetSystemRequestBus::Events* assetSystem = AzToolsFramework::AssetSystemRequestBus::FindFirstHandler(); + if (assetSystem) + { + AZStd::string watchFolder; + AZ::Data::AssetInfo assetInfo; + + if (!source.Id().IsNull()) + { + if (assetSystem->GetSourceInfoBySourceUUID(source.Id(), assetInfo, watchFolder)) + { + AZ::IO::Path watchPath(watchFolder); + AZ::IO::Path assetInfoPath(assetInfo.m_relativePath); + SourceHandle fullPathHandle(nullptr, assetInfo.m_assetId.m_guid, watchPath / assetInfoPath); + + if (assetSystem->GetSourceInfoBySourcePath(fullPathHandle.Path().c_str(), assetInfo, watchFolder) && assetInfo.m_assetId.IsValid()) + { + AZ_Warning("ScriptCanvas", assetInfo.m_assetId.m_guid == source.Id(), "SourceHandle completion produced conflicting AssetId."); + auto path = fullPathHandle.Path(); + return SourceHandle(source, assetInfo.m_assetId.m_guid, path.MakePreferred()); + } + } + } + + if (!source.Path().empty()) + { + if (assetSystem->GetSourceInfoBySourcePath(source.Path().c_str(), assetInfo, watchFolder) && assetInfo.m_assetId.IsValid()) + { + return SourceHandle(source, assetInfo.m_assetId.m_guid, source.Path()); + } + } + } + + + return AZStd::nullopt; + } + + bool CompleteDescriptionInPlace(SourceHandle& source) + { + if (auto completed = CompleteDescription(source)) + { + source = *completed; + return true; + } + else + { + return false; + } + } + ////////////////////////// // NodeIdentifierFactory ////////////////////////// diff --git a/Gems/ScriptCanvas/Code/Editor/Components/GraphUpgrade.cpp b/Gems/ScriptCanvas/Code/Editor/Components/GraphUpgrade.cpp index 0e5f11fa40..fec813b0c1 100644 --- a/Gems/ScriptCanvas/Code/Editor/Components/GraphUpgrade.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Components/GraphUpgrade.cpp @@ -438,10 +438,11 @@ namespace ScriptCanvasEditor if (nodeConfig.IsValid()) { ScriptCanvas::NodeUpdateSlotReport nodeUpdateSlotReport; + auto nodeEntity = node->GetEntityId(); auto nodeOutcome = graph->ReplaceNodeByConfig(node, nodeConfig, nodeUpdateSlotReport); if (nodeOutcome.IsSuccess()) { - ScriptCanvas::MergeUpdateSlotReport(node->GetEntityId(), sm->m_updateReport, nodeUpdateSlotReport); + ScriptCanvas::MergeUpdateSlotReport(nodeEntity, sm->m_updateReport, nodeUpdateSlotReport); sm->m_allNodes.erase(node); sm->m_outOfDateNodes.erase(node); @@ -675,20 +676,20 @@ namespace ScriptCanvasEditor RegisterState(ParseGraph); } - void EditorGraphUpgradeMachine::SetAsset(const AZ::Data::Asset& asset) + void EditorGraphUpgradeMachine::SetAsset(SourceHandle& asset) { if (m_asset != asset) { m_asset = asset; - SetDebugPrefix(asset.GetHint()); + SetDebugPrefix(asset.Path().c_str()); } } void EditorGraphUpgradeMachine::OnComplete(IState::ExitStatus exitStatus) { UpgradeNotificationsBus::Broadcast(&UpgradeNotifications::OnGraphUpgradeComplete, m_asset, exitStatus == IState::ExitStatus::Skipped); - - m_asset = {}; + // releasing the asset at this stage of the system tick causes a memory crash + // m_asset = {}; } ////////////////////////////////////////////////////////////////////// diff --git a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.h b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.h index 4d1be42d35..8593429b92 100644 --- a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.h +++ b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.h @@ -11,6 +11,7 @@ #include #include #include +#include namespace ScriptCanvas { diff --git a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl index 05541196f7..dabd06b0d1 100644 --- a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl +++ b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -75,7 +74,7 @@ namespace ScriptCanvasEditor AZ_Assert(loadResult.m_runtimeAsset, "failed to load dependent asset"); AZ::Outcome luaAssetOutcome = AZ::Failure(AZStd::string("lua asset creation for function failed")); - ScriptCanvasEditor::EditorAssetConversionBus::BroadcastResult(luaAssetOutcome, &ScriptCanvasEditor::EditorAssetConversionBusTraits::CreateLuaAsset, loadResult.m_editorAsset, loadResult.m_graphPath); + ScriptCanvasEditor::EditorAssetConversionBus::BroadcastResult(luaAssetOutcome, &ScriptCanvasEditor::EditorAssetConversionBusTraits::CreateLuaAsset, loadResult.m_editorAsset, loadResult.m_editorAsset.Path().c_str()); AZ_Assert(luaAssetOutcome.IsSuccess(), "failed to create Lua asset"); AZStd::string modulePath = namespacePath[0].data(); @@ -112,18 +111,19 @@ namespace ScriptCanvasEditor AZ_INLINE LoadTestGraphResult LoadTestGraph(AZStd::string_view graphPath) { - AZ::Data::Asset editorAsset; - ScriptCanvasEditor::EditorAssetConversionBus::BroadcastResult(editorAsset, &ScriptCanvasEditor::EditorAssetConversionBusTraits::LoadAsset, graphPath); - - if (editorAsset.GetData()) + if (auto loadFileOutcome = LoadFromFile(graphPath); loadFileOutcome.IsSuccess()) { - AZ::Outcome< AZ::Data::Asset, AZStd::string> assetOutcome = AZ::Failure(AZStd::string("asset creation failed")); - ScriptCanvasEditor::EditorAssetConversionBus::BroadcastResult(assetOutcome, &ScriptCanvasEditor::EditorAssetConversionBusTraits::CreateRuntimeAsset, editorAsset); + auto& source = loadFileOutcome.GetValue(); + auto testableSource = SourceHandle(source, AZ::Uuid::CreateRandom(), source.Path().c_str()); + + AZ::Outcome, AZStd::string> assetOutcome(AZ::Failure(AZStd::string("asset create failed"))); + ScriptCanvasEditor::EditorAssetConversionBus::BroadcastResult(assetOutcome + , &ScriptCanvasEditor::EditorAssetConversionBusTraits::CreateRuntimeAsset, testableSource); + if (assetOutcome.IsSuccess()) { LoadTestGraphResult result; - result.m_graphPath = graphPath; - result.m_editorAsset = editorAsset; + result.m_editorAsset = AZStd::move(testableSource); result.m_runtimeAsset = assetOutcome.GetValue(); result.m_entity = AZStd::make_unique("Loaded Graph"); return result; @@ -164,8 +164,7 @@ namespace ScriptCanvasEditor reporter.SetExecutionMode(mode); LoadTestGraphResult loadResult; - loadResult.m_graphPath = asset.GetHint().c_str(); - loadResult.m_editorAsset = asset; + loadResult.m_editorAsset = SourceHandle(nullptr, assetId.m_guid, asset.GetHint()); AZ::EntityId scriptCanvasId; loadResult.m_entity = AZStd::make_unique("Loaded test graph"); loadResult.m_runtimeAsset = runtimeAsset; @@ -206,7 +205,8 @@ namespace ScriptCanvasEditor { ScopedOutputSuppression outputSuppressor; AZ::Outcome luaAssetOutcome = AZ::Failure(AZStd::string("lua asset creation failed")); - ScriptCanvasEditor::EditorAssetConversionBus::BroadcastResult(luaAssetOutcome, &ScriptCanvasEditor::EditorAssetConversionBusTraits::CreateLuaAsset, loadResult.m_editorAsset, loadResult.m_graphPath); + ScriptCanvasEditor::EditorAssetConversionBus::BroadcastResult(luaAssetOutcome + , &ScriptCanvasEditor::EditorAssetConversionBusTraits::CreateLuaAsset, loadResult.m_editorAsset, loadResult.m_editorAsset.Path().c_str()); reporter.MarkParseAttemptMade(); if (luaAssetOutcome.IsSuccess()) @@ -220,6 +220,8 @@ namespace ScriptCanvasEditor { RuntimeDataOverrides runtimeDataOverrides; runtimeDataOverrides.m_runtimeAsset = loadResult.m_runtimeAsset; + runtimeDataOverrides.m_runtimeAsset.SetHint("original"); + runtimeDataOverrides.m_runtimeAsset.Get()->m_runtimeData.m_script.SetHint("original"); #if defined(LINUX) ////////////////////////////////////////////////////////////////////////// // Temporarily disable testing on the Linux build until the file name casing discrepancy @@ -265,6 +267,10 @@ namespace ScriptCanvasEditor RuntimeDataOverrides dependencyRuntimeDataOverrides; dependencyRuntimeDataOverrides.m_runtimeAsset = dependency.runtimeAsset; + AZStd::string dependencyHint = AZStd::string::format("dependency_%d", index); + dependencyRuntimeDataOverrides.m_runtimeAsset.SetHint(dependencyHint); + dependencyRuntimeDataOverrides.m_runtimeAsset.Get()->m_runtimeData.m_script.SetHint(dependencyHint); + runtimeDataOverrides.m_dependencies.push_back(dependencyRuntimeDataOverrides); RuntimeData& dependencyData = dependencyDataBuffer[index]; diff --git a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h index a87f4450c2..458852132d 100644 --- a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h +++ b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h @@ -27,6 +27,7 @@ #include #include #include +#include namespace AZ { @@ -45,11 +46,10 @@ namespace ScriptCanvasEditor struct LoadTestGraphResult { - AZStd::string_view m_graphPath; AZStd::unique_ptr m_entity; ScriptCanvas::RuntimeComponent* m_runtimeComponent = nullptr; bool m_nativeFunctionFound = false; - AZ::Data::Asset m_editorAsset; + SourceHandle m_editorAsset; AZ::Data::Asset m_runtimeAsset; AZ::Data::Asset m_scriptAsset; }; @@ -161,7 +161,7 @@ namespace ScriptCanvasEditor struct ScopedOutputSuppression { - ScopedOutputSuppression(bool suppressState = true) + ScopedOutputSuppression([[maybe_unused]] bool suppressState = true) { AZ::Debug::TraceMessageBus::BroadcastResult(m_oldSuppression, &AZ::Debug::TraceMessageEvents::OnOutput, "", ""); TraceSuppressionBus::Broadcast(&TraceSuppressionRequests::SuppressAllOutput, suppressState); diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EBusHandlerEventNodeDescriptorComponent.cpp b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EBusHandlerEventNodeDescriptorComponent.cpp index 29db0c52cc..e1450c0aa8 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EBusHandlerEventNodeDescriptorComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EBusHandlerEventNodeDescriptorComponent.cpp @@ -188,7 +188,7 @@ namespace ScriptCanvasEditor if (scriptCanvasSlot && scriptCanvasSlot->IsVisible()) { - auto graphCanvasSlotId = Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot)); + auto graphCanvasSlotId = Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), 0); GraphCanvas::TranslationKey key; key << "EBusHandler" << eventHandler->GetEBusName() << "methods" << m_eventName; @@ -219,9 +219,10 @@ namespace ScriptCanvasEditor if (scriptCanvasSlot && scriptCanvasSlot->IsVisible()) { - auto graphCanvasSlotId = Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot)); int& index = (scriptCanvasSlot->IsData() && scriptCanvasSlot->IsOutput()) ? paramIndex : outputIndex; + auto graphCanvasSlotId = Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), index); + GraphCanvas::TranslationRequests::Details details; if (scriptCanvasSlot->IsData()) @@ -254,7 +255,7 @@ namespace ScriptCanvasEditor if (scriptCanvasSlot && scriptCanvasSlot->IsVisible()) { - Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot)); + Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), 0); } } diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/FunctionNodeDescriptorComponent.cpp b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/FunctionNodeDescriptorComponent.cpp index db41fa70ca..f80c6dde21 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/FunctionNodeDescriptorComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/FunctionNodeDescriptorComponent.cpp @@ -97,7 +97,8 @@ namespace ScriptCanvasEditor } AZ::Outcome openOutcome = AZ::Failure(AZStd::string()); - GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAsset, assetInfo.m_assetId, -1); + GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAsset + , SourceHandle( nullptr, assetInfo.m_assetId.m_guid, {} ), Tracker::ScriptCanvasFileState::UNMODIFIED, -1); return openOutcome.IsSuccess(); } diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventReceiverEventNodeDescriptorComponent.cpp b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventReceiverEventNodeDescriptorComponent.cpp index 7881a9886b..ab231ae637 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventReceiverEventNodeDescriptorComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventReceiverEventNodeDescriptorComponent.cpp @@ -177,9 +177,11 @@ namespace ScriptCanvasEditor if (scriptCanvasSlot && scriptCanvasSlot->IsVisible()) { - Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot)); + Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), 0); } + int paramIndex = 0; + int outputIndex = 0; // // inputCount and outputCount work because the order of the slots is maintained from the BehaviorContext, if this changes // in the future then we should consider storing the actual offset or key name at that time. @@ -188,10 +190,14 @@ namespace ScriptCanvasEditor { scriptCanvasSlot = eventHandler->GetSlot(slotId); + int& index = (scriptCanvasSlot->IsData() && scriptCanvasSlot->IsInput()) ? paramIndex : outputIndex; + if (scriptCanvasSlot && scriptCanvasSlot->IsVisible()) { - Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot)); + Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), index); } + + ++index; } if (myEvent.m_resultSlotId.IsValid()) @@ -200,7 +206,7 @@ namespace ScriptCanvasEditor if (scriptCanvasSlot && scriptCanvasSlot->IsVisible()) { - Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot)); + Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), 0); } } diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasAssetHandler.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasAssetHandler.h index f29d5aa9cb..a0e00b40fd 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasAssetHandler.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasAssetHandler.h @@ -20,11 +20,6 @@ namespace AZ namespace ScriptCanvasEditor { - AZ::Outcome LoadScriptCanvasDataFromJson - ( ScriptCanvas::ScriptCanvasData& dataTarget - , AZStd::string_view source - , AZ::SerializeContext& serializeContext); - /** * Manages editor Script Canvas graph assets. */ diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasBaseAssetData.cpp b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasBaseAssetData.cpp index 6da134ed6a..efb20e3518 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasBaseAssetData.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasBaseAssetData.cpp @@ -7,17 +7,4 @@ */ #include -#include -namespace ScriptCanvas -{ - Graph* ScriptCanvasData::ModGraph() - { - return AZ::EntityUtils::FindFirstDerivedComponent(m_scriptCanvasEntity.get()); - } - - const Graph* ScriptCanvasData::GetGraph() const - { - return AZ::EntityUtils::FindFirstDerivedComponent(m_scriptCanvasEntity.get()); - } -} diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasBaseAssetData.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasBaseAssetData.h index f4b02b56b6..7597da9081 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasBaseAssetData.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasBaseAssetData.h @@ -13,27 +13,5 @@ namespace ScriptCanvas { - class ScriptCanvasData - { - public: - - AZ_RTTI(ScriptCanvasData, "{1072E894-0C67-4091-8B64-F7DB324AD13C}"); - AZ_CLASS_ALLOCATOR(ScriptCanvasData, AZ::SystemAllocator, 0); - ScriptCanvasData() {} - virtual ~ScriptCanvasData() {} - ScriptCanvasData(ScriptCanvasData&& other); - ScriptCanvasData& operator=(ScriptCanvasData&& other); - - static void Reflect(AZ::ReflectContext* reflectContext); - - AZ::Entity* GetScriptCanvasEntity() const { return m_scriptCanvasEntity.get(); } - - Graph* ModGraph(); - - const Graph* GetGraph() const; - - AZStd::unique_ptr m_scriptCanvasEntity; - private: - ScriptCanvasData(const ScriptCanvasData&) = delete; - }; + } diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasFileHandling.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasFileHandling.h new file mode 100644 index 0000000000..bd3d2b9f0a --- /dev/null +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasFileHandling.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include +#include +#include + +namespace AZ +{ + class SerializeContext; +} + +namespace ScriptCanvas +{ + class ScriptCanvasData; +} + +namespace ScriptCanvasEditor +{ + class EditorAssetTree + { + public: + AZ_CLASS_ALLOCATOR(EditorAssetTree, AZ::SystemAllocator, 0); + + EditorAssetTree* m_parent = nullptr; + AZStd::vector m_dependencies; + SourceHandle m_asset; + + EditorAssetTree* ModRoot(); + + void SetParent(EditorAssetTree& parent); + + AZStd::string ToString(size_t depth = 0) const; + }; + + AZ::Outcome LoadFromFile(AZStd::string_view path); + + AZ::Outcome LoadDataFromJson + ( ScriptCanvas::ScriptCanvasData& dataTarget + , AZStd::string_view source + , AZ::SerializeContext& serializeContext); + + AZ::Outcome LoadEditorAssetTree(SourceHandle handle, EditorAssetTree* parent = nullptr); + + AZ::Outcome SaveToStream(const SourceHandle& source, AZ::IO::GenericStream& stream); +} diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/EditorScriptCanvasBus.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/EditorScriptCanvasBus.h index 7e7b600081..b1fd291a1b 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/EditorScriptCanvasBus.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/EditorScriptCanvasBus.h @@ -26,6 +26,8 @@ #include #include +#include + namespace GraphCanvas { class GraphCanvasTreeItem; @@ -70,7 +72,7 @@ namespace ScriptCanvasEditor static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; using BusIdType = AZ::EntityId; - virtual void SetAssetId(const AZ::Data::AssetId& assetId) = 0; + virtual void SetAssetId(const SourceHandle& assetId) = 0; virtual bool HasAssetId() const = 0; }; @@ -89,40 +91,13 @@ namespace ScriptCanvasEditor }; using EditorContextMenuRequestBus = AZ::EBus; - - class EditorScriptCanvasAssetNotifications : public AZ::EBusTraits - { - public: - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; - using BusIdType = AZ::Data::AssetId; - - //! Notification which fires after an EditorGraph has received it's on AssetReady callback - //! \param scriptCanvasAsset Script Canvas asset which is now ready for use in the Editor - virtual void OnScriptCanvasAssetReady(const AZ::Data::Asset& /*scriptCanvasAsset*/) {}; - - //! Notification which fires after an EditorGraph has received it's on AssetReloaded callback - //! \param scriptCanvasAsset Script Canvas asset which is now ready for use in the Editor - virtual void OnScriptCanvasAssetReloaded(const AZ::Data::Asset& /*scriptCanvaAsset */) {}; - - //! Notification which fires after an EditorGraph has received it's on AssetReady callback - //! \param AssetId AssetId of unloaded ScriptCanvas - virtual void OnScriptCanvasAssetUnloaded(const AZ::Data::AssetId& /*assetId*/) {}; - - //! Notification which fires after an EditorGraph has received an onAssetSaved callback - //! \param scriptCanvasAsset Script Canvas asset which was attempted to be saved - //! \param isSuccessful specified where the Script Canvas asset was successfully saved - virtual void OnScriptCanvasAssetSaved(const AZ::Data::AssetId) {}; - }; - using EditorScriptCanvasAssetNotificationBus = AZ::EBus; - + class EditorGraphRequests : public AZ::EBusTraits { public: static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; using BusIdType = ScriptCanvas::ScriptCanvasId; - virtual void SetAssetId(const AZ::Data::AssetId& assetId) = 0; - virtual void CreateGraphCanvasScene() = 0; virtual void ClearGraphCanvasScene() = 0; virtual GraphCanvas::GraphId GetGraphCanvasGraphId() const = 0; @@ -225,7 +200,7 @@ namespace ScriptCanvasEditor virtual void OnUpgradeStart() {} virtual void OnUpgradeCancelled() {} - virtual void OnGraphUpgradeComplete(AZ::Data::Asset&, bool skipped = false) { (void)skipped; } + virtual void OnGraphUpgradeComplete(SourceHandle&, bool skipped = false) { (void)skipped; } }; using UpgradeNotificationsBus = AZ::EBus; diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/RequestBus.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/RequestBus.h index 8fa7beab2b..5ec0ee1636 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/RequestBus.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/RequestBus.h @@ -8,18 +8,16 @@ #pragma once -#include -#include -#include #include -#include +#include +#include +#include #include - +#include #include - -#include #include - +#include +#include #include class QLineEdit; @@ -49,6 +47,17 @@ namespace ScriptCanvasEditor struct CategoryInformation; struct NodePaletteModelInformation; + namespace Tracker + { + enum class ScriptCanvasFileState : AZ::s32 + { + NEW, + MODIFIED, + UNMODIFIED, + SOURCE_REMOVED, + INVALID = -1 + }; + } namespace Widget { @@ -70,16 +79,16 @@ namespace ScriptCanvasEditor //! Opens an existing graph and returns the tab index in which it was open in. //! \param File AssetId //! \return index of open tab if the asset was able to be open successfully or error message of why the open failed - virtual AZ::Outcome OpenScriptCanvasAsset(AZ::Data::AssetId scriptCanvasAssetId, int tabIndex = -1) = 0; - virtual AZ::Outcome OpenScriptCanvasAssetId(const AZ::Data::AssetId& scriptCanvasAsset) = 0; + virtual AZ::Outcome OpenScriptCanvasAsset(SourceHandle scriptCanvasAssetId, Tracker::ScriptCanvasFileState fileState, int tabIndex = -1) = 0; + virtual AZ::Outcome OpenScriptCanvasAssetId(const SourceHandle& scriptCanvasAsset, Tracker::ScriptCanvasFileState fileState) = 0; - virtual int CloseScriptCanvasAsset(const AZ::Data::AssetId&) = 0; + virtual int CloseScriptCanvasAsset(const SourceHandle&) = 0; virtual bool CreateScriptCanvasAssetFor(const TypeDefs::EntityComponentId& requestingComponent) = 0; - virtual bool IsScriptCanvasAssetOpen(const AZ::Data::AssetId& assetId) const = 0; + virtual bool IsScriptCanvasAssetOpen(const SourceHandle& assetId) const = 0; - virtual void OnChangeActiveGraphTab(AZ::Data::AssetId) {} + virtual void OnChangeActiveGraphTab(SourceHandle) {} virtual void CreateNewRuntimeAsset() = 0; @@ -103,12 +112,12 @@ namespace ScriptCanvasEditor return ScriptCanvas::ScriptCanvasId(); } - virtual GraphCanvas::GraphId FindGraphCanvasGraphIdByAssetId([[maybe_unused]] const AZ::Data::AssetId& assetId) const + virtual GraphCanvas::GraphId FindGraphCanvasGraphIdByAssetId([[maybe_unused]] const SourceHandle& assetId) const { return GraphCanvas::GraphId(); } - virtual ScriptCanvas::ScriptCanvasId FindScriptCanvasIdByAssetId([[maybe_unused]] const AZ::Data::AssetId& assetId) const + virtual ScriptCanvas::ScriptCanvasId FindScriptCanvasIdByAssetId([[maybe_unused]] const SourceHandle& assetId) const { return ScriptCanvas::ScriptCanvasId(); } @@ -126,7 +135,7 @@ namespace ScriptCanvasEditor virtual void DisconnectEndpoints(const AZ::EntityId& /*sceneId*/, const AZStd::vector& /*endpoints*/) {} virtual void PostUndoPoint(ScriptCanvas::ScriptCanvasId) = 0; - virtual void SignalSceneDirty(AZ::Data::AssetId) = 0; + virtual void SignalSceneDirty(SourceHandle) = 0; // Increment the value of the ignore undo point tracker virtual void PushPreventUndoStateUpdate() = 0; @@ -165,7 +174,7 @@ namespace ScriptCanvasEditor public: static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple; static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; - using BusIdType = AZ::Data::AssetId; + using BusIdType = SourceHandle; virtual void OnAssetVisualized() {}; virtual void OnAssetUnloaded() {}; diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h index 9913fa838b..9157aaeac9 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h @@ -34,6 +34,7 @@ #include #include +#include namespace ScriptCanvas { @@ -101,6 +102,8 @@ namespace ScriptCanvasEditor public: AZ_COMPONENT(Graph, "{4D755CA9-AB92-462C-B24F-0B3376F19967}", ScriptCanvas::Graph); + static ScriptCanvas::DataPtr Create(); + static void Reflect(AZ::ReflectContext* context); Graph(const ScriptCanvas::ScriptCanvasId& scriptCanvasId = AZ::Entity::MakeId()) @@ -138,10 +141,6 @@ namespace ScriptCanvasEditor void ReleaseVariableCounter(AZ::u32 variableCounter) override; //// - // RuntimeBus - AZ::Data::AssetId GetAssetId() const override { return m_assetId; } - //// - // GraphCanvas::GraphModelRequestBus void RequestUndoPoint() override; @@ -221,9 +220,6 @@ namespace ScriptCanvasEditor void OnGraphCanvasNodeCreated(const AZ::EntityId& nodeId) override; /////////////////////////// - // EditorGraphRequestBus - void SetAssetId(const AZ::Data::AssetId& assetId) override { m_assetId = assetId; } - void CreateGraphCanvasScene() override; void ClearGraphCanvasScene() override; void DisplayGraphCanvasScene() override; @@ -235,7 +231,7 @@ namespace ScriptCanvasEditor IfOutOfDate, Forced }; - bool UpgradeGraph(const AZ::Data::Asset& asset, UpgradeRequest request, bool isVerbose = true); + bool UpgradeGraph(SourceHandle& asset, UpgradeRequest request, bool isVerbose = true); void ConnectGraphCanvasBuses(); void DisconnectGraphCanvasBuses(); /////// @@ -302,12 +298,13 @@ namespace ScriptCanvasEditor void OnUndoRedoEnd() override; //// - void SetAssetType(AZ::Data::AssetType); - void ReportError(const ScriptCanvas::Node& node, const AZStd::string& errorSource, const AZStd::string& errorMessage) override; const GraphStatisticsHelper& GetNodeUsageStatistics() const; + void MarkOwnership(ScriptCanvas::ScriptCanvasData& owner); + ScriptCanvas::DataPtr GetOwnership() const; + // Finds and returns all nodes within the graph that are of the specified type template AZStd::vector GetNodesOfType() const @@ -384,12 +381,15 @@ namespace ScriptCanvasEditor GraphCanvas::NodeFocusCyclingHelper m_focusHelper; GraphStatisticsHelper m_statisticsHelper; + UndoHelper m_undoHelper; bool m_ignoreSaveRequests; //! Defaults to true to signal that this graph does not have the GraphCanvas stuff intermingled bool m_saveFormatConverted = true; - AZ::Data::AssetId m_assetId; + ScriptCanvasEditor::SourceHandle m_assetId; + // temporary step in cleaning up the graph / asset class structure. This reference is deliberately weak. + ScriptCanvas::ScriptCanvasData* m_owner; }; } diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponent.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponent.h index 5dbe718eca..52cf49070b 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponent.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponent.h @@ -17,6 +17,7 @@ #include #include #include +#include namespace ScriptCanvasEditor { @@ -34,9 +35,9 @@ namespace ScriptCanvasEditor : public AzToolsFramework::Components::EditorComponentBase , private EditorContextMenuRequestBus::Handler , private AzFramework::AssetCatalogEventBus::Handler + , private AzToolsFramework::AssetSystemBus::Handler , private EditorScriptCanvasComponentLoggingBus::Handler , private EditorScriptCanvasComponentRequestBus::Handler - , private AssetTrackerNotificationBus::Handler , private AzToolsFramework::EditorEntityContextNotificationBus::Handler { @@ -44,9 +45,12 @@ namespace ScriptCanvasEditor AZ_COMPONENT(EditorScriptCanvasComponent, "{C28E2D29-0746-451D-A639-7F113ECF5D72}", AzToolsFramework::Components::EditorComponentBase); EditorScriptCanvasComponent(); - EditorScriptCanvasComponent(AZ::Data::Asset asset); + EditorScriptCanvasComponent(const SourceHandle& sourceHandle); ~EditorScriptCanvasComponent() override; + // sets the soure but does not attempt to load anything; + void InitializeSource(const SourceHandle& sourceHandle); + //===================================================================== // AZ::Component void Init() override; @@ -66,17 +70,16 @@ namespace ScriptCanvasEditor ScriptCanvas::GraphIdentifier GetGraphIdentifier() const override; //===================================================================== - void OpenEditor(); - void CloseGraph(); - - void SetName(const AZStd::string& name) { m_name = name; } + void OpenEditor(const AZ::Data::AssetId&, const AZ::Data::AssetType&); + + void SetName(AZStd::string_view name) { m_name = name; } const AZStd::string& GetName() const; AZ::EntityId GetEditorEntityId() const { return GetEntity() ? GetEntityId() : AZ::EntityId(); } AZ::NamedEntityId GetNamedEditorEntityId() const { return GetEntity() ? GetNamedEntityId() : AZ::NamedEntityId(); } //===================================================================== // EditorScriptCanvasComponentRequestBus - void SetAssetId(const AZ::Data::AssetId& assetId) override; + void SetAssetId(const SourceHandle& assetId) override; bool HasAssetId() const override; //===================================================================== @@ -84,14 +87,8 @@ namespace ScriptCanvasEditor // EditorContextMenuRequestBus AZ::Data::AssetId GetAssetId() const override; //===================================================================== - AZ::EntityId GetGraphEntityId() const; - - //===================================================================== - // AssetTrackerNotificationBus - void OnAssetReady(const ScriptCanvasMemoryAsset::pointer asset) override; - void OnAssetSaved(const ScriptCanvasMemoryAsset::pointer asset, bool isSuccessful) override; - void OnAssetReloaded(const ScriptCanvasMemoryAsset::pointer asset) override; - //===================================================================== + + //===================================================================== @@ -101,6 +98,14 @@ namespace ScriptCanvasEditor void OnStopPlayInEditor() override; protected: + enum class SourceChangeDescription : AZ::u8 + { + Error, + Modified, + Removed, + SelectionChanged, + }; + static void Reflect(AZ::ReflectContext* context); static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) @@ -118,25 +123,31 @@ namespace ScriptCanvasEditor (void)incompatible; } - void OnCatalogAssetAdded(const AZ::Data::AssetId& assetId) override; - void OnCatalogAssetRemoved(const AZ::Data::AssetId& assetId, const AZ::Data::AssetInfo& assetInfo) override; - void OnScriptCanvasAssetChanged(AZ::Data::AssetId assetId); + // complete the id, load call OnScriptCanvasAssetChanged + void SourceFileChanged(AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid fileAssetId) override; + // update the display icon for failure, save the values in the graph + void SourceFileRemoved(AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid fileAssetId) override; + void SourceFileFailed(AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid fileAssetId) override; + + AZ::u32 OnFileSelectionChanged(); + + void OnScriptCanvasAssetChanged(SourceChangeDescription changeDescription); void UpdateName(); //===================================================================== - void OnScriptCanvasAssetReady(const ScriptCanvasMemoryAsset::pointer asset); + void UpdatePropertyDisplay(const SourceHandle& sourceHandle); //===================================================================== void BuildGameEntityData(); void ClearVariables(); private: - AZ::Data::AssetId m_removedCatalogId; - AZ::Data::AssetId m_previousAssetId; AZStd::string m_name; - ScriptCanvasAssetHolder m_scriptCanvasAssetHolder; bool m_runtimeDataIsValid = false; ScriptCanvasBuilder::BuildVariableOverrides m_variableOverrides; + SourceHandle m_sourceHandle; + SourceHandle m_previousHandle; + SourceHandle m_removedHandle; }; } diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponentSerializer.cpp b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponentSerializer.cpp new file mode 100644 index 0000000000..dfda030403 --- /dev/null +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponentSerializer.cpp @@ -0,0 +1,55 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include + +namespace AZ +{ + AZ_CLASS_ALLOCATOR_IMPL(EditorScriptCanvasComponentSerializer, SystemAllocator, 0); + + JsonSerializationResult::Result EditorScriptCanvasComponentSerializer::Load + ( void* outputValue + , const Uuid& outputValueTypeId + , const rapidjson::Value& inputValue + , JsonDeserializerContext& context) + { + namespace JSR = JsonSerializationResult; + + AZ_Assert(outputValueTypeId == azrtti_typeid() + , "EditorScriptCanvasComponentSerializer Load against output typeID that was not EditorScriptCanvasComponent"); + AZ_Assert(outputValue, "EditorScriptCanvasComponentSerializer Load against null output"); + + auto outputComponent = reinterpret_cast(outputValue); + JsonSerializationResult::ResultCode result = BaseJsonSerializer::Load(outputValue, outputValueTypeId, inputValue, context); + + if (result.GetProcessing() != JSR::Processing::Halted) + { + auto assetHolderMember = inputValue.FindMember("m_assetHolder"); + if (assetHolderMember != inputValue.MemberEnd()) + { + ScriptCanvasEditor::ScriptCanvasAssetHolder assetHolder; + result.Combine + ( ContinueLoading(&assetHolder + , azrtti_typeid(), assetHolderMember->value, context)); + + if (result.GetProcessing() != JSR::Processing::Halted) + { + outputComponent->InitializeSource + ( ScriptCanvasEditor::SourceHandle(nullptr, assetHolder.GetAssetId().m_guid, assetHolder.GetAssetHint())); + } + } + } + + return context.Report(result, result.GetProcessing() != JSR::Processing::Halted + ? "EditorScriptCanvasComponentSerializer Load finished loading EditorScriptCanvasComponent" + : "EditorScriptCanvasComponentSerializer Load failed to load EditorScriptCanvasComponent"); + } +} diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponentSerializer.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponentSerializer.h new file mode 100644 index 0000000000..68ad370997 --- /dev/null +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponentSerializer.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include +#include + +namespace AZ +{ + class EditorScriptCanvasComponentSerializer + : public BaseJsonSerializer + { + public: + AZ_RTTI(EditorScriptCanvasComponentSerializer, "{80B497B3-ABC1-4991-A3C4-047A8CB2C26C}", BaseJsonSerializer); + AZ_CLASS_ALLOCATOR_DECL; + + private: + JsonSerializationResult::Result Load + ( void* outputValue + , const Uuid& outputValueTypeId + , const rapidjson::Value& inputValue + , JsonDeserializerContext& context) override; + }; +} diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorUtils.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorUtils.h index 15100cbf4e..a4522198b7 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorUtils.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorUtils.h @@ -21,6 +21,13 @@ namespace GraphCanvas namespace ScriptCanvasEditor { + // If only the Path or the Id is valid, attempts to fill in the missing piece. + // If both Path and Id is valid, including after correction, returns the handle including source Data, + // otherwise, returns null + AZStd::optional CompleteDescription(const SourceHandle& source); + // if CompleteDescription() succeeds, sets the handle to the result, else does nothing + bool CompleteDescriptionInPlace(SourceHandle& source); + class Graph; class NodePaletteModel; diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/GraphUpgrade.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/GraphUpgrade.h index 817b883695..0e6e69c4bf 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/GraphUpgrade.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/GraphUpgrade.h @@ -184,9 +184,9 @@ namespace ScriptCanvasEditor bool m_graphNeedsDirtying = false; Graph* m_graph = nullptr; - AZ::Data::Asset m_asset; + SourceHandle m_asset; - void SetAsset(const AZ::Data::Asset& asset); + void SetAsset(SourceHandle& assetasset); void OnComplete(IState::ExitStatus exitStatus) override; diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp index 26caa5fc2f..8e273fd2fc 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp @@ -110,12 +110,17 @@ namespace ScriptCanvasEditor::Nodes GraphCanvas::TranslationRequests::Details details; GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); + int paramIndex = 0; + int outputIndex = 0; + // Create the GraphCanvas slots for (const auto& slot : node->GetSlots()) { GraphCanvas::TranslationKey slotKey; slotKey << "ScriptCanvas::Node" << azrtti_typeid(node).ToString() << "slots"; + int& index = (slot.IsData() && slot.IsInput()) ? paramIndex : outputIndex; + if (slot.IsVisible()) { AZStd::string slotKeyStr; @@ -150,11 +155,13 @@ namespace ScriptCanvasEditor::Nodes slotDetails.m_tooltip = slot.GetToolTip(); } - AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasEntity->GetId(), slot); + AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasEntity->GetId(), slot, index); GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetName, slotDetails.m_name); GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTooltip, slotDetails.m_tooltip); } + + ++index; } const auto& visualExtensions = node->GetVisualExtensions(); @@ -328,6 +335,7 @@ namespace ScriptCanvasEditor::Nodes // Set the class' name as the subtitle fallback details.m_subtitle = details.m_name; + AZStd::string methodContext; // Get the method's text data GraphCanvas::TranslationRequests::Details methodDetails; methodDetails.m_name = details.m_name; // fallback @@ -338,14 +346,16 @@ namespace ScriptCanvasEditor::Nodes if (methodNode->GetMethodType() == ScriptCanvas::MethodType::Getter || methodNode->GetMethodType() == ScriptCanvas::MethodType::Free) { updatedMethodName = "Get"; + methodContext = "Getter"; } else { updatedMethodName = "Set"; + methodContext = "Setter"; } updatedMethodName.append(methodName); } - key << updatedMethodName; + key << methodContext << updatedMethodName; GraphCanvas::TranslationRequestBus::BroadcastResult(methodDetails, &GraphCanvas::TranslationRequests::GetDetails, key + ".details", methodDetails); @@ -372,21 +382,23 @@ namespace ScriptCanvasEditor::Nodes { GraphCanvas::TranslationKey slotKey = key; + int& index = (slot.IsData() && slot.IsInput()) ? paramIndex : outputIndex; + if (slot.IsVisible()) { - AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot); + AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot, index); details.m_name = slot.GetName(); details.m_tooltip = slot.GetToolTip(); if (methodNode->HasBusID() && busId == slot.GetId() && slot.GetDescriptor() == ScriptCanvas::SlotDescriptors::DataIn()) { - key = Translation::GlobalKeys::EBusSenderIDKey; + key = ::Translation::GlobalKeys::EBusSenderIDKey; GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key + ".details", details); } else { - int& index = (slot.IsData() && slot.IsInput()) ? paramIndex : outputIndex; + if (slot.IsData()) { @@ -416,6 +428,8 @@ namespace ScriptCanvasEditor::Nodes UpdateSlotDatumLabel(graphCanvasNodeId, slot.GetId(), details.m_name); } + + ++index; } // Set the name @@ -471,6 +485,9 @@ namespace ScriptCanvasEditor::Nodes AZStd::vector< ScriptCanvas::SlotId > scriptCanvasSlots = busNode->GetNonEventSlotIds(); + int paramIndex = 0; + int outputIndex = 0; + for (const auto& slotId : scriptCanvasSlots) { ScriptCanvas::Slot* slot = busNode->GetSlot(slotId); @@ -484,12 +501,14 @@ namespace ScriptCanvasEditor::Nodes if (slot->IsVisible()) { + int& index = (slot->IsData() && slot->IsInput()) ? paramIndex : outputIndex; + AZ::EntityId gcSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, (*slot), group); if (busNode->IsIDRequired() && slot->GetDescriptor() == ScriptCanvas::SlotDescriptors::DataIn()) { GraphCanvas::TranslationKey key; - key << Translation::GlobalKeys::EBusHandlerIDKey << "details"; + key << ::Translation::GlobalKeys::EBusHandlerIDKey << "details"; GraphCanvas::TranslationRequests::Details details; details.m_name = slot->GetName(); details.m_tooltip = slot->GetToolTip(); @@ -497,6 +516,8 @@ namespace ScriptCanvasEditor::Nodes GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetDetails, details.m_name, details.m_tooltip); } + + ++index; } } @@ -594,12 +615,17 @@ namespace ScriptCanvasEditor::Nodes *graphCanvasUserData = azEventNode->GetEntityId(); } + int paramIndex = 0; + int outputIndex = 0; + for (const ScriptCanvas::Slot& slot: azEventNode->GetSlots()) { GraphCanvas::SlotGroup group = GraphCanvas::SlotGroups::Invalid; if (slot.IsVisible()) { + int& index = (slot.IsData() && slot.IsInput()) ? paramIndex : outputIndex; + AZ::EntityId gcSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot, group); GraphCanvas::TranslationKey key; @@ -610,6 +636,8 @@ namespace ScriptCanvasEditor::Nodes GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetName, details.m_name); GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetTooltip, details.m_tooltip);; + + ++index; } } @@ -675,6 +703,9 @@ namespace ScriptCanvasEditor::Nodes AZStd::vector< ScriptCanvas::SlotId > scriptCanvasSlots = busNode->GetNonEventSlotIds(); + int paramIndex = 0; + int outputIndex = 0; + for (const auto& slotId : scriptCanvasSlots) { ScriptCanvas::Slot* slot = busNode->GetSlot(slotId); @@ -688,16 +719,20 @@ namespace ScriptCanvasEditor::Nodes if (slot->IsVisible()) { + int& index = (slot->IsData() && slot->IsInput()) ? paramIndex : outputIndex; + AZ::EntityId gcSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, (*slot), group); if (busNode->IsIDRequired() && slot->GetDescriptor() == ScriptCanvas::SlotDescriptors::DataIn()) { GraphCanvas::TranslationKey key; - key << Translation::GlobalKeys::EBusHandlerIDKey << "details"; + key << ::Translation::GlobalKeys::EBusHandlerIDKey << "details"; GraphCanvas::TranslationRequests::Details details; GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetDetails, details.m_name, details.m_tooltip); } + + ++index; } } @@ -783,17 +818,24 @@ namespace ScriptCanvasEditor::Nodes return graphCanvasNodeId; } + int paramIndex = 0; + int outputIndex = 0; + for (const auto& slot : senderNode->GetSlots()) { + int& index = (slot.IsData() && slot.IsInput()) ? paramIndex : outputIndex; + if (slot.IsVisible()) { - AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot); + AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot, index); GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetName, slot.GetName()); GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTooltip, slot.GetToolTip()); UpdateSlotDatumLabel(graphCanvasNodeId, slot.GetId(), slot.GetName()); } + + ++index; } // Set the name @@ -871,14 +913,21 @@ namespace ScriptCanvasEditor::Nodes return graphCanvasNodeId; } + int paramIndex = 0; + int outputIndex = 0; + for (const auto& slot : functionNode->GetSlots()) { - AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot); + int& index = (slot.IsData() && slot.IsInput()) ? paramIndex : outputIndex; + + AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot, index); GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetName, slot.GetName()); GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTooltip, slot.GetToolTip()); UpdateSlotDatumLabel(graphCanvasNodeId, slot.GetId(), slot.GetName()); + + ++index; } if (asset) @@ -1141,7 +1190,7 @@ namespace ScriptCanvasEditor::Nodes return graphCanvasConnectionType; } - AZ::EntityId DisplayScriptCanvasSlot(AZ::EntityId graphCanvasNodeId, const ScriptCanvas::Slot& slot, GraphCanvas::SlotGroup slotGroup) + AZ::EntityId DisplayScriptCanvasSlot(AZ::EntityId graphCanvasNodeId, const ScriptCanvas::Slot& slot, int slotIndex, GraphCanvas::SlotGroup slotGroup) { if (!slot.IsVisible()) { @@ -1244,6 +1293,7 @@ namespace ScriptCanvasEditor::Nodes } slotKeyStr.append(slot.GetName()); + slotKeyStr.append(AZStd::string::format("_%d", slotIndex)); slotKey << slotKeyStr << "details"; GraphCanvas::TranslationRequests::Details slotDetails; diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.h b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.h index 6d0b125b7a..8dbc5cd2c7 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.h +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.h @@ -63,5 +63,5 @@ namespace ScriptCanvasEditor::Nodes // SlotGroup will control how elements are grouped. // Invalid will cause the slots to put themselves into whatever category they belong to by default. - AZ::EntityId DisplayScriptCanvasSlot(AZ::EntityId graphCanvasNodeId, const ScriptCanvas::Slot& slot, GraphCanvas::SlotGroup group = GraphCanvas::SlotGroups::Invalid); + AZ::EntityId DisplayScriptCanvasSlot(AZ::EntityId graphCanvasNodeId, const ScriptCanvas::Slot& slot, int slotIndex, GraphCanvas::SlotGroup group = GraphCanvas::SlotGroups::Invalid); } diff --git a/Gems/ScriptCanvas/Code/Editor/QtMetaTypes.h b/Gems/ScriptCanvas/Code/Editor/QtMetaTypes.h index 9058e27b03..5e413f0266 100644 --- a/Gems/ScriptCanvas/Code/Editor/QtMetaTypes.h +++ b/Gems/ScriptCanvas/Code/Editor/QtMetaTypes.h @@ -11,11 +11,13 @@ AZ_PUSH_DISABLE_WARNING(4251 4800 4244, "-Wunknown-warning-option") #include AZ_POP_DISABLE_WARNING +#include #include #include - // VariableId is a UUID typedef for now. So we don't want to double reflect the UUID. Q_DECLARE_METATYPE(AZ::Uuid); Q_DECLARE_METATYPE(AZ::Data::AssetId); Q_DECLARE_METATYPE(ScriptCanvas::Data::Type); Q_DECLARE_METATYPE(ScriptCanvas::VariableId); +Q_DECLARE_METATYPE(ScriptCanvasEditor::SourceHandle); + diff --git a/Gems/ScriptCanvas/Code/Editor/ReflectComponent.cpp b/Gems/ScriptCanvas/Code/Editor/ReflectComponent.cpp index a75671d0f8..7f2a170a4d 100644 --- a/Gems/ScriptCanvas/Code/Editor/ReflectComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/ReflectComponent.cpp @@ -31,6 +31,7 @@ namespace ScriptCanvasEditor { void ReflectComponent::Reflect(AZ::ReflectContext* context) { + SourceHandle::Reflect(context); ScriptCanvas::ScriptCanvasData::Reflect(context); ScriptCanvasAssetHolder::Reflect(context); EditorSettings::EditorWorkspace::Reflect(context); diff --git a/Gems/ScriptCanvas/Code/Editor/Settings.cpp b/Gems/ScriptCanvas/Code/Editor/Settings.cpp index 8d24a30aab..84744f77e3 100644 --- a/Gems/ScriptCanvas/Code/Editor/Settings.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Settings.cpp @@ -92,13 +92,11 @@ namespace ScriptCanvasEditor // WorkspaceAssetSaveData EditorWorkspace::WorkspaceAssetSaveData::WorkspaceAssetSaveData() - : m_assetType(azrtti_typeid()) { } - EditorWorkspace::WorkspaceAssetSaveData::WorkspaceAssetSaveData(const AZ::Data::AssetId& assetId) + EditorWorkspace::WorkspaceAssetSaveData::WorkspaceAssetSaveData(SourceHandle assetId) : m_assetId(assetId) - , m_assetType(azrtti_typeid()) { } @@ -108,7 +106,7 @@ namespace ScriptCanvasEditor { AZStd::vector assetSaveData; AZStd::vector assetIds; - auto subElement = rootDataElementNode.FindSubElement(AZ_CRC("ActiveAssetIds", 0xe445268a)); + auto subElement = rootDataElementNode.FindSubElement(AZ_CRC_CE("ActiveAssetIds")); if (subElement) { @@ -117,15 +115,21 @@ namespace ScriptCanvasEditor assetSaveData.reserve(assetIds.size()); for (const AZ::Data::AssetId& assetId : assetIds) { - assetSaveData.emplace_back(assetId); + assetSaveData.emplace_back(SourceHandle( nullptr, assetId.m_guid, "" )); } } } - rootDataElementNode.RemoveElementByName(AZ_CRC("ActiveAssetIds", 0xe445268a)); + rootDataElementNode.RemoveElementByName(AZ_CRC_CE("ActiveAssetIds")); rootDataElementNode.AddElementWithData(context, "ActiveAssetData", assetSaveData); } + if (rootDataElementNode.GetVersion() < 4) + { + rootDataElementNode.RemoveElementByName(AZ_CRC_CE("ActiveAssetIds")); + rootDataElementNode.RemoveElementByName(AZ_CRC_CE("FocusedAssetId")); + } + return true; } @@ -135,13 +139,12 @@ namespace ScriptCanvasEditor if (serialize) { serialize->Class() - ->Version(1) + ->Version(2) ->Field("AssetId", &WorkspaceAssetSaveData::m_assetId) - ->Field("AssetType", &WorkspaceAssetSaveData::m_assetType) ; serialize->Class() - ->Version(3, &EditorWorkspace::VersionConverter) + ->Version(4, &EditorWorkspace::VersionConverter) ->Field("m_storedWindowState", &EditorWorkspace::m_storedWindowState) ->Field("m_windowGeometry", &EditorWorkspace::m_windowGeometry) ->Field("FocusedAssetId", &EditorWorkspace::m_focusedAssetId) @@ -150,13 +153,13 @@ namespace ScriptCanvasEditor } } - void EditorWorkspace::ConfigureActiveAssets(AZ::Data::AssetId focussedAssetId, const AZStd::vector< WorkspaceAssetSaveData >& activeAssetData) + void EditorWorkspace::ConfigureActiveAssets(SourceHandle focussedAssetId, const AZStd::vector< WorkspaceAssetSaveData >& activeAssetData) { m_focusedAssetId = focussedAssetId; m_activeAssetData = activeAssetData; } - AZ::Data::AssetId EditorWorkspace::GetFocusedAssetId() const + SourceHandle EditorWorkspace::GetFocusedAssetId() const { return m_focusedAssetId; } diff --git a/Gems/ScriptCanvas/Code/Editor/Settings.h b/Gems/ScriptCanvas/Code/Editor/Settings.h index dee55f8272..27039d8a70 100644 --- a/Gems/ScriptCanvas/Code/Editor/Settings.h +++ b/Gems/ScriptCanvas/Code/Editor/Settings.h @@ -11,6 +11,7 @@ #include #include #include +#include // qdatastream.h(173): warning C4251: 'QDataStream::d': class 'QScopedPointer>' needs to have dll-interface to be used by clients of class 'QDataStream' // qwidget.h(858): warning C4800: 'uint': forcing value to bool 'true' or 'false' (performance warning) @@ -53,11 +54,10 @@ namespace ScriptCanvasEditor AZ_RTTI(WorkspaceAssetSaveData, "{927368CA-096F-4CF1-B2E0-1B9E4A93EA57}"); WorkspaceAssetSaveData(); - WorkspaceAssetSaveData(const AZ::Data::AssetId& assetId); + WorkspaceAssetSaveData(SourceHandle assetId); virtual ~WorkspaceAssetSaveData() = default; - AZ::Data::AssetId m_assetId; - AZ::Data::AssetType m_assetType; + SourceHandle m_assetId; }; @@ -69,9 +69,9 @@ namespace ScriptCanvasEditor EditorWorkspace() = default; - void ConfigureActiveAssets(AZ::Data::AssetId focusedAssetId, const AZStd::vector< WorkspaceAssetSaveData >& activeAssetIds); + void ConfigureActiveAssets(SourceHandle focusedAsset, const AZStd::vector< WorkspaceAssetSaveData >& activeAssetIds); - AZ::Data::AssetId GetFocusedAssetId() const; + SourceHandle GetFocusedAssetId() const; AZStd::vector< WorkspaceAssetSaveData > GetActiveAssetData() const; void Init(const QByteArray& windowState, const QByteArray& windowGeometry); @@ -79,7 +79,7 @@ namespace ScriptCanvasEditor void Clear() { - m_focusedAssetId.SetInvalid(); + m_focusedAssetId.Clear(); m_activeAssetData.clear(); } @@ -91,7 +91,7 @@ namespace ScriptCanvasEditor AZStd::vector m_windowGeometry; AZStd::vector m_windowState; - AZ::Data::AssetId m_focusedAssetId; + SourceHandle m_focusedAssetId; AZStd::vector< WorkspaceAssetSaveData > m_activeAssetData; }; diff --git a/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp b/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp index f901915fdb..0be2d564ee 100644 --- a/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -119,6 +120,10 @@ namespace ScriptCanvasEditor PopulateEditorCreatableTypes(); AzToolsFramework::RegisterGenericComboBoxHandler(); + if (AzToolsFramework::PropertyTypeRegistrationMessages::Bus::FindFirstHandler()) + { + AzToolsFramework::PropertyTypeRegistrationMessages::Bus::Broadcast(&AzToolsFramework::PropertyTypeRegistrationMessages::RegisterPropertyType, aznew SourceHandlePropertyHandler()); + } SystemRequestBus::Handler::BusConnect(); ScriptCanvasExecutionBus::Handler::BusConnect(); @@ -173,13 +178,11 @@ namespace ScriptCanvasEditor outCreatableTypes.insert(m_creatableTypes.begin(), m_creatableTypes.end()); } - void SystemComponent::CreateEditorComponentsOnEntity(AZ::Entity* entity, const AZ::Data::AssetType& assetType) + void SystemComponent::CreateEditorComponentsOnEntity(AZ::Entity* entity, [[maybe_unused]] const AZ::Data::AssetType& assetType) { if (entity) { auto graph = entity->CreateComponent(); - graph->SetAssetType(assetType); - entity->CreateComponent(graph->GetScriptCanvasId()); } } @@ -248,23 +251,25 @@ namespace ScriptCanvasEditor { continue; } - + entityMenu->setEnabled(true); - + usedIds.insert(assetId); - + AZStd::string rootPath; AZ::Data::AssetInfo assetInfo = AssetHelpers::GetAssetInfo(assetId, rootPath); - + AZStd::string displayName; AZ::StringFunc::Path::GetFileName(assetInfo.m_relativePath.c_str(), displayName); - + action = entityMenu->addAction(QString("%1").arg(QString(displayName.c_str()))); - + QObject::connect(action, &QAction::triggered, [assetId] { AzToolsFramework::OpenViewPane(LyViewPane::ScriptCanvas); - GeneralRequestBus::Broadcast(&GeneralRequests::OpenScriptCanvasAsset, assetId, -1); + GeneralRequestBus::Broadcast(&GeneralRequests::OpenScriptCanvasAsset + , SourceHandle(nullptr, assetId.m_guid, "") + , Tracker::ScriptCanvasFileState::UNMODIFIED, -1); }); } } @@ -301,7 +306,10 @@ namespace ScriptCanvasEditor return AzToolsFramework::AssetBrowser::SourceFileDetails(); } - void SystemComponent::AddSourceFileOpeners(const char* fullSourceFileName, [[maybe_unused]] const AZ::Uuid& sourceUUID, AzToolsFramework::AssetBrowser::SourceFileOpenerList& openers) + void SystemComponent::AddSourceFileOpeners + ( [[maybe_unused]] const char* fullSourceFileName + , [[maybe_unused]] const AZ::Uuid& sourceUUID + , [[maybe_unused]] AzToolsFramework::AssetBrowser::SourceFileOpenerList& openers) { using namespace AzToolsFramework; using namespace AzToolsFramework::AssetBrowser; @@ -322,14 +330,16 @@ namespace ScriptCanvasEditor if (fullDetails) { AzToolsFramework::OpenViewPane(LyViewPane::ScriptCanvas); - + AzToolsFramework::EditorRequests::Bus::Broadcast(&AzToolsFramework::EditorRequests::OpenViewPane, "Script Canvas"); - GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAsset, sourceUUIDInCall, -1); + GeneralRequestBus::BroadcastResult(openOutcome + , &GeneralRequests::OpenScriptCanvasAsset + , SourceHandle(nullptr, sourceUUIDInCall, ""), Tracker::ScriptCanvasFileState::UNMODIFIED, -1); } }; - + openers.push_back({ "O3DE_ScriptCanvasEditor", "Open In Script Canvas Editor...", QIcon(), scriptCanvasEditorCallback }); - } + } } void SystemComponent::OnUserSettingsActivated() diff --git a/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasGraphCommand.cpp b/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasGraphCommand.cpp index 4e3e0c85ad..944a5e667d 100644 --- a/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasGraphCommand.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasGraphCommand.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #include @@ -19,7 +20,6 @@ #include #include -#include namespace ScriptCanvasEditor { @@ -36,7 +36,7 @@ namespace ScriptCanvasEditor { } - void GraphItemCommand::Capture(ScriptCanvasMemoryAsset&, bool) + void GraphItemCommand::Capture(Graph*, bool) { } @@ -105,10 +105,10 @@ namespace ScriptCanvasEditor RestoreItem(m_redoState); } - void GraphItemChangeCommand::Capture(ScriptCanvasMemoryAsset& memoryAsset, bool captureUndo) + void GraphItemChangeCommand::Capture(Graph* graph, bool captureUndo) { - m_scriptCanvasId = memoryAsset.GetScriptCanvasId(); - m_graphCanvasGraphId = memoryAsset.GetGraphId(); + m_scriptCanvasId = graph->GetScriptCanvasId(); + m_graphCanvasGraphId = graph->GetGraphCanvasGraphId(); UndoCache* undoCache = nullptr; UndoRequestBus::EventResult(undoCache, m_scriptCanvasId, &UndoRequests::GetSceneUndoCache); @@ -204,9 +204,9 @@ namespace ScriptCanvasEditor RestoreItem(m_redoState); } - void GraphItemAddCommand::Capture(ScriptCanvasMemoryAsset& memoryAsset, bool) + void GraphItemAddCommand::Capture(Graph* graph, bool) { - GraphItemChangeCommand::Capture(memoryAsset, false); + GraphItemChangeCommand::Capture(graph, false); } //// Graph Item Removal Command @@ -225,8 +225,8 @@ namespace ScriptCanvasEditor RestoreItem(m_redoState); } - void GraphItemRemovalCommand::Capture(ScriptCanvasMemoryAsset& memoryAsset, bool) + void GraphItemRemovalCommand::Capture(Graph* graph, bool) { - GraphItemChangeCommand::Capture(memoryAsset, true); + GraphItemChangeCommand::Capture(graph, true); } } diff --git a/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasGraphCommand.h b/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasGraphCommand.h index e0f5adde7e..b9435d0702 100644 --- a/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasGraphCommand.h +++ b/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasGraphCommand.h @@ -46,7 +46,7 @@ namespace ScriptCanvasEditor void Undo() override; void Redo() override; - virtual void Capture(ScriptCanvasMemoryAsset& memoryAsset, bool captureUndo); + virtual void Capture(Graph* graph, bool captureUndo); bool Changed() const override; @@ -76,7 +76,7 @@ namespace ScriptCanvasEditor void Undo() override; void Redo() override; - void Capture(ScriptCanvasMemoryAsset& memoryAsset, bool captureUndo) override; + void Capture(Graph* graph, bool captureUndo) override; void RestoreItem(const AZStd::vector& restoreBuffer) override; @@ -103,7 +103,7 @@ namespace ScriptCanvasEditor void Undo() override; void Redo() override; - void Capture(ScriptCanvasMemoryAsset& memoryAsset, bool captureUndo) override; + void Capture(Graph* graph, bool captureUndo) override; protected: GraphItemAddCommand(const GraphItemAddCommand&) = delete; @@ -124,7 +124,7 @@ namespace ScriptCanvasEditor void Undo() override; void Redo() override; - void Capture(ScriptCanvasMemoryAsset& memoryAsset, bool captureUndo) override; + void Capture(Graph* graph, bool captureUndo) override; protected: GraphItemRemovalCommand(const GraphItemRemovalCommand&) = delete; diff --git a/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasUndoManager.cpp b/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasUndoManager.cpp index 4d24720227..5a01507352 100644 --- a/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasUndoManager.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasUndoManager.cpp @@ -28,9 +28,9 @@ namespace ScriptCanvasEditor // SceneUndoState SceneUndoState::SceneUndoState(AzToolsFramework::UndoSystem::IUndoNotify* undoNotify) - : m_undoStack(AZStd::make_unique(c_undoLimit, undoNotify)) - , m_undoCache(AZStd::make_unique()) { + m_undoStack = AZStd::make_unique(c_undoLimit, undoNotify); + m_undoCache = AZStd::make_unique(); } void SceneUndoState::BeginUndoBatch(AZStd::string_view label) diff --git a/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasUndoManager.h b/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasUndoManager.h index 52d7b1de3e..1d207e9408 100644 --- a/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasUndoManager.h +++ b/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasUndoManager.h @@ -61,6 +61,7 @@ namespace ScriptCanvasEditor public: AZ_CLASS_ALLOCATOR(SceneUndoState, AZ::SystemAllocator, 0); + SceneUndoState() = default; SceneUndoState(AzToolsFramework::UndoSystem::IUndoNotify* undoNotify); ~SceneUndoState(); diff --git a/Gems/ScriptCanvas/Code/Editor/Utilities/RecentAssetPath.cpp b/Gems/ScriptCanvas/Code/Editor/Utilities/RecentAssetPath.cpp index 06bbd29250..5d415f5fd9 100644 --- a/Gems/ScriptCanvas/Code/Editor/Utilities/RecentAssetPath.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Utilities/RecentAssetPath.cpp @@ -15,7 +15,7 @@ namespace ScriptCanvasEditor { - AZ::Data::AssetId ReadRecentAssetId() + SourceHandle ReadRecentAssetId() { QSettings settings(QSettings::IniFormat, QSettings::UserScope, SCRIPTCANVASEDITOR_AZ_QCOREAPPLICATION_SETTINGS_ORGANIZATION_NAME); @@ -26,20 +26,15 @@ namespace ScriptCanvasEditor recentOpenFileLocation = settings.value(SCRIPTCANVASEDITOR_SETTINGS_RECENT_OPEN_FILE_LOCATION_KEY).toString(); settings.endGroup(); - if (recentOpenFileLocation.isEmpty()) - { - return {}; - } - AZ::Data::AssetId assetId(recentOpenFileLocation.toUtf8().constData()); - return assetId; + return { nullptr, {}, recentOpenFileLocation.toUtf8().constData() }; } - void SetRecentAssetId(const AZ::Data::AssetId& assetId) + void SetRecentAssetId(SourceHandle assetId) { QSettings settings(QSettings::IniFormat, QSettings::UserScope, SCRIPTCANVASEDITOR_AZ_QCOREAPPLICATION_SETTINGS_ORGANIZATION_NAME); - AZStd::string guidStr = assetId.m_guid.ToString(); + AZStd::string guidStr = assetId.Id().ToString(); settings.beginGroup(SCRIPTCANVASEDITOR_NAME_SHORT); settings.setValue(SCRIPTCANVASEDITOR_SETTINGS_RECENT_OPEN_FILE_LOCATION_KEY, diff --git a/Gems/ScriptCanvas/Code/Editor/Utilities/RecentAssetPath.h b/Gems/ScriptCanvas/Code/Editor/Utilities/RecentAssetPath.h index 0aa4332ca4..aaef02ca58 100644 --- a/Gems/ScriptCanvas/Code/Editor/Utilities/RecentAssetPath.h +++ b/Gems/ScriptCanvas/Code/Editor/Utilities/RecentAssetPath.h @@ -8,10 +8,11 @@ #pragma once #include +#include namespace ScriptCanvasEditor { - AZ::Data::AssetId ReadRecentAssetId(); - void SetRecentAssetId(const AZ::Data::AssetId& assetId); + SourceHandle ReadRecentAssetId(); + void SetRecentAssetId(SourceHandle assetId); void ClearRecentAssetId(); } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/AssetGraphSceneDataBus.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/AssetGraphSceneDataBus.h index cbb8ef12d6..6d2c3280ac 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/AssetGraphSceneDataBus.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/AssetGraphSceneDataBus.h @@ -11,14 +11,16 @@ #include #include #include +#include namespace ScriptCanvasEditor { + // #sc-editor-asset remove this class AssetGraphScene : public AZ::EBusTraits { public: - virtual AZ::EntityId FindEditorNodeIdByAssetNodeId(const AZ::Data::AssetId& assetId, AZ::EntityId assetNodeId) const = 0; - virtual AZ::EntityId FindAssetNodeIdByEditorNodeId(const AZ::Data::AssetId& assetId, AZ::EntityId editorNodeId) const = 0; + virtual AZ::EntityId FindEditorNodeIdByAssetNodeId(const SourceHandle& assetId, AZ::EntityId assetNodeId) const = 0; + virtual AZ::EntityId FindAssetNodeIdByEditorNodeId(const SourceHandle& assetId, AZ::EntityId editorNodeId) const = 0; }; using AssetGraphSceneBus = AZ::EBus; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.cpp index dfa39b0047..69fe4053fe 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.cpp @@ -36,7 +36,7 @@ namespace ScriptCanvasEditor { namespace Widget { - CanvasWidget::CanvasWidget(const AZ::Data::AssetId& assetId, QWidget* parent) + CanvasWidget::CanvasWidget(const ScriptCanvasEditor::SourceHandle& assetId, QWidget* parent) : QWidget(parent) , ui(new Ui::CanvasWidget()) , m_attached(false) @@ -69,25 +69,15 @@ namespace ScriptCanvasEditor void CanvasWidget::ShowScene(const ScriptCanvas::ScriptCanvasId& scriptCanvasId) { EditorGraphRequests* editorGraphRequests = EditorGraphRequestBus::FindFirstHandler(scriptCanvasId); - - editorGraphRequests->SetAssetId(m_assetId); editorGraphRequests->CreateGraphCanvasScene(); - AZ::EntityId graphCanvasSceneId = editorGraphRequests->GetGraphCanvasGraphId(); - m_graphicsView->SetScene(graphCanvasSceneId); - m_scriptCanvasId = scriptCanvasId; } - void CanvasWidget::SetAssetId(const AZ::Data::AssetId& assetId) + void CanvasWidget::SetAssetId(const ScriptCanvasEditor::SourceHandle& assetId) { m_assetId = assetId; - - if (EditorGraphRequests* editorGraphRequests = EditorGraphRequestBus::FindFirstHandler(m_scriptCanvasId)) - { - editorGraphRequests->SetAssetId(m_assetId); - } } const GraphCanvas::ViewId& CanvasWidget::GetViewId() const diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.h index 9abb41aacc..fc04486c36 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.h @@ -21,6 +21,7 @@ AZ_POP_DISABLE_WARNING #include #include +#include #endif class QVBoxLayout; @@ -46,13 +47,13 @@ namespace ScriptCanvasEditor Q_OBJECT public: AZ_CLASS_ALLOCATOR(CanvasWidget, AZ::SystemAllocator, 0); - CanvasWidget(const AZ::Data::AssetId& assetId, QWidget* parent = nullptr); + CanvasWidget(const ScriptCanvasEditor::SourceHandle& assetId, QWidget* parent = nullptr); ~CanvasWidget() override; void SetDefaultBorderColor(AZ::Color defaultBorderColor); void ShowScene(const ScriptCanvas::ScriptCanvasId& scriptCanvasId); - void SetAssetId(const AZ::Data::AssetId& assetId); + void SetAssetId(const ScriptCanvasEditor::SourceHandle& assetId); const GraphCanvas::ViewId& GetViewId() const; @@ -69,7 +70,7 @@ namespace ScriptCanvasEditor void SetupGraphicsView(); - AZ::Data::AssetId m_assetId; + ScriptCanvasEditor::SourceHandle m_assetId; AZStd::unique_ptr ui; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/GraphTabBar.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/GraphTabBar.cpp index f2963287c6..4e9398fdcf 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/GraphTabBar.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/GraphTabBar.cpp @@ -23,6 +23,8 @@ #include +#include + namespace ScriptCanvasEditor { namespace Widget @@ -31,7 +33,7 @@ namespace ScriptCanvasEditor // GraphTabBar //////////////// - GraphTabBar::GraphTabBar(QWidget* parent /*= nullptr*/) + GraphTabBar::GraphTabBar(QWidget* parent) : AzQtComponents::TabBar(parent) { setTabsClosable(true); @@ -44,49 +46,128 @@ namespace ScriptCanvasEditor connect(this, &QTabBar::customContextMenuRequested, this, &GraphTabBar::OnContextMenu); } - void GraphTabBar::AddGraphTab(const AZ::Data::AssetId& assetId) + void GraphTabBar::AddGraphTab(ScriptCanvasEditor::SourceHandle assetId, Tracker::ScriptCanvasFileState fileState) { - InsertGraphTab(count(), assetId); + InsertGraphTab(count(), assetId, fileState); } - int GraphTabBar::InsertGraphTab(int tabIndex, const AZ::Data::AssetId& assetId) + void GraphTabBar::ClearTabView(int tabIndex) { - if (!SelectTab(assetId)) + if (tabIndex < count()) { - AZStd::shared_ptr memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetId); + if (QVariant tabDataVariant = tabData(tabIndex); tabDataVariant.isValid()) + { + GraphTabMetadata replacement = tabDataVariant.value(); + if (replacement.m_canvasWidget) + { + delete replacement.m_canvasWidget; + replacement.m_canvasWidget = nullptr; + tabDataVariant.setValue(replacement); + setTabData(tabIndex, tabDataVariant); + } + } + } + } - if (memoryAsset) + CanvasWidget* GraphTabBar::ModOrCreateTabView(int tabIndex) + { + if (tabIndex < count()) + { + if (QVariant tabDataVariant = tabData(tabIndex); tabDataVariant.isValid()) { - ScriptCanvas::AssetDescription assetDescription = memoryAsset->GetAsset().Get()->GetAssetDescription(); + if (!tabDataVariant.value().m_canvasWidget) + { + CanvasWidget* canvasWidget = new CanvasWidget(tabDataVariant.value().m_assetId, this); + canvasWidget->SetDefaultBorderColor(ScriptCanvasAssetDescription().GetDisplayColorImpl()); + GraphTabMetadata replacement = tabDataVariant.value(); + replacement.m_canvasWidget = canvasWidget; + tabDataVariant.setValue(replacement); + setTabData(tabIndex, tabDataVariant); + } - QIcon tabIcon = QIcon(assetDescription.GetIconPathImpl()); - int newTabIndex = qobject_cast(parent())->insertTab(tabIndex, new QWidget(), tabIcon, ""); + return tabDataVariant.value().m_canvasWidget; + } + } - CanvasWidget* canvasWidget = memoryAsset->CreateView(this); + return nullptr; + } - canvasWidget->SetDefaultBorderColor(assetDescription.GetDisplayColorImpl()); + CanvasWidget* GraphTabBar::ModTabView(int tabIndex) + { + if (tabIndex < count()) + { + if (QVariant tabDataVariant = tabData(tabIndex); tabDataVariant.isValid()) + { + return tabDataVariant.value().m_canvasWidget; + } + } - AZStd::string tabName; - AzFramework::StringFunc::Path::GetFileName(memoryAsset->GetAbsolutePath().c_str(), tabName); + return nullptr; + } - ConfigureTab(newTabIndex, assetId, tabName); + AZStd::optional GraphTabBar::GetTabData(int tabIndex) const + { + if (tabIndex < count()) + { + if (QVariant tabDataVariant = tabData(tabIndex); tabDataVariant.isValid()) + { + return tabDataVariant.value(); + } + } - // new graphs will need to use their in-memory assetid which we'll need to update - // upon saving the asset - if (!memoryAsset->GetFileAssetId().IsValid()) - { - setTabData(newTabIndex, QVariant::fromValue(memoryAsset->GetId())); - } + return AZStd::nullopt; + } - return newTabIndex; - } + AZStd::optional GraphTabBar::GetTabData(ScriptCanvasEditor::SourceHandle assetId) const + { + return GetTabData(FindTab(assetId)); + } + + void GraphTabBar::SetTabData(const GraphTabMetadata& metadata, int tabIndex) + { + if (tabIndex < count()) + { + setTabData(tabIndex, QVariant::fromValue(metadata)); + } + } + + void GraphTabBar::SetTabData(const GraphTabMetadata& metadata, ScriptCanvasEditor::SourceHandle assetId) + { + auto index = FindTab(assetId); + auto replacement = GetTabData(assetId); + + if (index >= 0 && replacement) + { + replacement->m_assetId = assetId; + SetTabData(metadata, index); + } + } + + int GraphTabBar::InsertGraphTab(int tabIndex, ScriptCanvasEditor::SourceHandle assetId, Tracker::ScriptCanvasFileState fileState) + { + if (!SelectTab(assetId)) + { + QIcon tabIcon = QIcon(ScriptCanvasAssetDescription().GetIconPathImpl()); + tabIndex = qobject_cast(parent())->insertTab(tabIndex, new QWidget(), tabIcon, ""); + GraphTabMetadata metaData; + CanvasWidget* canvasWidget = new CanvasWidget(assetId, this); + canvasWidget->SetDefaultBorderColor(ScriptCanvasAssetDescription().GetDisplayColorImpl()); + metaData.m_canvasWidget = canvasWidget; + metaData.m_assetId = assetId; + metaData.m_fileState = fileState; + + AZStd::string tabName; + AzFramework::StringFunc::Path::GetFileName(assetId.Path().c_str(), tabName); + + SetTabText(tabIndex, tabName.c_str(), fileState); + setTabData(tabIndex, QVariant::fromValue(metaData)); + return tabIndex; } return -1; } - bool GraphTabBar::SelectTab(const AZ::Data::AssetId& assetId) + bool GraphTabBar::SelectTab(ScriptCanvasEditor::SourceHandle assetId) { int tabIndex = FindTab(assetId); if (-1 != tabIndex) @@ -94,74 +175,119 @@ namespace ScriptCanvasEditor setCurrentIndex(tabIndex); return true; } + return false; } - void GraphTabBar::ConfigureTab(int tabIndex, AZ::Data::AssetId fileAssetId, const AZStd::string& tabName) + int GraphTabBar::FindTab(ScriptCanvasEditor::SourceHandle assetId) const { - if (fileAssetId.IsValid()) + for (int tabIndex = 0; tabIndex < count(); ++tabIndex) { QVariant tabDataVariant = tabData(tabIndex); - if (tabDataVariant.isValid()) { - auto tabAssetId = tabDataVariant.value(); - MemoryAssetNotificationBus::MultiHandler::BusDisconnect(tabAssetId); + auto tabAssetId = tabDataVariant.value(); + if (tabAssetId.m_assetId.AnyEquals(assetId)) + { + return tabIndex; + } } - - setTabData(tabIndex, QVariant::fromValue(fileAssetId)); - - MemoryAssetNotificationBus::MultiHandler::BusConnect(fileAssetId); } - Tracker::ScriptCanvasFileState fileState = Tracker::ScriptCanvasFileState::INVALID; - AssetTrackerRequestBus::BroadcastResult(fileState, &AssetTrackerRequests::GetFileState, fileAssetId); + return -1; + } - SetTabText(tabIndex, tabName.c_str(), fileState); + int GraphTabBar::FindTab(ScriptCanvasEditor::GraphPtrConst graph) const + { + for (int tabIndex = 0; tabIndex < count(); ++tabIndex) + { + QVariant tabDataVariant = tabData(tabIndex); + if (tabDataVariant.isValid()) + { + auto tabAssetId = tabDataVariant.value(); + if (tabAssetId.m_assetId.Get() == graph) + { + return tabIndex; + } + } + } + + return -1; } - int GraphTabBar::FindTab(const AZ::Data::AssetId& assetId) const + int GraphTabBar::FindSaveOverMatch(ScriptCanvasEditor::SourceHandle assetId) const { for (int tabIndex = 0; tabIndex < count(); ++tabIndex) { QVariant tabDataVariant = tabData(tabIndex); if (tabDataVariant.isValid()) { - auto tabAssetId = tabDataVariant.value(); - if (tabAssetId == assetId) + auto tabAssetId = tabDataVariant.value(); + if (tabAssetId.m_assetId.Get() != assetId.Get() && tabAssetId.m_assetId.PathEquals(assetId)) { return tabIndex; } } } + return -1; } - AZ::Data::AssetId GraphTabBar::FindAssetId(int tabIndex) + ScriptCanvasEditor::SourceHandle GraphTabBar::FindTabByPath(AZStd::string_view path) const + { + ScriptCanvasEditor::SourceHandle candidate(nullptr, {}, path); + + for (int index = 0; index < count(); ++index) + { + QVariant tabdata = tabData(index); + if (tabdata.isValid()) + { + auto tabAssetId = tabdata.value(); + if (tabAssetId.m_assetId.AnyEquals(candidate)) + { + return tabAssetId.m_assetId; + } + } + } + + return {}; + } + + ScriptCanvasEditor::SourceHandle GraphTabBar::FindAssetId(int tabIndex) { QVariant dataVariant = tabData(tabIndex); if (dataVariant.isValid()) { - auto tabAssetId = dataVariant.value(); - return tabAssetId; + auto tabAssetId = dataVariant.value(); + return tabAssetId.m_assetId; } - return AZ::Data::AssetId(); + return ScriptCanvasEditor::SourceHandle(); } - void GraphTabBar::CloseTab(int index) + ScriptCanvas::ScriptCanvasId GraphTabBar::FindScriptCanvasIdFromGraphCanvasId(const GraphCanvas::GraphId& graphCanvasGraphId) const { - if (index >= 0 && index < count()) + for (int index = 0; index < count(); ++index) { QVariant tabdata = tabData(index); if (tabdata.isValid()) { - auto tabAssetId = tabdata.value(); - - MemoryAssetNotificationBus::MultiHandler::BusDisconnect(tabAssetId); - AssetTrackerRequestBus::Broadcast(&AssetTrackerRequests::ClearView, tabAssetId); + auto tabAssetId = tabdata.value(); + if (tabAssetId.m_assetId.IsGraphValid() + && tabAssetId.m_assetId.Get()->GetGraphCanvasGraphId() == graphCanvasGraphId) + { + return tabAssetId.m_assetId.Get()->GetScriptCanvasId(); + } } + } + + return ScriptCanvas::ScriptCanvasId{}; + } + void GraphTabBar::CloseTab(int index) + { + if (index >= 0 && index < count()) + { qobject_cast(parent())->removeTab(index); } } @@ -172,8 +298,6 @@ namespace ScriptCanvasEditor { Q_EMIT TabCloseNoButton(i); } - - MemoryAssetNotificationBus::MultiHandler::BusDisconnect(); } void GraphTabBar::OnContextMenu(const QPoint& point) @@ -187,11 +311,9 @@ namespace ScriptCanvasEditor QVariant tabdata = tabData(tabIndex); if (tabdata.isValid()) { - auto tabAssetId = tabdata.value(); - - Tracker::ScriptCanvasFileState fileState; - AssetTrackerRequestBus::BroadcastResult(fileState , &AssetTrackerRequests::GetFileState, tabAssetId); + auto tabAssetId = tabdata.value(); + Tracker::ScriptCanvasFileState fileState = Tracker::ScriptCanvasFileState::INVALID; isModified = fileState == Tracker::ScriptCanvasFileState::NEW || fileState == Tracker::ScriptCanvasFileState::MODIFIED; } @@ -263,23 +385,14 @@ namespace ScriptCanvasEditor AzQtComponents::TabBar::mouseReleaseEvent(event); } - void GraphTabBar::OnFileStateChanged(Tracker::ScriptCanvasFileState fileState) + void GraphTabBar::SetTabText(int tabIndex, const QString& path, Tracker::ScriptCanvasFileState fileState) { - const AZ::Data::AssetId* fileAssetId = MemoryAssetNotificationBus::GetCurrentBusId(); - - if (fileAssetId) + QString safePath = path; + if (path.endsWith("^") || path.endsWith("*")) { - SetFileState((*fileAssetId), fileState); - - if (FindTab((*fileAssetId)) == currentIndex()) - { - Q_EMIT OnActiveFileStateChanged(); - } + safePath.chop(1); } - } - void GraphTabBar::SetTabText(int tabIndex, const QString& path, Tracker::ScriptCanvasFileState fileState) - { if (tabIndex >= 0 && tabIndex < count()) { const char* fileStateTag = ""; @@ -296,7 +409,7 @@ namespace ScriptCanvasEditor break; } - setTabText(tabIndex, QString("%1%2").arg(path).arg(fileStateTag)); + setTabText(tabIndex, QString("%1%2").arg(safePath).arg(fileStateTag)); } } @@ -314,6 +427,23 @@ namespace ScriptCanvasEditor Q_EMIT TabRemoved(index); } + void GraphTabBar::UpdateFileState(const ScriptCanvasEditor::SourceHandle& assetId, Tracker::ScriptCanvasFileState fileState) + { + auto tabData = GetTabData(assetId); + if (tabData && tabData->m_fileState != fileState) + { + int index = FindTab(assetId); + tabData->m_fileState = fileState; + SetTabData(*tabData, assetId); + SetTabText(index, tabText(index), fileState); + + if (index == currentIndex()) + { + Q_EMIT OnActiveFileStateChanged(); + } + } + } + void GraphTabBar::currentChangedTab(int index) { if (index < 0) @@ -327,7 +457,7 @@ namespace ScriptCanvasEditor return; } - auto assetId = tabdata.value(); + auto assetId = tabdata.value().m_assetId; ScriptCanvasEditor::GeneralRequestBus::Broadcast(&ScriptCanvasEditor::GeneralRequests::OnChangeActiveGraphTab, assetId); @@ -338,24 +468,6 @@ namespace ScriptCanvasEditor } } - void GraphTabBar::SetFileState(AZ::Data::AssetId assetId, Tracker::ScriptCanvasFileState fileState) - { - int index = FindTab(assetId); - - if (index >= 0 && index < count()) - { - QVariant tabdata = tabData(index); - if (tabdata.isValid()) - { - auto tabAssetId = tabdata.value(); - - AZStd::string tabName; - AssetTrackerRequestBus::BroadcastResult(tabName, &AssetTrackerRequests::GetTabName, tabAssetId); - SetTabText(index, tabName.c_str(), fileState); - } - } - } - #include } } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/GraphTabBar.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/GraphTabBar.h index 47a5cb8651..939fb7c8f4 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/GraphTabBar.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/GraphTabBar.h @@ -16,7 +16,10 @@ #include #include +#include #include +#include + #endif class QGraphicsView; @@ -26,17 +29,18 @@ namespace ScriptCanvasEditor { namespace Widget { + class CanvasWidget; + struct GraphTabMetadata { - AZ::Data::AssetId m_assetId; + SourceHandle m_assetId; QWidget* m_hostWidget = nullptr; - QString m_tabName; + CanvasWidget* m_canvasWidget = nullptr; Tracker::ScriptCanvasFileState m_fileState = Tracker::ScriptCanvasFileState::INVALID; }; class GraphTabBar : public AzQtComponents::TabBar - , public MemoryAssetNotificationBus::MultiHandler { Q_OBJECT @@ -45,30 +49,39 @@ namespace ScriptCanvasEditor GraphTabBar(QWidget* parent = nullptr); ~GraphTabBar() override = default; - void AddGraphTab(const AZ::Data::AssetId& assetId); - int InsertGraphTab(int tabIndex, const AZ::Data::AssetId& assetId); - bool SelectTab(const AZ::Data::AssetId& assetId); - - void ConfigureTab(int tabIndex, AZ::Data::AssetId fileAssetId, const AZStd::string& tabName); - - int FindTab(const AZ::Data::AssetId& assetId) const; - AZ::Data::AssetId FindAssetId(int tabIndex); + AZStd::optional GetTabData(int index) const; + AZStd::optional GetTabData(ScriptCanvasEditor::SourceHandle assetId) const; + void SetTabData(const GraphTabMetadata& data, int index); + void SetTabData(const GraphTabMetadata& data, ScriptCanvasEditor::SourceHandle assetId); + void AddGraphTab(ScriptCanvasEditor::SourceHandle assetId, Tracker::ScriptCanvasFileState fileState); void CloseTab(int index); void CloseAllTabs(); + int InsertGraphTab(int tabIndex, ScriptCanvasEditor::SourceHandle assetId, Tracker::ScriptCanvasFileState fileState); + bool SelectTab(ScriptCanvasEditor::SourceHandle assetId); + + int FindTab(ScriptCanvasEditor::SourceHandle assetId) const; + int FindTab(ScriptCanvasEditor::GraphPtrConst graph) const; + int FindSaveOverMatch(ScriptCanvasEditor::SourceHandle assetId) const; + ScriptCanvasEditor::SourceHandle FindTabByPath(AZStd::string_view path) const; + ScriptCanvasEditor::SourceHandle FindAssetId(int tabIndex); + ScriptCanvas::ScriptCanvasId FindScriptCanvasIdFromGraphCanvasId(const GraphCanvas::GraphId& graphCanvasGraphId) const; + + void ClearTabView(int tabIndex); + CanvasWidget* ModOrCreateTabView(int tabIndex); + CanvasWidget* ModTabView(int tabIndex); + void OnContextMenu(const QPoint& point); void mouseReleaseEvent(QMouseEvent* event) override; - // MemoryAssetNotifications - void OnFileStateChanged(Tracker::ScriptCanvasFileState fileState) override; - //// - // Updates the tab at the supplied index with the GraphTabMetadata // The host widget field of the tabMetadata is not used and will not overwrite the tab data void SetTabText(int tabIndex, const QString& path, Tracker::ScriptCanvasFileState fileState = Tracker::ScriptCanvasFileState::INVALID); + void UpdateFileState(const ScriptCanvasEditor::SourceHandle& assetId, Tracker::ScriptCanvasFileState fileState); + Q_SIGNALS: void TabInserted(int index); void TabRemoved(int index); @@ -92,8 +105,6 @@ namespace ScriptCanvasEditor // Called when the selected tab changes void currentChangedTab(int index); - void SetFileState(AZ::Data::AssetId assetId, Tracker::ScriptCanvasFileState fileState); - int m_signalSaveOnChangeTo = -1; }; } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowSession.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowSession.cpp index 5fadb0a81e..963be52edc 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowSession.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowSession.cpp @@ -256,7 +256,8 @@ namespace ScriptCanvasEditor const AZ::Data::AssetId& assetId = executionItem->GetAssetId(); - GeneralRequestBus::Broadcast(&GeneralRequests::OpenScriptCanvasAssetId, assetId); + GeneralRequestBus::Broadcast(&GeneralRequests::OpenScriptCanvasAssetId + , SourceHandle(nullptr, assetId.m_guid, {}), Tracker::ScriptCanvasFileState::UNMODIFIED); } } } @@ -270,12 +271,14 @@ namespace ScriptCanvasEditor const AZ::Data::AssetId& assetId = executionItem->GetAssetId(); bool isAssetOpen = false; - GeneralRequestBus::BroadcastResult(isAssetOpen, &GeneralRequests::IsScriptCanvasAssetOpen, assetId); + GeneralRequestBus::BroadcastResult(isAssetOpen, &GeneralRequests::IsScriptCanvasAssetOpen, SourceHandle(nullptr, assetId.m_guid, {})); - GeneralRequestBus::Broadcast(&GeneralRequests::OpenScriptCanvasAssetId, assetId); + GeneralRequestBus::Broadcast(&GeneralRequests::OpenScriptCanvasAssetId + , SourceHandle(nullptr, assetId.m_guid, {}), Tracker::ScriptCanvasFileState::UNMODIFIED); AZ::EntityId graphCanvasGraphId; - GeneralRequestBus::BroadcastResult(graphCanvasGraphId, &GeneralRequests::FindGraphCanvasGraphIdByAssetId, assetId); + GeneralRequestBus::BroadcastResult(graphCanvasGraphId, &GeneralRequests::FindGraphCanvasGraphIdByAssetId + , SourceHandle(nullptr, assetId.m_guid, {})); if (isAssetOpen) { @@ -348,7 +351,7 @@ namespace ScriptCanvasEditor GeneralRequestBus::BroadcastResult(activeGraphCanvasGraphId, &GeneralRequests::GetActiveGraphCanvasGraphId); AZ::EntityId graphCanvasGraphId; - GeneralRequestBus::BroadcastResult(graphCanvasGraphId, &GeneralRequests::FindGraphCanvasGraphIdByAssetId, m_assetId); + GeneralRequestBus::BroadcastResult(graphCanvasGraphId, &GeneralRequests::FindGraphCanvasGraphIdByAssetId, SourceHandle(nullptr, m_assetId.m_guid, {})); if (activeGraphCanvasGraphId == graphCanvasGraphId) { @@ -366,7 +369,7 @@ namespace ScriptCanvasEditor GraphCanvas::FocusConfig focusConfig; AZ::EntityId scriptCanvasNodeId; - AssetGraphSceneBus::BroadcastResult(scriptCanvasNodeId, &AssetGraphScene::FindEditorNodeIdByAssetNodeId, assetId, assetNodeId); + AssetGraphSceneBus::BroadcastResult(scriptCanvasNodeId, &AssetGraphScene::FindEditorNodeIdByAssetNodeId, SourceHandle(nullptr, assetId.m_guid, {}), assetNodeId); GraphCanvas::NodeId graphCanvasNodeId; SceneMemberMappingRequestBus::EventResult(graphCanvasNodeId, scriptCanvasNodeId, &SceneMemberMappingRequests::GetGraphCanvasEntityId); @@ -403,12 +406,12 @@ namespace ScriptCanvasEditor void LoggingWindowSession::HighlightElement(const AZ::Data::AssetId& assetId, const AZ::EntityId& assetNodeId) { AZ::EntityId graphCanvasGraphId; - GeneralRequestBus::BroadcastResult(graphCanvasGraphId, &GeneralRequests::FindGraphCanvasGraphIdByAssetId, assetId); + GeneralRequestBus::BroadcastResult(graphCanvasGraphId, &GeneralRequests::FindGraphCanvasGraphIdByAssetId, SourceHandle(nullptr, assetId.m_guid, {})); if (graphCanvasGraphId.IsValid()) { AZ::EntityId scriptCanvasNodeId; - AssetGraphSceneBus::BroadcastResult(scriptCanvasNodeId, &AssetGraphScene::FindEditorNodeIdByAssetNodeId, assetId, assetNodeId); + AssetGraphSceneBus::BroadcastResult(scriptCanvasNodeId, &AssetGraphScene::FindEditorNodeIdByAssetNodeId, SourceHandle(nullptr, assetId.m_guid, {}), assetNodeId); GraphCanvas::NodeId graphCanvasNodeId; SceneMemberMappingRequestBus::EventResult(graphCanvasNodeId, scriptCanvasNodeId, &SceneMemberMappingRequests::GetGraphCanvasEntityId); @@ -447,7 +450,7 @@ namespace ScriptCanvasEditor if (effectIter != m_highlightEffects.end()) { AZ::EntityId graphCanvasGraphId; - GeneralRequestBus::BroadcastResult(graphCanvasGraphId, &GeneralRequests::FindGraphCanvasGraphIdByAssetId, assetId); + GeneralRequestBus::BroadcastResult(graphCanvasGraphId, &GeneralRequests::FindGraphCanvasGraphIdByAssetId, SourceHandle(nullptr, assetId.m_guid, {})); if (graphCanvasGraphId.IsValid()) { diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowTreeItems.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowTreeItems.cpp index b992d3a289..6936a0c368 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowTreeItems.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowTreeItems.cpp @@ -122,7 +122,11 @@ namespace ScriptCanvasEditor { } - ExecutionLogTreeItem* DebugLogRootItem::CreateExecutionItem(const LoggingDataId& loggingDataId, const ScriptCanvas::NodeTypeIdentifier& nodeType, const ScriptCanvas::GraphInfo& graphInfo, const ScriptCanvas::NamedNodeId& nodeId) + ExecutionLogTreeItem* DebugLogRootItem::CreateExecutionItem + ( [[maybe_unused]] const LoggingDataId& loggingDataId + , [[maybe_unused]] const ScriptCanvas::NodeTypeIdentifier& nodeType + , [[maybe_unused]] const ScriptCanvas::GraphInfo& graphInfo + , [[maybe_unused]] const ScriptCanvas::NamedNodeId& nodeId) { ExecutionLogTreeItem* treeItem = nullptr; @@ -133,15 +137,6 @@ namespace ScriptCanvasEditor m_additionTimer.start(); } } - - if (m_updatePolicy == UpdatePolicy::SingleTime) - { - treeItem = CreateChildNodeWithoutAddSignal(loggingDataId, nodeType, graphInfo, nodeId); - } - else - { - treeItem = CreateChildNode(loggingDataId, nodeType, graphInfo, nodeId); - } return treeItem; } @@ -185,7 +180,11 @@ namespace ScriptCanvasEditor // ExecutionLogTreeItem ///////////////////////// - ExecutionLogTreeItem::ExecutionLogTreeItem(const LoggingDataId& loggingDataId, const ScriptCanvas::NodeTypeIdentifier& nodeType, const ScriptCanvas::GraphInfo& graphInfo, const ScriptCanvas::NamedNodeId& nodeId) + ExecutionLogTreeItem::ExecutionLogTreeItem + ( const LoggingDataId& loggingDataId + , const ScriptCanvas::NodeTypeIdentifier& nodeType + , const SourceHandle& graphInfo + , const ScriptCanvas::NamedNodeId& nodeId) : m_loggingDataId(loggingDataId) , m_nodeType(nodeType) , m_graphInfo(graphInfo) @@ -196,7 +195,6 @@ namespace ScriptCanvasEditor m_paletteConfiguration.SetColorPalette("MethodNodeTitlePalette"); AZ::NamedEntityId entityName; - LoggingDataRequestBus::EventResult(entityName, m_loggingDataId, &LoggingDataRequests::FindNamedEntityId, m_graphInfo.m_runtimeEntity); m_sourceEntityName = entityName.ToString().c_str(); m_displayName = nodeId.m_name.c_str(); @@ -207,7 +205,7 @@ namespace ScriptCanvasEditor m_inputName = "---"; m_outputName = "---"; - GeneralAssetNotificationBus::Handler::BusConnect(GetAssetId()); + GeneralAssetNotificationBus::Handler::BusConnect(graphInfo); } QVariant ExecutionLogTreeItem::Data(const QModelIndex& index, int role) const @@ -502,12 +500,12 @@ namespace ScriptCanvasEditor const ScriptCanvas::GraphIdentifier& ExecutionLogTreeItem::GetGraphIdentifier() const { - return m_graphInfo.m_graphIdentifier; + return m_graphIdentifier; } - const AZ::Data::AssetId& ExecutionLogTreeItem::GetAssetId() const + AZ::Data::AssetId ExecutionLogTreeItem::GetAssetId() const { - return m_graphInfo.m_graphIdentifier.m_assetId; + return m_graphInfo.Id(); } AZ::EntityId ExecutionLogTreeItem::GetScriptCanvasAssetNodeId() const @@ -623,12 +621,14 @@ namespace ScriptCanvasEditor { if (!m_graphCanvasGraphId.IsValid()) { - GeneralRequestBus::BroadcastResult(m_graphCanvasGraphId, &GeneralRequests::FindGraphCanvasGraphIdByAssetId, GetAssetId()); + GeneralRequestBus::BroadcastResult(m_graphCanvasGraphId + , &GeneralRequests::FindGraphCanvasGraphIdByAssetId, SourceHandle(nullptr, GetAssetId().m_guid, "")); if (!EditorGraphNotificationBus::Handler::BusIsConnected()) { ScriptCanvas::ScriptCanvasId scriptCanvasId; - GeneralRequestBus::BroadcastResult(scriptCanvasId, &GeneralRequests::FindScriptCanvasIdByAssetId, GetAssetId()); + GeneralRequestBus::BroadcastResult(scriptCanvasId + , &GeneralRequests::FindScriptCanvasIdByAssetId, SourceHandle(nullptr, GetAssetId().m_guid, "")); EditorGraphNotificationBus::Handler::BusConnect(scriptCanvasId); } @@ -638,7 +638,9 @@ namespace ScriptCanvasEditor { if (!m_graphCanvasNodeId.IsValid()) { - AssetGraphSceneBus::BroadcastResult(m_scriptCanvasNodeId, &AssetGraphScene::FindEditorNodeIdByAssetNodeId, GetAssetId(), m_scriptCanvasAssetNodeId); + AssetGraphSceneBus::BroadcastResult(m_scriptCanvasNodeId + , &AssetGraphScene::FindEditorNodeIdByAssetNodeId + , SourceHandle(nullptr, GetAssetId().m_guid, ""), m_scriptCanvasAssetNodeId); SceneMemberMappingRequestBus::EventResult(m_graphCanvasNodeId, m_scriptCanvasNodeId, &SceneMemberMappingRequests::GetGraphCanvasEntityId); } @@ -806,7 +808,8 @@ namespace ScriptCanvasEditor { if (!m_graphCanvasGraphId.IsValid()) { - GeneralRequestBus::BroadcastResult(m_graphCanvasGraphId, &GeneralRequests::FindGraphCanvasGraphIdByAssetId, m_graphIdentifier.m_assetId); + GeneralRequestBus::BroadcastResult(m_graphCanvasGraphId + , &GeneralRequests::FindGraphCanvasGraphIdByAssetId, SourceHandle(nullptr, m_graphIdentifier.m_assetId.m_guid, "")); } ScrapeInputName(); @@ -828,7 +831,7 @@ namespace ScriptCanvasEditor if (m_graphCanvasGraphId.IsValid() && m_assetInputEndpoint.IsValid()) { AZ::EntityId scriptCanvasNodeId; - AssetGraphSceneBus::BroadcastResult(scriptCanvasNodeId, &AssetGraphScene::FindEditorNodeIdByAssetNodeId, GetAssetId(), m_assetInputEndpoint.GetNodeId()); + AssetGraphSceneBus::BroadcastResult(scriptCanvasNodeId, &AssetGraphScene::FindEditorNodeIdByAssetNodeId, SourceHandle(nullptr, GetAssetId().m_guid, ""), m_assetInputEndpoint.GetNodeId()); GraphCanvas::NodeId graphCanvasNodeId; SceneMemberMappingRequestBus::EventResult(graphCanvasNodeId, scriptCanvasNodeId, &SceneMemberMappingRequests::GetGraphCanvasEntityId); @@ -851,8 +854,9 @@ namespace ScriptCanvasEditor if (m_graphCanvasGraphId.IsValid() && m_assetOutputEndpoint.IsValid()) { AZ::EntityId scriptCanvasNodeId; - AssetGraphSceneBus::BroadcastResult(scriptCanvasNodeId, &AssetGraphScene::FindEditorNodeIdByAssetNodeId, GetAssetId(), m_assetOutputEndpoint.GetNodeId()); - + AssetGraphSceneBus::BroadcastResult(scriptCanvasNodeId, &AssetGraphScene::FindEditorNodeIdByAssetNodeId + , SourceHandle(nullptr, GetAssetId().m_guid, ""), m_assetOutputEndpoint.GetNodeId()); + GraphCanvas::NodeId graphCanvasNodeId; SceneMemberMappingRequestBus::EventResult(graphCanvasNodeId, scriptCanvasNodeId, &SceneMemberMappingRequests::GetGraphCanvasEntityId); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowTreeItems.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowTreeItems.h index 862b231f3a..5b6d23590b 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowTreeItems.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowTreeItems.h @@ -131,7 +131,12 @@ namespace ScriptCanvasEditor AZ_CLASS_ALLOCATOR(ExecutionLogTreeItem, AZ::SystemAllocator, 0); AZ_RTTI(ExecutionLogTreeItem, "{71139142-A30C-4A16-81CC-D51314AEAF7D}", DebugLogTreeItem); - ExecutionLogTreeItem(const LoggingDataId& loggingDataId, const ScriptCanvas::NodeTypeIdentifier& nodeType, const ScriptCanvas::GraphInfo& graphInfo, const ScriptCanvas::NamedNodeId& nodeId); + ExecutionLogTreeItem + ( const LoggingDataId& loggingDataId + , const ScriptCanvas::NodeTypeIdentifier& nodeType + , const SourceHandle& graphInfo + , const ScriptCanvas::NamedNodeId& nodeId); + ~ExecutionLogTreeItem() override = default; QVariant Data(const QModelIndex& index, int role) const override final; @@ -163,7 +168,7 @@ namespace ScriptCanvasEditor //// const ScriptCanvas::GraphIdentifier& GetGraphIdentifier() const; - const AZ::Data::AssetId& GetAssetId() const; + AZ::Data::AssetId GetAssetId() const; AZ::EntityId GetScriptCanvasAssetNodeId() const; GraphCanvas::NodeId GetGraphCanvasNodeId() const; @@ -184,7 +189,8 @@ namespace ScriptCanvasEditor LoggingDataId m_loggingDataId; ScriptCanvas::NodeTypeIdentifier m_nodeType; - ScriptCanvas::GraphInfo m_graphInfo; + SourceHandle m_graphInfo; + ScriptCanvas::GraphIdentifier m_graphIdentifier; QString m_sourceEntityName; QString m_graphName; QString m_relativeGraphPath; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/PivotTree/PivotTreeWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/PivotTree/PivotTreeWidget.cpp index a34b42bed8..b1827d7099 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/PivotTree/PivotTreeWidget.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/PivotTree/PivotTreeWidget.cpp @@ -406,15 +406,14 @@ namespace ScriptCanvasEditor sourceIndex = proxyModel->mapToSource(modelIndex); } - PivotTreeItem* pivotTreeItem = static_cast(sourceIndex.internalPointer()); - - if (pivotTreeItem) + if (PivotTreeItem* pivotTreeItem = static_cast(sourceIndex.internalPointer())) { - PivotTreeGraphItem* graphItem = azrtti_cast(pivotTreeItem); - - if (graphItem) + if (PivotTreeGraphItem* graphItem = azrtti_cast(pivotTreeItem)) { - GeneralRequestBus::Broadcast(&GeneralRequests::OpenScriptCanvasAssetId, graphItem->GetAssetId()); + GeneralRequestBus::Broadcast + ( &GeneralRequests::OpenScriptCanvasAssetId + , SourceHandle(nullptr, graphItem->GetAssetId().m_guid, "") + , Tracker::ScriptCanvasFileState::UNMODIFIED); } } } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.cpp index 50a5e8ac1a..b2db9508b1 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.cpp @@ -129,7 +129,10 @@ namespace ScriptCanvasEditor { if (row == NodePaletteTreeItem::Column::Customization) { - GeneralRequestBus::Broadcast(&GeneralRequests::OpenScriptCanvasAsset, GetSourceAssetId(), -1); + GeneralRequestBus::Broadcast + ( &GeneralRequests::OpenScriptCanvasAssetId + , SourceHandle(nullptr, GetSourceAssetId().m_guid, "") + , Tracker::ScriptCanvasFileState::UNMODIFIED); } } @@ -137,7 +140,10 @@ namespace ScriptCanvasEditor { if (row != NodePaletteTreeItem::Column::Customization) { - GeneralRequestBus::Broadcast(&GeneralRequests::OpenScriptCanvasAsset, GetSourceAssetId(), -1); + GeneralRequestBus::Broadcast + ( &GeneralRequests::OpenScriptCanvasAssetId + , SourceHandle(nullptr, GetSourceAssetId().m_guid, "") + , Tracker::ScriptCanvasFileState::UNMODIFIED); return true; } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp index dc221deec0..c5be5cb4c6 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp @@ -1023,13 +1023,15 @@ namespace ScriptCanvasEditor GraphCanvas::TranslationKey key; + AZStd::string context; AZStd::string updatedMethodName; if (propertyStatus != ScriptCanvas::PropertyStatus::None) { updatedMethodName = (propertyStatus == ScriptCanvas::PropertyStatus::Getter) ? "Get" : "Set"; + context = (propertyStatus == ScriptCanvas::PropertyStatus::Getter) ? "Getter" : "Setter"; } updatedMethodName += methodName; - key << "BehaviorClass" << methodClass.c_str() << "methods" << updatedMethodName << "details"; + key << "BehaviorClass" << context << methodClass << "methods" << updatedMethodName << "details"; GraphCanvas::TranslationRequests::Details details; GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/SourceHandlePropertyAssetCtrl.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/SourceHandlePropertyAssetCtrl.cpp new file mode 100644 index 0000000000..3e4cb7cd49 --- /dev/null +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/SourceHandlePropertyAssetCtrl.cpp @@ -0,0 +1,166 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include + +#include + +#include +#include +#include +#include + +namespace ScriptCanvasEditor +{ + SourceHandlePropertyAssetCtrl::SourceHandlePropertyAssetCtrl(QWidget* parent) + : AzToolsFramework::PropertyAssetCtrl(parent) + { + } + + AzToolsFramework::AssetBrowser::AssetSelectionModel SourceHandlePropertyAssetCtrl::GetAssetSelectionModel() + { + auto selectionModel = AssetSelectionModel::SourceAssetTypeSelection(m_sourceAssetFilterPattern); + selectionModel.SetTitle(m_title); + return selectionModel; + } + + void SourceHandlePropertyAssetCtrl::PopupAssetPicker() + { + // Request the AssetBrowser Dialog and set a type filter + AssetSelectionModel selection = GetAssetSelectionModel(); + selection.SetSelectedFilePath(m_selectedSourcePath.c_str()); + + AZStd::string defaultDirectory; + if (m_defaultDirectoryCallback) + { + m_defaultDirectoryCallback->Invoke(m_editNotifyTarget, defaultDirectory); + selection.SetDefaultDirectory(defaultDirectory); + } + + AssetBrowserComponentRequestBus::Broadcast(&AssetBrowserComponentRequests::PickAssets, selection, parentWidget()); + if (selection.IsValid()) + { + const auto source = azrtti_cast(selection.GetResult()); + AZ_Assert(source, "Incorrect entry type selected. Expected source."); + if (source) + { + SetSelectedSourcePath(source->GetFullPath()); + } + } + } + + void SourceHandlePropertyAssetCtrl::ClearAssetInternal() + { + SetSelectedSourcePath(""); + + PropertyAssetCtrl::ClearAssetInternal(); + } + + void SourceHandlePropertyAssetCtrl::ConfigureAutocompleter() + { + if (m_completerIsConfigured) + { + return; + } + + AzToolsFramework::PropertyAssetCtrl::ConfigureAutocompleter(); + + AssetSelectionModel selection = GetAssetSelectionModel(); + m_model->SetFetchEntryType(AssetBrowserEntry::AssetEntryType::Source); + m_model->SetFilter(selection.GetDisplayFilter()); + } + + void SourceHandlePropertyAssetCtrl::SetSourceAssetFilterPattern(const QString& filterPattern) + { + m_sourceAssetFilterPattern = filterPattern; + } + + AZ::IO::Path SourceHandlePropertyAssetCtrl::GetSelectedSourcePath() const + { + return m_selectedSourcePath; + } + + void SourceHandlePropertyAssetCtrl::SetSelectedSourcePath(const AZ::IO::Path& sourcePath) + { + m_selectedSourcePath = sourcePath; + + AZStd::string displayText; + if (!sourcePath.empty()) + { + AzFramework::StringFunc::Path::GetFileName(sourcePath.c_str(), displayText); + } + m_browseEdit->setText(displayText.c_str()); + + // The AssetID gets ignored, the only important bit is triggering the change for the RequestWrite + emit OnAssetIDChanged(AZ::Data::AssetId()); + } + + void SourceHandlePropertyAssetCtrl::OnAutocomplete(const QModelIndex& index) + { + SetSelectedSourcePath(m_model->GetPathFromIndex(GetSourceIndex(index))); + } + + QWidget* SourceHandlePropertyHandler::CreateGUI(QWidget* pParent) + { + SourceHandlePropertyAssetCtrl* newCtrl = aznew SourceHandlePropertyAssetCtrl(pParent); + connect(newCtrl, &SourceHandlePropertyAssetCtrl::OnAssetIDChanged, this, [newCtrl](AZ::Data::AssetId newAssetID) + { + (void)newAssetID; + AzToolsFramework::PropertyEditorGUIMessages::Bus::Broadcast(&AzToolsFramework::PropertyEditorGUIMessages::RequestWrite, newCtrl); + AzToolsFramework::PropertyEditorGUIMessages::Bus::Broadcast(&AzToolsFramework::PropertyEditorGUIMessages::OnEditingFinished, newCtrl); + }); + return newCtrl; + } + + void SourceHandlePropertyHandler::ConsumeAttribute(SourceHandlePropertyAssetCtrl* GUI, AZ::u32 attrib, AzToolsFramework::PropertyAttributeReader* attrValue, const char* debugName) + { + // Let the AssetPropertyHandlerDefault handle all of the common attributes + AzToolsFramework::AssetPropertyHandlerDefault::ConsumeAttributeInternal(GUI, attrib, attrValue, debugName); + + if (attrib == AZ::Edit::Attributes::SourceAssetFilterPattern) + { + AZStd::string filterPattern; + if (attrValue->Read(filterPattern)) + { + GUI->SetSourceAssetFilterPattern(filterPattern.c_str()); + } + } + } + + void SourceHandlePropertyHandler::WriteGUIValuesIntoProperty(size_t index, SourceHandlePropertyAssetCtrl* GUI, property_t& instance, AzToolsFramework::InstanceDataNode* node) + { + (void)index; + (void)node; + + auto sourceHandle = SourceHandle(nullptr, GUI->GetSelectedSourcePath()); + auto completeSourceHandle = CompleteDescription(sourceHandle); + if (completeSourceHandle) + { + instance = property_t(*CompleteDescription(sourceHandle)); + } + else + { + instance = property_t(); + } + } + + bool SourceHandlePropertyHandler::ReadValuesIntoGUI(size_t index, SourceHandlePropertyAssetCtrl* GUI, const property_t& instance, AzToolsFramework::InstanceDataNode* node) + { + (void)index; + (void)node; + + GUI->blockSignals(true); + + GUI->SetSelectedSourcePath(instance.Path()); + GUI->SetEditNotifyTarget(node->GetParent()->GetInstance(0)); + + GUI->blockSignals(false); + return false; + } +} diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/SourceHandlePropertyAssetCtrl.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/SourceHandlePropertyAssetCtrl.h new file mode 100644 index 0000000000..f54279e59c --- /dev/null +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/SourceHandlePropertyAssetCtrl.h @@ -0,0 +1,71 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#if !defined(Q_MOC_RUN) +#include + +#include +#endif + +namespace ScriptCanvasEditor +{ + class SourceHandlePropertyAssetCtrl + : public AzToolsFramework::PropertyAssetCtrl + { + Q_OBJECT + + public: + AZ_CLASS_ALLOCATOR(SourceHandlePropertyAssetCtrl, AZ::SystemAllocator, 0); + + SourceHandlePropertyAssetCtrl(QWidget* parent = nullptr); + + AzToolsFramework::AssetBrowser::AssetSelectionModel GetAssetSelectionModel() override; + void PopupAssetPicker() override; + void ClearAssetInternal() override; + void ConfigureAutocompleter() override; + + void SetSourceAssetFilterPattern(const QString& filterPattern); + + AZ::IO::Path GetSelectedSourcePath() const; + void SetSelectedSourcePath(const AZ::IO::Path& sourcePath); + + public Q_SLOTS: + void OnAutocomplete(const QModelIndex& index) override; + + private: + //! A regular expression pattern for filtering by source assets + //! If this is set, the PropertyAssetCtrl will be dealing with source assets + //! instead of a specific asset type + QString m_sourceAssetFilterPattern; + + AZ::IO::Path m_selectedSourcePath; + }; + + class SourceHandlePropertyHandler + : QObject + , public AzToolsFramework::PropertyHandler + { + Q_OBJECT + + public: + AZ_CLASS_ALLOCATOR(SourceHandlePropertyHandler, AZ::SystemAllocator, 0); + + AZ::u32 GetHandlerName(void) const override { return AZ_CRC_CE("SourceHandle"); } + bool IsDefaultHandler() const override { return true; } + QWidget* GetFirstInTabOrder(SourceHandlePropertyAssetCtrl* widget) override { return widget->GetFirstInTabOrder(); } + QWidget* GetLastInTabOrder(SourceHandlePropertyAssetCtrl* widget) override { return widget->GetLastInTabOrder(); } + void UpdateWidgetInternalTabbing(SourceHandlePropertyAssetCtrl* widget) override { widget->UpdateTabOrder(); } + + QWidget* CreateGUI(QWidget* pParent) override; + void ConsumeAttribute(SourceHandlePropertyAssetCtrl* GUI, AZ::u32 attrib, AzToolsFramework::PropertyAttributeReader* attrValue, const char* debugName) override; + void WriteGUIValuesIntoProperty(size_t index, SourceHandlePropertyAssetCtrl* GUI, property_t& instance, AzToolsFramework::InstanceDataNode* node) override; + bool ReadValuesIntoGUI(size_t index, SourceHandlePropertyAssetCtrl* GUI, const property_t& instance, AzToolsFramework::InstanceDataNode* node) override; + }; +} diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/ScriptCanvasStatisticsDialog.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/ScriptCanvasStatisticsDialog.cpp index ece93955bb..4a0905c17c 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/ScriptCanvasStatisticsDialog.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/ScriptCanvasStatisticsDialog.cpp @@ -257,7 +257,10 @@ namespace ScriptCanvasEditor if (treeItem->GetAssetId().IsValid()) { - GeneralRequestBus::Broadcast(&GeneralRequests::OpenScriptCanvasAssetId, treeItem->GetAssetId()); + GeneralRequestBus::Broadcast + ( &GeneralRequests::OpenScriptCanvasAssetId + , SourceHandle(nullptr, treeItem->GetAssetId().m_guid, "") + , Tracker::ScriptCanvasFileState::UNMODIFIED); } } } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/UnitTestPanel/UnitTestDockWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/UnitTestPanel/UnitTestDockWidget.cpp index 6142729bfe..f319a166df 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/UnitTestPanel/UnitTestDockWidget.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/UnitTestPanel/UnitTestDockWidget.cpp @@ -433,7 +433,10 @@ namespace ScriptCanvasEditor AZ::Data::AssetId sourceAssetId(sourceUuid, 0); AZ::Outcome openOutcome = AZ::Failure(AZStd::string()); - GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAssetId, sourceAssetId); + GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAssetId + , ScriptCanvasEditor::SourceHandle(nullptr, sourceUuid, {}) + , Tracker::ScriptCanvasFileState::UNMODIFIED); + if (!openOutcome) { AZ_Warning("Script Canvas", openOutcome, "%s", openOutcome.GetError().data()); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.cpp index 5b78c62bac..1af554dd32 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.cpp @@ -716,10 +716,7 @@ namespace ScriptCanvasEditor void GraphVariablesModel::SetActiveScene(const ScriptCanvas::ScriptCanvasId& scriptCanvasId) { ScriptCanvas::GraphVariableManagerNotificationBus::Handler::BusDisconnect(); - - m_assetType = AZ::Data::AssetType::CreateNull(); - ScriptCanvas::GraphRequestBus::EventResult(m_assetType, scriptCanvasId, &ScriptCanvas::GraphRequests::GetAssetType); - + m_assetType = azrtti_typeid(); m_scriptCanvasId = scriptCanvasId; if (m_scriptCanvasId.IsValid()) diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp index e61b015aae..fa13681879 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp @@ -135,6 +135,7 @@ #include #include #include +#include #include @@ -235,7 +236,7 @@ namespace ScriptCanvasEditor Widget::GraphTabBar* tabBar = m_mainWindow->m_tabBar; AZStd::vector activeAssets; - AZ::Data::AssetId focusedAssetId = tabBar->FindAssetId(tabBar->currentIndex()); + ScriptCanvasEditor::SourceHandle focusedAssetId = tabBar->FindAssetId(tabBar->currentIndex()); if (m_rememberOpenCanvases) { @@ -243,44 +244,35 @@ namespace ScriptCanvasEditor for (int i = 0; i < tabBar->count(); ++i) { - AZ::Data::AssetId assetId = tabBar->FindAssetId(i); + ScriptCanvasEditor::SourceHandle assetId = tabBar->FindAssetId(i); const Tracker::ScriptCanvasFileState& fileState = m_mainWindow->GetAssetFileState(assetId); if (fileState == Tracker::ScriptCanvasFileState::MODIFIED || fileState == Tracker::ScriptCanvasFileState::UNMODIFIED) { - AZ::Data::AssetId sourceId = GetSourceAssetId(assetId); - if (sourceId.IsValid()) + ScriptCanvasEditor::SourceHandle sourceId = GetSourceAssetId(assetId); + if (sourceId.IsGraphValid()) { EditorSettings::EditorWorkspace::WorkspaceAssetSaveData assetSaveData; assetSaveData.m_assetId = sourceId; - ScriptCanvas::ScriptCanvasId scriptCanvasId = m_mainWindow->FindScriptCanvasIdByAssetId(assetId); - - EditorGraphRequests* editorRequests = EditorGraphRequestBus::FindFirstHandler(scriptCanvasId); - - if (editorRequests) - { - assetSaveData.m_assetType = azrtti_typeid(); - } - activeAssets.push_back(assetSaveData); } } - else if (assetId == focusedAssetId) + else if (assetId.AnyEquals(focusedAssetId)) { - focusedAssetId.SetInvalid(); + focusedAssetId.Clear(); } } // The assetId needs to be the file AssetId to restore the workspace - if (focusedAssetId.IsValid()) + if (focusedAssetId.IsGraphValid()) { focusedAssetId = GetSourceAssetId(focusedAssetId); } // If our currently focused asset won't be restored, just show the first element. - if (!focusedAssetId.IsValid()) + if (!focusedAssetId.IsGraphValid()) { if (!activeAssets.empty()) { @@ -316,7 +308,7 @@ namespace ScriptCanvasEditor if (m_loadingAssets.empty()) { - m_mainWindow->OnWorkspaceRestoreEnd(AZ::Data::AssetId()); + m_mainWindow->OnWorkspaceRestoreEnd(ScriptCanvasEditor::SourceHandle()); } else { @@ -325,86 +317,81 @@ namespace ScriptCanvasEditor m_queuedAssetFocus = workspace->GetFocusedAssetId(); - for (const auto& assetSaveData : workspace->GetActiveAssetData()) + // #sc-asset-editor + //for (const auto& assetSaveData : workspace->GetActiveAssetData()) { - AssetTrackerNotificationBus::MultiHandler::BusConnect(assetSaveData.m_assetId); - - Callbacks::OnAssetReadyCallback onAssetReady = [this, assetSaveData](ScriptCanvasMemoryAsset& asset) - { - // If we get an error callback. Just remove it from out active lists. - if (asset.IsSourceInError()) - { - if (assetSaveData.m_assetId == m_queuedAssetFocus) - { - m_queuedAssetFocus = AZ::Data::AssetId(); - } - - SignalAssetComplete(asset.GetFileAssetId()); - } - }; - - bool loadedFile = true; - AssetTrackerRequestBus::BroadcastResult(loadedFile, &AssetTrackerRequests::Load, assetSaveData.m_assetId, assetSaveData.m_assetType, onAssetReady); - - if (!loadedFile) - { - if (assetSaveData.m_assetId == m_queuedAssetFocus) - { - m_queuedAssetFocus = AZ::Data::AssetId(); - } - - SignalAssetComplete(assetSaveData.m_assetId); - } + // load all the files +// AssetTrackerNotificationBus::MultiHandler::BusConnect(assetSaveData.m_assetId); +// +// Callbacks::OnAssetReadyCallback onAssetReady = [this, assetSaveData](ScriptCanvasMemoryAsset& asset) +// { +// // If we get an error callback. Just remove it from out active lists. +// if (asset.IsSourceInError()) +// { +// if (assetSaveData.m_assetId == m_queuedAssetFocus) +// { +// m_queuedAssetFocus = ScriptCanvasEditor::SourceHandle(); +// } +// +// SignalAssetComplete(asset.GetFileAssetId()); +// } +// }; +// +// bool loadedFile = true; +// AssetTrackerRequestBus::BroadcastResult(loadedFile, &AssetTrackerRequests::Load, assetSaveData.m_assetId, assetSaveData.m_assetType, onAssetReady); +// +// if (!loadedFile) +// { +// if (assetSaveData.m_assetId == m_queuedAssetFocus) +// { +// m_queuedAssetFocus = ScriptCanvasEditor::SourceHandle(); +// } +// +// SignalAssetComplete(assetSaveData.m_assetId); +// } } } else { - m_mainWindow->OnWorkspaceRestoreEnd(AZ::Data::AssetId()); + m_mainWindow->OnWorkspaceRestoreEnd(ScriptCanvasEditor::SourceHandle()); } } } void Workspace::OnAssetReady(const ScriptCanvasMemoryAsset::pointer memoryAsset) { - const AZ::Data::AssetId& fileAssetId = memoryAsset->GetFileAssetId(); - - if (AssetTrackerNotificationBus::MultiHandler::BusIsConnectedId(fileAssetId)) - { - AssetTrackerNotificationBus::MultiHandler::BusDisconnect(fileAssetId); - - m_mainWindow->OpenScriptCanvasAsset(*memoryAsset); - - SignalAssetComplete(fileAssetId); - } + // open the file in the main window +// const ScriptCanvasEditor::SourceHandle& fileAssetId = memoryAsset->GetFileAssetId(); +// +// if (AssetTrackerNotificationBus::MultiHandler::BusIsConnectedId(fileAssetId)) +// { +// AssetTrackerNotificationBus::MultiHandler::BusDisconnect(fileAssetId); +// +// m_mainWindow->OpenScriptCanvasAsset(*memoryAsset); +// +// SignalAssetComplete(fileAssetId); +// } } - void Workspace::SignalAssetComplete(const AZ::Data::AssetId& fileAssetId) + void Workspace::SignalAssetComplete(const ScriptCanvasEditor::SourceHandle& /*fileAssetId*/) { - auto it = AZStd::find(m_loadingAssets.begin(), m_loadingAssets.end(), fileAssetId); - if (it != m_loadingAssets.end()) - { - m_loadingAssets.erase(it); - } - - //! When we are done loading all assets we can safely set the focus to the recorded asset - if (m_loadingAssets.empty()) - { - m_mainWindow->OnWorkspaceRestoreEnd(m_queuedAssetFocus); - m_queuedAssetFocus.SetInvalid(); - } + // When we are done loading all assets we can safely set the focus to the recorded asset +// auto it = AZStd::find(m_loadingAssets.begin(), m_loadingAssets.end(), fileAssetId); +// if (it != m_loadingAssets.end()) +// { +// m_loadingAssets.erase(it); +// } +// +// if (m_loadingAssets.empty()) +// { +// m_mainWindow->OnWorkspaceRestoreEnd(m_queuedAssetFocus); +// m_queuedAssetFocus.SetInvalid(); +// } } - AZ::Data::AssetId Workspace::GetSourceAssetId(const AZ::Data::AssetId& memoryAssetId) const + ScriptCanvasEditor::SourceHandle Workspace::GetSourceAssetId(const ScriptCanvasEditor::SourceHandle& memoryAssetId) const { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, memoryAssetId); - - if (memoryAsset) - { - return memoryAsset->GetFileAssetId(); - } - - return AZ::Data::AssetId(); + return memoryAssetId; } //////////////// @@ -655,9 +642,9 @@ namespace ScriptCanvasEditor QTimer::singleShot(0, [this]() { SetDefaultLayout(); - if (m_activeAssetId.IsValid()) + if (m_activeGraph.IsGraphValid()) { - m_queuedFocusOverride = m_activeAssetId; + m_queuedFocusOverride = m_activeGraph; } m_workspace->Restore(); @@ -676,8 +663,9 @@ namespace ScriptCanvasEditor ScriptCanvas::BatchOperationNotificationBus::Handler::BusConnect(); AssetGraphSceneBus::Handler::BusConnect(); AzToolsFramework::ToolsApplicationNotificationBus::Handler::BusConnect(); - + AzToolsFramework::AssetSystemBus::Handler::BusConnect(); ScriptCanvas::ScriptCanvasSettingsRequestBus::Handler::BusConnect(); + AZ::SystemTickBus::Handler::BusConnect(); UINotificationBus::Broadcast(&UINotifications::MainWindowCreationEvent, this); @@ -720,6 +708,7 @@ namespace ScriptCanvasEditor ScriptCanvasEditor::GeneralRequestBus::Handler::BusDisconnect(); GraphCanvas::AssetEditorAutomationRequestBus::Handler::BusDisconnect(); ScriptCanvas::ScriptCanvasSettingsRequestBus::Handler::BusDisconnect(); + AzToolsFramework::AssetSystemBus::Handler::BusDisconnect(); Clear(); @@ -831,16 +820,12 @@ namespace ScriptCanvasEditor connect(ui->action_ViewRestoreDefaultLayout, &QAction::triggered, this, &MainWindow::OnRestoreDefaultLayout); } - void MainWindow::SignalActiveSceneChanged(AZ::Data::AssetId assetId) + void MainWindow::SignalActiveSceneChanged(ScriptCanvasEditor::SourceHandle assetId) { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetId); - AZ::EntityId graphId; - - if (memoryAsset) + if (assetId.IsGraphValid()) { - graphId = memoryAsset->GetGraphId(); + EditorGraphRequestBus::EventResult(graphId, assetId.Get()->GetScriptCanvasId(), &EditorGraphRequests::GetGraphCanvasGraphId); } m_autoSaveTimer.stop(); @@ -859,18 +844,20 @@ namespace ScriptCanvasEditor GraphCanvas::ViewId viewId; GraphCanvas::SceneRequestBus::EventResult(viewId, graphId, &GraphCanvas::SceneRequests::GetViewId); - AZ_Assert(viewId.IsValid(), "SceneRequest must return a valid ViewId"); if (viewId.IsValid()) { GraphCanvas::ViewNotificationBus::Handler::BusDisconnect(); GraphCanvas::ViewNotificationBus::Handler::BusConnect(viewId); - enabled = memoryAsset->GetScriptCanvasId().IsValid(); + enabled = true; + } + else + { + AZ_Error("ScriptCanvasEditor", viewId.IsValid(), "SceneRequest must return a valid ViewId"); } } UpdateMenuState(enabled); - } void MainWindow::UpdateRecentMenu() @@ -922,18 +909,9 @@ namespace ScriptCanvasEditor return; } - AssetTrackerRequests::AssetList unsavedAssets; - AssetTrackerRequestBus::BroadcastResult(unsavedAssets, &AssetTrackerRequests::GetUnsavedAssets); - for (int tabCounter = 0; tabCounter < m_tabBar->count(); ++tabCounter) { - AZ::Data::AssetId assetId = m_tabBar->FindAssetId(tabCounter); - - auto resultIterator = m_processedClosedAssetIds.insert(assetId); - if (!resultIterator.second) - { - continue; - } + ScriptCanvasEditor::SourceHandle assetId = m_tabBar->FindAssetId(tabCounter); const Tracker::ScriptCanvasFileState& fileState = GetAssetFileState(assetId); @@ -950,29 +928,13 @@ namespace ScriptCanvasEditor if (shouldSaveResults == UnsavedChangesOptions::SAVE) { - Callbacks::OnSave saveCB = [this](bool isSuccessful, AZ::Data::AssetPtr, AZ::Data::AssetId) - { - if (isSuccessful) - { - // Continue closing. - qobject_cast(parent())->close(); - } - else - { - // Abort closing. - QMessageBox::critical(this, QString(), QObject::tr("Failed to save.")); - m_processedClosedAssetIds.clear(); - } - }; - ActivateAndSaveAsset(assetId, saveCB); + SaveAssetImpl(assetId, Save::InPlace); event->ignore(); return; } else if (shouldSaveResults == UnsavedChangesOptions::CANCEL_WITHOUT_SAVING) { - m_processedClosedAssetIds.clear(); event->ignore(); - return; } else if (shouldSaveResults == UnsavedChangesOptions::CONTINUE_WITHOUT_SAVING && @@ -984,20 +946,6 @@ namespace ScriptCanvasEditor } m_workspace->Save(); - - // Close all files. - - AssetTrackerRequests::AssetList allAssets; - AssetTrackerRequestBus::BroadcastResult(allAssets, &AssetTrackerRequests::GetAssets); - - for (auto trackedAsset : allAssets) - { - const AZ::Data::AssetId& assetId = trackedAsset->GetAsset().GetId(); - CloseScriptCanvasAsset(assetId); - } - - m_processedClosedAssetIds.clear(); - event->accept(); } @@ -1032,7 +980,7 @@ namespace ScriptCanvasEditor DequeuePropertyGridUpdate(); UndoRequestBus::Event(GetActiveScriptCanvasId(), &UndoRequests::Undo); - SignalSceneDirty(m_activeAssetId); + SignalSceneDirty(m_activeGraph); m_propertyGrid->ClearSelection(); GeneralEditorNotificationBus::Event(GetActiveScriptCanvasId(), &GeneralEditorNotifications::OnUndoRedoEnd); @@ -1044,7 +992,7 @@ namespace ScriptCanvasEditor DequeuePropertyGridUpdate(); UndoRequestBus::Event(GetActiveScriptCanvasId(), &UndoRequests::Redo); - SignalSceneDirty(m_activeAssetId); + SignalSceneDirty(m_activeGraph); m_propertyGrid->ClearSelection(); GeneralEditorNotificationBus::Event(GetActiveScriptCanvasId(), &GeneralEditorNotifications::OnUndoRedoEnd); @@ -1117,16 +1065,59 @@ namespace ScriptCanvasEditor { ScopedUndoBatch scopedUndoBatch("Modify Graph Canvas Scene"); UndoRequestBus::Event(scriptCanvasId, &UndoRequests::AddGraphItemChangeUndo, "Graph Change"); - MarkAssetModified(m_activeAssetId); + UpdateFileState(m_activeGraph, Tracker::ScriptCanvasFileState::MODIFIED); } const bool forceTimer = true; RestartAutoTimerSave(forceTimer); } - void MainWindow::SignalSceneDirty(AZ::Data::AssetId assetId) + void MainWindow::SourceFileChanged + ( [[maybe_unused]] AZStd::string relativePath + , AZStd::string scanFolder + , [[maybe_unused]] AZ::Uuid fileAssetId) + { + auto handle = CompleteDescription(SourceHandle(nullptr, fileAssetId, {})); + if (handle) + { + if (!IsRecentSave(*handle)) + { + UpdateFileState(*handle, Tracker::ScriptCanvasFileState::MODIFIED); + } + else + { + AZ_TracePrintf + ( "ScriptCanvas" + , "Ignoring source file modification notification (possibly external), as a it was recently saved by the editor: %s" + , relativePath.c_str()); + } + } + } + + void MainWindow::SourceFileRemoved + ( AZStd::string relativePath + , [[maybe_unused]] AZStd::string scanFolder + , AZ::Uuid fileAssetId) + { + SourceHandle handle(nullptr, fileAssetId, relativePath); + { + if (!IsRecentSave(handle)) + { + UpdateFileState(handle, Tracker::ScriptCanvasFileState::SOURCE_REMOVED); + } + else + { + AZ_TracePrintf + ( "ScriptCanvas" + , "Ignoring source file removed notification (possibly external), as a it was recently saved by the editor: %s" + , relativePath.c_str()); + } + } + } + + void MainWindow::SignalSceneDirty(ScriptCanvasEditor::SourceHandle assetId) { - MarkAssetModified(assetId); + UpdateFileState(assetId, Tracker::ScriptCanvasFileState::MODIFIED); } void MainWindow::PushPreventUndoStateUpdate() @@ -1147,62 +1138,14 @@ namespace ScriptCanvasEditor m_preventUndoStateUpdateCount = 0; } - void MainWindow::MarkAssetModified(const AZ::Data::AssetId& assetId) + void MainWindow::UpdateFileState(const ScriptCanvasEditor::SourceHandle& assetId, Tracker::ScriptCanvasFileState fileState) { - if (!assetId.IsValid()) - { - return; - } - - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetId); - - if (memoryAsset) - { - const auto& memoryAssetId = memoryAsset->GetId(); - const Tracker::ScriptCanvasFileState& fileState = GetAssetFileState(memoryAssetId); - if (fileState != Tracker::ScriptCanvasFileState::NEW) - { - AssetTrackerRequestBus::Broadcast(&AssetTrackerRequests::UpdateFileState, memoryAssetId, Tracker::ScriptCanvasFileState::MODIFIED); - } - } - } - - void MainWindow::RefreshScriptCanvasAsset(const AZ::Data::Asset& asset) - { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, asset.GetId()); - - if (memoryAsset && asset.IsReady()) - { - AZ::EntityId scGraphId = memoryAsset->GetScriptCanvasId(); - GraphCanvas::SceneNotificationBus::MultiHandler::BusDisconnect(scGraphId); - AZ::EntityId graphCanvasId = GetGraphCanvasGraphId(scGraphId); - - GraphCanvas::AssetEditorNotificationBus::Event(ScriptCanvasEditor::AssetEditorId, &GraphCanvas::AssetEditorNotifications::OnGraphRefreshed, graphCanvasId, graphCanvasId); - - int tabIndex = -1; - if (IsTabOpen(asset.GetId(), tabIndex)) - { - const AZStd::string& assetPath = memoryAsset->GetAbsolutePath(); - m_tabBar->setTabToolTip(tabIndex, assetPath.c_str()); - m_tabBar->SetTabText(tabIndex, memoryAsset->GetTabName().c_str(), memoryAsset->GetFileState()); - } - - if (graphCanvasId.IsValid()) - { - GraphCanvas::SceneNotificationBus::MultiHandler::BusConnect(graphCanvasId); - GraphCanvas::SceneMimeDelegateRequestBus::Event(graphCanvasId, &GraphCanvas::SceneMimeDelegateRequests::AddDelegate, m_entityMimeDelegateId); - - GraphCanvas::SceneRequestBus::Event(graphCanvasId, &GraphCanvas::SceneRequests::SetMimeType, Widget::NodePaletteDockWidget::GetMimeType()); - GraphCanvas::SceneMemberNotificationBus::Event(graphCanvasId, &GraphCanvas::SceneMemberNotifications::OnSceneReady); - } - } + m_tabBar->UpdateFileState(assetId, fileState); } - AZ::Outcome MainWindow::OpenScriptCanvasAssetId(const AZ::Data::AssetId& fileAssetId) + AZ::Outcome MainWindow::OpenScriptCanvasAssetId(const ScriptCanvasEditor::SourceHandle& fileAssetId, Tracker::ScriptCanvasFileState fileState) { - if (!fileAssetId.IsValid()) + if (fileAssetId.Id().IsNull()) { return AZ::Failure(AZStd::string("Unable to open asset with invalid asset id")); } @@ -1215,45 +1158,23 @@ namespace ScriptCanvasEditor return AZ::Success(outTabIndex); } - AZ::Data::AssetInfo assetInfo; - AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequests::GetAssetInfoById, fileAssetId); - - if (assetInfo.m_relativePath.empty()) + auto loadedGraph = LoadFromFile(fileAssetId.Path().c_str()); + if (!loadedGraph.IsSuccess()) { - return AZ::Failure(AZStd::string("Unknown AssetId")); + return AZ::Failure(AZStd::string("Failed to load graph at %s", fileAssetId.Path().c_str())); } - if (assetInfo.m_assetType != azrtti_typeid()) - { - return AZ::Failure(AZStd::string("Invalid AssetId provided, it's not a Script Canvas supported type")); - } + outTabIndex = CreateAssetTab(loadedGraph.GetValue(), fileState); - AssetTrackerRequests::OnAssetReadyCallback onAssetReady = [this, fileAssetId, &outTabIndex](ScriptCanvasMemoryAsset& asset) + if (!m_isRestoringWorkspace) { - if (!asset.IsSourceInError()) - { - outTabIndex = CreateAssetTab(asset.GetFileAssetId()); - - if (!m_isRestoringWorkspace) - { - SetActiveAsset(fileAssetId); - } - - UpdateWorkspaceStatus(asset); - } - else - { - outTabIndex = -1; - m_loadingAssets.erase(fileAssetId); - } - }; - - m_loadingAssets.insert(fileAssetId); - - AssetTrackerRequestBus::Broadcast(&AssetTrackerRequests::Load, fileAssetId, assetInfo.m_assetType, onAssetReady); + SetActiveAsset(loadedGraph.GetValue()); + } if (outTabIndex >= 0) { + AddRecentFile(loadedGraph.GetValue().Path().c_str()); + OpenScriptCanvasAssetImplementation(loadedGraph.GetValue(), fileState); return AZ::Success(outTabIndex); } else @@ -1262,28 +1183,28 @@ namespace ScriptCanvasEditor } } - AZ::Outcome MainWindow::OpenScriptCanvasAsset(const ScriptCanvasMemoryAsset& scriptCanvasAsset, int tabIndex /*= -1*/) + AZ::Outcome MainWindow::OpenScriptCanvasAssetImplementation(const SourceHandle& scriptCanvasAsset, Tracker::ScriptCanvasFileState fileState, int tabIndex) { - const AZ::Data::AssetId& fileAssetId = scriptCanvasAsset.GetFileAssetId(); - if (!fileAssetId.IsValid()) + const ScriptCanvasEditor::SourceHandle& fileAssetId = scriptCanvasAsset; + if (!fileAssetId.IsDescriptionValid()) { return AZ::Failure(AZStd::string("Unable to open asset with invalid asset id")); } - if (scriptCanvasAsset.IsSourceInError()) + if (!scriptCanvasAsset.IsDescriptionValid()) { if (!m_isRestoringWorkspace) { - AZStd::string errorPath = scriptCanvasAsset.GetAbsolutePath(); + AZStd::string errorPath = scriptCanvasAsset.Path().c_str(); if (errorPath.empty()) { errorPath = m_errorFilePath; } - if (m_queuedFocusOverride == fileAssetId) + if (m_queuedFocusOverride.AnyEquals(fileAssetId)) { - m_queuedFocusOverride.SetInvalid(); + m_queuedFocusOverride = fileAssetId; } QMessageBox::warning(this, "Unable to open source file", QString("Source File(%1) is in error and cannot be opened").arg(errorPath.c_str()), QMessageBox::StandardButton::Ok); @@ -1304,113 +1225,67 @@ namespace ScriptCanvasEditor return AZ::Success(outTabIndex); } - outTabIndex = CreateAssetTab(fileAssetId, tabIndex); + outTabIndex = CreateAssetTab(fileAssetId, fileState, tabIndex); if (outTabIndex == -1) { - return AZ::Failure(AZStd::string::format("Unable to open existing Script Canvas Asset with id %s in the Script Canvas Editor", AssetHelpers::AssetIdToString(fileAssetId).c_str())); + return AZ::Failure(AZStd::string::format("Unable to open existing Script Canvas Asset with id %s in the Script Canvas Editor" + , fileAssetId.ToString().c_str())); } - AZStd::string assetPath = scriptCanvasAsset.GetAbsolutePath(); + AZStd::string assetPath = scriptCanvasAsset.Path().c_str(); if (!assetPath.empty() && !m_loadingNewlySavedFile) { - const size_t eraseCount = m_loadingWorkspaceAssets.erase(fileAssetId); - - if (eraseCount == 0) - { - AddRecentFile(assetPath.c_str()); - } - } - - if (!m_isRestoringWorkspace) - { - SetActiveAsset(fileAssetId); + AddRecentFile(assetPath.c_str()); } - GraphCanvas::GraphId graphCanvasGraphId = GetGraphCanvasGraphId(scriptCanvasAsset.GetScriptCanvasId()); + GraphCanvas::GraphId graphCanvasGraphId = GetGraphCanvasGraphId(scriptCanvasAsset.Get()->GetScriptCanvasId()); GraphCanvas::AssetEditorNotificationBus::Event(ScriptCanvasEditor::AssetEditorId, &GraphCanvas::AssetEditorNotifications::OnGraphLoaded, graphCanvasGraphId); - GeneralAssetNotificationBus::Event(fileAssetId, &GeneralAssetNotifications::OnAssetVisualized); - - AssetTrackerNotificationBus::MultiHandler::BusConnect(fileAssetId); - return AZ::Success(outTabIndex); } - AZ::Outcome MainWindow::OpenScriptCanvasAsset(AZ::Data::AssetId scriptCanvasAssetId, int tabIndex /*= -1*/) + AZ::Outcome MainWindow::OpenScriptCanvasAsset(ScriptCanvasEditor::SourceHandle scriptCanvasAssetId, Tracker::ScriptCanvasFileState fileState, int tabIndex) { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, scriptCanvasAssetId); - - // If the asset is already tracked we can go directly to opening it. - if (memoryAsset) + if (scriptCanvasAssetId.IsGraphValid()) { - return OpenScriptCanvasAsset(*memoryAsset, tabIndex); + return OpenScriptCanvasAssetImplementation(scriptCanvasAssetId, fileState, tabIndex); } else { - return OpenScriptCanvasAssetId(scriptCanvasAssetId); + return OpenScriptCanvasAssetId(scriptCanvasAssetId, fileState); } } - int MainWindow::CreateAssetTab(const AZ::Data::AssetId& assetId, int tabIndex) + int MainWindow::CreateAssetTab(const ScriptCanvasEditor::SourceHandle& assetId, Tracker::ScriptCanvasFileState fileState, int tabIndex) { - return m_tabBar->InsertGraphTab(tabIndex, assetId); + return m_tabBar->InsertGraphTab(tabIndex, assetId, fileState); } - AZ::Outcome MainWindow::UpdateScriptCanvasAsset(const AZ::Data::Asset& scriptCanvasAsset) + void MainWindow::RemoveScriptCanvasAsset(const ScriptCanvasEditor::SourceHandle& assetId) { - int outTabIndex = -1; - - PushPreventUndoStateUpdate(); - RefreshScriptCanvasAsset(scriptCanvasAsset); - if (IsTabOpen(scriptCanvasAsset.GetId(), outTabIndex)) - { - RefreshActiveAsset(); - } - PopPreventUndoStateUpdate(); - - if (outTabIndex == -1) - { - return AZ::Failure(AZStd::string::format("Script Canvas Asset %s is not open in a tab", scriptCanvasAsset.ToString().c_str())); - } - - return AZ::Success(outTabIndex); - } - - void MainWindow::RemoveScriptCanvasAsset(const AZ::Data::AssetId& assetId) - { - AssetHelpers::PrintInfo("RemoveScriptCanvasAsset : %s", AssetHelpers::AssetIdToString(assetId).c_str()); - + AssetHelpers::PrintInfo("RemoveScriptCanvasAsset : %s", assetId.ToString().c_str()); m_assetCreationRequests.erase(assetId); - GeneralAssetNotificationBus::Event(assetId, &GeneralAssetNotifications::OnAssetUnloaded); - AssetTrackerNotificationBus::MultiHandler::BusDisconnect(assetId); - - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetId); - - if (memoryAsset) + if (assetId.IsGraphValid()) { // Disconnect scene and asset editor buses - GraphCanvas::SceneNotificationBus::MultiHandler::BusDisconnect(memoryAsset->GetScriptCanvasId()); - GraphCanvas::AssetEditorNotificationBus::Event(ScriptCanvasEditor::AssetEditorId, &GraphCanvas::AssetEditorNotifications::OnGraphUnloaded, memoryAsset->GetGraphId()); + GraphCanvas::SceneNotificationBus::MultiHandler::BusDisconnect(assetId.Get()->GetScriptCanvasId()); + GraphCanvas::AssetEditorNotificationBus::Event(ScriptCanvasEditor::AssetEditorId + , &GraphCanvas::AssetEditorNotifications::OnGraphUnloaded, assetId.Get()->GetGraphCanvasGraphId()); } - AssetTrackerRequestBus::Broadcast(&AssetTrackerRequests::Close, assetId); - int tabIndex = m_tabBar->FindTab(assetId); QVariant tabdata = m_tabBar->tabData(tabIndex); if (tabdata.isValid()) { - auto tabAssetId = tabdata.value(); - SetActiveAsset(tabAssetId); + auto tabAssetId = tabdata.value(); + SetActiveAsset(tabAssetId.m_assetId); } - } - int MainWindow::CloseScriptCanvasAsset(const AZ::Data::AssetId& assetId) + int MainWindow::CloseScriptCanvasAsset(const ScriptCanvasEditor::SourceHandle& assetId) { int tabIndex = -1; if (IsTabOpen(assetId, tabIndex)) @@ -1427,35 +1302,32 @@ namespace ScriptCanvasEditor { if (createdAssetPair.second == requestingEntityId) { - return OpenScriptCanvasAssetId(createdAssetPair.first).IsSuccess(); + return OpenScriptCanvasAssetId(createdAssetPair.first, Tracker::ScriptCanvasFileState::NEW).IsSuccess(); } } - AZ::Data::AssetId previousAssetId = m_activeAssetId; + ScriptCanvasEditor::SourceHandle previousAssetId = m_activeGraph; OnFileNew(); - bool createdNewAsset = m_activeAssetId != previousAssetId; + bool createdNewAsset = !(m_activeGraph.AnyEquals(previousAssetId)); if (createdNewAsset) { - m_assetCreationRequests[m_activeAssetId] = requestingEntityId; + m_assetCreationRequests[m_activeGraph] = requestingEntityId; } if (m_isRestoringWorkspace) { - m_queuedFocusOverride = m_activeAssetId; + m_queuedFocusOverride = m_activeGraph; } return createdNewAsset; } - bool MainWindow::IsScriptCanvasAssetOpen(const AZ::Data::AssetId& assetId) const + bool MainWindow::IsScriptCanvasAssetOpen(const ScriptCanvasEditor::SourceHandle& assetId) const { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetId); - - return memoryAsset != nullptr; + return m_tabBar->FindTab(assetId) >= 0; } const CategoryInformation* MainWindow::FindNodePaletteCategoryInformation(AZStd::string_view categoryPath) const @@ -1468,107 +1340,57 @@ namespace ScriptCanvasEditor return m_nodePaletteModel.FindNodePaletteInformation(nodeType); } - void MainWindow::GetSuggestedFullFilenameToSaveAs(const AZ::Data::AssetId& assetId, AZStd::string& filePath, AZStd::string& fileFilter) + void MainWindow::OpenFile(const char* fullPath) { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetId); - - AZStd::string assetPath; - if (memoryAsset) + auto tabIndex = m_tabBar->FindTabByPath(fullPath); + if (tabIndex.IsGraphValid()) { - assetPath = memoryAsset->GetAbsolutePath(); - - AZ::Data::AssetType assetType = memoryAsset->GetAsset().GetType(); - - ScriptCanvasAssetHandler* assetHandler; - AssetTrackerRequestBus::BroadcastResult(assetHandler, &AssetTrackerRequests::GetAssetHandlerForType, assetType); - AZ_Assert(assetHandler, "Asset type must have a valid asset handler"); - - AZ::EBusAggregateResults results; - AssetRegistryRequestBus::BroadcastResult(results, &AssetRegistryRequests::GetAssetDescription, assetType); - - ScriptCanvas::AssetDescription* description = nullptr; - for (auto item : results.values) - { - if (item->GetAssetType() == assetType) - { - description = item; - break; - } - } - - AZ_Assert(description, "Asset type must have a valid description"); - - fileFilter = description->GetFileFilterImpl(); - - AZStd::string tabName; - AssetTrackerRequestBus::BroadcastResult(tabName, &AssetTrackerRequests::GetTabName, assetId); - - assetPath = AZStd::string::format("%s/%s%s", description->GetSuggestedSavePathImpl(), tabName.c_str(), description->GetExtensionImpl()); + SetActiveAsset(tabIndex); + return; } - AZStd::array resolvedPath; - AZ::IO::FileIOBase::GetInstance()->ResolvePath(assetPath.data(), resolvedPath.data(), resolvedPath.size()); - filePath = resolvedPath.data(); - } - - void MainWindow::OpenFile(const char* fullPath) - { - m_errorFilePath = fullPath; - - // Let's find the source file on disk AZStd::string watchFolder; AZ::Data::AssetInfo assetInfo; bool sourceInfoFound{}; - AzToolsFramework::AssetSystemRequestBus::BroadcastResult(sourceInfoFound, &AzToolsFramework::AssetSystemRequestBus::Events::GetSourceInfoBySourcePath, fullPath, assetInfo, watchFolder); + AzToolsFramework::AssetSystemRequestBus::BroadcastResult + ( sourceInfoFound + , &AzToolsFramework::AssetSystemRequestBus::Events::GetSourceInfoBySourcePath, fullPath, assetInfo, watchFolder); - if (sourceInfoFound) + if (!sourceInfoFound) { - const Tracker::ScriptCanvasFileState& fileState = GetAssetFileState(assetInfo.m_assetId); - if (fileState != Tracker::ScriptCanvasFileState::NEW && fileState != Tracker::ScriptCanvasFileState::INVALID) - { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetInfo.m_assetId); - - if (m_tabBar->FindTab(assetInfo.m_assetId) < 0) - { - CreateAssetTab(assetInfo.m_assetId); - } - - SetActiveAsset(memoryAsset->GetFileAssetId()); - OpenNextFile(); - return; - } - - Callbacks::OnAssetReadyCallback onAssetReady = [this, assetInfo](ScriptCanvasMemoryAsset&) - { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetInfo.m_assetId); - - auto openOutcome = OpenScriptCanvasAsset(*memoryAsset); - if (openOutcome) - { - RunGraphValidation(false); - SetRecentAssetId(assetInfo.m_assetId); - } - else - { - AZ_Warning("Script Canvas", openOutcome, "%s", openOutcome.GetError().data()); - } + QMessageBox::warning(this, "Invalid Source Asset", QString("'%1' is not a valid asset path.").arg(fullPath), QMessageBox::Ok); + m_errorFilePath = fullPath; + AZ_Warning("ScriptCanvas", false, "Unable to open file as a ScriptCanvas graph: %s", fullPath); + return; + } - OpenNextFile(); - }; + AZ::Outcome outcome = LoadFromFile(fullPath); + if (!outcome.IsSuccess()) + { + QMessageBox::warning(this, "Invalid Source File", QString("'%1' failed to load properly.").arg(fullPath), QMessageBox::Ok); + m_errorFilePath = fullPath; + AZ_Warning("ScriptCanvas", false, "Unable to open file as a ScriptCanvas graph: %s", fullPath); + return; + } - // TODO-LS the assetInfo.m_assetType is always null for some reason, I know in this case we want default assets so it's ok to hardcode it - AssetTrackerRequestBus::Broadcast(&AssetTrackerRequests::Load, assetInfo.m_assetId, /*assetInfo.m_assetType*/azrtti_typeid(), onAssetReady); + m_errorFilePath.clear(); + auto activeGraph = ScriptCanvasEditor::SourceHandle(outcome.TakeValue(), assetInfo.m_assetId.m_guid, fullPath); + + auto openOutcome = OpenScriptCanvasAsset(activeGraph, Tracker::ScriptCanvasFileState::UNMODIFIED); + if (openOutcome) + { + RunGraphValidation(false); + SetActiveAsset(activeGraph); + SetRecentAssetId(activeGraph); } else { - QMessageBox::warning(this, "Invalid Source Asset", QString("'%1' is not a valid asset path.").arg(fullPath), QMessageBox::Ok); + AZ_Warning("Script Canvas", openOutcome, "%s", openOutcome.GetError().data()); } } - GraphCanvas::Endpoint MainWindow::HandleProposedConnection(const GraphCanvas::GraphId&, const GraphCanvas::ConnectionId&, const GraphCanvas::Endpoint& endpoint, const GraphCanvas::NodeId& nodeId, const QPoint& screenPoint) + GraphCanvas::Endpoint MainWindow::HandleProposedConnection(const GraphCanvas::GraphId&, const GraphCanvas::ConnectionId& + , const GraphCanvas::Endpoint& endpoint, const GraphCanvas::NodeId& nodeId, const QPoint& screenPoint) { GraphCanvas::Endpoint retVal; @@ -1673,10 +1495,39 @@ namespace ScriptCanvasEditor void MainWindow::OnFileNew() { - MakeNewFile(); + static int scriptCanvasEditorDefaultNewNameCount = 0; + + AZStd::string assetPath; + + for (;;) + { + ScriptCanvasAssetDescription description; + AZStd::string newAssetName = AZStd::string::format(description.GetAssetNamePatternImpl(), ++scriptCanvasEditorDefaultNewNameCount); + + AZStd::array assetRootArray; + if (!AZ::IO::FileIOBase::GetInstance()->ResolvePath(description.GetSuggestedSavePathImpl() + , assetRootArray.data(), assetRootArray.size())) + { + AZ_ErrorOnce("Script Canvas", false, "Unable to resolve @projectroot@ path"); + } + + AzFramework::StringFunc::Path::Join(assetRootArray.data(), (newAssetName + description.GetExtensionImpl()).data(), assetPath); + AZ::Data::AssetInfo assetInfo; + + if (!AssetHelpers::GetAssetInfo(assetPath, assetInfo)) + { + break; + } + } + + auto createOutcome = CreateScriptCanvasAsset(assetPath); + if (!createOutcome.IsSuccess()) + { + AZ_Warning("Script Canvas", createOutcome, "%s", createOutcome.GetError().data()); + } } - int MainWindow::InsertTabForAsset(AZStd::string_view assetPath, AZ::Data::AssetId assetId, int tabIndex) + int MainWindow::InsertTabForAsset(AZStd::string_view assetPath, ScriptCanvasEditor::SourceHandle assetId, int tabIndex) { int outTabIndex = -1; @@ -1684,11 +1535,11 @@ namespace ScriptCanvasEditor // Insert tab block AZStd::string tabName; AzFramework::StringFunc::Path::GetFileName(assetPath.data(), tabName); - m_tabBar->InsertGraphTab(tabIndex, assetId); + m_tabBar->InsertGraphTab(tabIndex, assetId, Tracker::ScriptCanvasFileState::NEW); if (!IsTabOpen(assetId, outTabIndex)) { - AZ_Assert(false, AZStd::string::format("Unable to open new Script Canvas Asset with id %s in the Script Canvas Editor", AssetHelpers::AssetIdToString(assetId).c_str()).c_str()); + AZ_Assert(false, AZStd::string::format("Unable to open new Script Canvas Asset with id %s in the Script Canvas Editor", assetId.ToString().c_str()).c_str()); return -1; } @@ -1698,7 +1549,7 @@ namespace ScriptCanvasEditor return outTabIndex; } - void MainWindow::UpdateUndoCache(AZ::Data::AssetId) + void MainWindow::UpdateUndoCache(ScriptCanvasEditor::SourceHandle) { UndoCache* undoCache = nullptr; UndoRequestBus::EventResult(undoCache, GetActiveScriptCanvasId(), &UndoRequests::GetSceneUndoCache); @@ -1708,94 +1559,115 @@ namespace ScriptCanvasEditor } } - AZ::Outcome MainWindow::CreateScriptCanvasAsset(AZStd::string_view assetPath, AZ::Data::AssetType assetType, int tabIndex) + AZ::Outcome MainWindow::CreateScriptCanvasAsset(AZStd::string_view assetPath, int tabIndex) { int outTabIndex = -1; - AZ::Data::AssetId newAssetId; - auto onAssetCreated = [this, assetPath, tabIndex, &outTabIndex](ScriptCanvasMemoryAsset& asset) - { - const AZ::Data::AssetId& assetId = asset.GetId(); - - outTabIndex = InsertTabForAsset(assetPath, assetId, tabIndex); + ScriptCanvas::DataPtr graph = Graph::Create(); + AZ::Uuid assetId = AZ::Uuid::CreateRandom(); + ScriptCanvasEditor::SourceHandle handle = ScriptCanvasEditor::SourceHandle(graph, assetId, assetPath); - SetActiveAsset(assetId); - - UpdateScriptCanvasAsset(asset.GetAsset()); + outTabIndex = InsertTabForAsset(assetPath, handle, tabIndex); + + if (outTabIndex == -1) + { + return AZ::Failure(AZStd::string::format("Script Canvas Asset %.*s is not open in a tab" + , static_cast(assetPath.size()), assetPath.data())); + } - AZ::EntityId scriptCanvasEntityId; - AssetTrackerRequestBus::BroadcastResult(scriptCanvasEntityId, &AssetTrackerRequests::GetScriptCanvasId, assetId); + SetActiveAsset(handle); + PushPreventUndoStateUpdate(); - GraphCanvas::GraphId graphCanvasGraphId = GetGraphCanvasGraphId(scriptCanvasEntityId); - GraphCanvas::AssetEditorNotificationBus::Event(ScriptCanvasEditor::AssetEditorId, &GraphCanvas::AssetEditorNotifications::OnGraphLoaded, graphCanvasGraphId); + AZ::EntityId scriptCanvasEntityId = graph->GetGraph()->GetScriptCanvasId(); + GraphCanvas::SceneNotificationBus::MultiHandler::BusDisconnect(scriptCanvasEntityId); + AZ::EntityId graphCanvasGraphId = GetGraphCanvasGraphId(scriptCanvasEntityId); - }; - AssetTrackerRequestBus::BroadcastResult(newAssetId, &AssetTrackerRequests::Create, assetPath, assetType, onAssetCreated); + GraphCanvas::AssetEditorNotificationBus::Event(ScriptCanvasEditor::AssetEditorId + , &GraphCanvas::AssetEditorNotifications::OnGraphRefreshed, graphCanvasGraphId, graphCanvasGraphId); - return AZ::Success(outTabIndex); - } + if (IsTabOpen(handle, tabIndex)) + { + AZStd::string tabName; + AzFramework::StringFunc::Path::GetFileName(assetPath.data(), tabName); + m_tabBar->setTabToolTip(tabIndex, assetPath.data()); + m_tabBar->SetTabText(tabIndex, tabName.c_str(), Tracker::ScriptCanvasFileState::NEW); + } - bool MainWindow::OnFileSave(const Callbacks::OnSave& saveCB) - { - return SaveAssetImpl(m_activeAssetId, saveCB); - } + if (graphCanvasGraphId.IsValid()) + { + GraphCanvas::SceneNotificationBus::MultiHandler::BusConnect(graphCanvasGraphId); + GraphCanvas::SceneMimeDelegateRequestBus::Event(graphCanvasGraphId, &GraphCanvas::SceneMimeDelegateRequests::AddDelegate, m_entityMimeDelegateId); - bool MainWindow::OnFileSaveAs(const Callbacks::OnSave& saveCB) - { - return SaveAssetAsImpl(m_activeAssetId, saveCB); - } + GraphCanvas::SceneRequestBus::Event(graphCanvasGraphId, &GraphCanvas::SceneRequests::SetMimeType, Widget::NodePaletteDockWidget::GetMimeType()); + GraphCanvas::SceneMemberNotificationBus::Event(graphCanvasGraphId, &GraphCanvas::SceneMemberNotifications::OnSceneReady); + } - bool MainWindow::SaveAssetImpl(const AZ::Data::AssetId& assetId, const Callbacks::OnSave& saveCB) - { - if (!assetId.IsValid()) + if (IsTabOpen(handle, outTabIndex)) { - return false; + RefreshActiveAsset(); } - // TODO: Set graph read-only to prevent edits during save + PopPreventUndoStateUpdate(); - bool saveSuccessful = false; - Tracker::ScriptCanvasFileState fileState = GetAssetFileState(assetId); + GraphCanvas::AssetEditorNotificationBus::Event(ScriptCanvasEditor::AssetEditorId + , &GraphCanvas::AssetEditorNotifications::OnGraphLoaded, graphCanvasGraphId); - if (fileState == Tracker::ScriptCanvasFileState::NEW) - { - saveSuccessful = SaveAssetAsImpl(assetId, saveCB); - } - else if (fileState == Tracker::ScriptCanvasFileState::MODIFIED - || fileState == Tracker::ScriptCanvasFileState::SOURCE_REMOVED) - { - SaveAsset(assetId, saveCB); - saveSuccessful = true; - } + return AZ::Success(outTabIndex); + } - return saveSuccessful; + bool MainWindow::OnFileSave() + { + return SaveAssetImpl(m_activeGraph, Save::InPlace); } - bool MainWindow::SaveAssetAsImpl(const AZ::Data::AssetId& inMemoryAssetId, const Callbacks::OnSave& saveCB) + bool MainWindow::OnFileSaveAs() { - if (!inMemoryAssetId.IsValid()) + return SaveAssetImpl(m_activeGraph, Save::As); + } + + bool MainWindow::SaveAssetImpl(const ScriptCanvasEditor::SourceHandle& inMemoryAssetId, Save save) + { + if (!inMemoryAssetId.IsGraphValid()) { return false; } - if (m_activeAssetId != inMemoryAssetId) + if (!m_activeGraph.AnyEquals(inMemoryAssetId)) { OnChangeActiveGraphTab(inMemoryAssetId); } PrepareAssetForSave(inMemoryAssetId); + ScriptCanvasAssetDescription assetDescription; AZStd::string suggestedFilename; AZStd::string suggestedFileFilter; - GetSuggestedFullFilenameToSaveAs(inMemoryAssetId, suggestedFilename, suggestedFileFilter); + bool isValidFileName = false; + + if (save == Save::InPlace) + { + isValidFileName = true; + suggestedFileFilter = ScriptCanvasAssetDescription().GetExtensionImpl(); + suggestedFilename = inMemoryAssetId.Path().c_str(); + } + else + { + suggestedFileFilter = ScriptCanvasAssetDescription().GetExtensionImpl(); + if (inMemoryAssetId.Path().empty()) + { + suggestedFilename = ScriptCanvasAssetDescription().GetSuggestedSavePathImpl(); + } + else + { + suggestedFilename = inMemoryAssetId.Path().c_str(); + } + } + EnsureSaveDestinationDirectory(suggestedFilename); - QString filter = suggestedFileFilter.c_str(); - QString selectedFile; - - bool isValidFileName = false; + QString selectedFile = suggestedFilename.c_str(); while (!isValidFileName) { @@ -1806,6 +1678,12 @@ namespace ScriptCanvasEditor if (!selectedFile.isEmpty()) { AZStd::string filePath = selectedFile.toUtf8().data(); + + if (!AZ::StringFunc::EndsWith(filePath, assetDescription.GetExtensionImpl(), false)) + { + filePath += assetDescription.GetExtensionImpl(); + } + AZStd::string fileName; // Verify that the path is within the project @@ -1815,11 +1693,7 @@ namespace ScriptCanvasEditor AZ::IO::FileIOBase::GetInstance()->ResolvePath("@engroot@", assetRootChar.data(), assetRootChar.size()); assetRoot = assetRootChar.data(); - /* if (!AZ::StringFunc::StartsWith(filePath, assetRoot)) - { - QMessageBox::information(this, "Unable to Save", AZStd::string::format("You must select a path within the current project\n\n%s", assetRoot.c_str()).c_str()); - } - else*/ if (AzFramework::StringFunc::Path::GetFileName(filePath.c_str(), fileName)) + if (AzFramework::StringFunc::Path::GetFileName(filePath.c_str(), fileName)) { isValidFileName = !(fileName.empty()); } @@ -1827,7 +1701,6 @@ namespace ScriptCanvasEditor { QMessageBox::information(this, "Unable to Save", "File name cannot be empty"); } - } else { @@ -1839,127 +1712,133 @@ namespace ScriptCanvasEditor { AZStd::string internalStringFile = selectedFile.toUtf8().data(); + + if (!AZ::StringFunc::EndsWith(internalStringFile, assetDescription.GetExtensionImpl(), false)) + { + internalStringFile += assetDescription.GetExtensionImpl(); + } + if (!AssetHelpers::IsValidSourceFile(internalStringFile, GetActiveScriptCanvasId())) { QMessageBox::warning(this, "Unable to Save", QString("File\n'%1'\n\nDoes not match the asset type of the current Graph.").arg(selectedFile)); return false; } - SaveNewAsset(internalStringFile, inMemoryAssetId, saveCB); - + SaveAs(internalStringFile, inMemoryAssetId); m_newlySavedFile = internalStringFile; - // Forcing the file add here, since we are creating a new file AddRecentFile(m_newlySavedFile.c_str()); - return true; } return false; } - - void MainWindow::OnSaveCallback(bool saveSuccess, AZ::Data::AssetPtr fileAsset, AZ::Data::AssetId previousFileAssetId) + + void MainWindow::OnSaveCallBack(const VersionExplorer::FileSaveResult& result) { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AZStd::string tabName = m_tabBar->tabText(m_tabBar->currentIndex()).toUtf8().data(); - - int saveTabIndex = m_tabBar->currentIndex(); + const bool saveSuccess = result.fileSaveError.empty(); + auto completeDescription = CompleteDescription(m_fileSaver->GetSource()); + auto memoryAsset = completeDescription ? *completeDescription : m_fileSaver->GetSource(); + int saveTabIndex = m_tabBar->FindTab(memoryAsset); + AZStd::string tabName = saveTabIndex >= 0 ? m_tabBar->tabText(saveTabIndex).toUtf8().data() : ""; if (saveSuccess) { - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, fileAsset->GetId()); - AZ_Assert(memoryAsset, "At this point we must have a MemoryAsset"); + ScriptCanvasEditor::SourceHandle& fileAssetId = memoryAsset; + int currentTabIndex = m_tabBar->currentIndex(); - // Update the editor with the new information about this asset. - const AZ::Data::AssetId& fileAssetId = memoryAsset->GetFileAssetId(); + AZ::Data::AssetId oldId = fileAssetId.Id(); + AZ::Data::AssetInfo assetInfo; + assetInfo.m_assetId = fileAssetId.Id(); + AZ_VerifyWarning("ScriptCanvas", AssetHelpers::GetAssetInfo(fileAssetId.Path().c_str(), assetInfo) + , "Failed to find asset info for source file just saved: %s", fileAssetId.Path().c_str()); - saveTabIndex = m_tabBar->FindTab(fileAssetId); + const bool assetIdHasChanged = assetInfo.m_assetId.m_guid != fileAssetId.Id(); + fileAssetId = SourceHandle(fileAssetId, assetInfo.m_assetId.m_guid, fileAssetId.Path()); - // We've saved as over a new graph, so we need to close the old one. - if (saveTabIndex != m_tabBar->currentIndex()) - { - // Invalidate the file asset id so we don't delete trigger the asset flow. - m_tabBar->setTabData(saveTabIndex, QVariant::fromValue(AZ::Data::AssetId())); - - m_tabBar->CloseTab(saveTabIndex); - saveTabIndex = -1; - } - - if (saveTabIndex < 0) + // check for saving a graph over another graph with an open tab + for (;;) { - // This asset had not been saved yet, we will need to use the in memory asset Id to get the index. - saveTabIndex = m_tabBar->FindTab(memoryAsset->GetId()); - - if (saveTabIndex < 0) + auto graph = fileAssetId.Get(); + int tabIndexByGraph = m_tabBar->FindTab(graph); + if (tabIndexByGraph == -1) { - // Finally, we may have Saved-As and we need the previous file asset Id to find the tab - saveTabIndex = m_tabBar->FindTab(previousFileAssetId); + AZ_Warning("ScriptCanvas", false, "unable to find graph just saved"); + break; } - } - AzFramework::StringFunc::Path::GetFileName(memoryAsset->GetAbsolutePath().c_str(), tabName); + int saveOverMatch = m_tabBar->FindSaveOverMatch(fileAssetId); + if (saveOverMatch < 0) + { + saveTabIndex = tabIndexByGraph; + currentTabIndex = m_tabBar->currentIndex(); + break; + } - // Update the tab's assetId to the file asset Id (necessary when saving a new asset) - m_tabBar->ConfigureTab(saveTabIndex, fileAssetId, tabName); + m_tabBar->CloseTab(saveOverMatch); + } - GeneralAssetNotificationBus::Event(memoryAsset->GetId(), &GeneralAssetNotifications::OnAssetVisualized); + // this path is questionable, this is a save request that is not the current graph + // We've saved as over a new graph, so we need to close the old one. + if (saveTabIndex != currentTabIndex) + { + // Invalidate the file asset id so we don't delete trigger the asset flow. + m_tabBar->setTabData(saveTabIndex, QVariant::fromValue(Widget::GraphTabMetadata())); + m_tabBar->CloseTab(saveTabIndex); + saveTabIndex = -1; + } - auto requestorIter = m_assetCreationRequests.find(fileAsset->GetId()); + AzFramework::StringFunc::Path::GetFileName(memoryAsset.Path().c_str(), tabName); - if (requestorIter != m_assetCreationRequests.end()) + if (assetIdHasChanged) { - auto editorComponents = AZ::EntityUtils::FindDerivedComponents(requestorIter->second.first); + auto entity = memoryAsset.Get()->GetEntity(); + + auto editorComponents = AZ::EntityUtils::FindDerivedComponents(entity); if (editorComponents.empty()) { - auto firstRequestBus = EditorScriptCanvasComponentRequestBus::FindFirstHandler(requestorIter->second.first); - - if (firstRequestBus) + if (auto firstRequestBus = EditorScriptCanvasComponentRequestBus::FindFirstHandler(entity->GetId())) { - firstRequestBus->SetAssetId(fileAsset->GetId()); + firstRequestBus->SetAssetId(memoryAsset.Describe()); } } else { for (auto editorComponent : editorComponents) { - if (editorComponent->GetId() == requestorIter->second.second) + if (editorComponent->GetAssetId() == oldId) { - editorComponent->SetAssetId(fileAsset->GetId()); + editorComponent->SetAssetId(memoryAsset.Describe()); break; } } } - - m_assetCreationRequests.erase(requestorIter); - } + } // Soft switch the asset id here. We'll do a double scene switch down below to actually switch the active assetid - m_activeAssetId = fileAssetId; - } - else - { - // Use the previous memory asset to find what we had setup as our display - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, m_activeAssetId); + m_activeGraph = fileAssetId; - // Drop off our file modifier status for our display name when we fail to save. - if (tabName.at(tabName.size() -1) == '*') + if (tabName.at(tabName.size() - 1) == '*' || tabName.at(tabName.size() - 1) == '^') { tabName = tabName.substr(0, tabName.size() - 2); } - } - if (m_tabBar->currentIndex() != saveTabIndex) - { - m_tabBar->setCurrentIndex(saveTabIndex); + auto tabData = m_tabBar->GetTabData(saveTabIndex); + tabData->m_fileState = Tracker::ScriptCanvasFileState::UNMODIFIED; + tabData->m_assetId = fileAssetId; + m_tabBar->SetTabData(*tabData, saveTabIndex); + m_tabBar->SetTabText(saveTabIndex, tabName.c_str()); } else { - // Something weird happens with our saving. Where we are relying on these scene changes being called. - AZ::Data::AssetId previousAssetId = m_activeAssetId; + const auto failureMessage = AZStd::string::format("Failed to save %s: %s", tabName.c_str(), result.fileSaveError.c_str()); + QMessageBox::critical(this, QString(), QObject::tr(failureMessage.data())); + } - OnChangeActiveGraphTab(AZ::Data::AssetId()); - OnChangeActiveGraphTab(previousAssetId); + if (m_tabBar->currentIndex() != saveTabIndex) + { + m_tabBar->setCurrentIndex(saveTabIndex); } UpdateAssignToSelectionState(); @@ -1969,81 +1848,34 @@ namespace ScriptCanvasEditor const bool displayAsNotification = true; RunGraphValidation(displayAsNotification); - // This is called during saving, so the is scaving flag is always true Need to update the state after this callback is complete. So schedule for next system tick. - AddSystemTickAction(SystemTickActionFlag::UpdateSaveMenuState); - - if (m_closeCurrentGraphAfterSave) - { - AddSystemTickAction(SystemTickActionFlag::CloseCurrentGraph); - } - m_closeCurrentGraphAfterSave = false; EnableAssetView(memoryAsset); + UpdateSaveState(true); UnblockCloseRequests(); + m_fileSaver.reset(); } - bool MainWindow::ActivateAndSaveAsset(const AZ::Data::AssetId& unsavedAssetId, const Callbacks::OnSave& saveCB) + bool MainWindow::ActivateAndSaveAsset(const ScriptCanvasEditor::SourceHandle& unsavedAssetId) { SetActiveAsset(unsavedAssetId); - return OnFileSave(saveCB); + return OnFileSave(); } - void MainWindow::SaveAsset(AZ::Data::AssetId assetId, const Callbacks::OnSave& onSave) + void MainWindow::SaveAs(AZStd::string_view path, ScriptCanvasEditor::SourceHandle inMemoryAssetId) { - PrepareAssetForSave(assetId); - - auto onSaveCallback = [this, onSave](bool saveSuccess, AZ::Data::AssetPtr asset, AZ::Data::AssetId previousAssetId) - { - OnSaveCallback(saveSuccess, asset, previousAssetId); - if (onSave) - { - AZStd::invoke(onSave, saveSuccess, asset, previousAssetId); - } - }; + DisableAssetView(inMemoryAssetId); + UpdateSaveState(false); + m_fileSaver = AZStd::make_unique + ( nullptr + , [this](const VersionExplorer::FileSaveResult& fileSaveResult) { OnSaveCallBack(fileSaveResult); }); - AssetTrackerRequestBus::Broadcast(&AssetTrackerRequests::Save, assetId, onSaveCallback); - UpdateSaveState(); + ScriptCanvasEditor::SourceHandle newLocation(inMemoryAssetId, AZ::Uuid::CreateNull(), path); + MarkRecentSave(newLocation); + m_fileSaver->Save(newLocation); - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, m_activeAssetId); - - // Disable the current view if we are saving. - if (memoryAsset) - { - DisableAssetView(memoryAsset); - } - - BlockCloseRequests(); - } - - void MainWindow::SaveNewAsset(AZStd::string_view path, AZ::Data::AssetId inMemoryAssetId, const Callbacks::OnSave& onSave) - { - PrepareAssetForSave(inMemoryAssetId); - - auto onSaveCallback = [this, onSave](bool saveSuccess, AZ::Data::AssetPtr asset, AZ::Data::AssetId previousAssetId) - { - OnSaveCallback(saveSuccess, asset, previousAssetId); - if (onSave) - { - AZStd::invoke(onSave, saveSuccess, asset, previousAssetId); - } - }; - AssetTrackerRequestBus::Broadcast(&AssetTrackerRequests::SaveAs, inMemoryAssetId, path, onSaveCallback); - - UpdateSaveState(); - - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, inMemoryAssetId); - - // Disable the current view if we are saving. - if (memoryAsset) - { - DisableAssetView(memoryAsset); - } - - BlockCloseRequests(); + BlockCloseRequests(); } void MainWindow::OnFileOpen() @@ -2052,8 +1884,6 @@ namespace ScriptCanvasEditor EBUS_EVENT_RESULT(serializeContext, AZ::ComponentApplicationBus, GetSerializeContext); AZ_Assert(serializeContext, "Failed to acquire application serialize context."); - AZ::Data::AssetId openId = ReadRecentAssetId(); - AZStd::string assetRoot; { AZStd::array assetRootChar; @@ -2061,18 +1891,7 @@ namespace ScriptCanvasEditor assetRoot = assetRootChar.data(); } - AZStd::string assetPath; - AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetPath, &AZ::Data::AssetCatalogRequests::GetAssetPathById, openId); - if (!assetPath.empty()) - { - assetPath = AZStd::string::format("%s/%s", assetRoot.c_str(), assetPath.c_str()); - } - - if (!openId.IsValid() || !QFile::exists(assetPath.c_str())) - { - assetPath = AZStd::string::format("%s/scriptcanvas", assetRoot.c_str()); - } - assetPath = AZStd::string::format("%s/scriptcanvas", assetRoot.c_str()); + AZStd::string assetPath = AZStd::string::format("%s/scriptcanvas", assetRoot.c_str()); AZ::EBusAggregateResults> fileFilters; AssetRegistryRequestBus::BroadcastResult(fileFilters, &AssetRegistryRequests::GetAssetHandlerFileFilters); @@ -2454,31 +2273,6 @@ namespace ScriptCanvasEditor GraphCanvas::ViewRequestBus::Event(viewId, &GraphCanvas::ViewRequests::CenterOnEndOfChain); } - void MainWindow::UpdateWorkspaceStatus(const ScriptCanvasMemoryAsset& memoryAsset) - { - AZ::Data::AssetId fileAssetId = memoryAsset.GetFileAssetId(); - - size_t eraseCount = m_loadingAssets.erase(fileAssetId); - - if (eraseCount > 0) - { - AZStd::string rootFilePath; - AZ::Data::AssetInfo assetInfo = AssetHelpers::GetAssetInfo(fileAssetId, rootFilePath); - - // Don't want to use the join since I don't want the normalized path - if (!rootFilePath.empty() && !assetInfo.m_relativePath.empty()) - { - eraseCount = m_loadingWorkspaceAssets.erase(fileAssetId); - - if (eraseCount == 0) - { - AZStd::string fullPath = AZStd::string::format("%s/%s", rootFilePath.c_str(), assetInfo.m_relativePath.c_str()); - AddRecentFile(fullPath.c_str()); - } - } - } - } - void MainWindow::OnCanUndoChanged(bool canUndo) { ui->action_Undo->setEnabled(canUndo); @@ -2519,7 +2313,7 @@ namespace ScriptCanvasEditor { if (m_allowAutoSave) { - const Tracker::ScriptCanvasFileState& fileState = GetAssetFileState(m_activeAssetId); + const Tracker::ScriptCanvasFileState& fileState = GetAssetFileState(m_activeGraph); if (fileState != Tracker::ScriptCanvasFileState::INVALID && fileState != Tracker::ScriptCanvasFileState::NEW) { OnFileSaveCaller(); @@ -2528,52 +2322,57 @@ namespace ScriptCanvasEditor } //! GeneralRequestBus - void MainWindow::OnChangeActiveGraphTab(AZ::Data::AssetId assetId) + void MainWindow::OnChangeActiveGraphTab(ScriptCanvasEditor::SourceHandle assetId) { SetActiveAsset(assetId); } AZ::EntityId MainWindow::GetActiveGraphCanvasGraphId() const { - AZ::EntityId graphId; - AssetTrackerRequestBus::BroadcastResult(graphId, &AssetTrackerRequests::GetGraphId, m_activeAssetId); + AZ::EntityId graphId{}; + + if (m_activeGraph.IsGraphValid()) + { + EditorGraphRequestBus::EventResult + ( graphId, m_activeGraph.Get()->GetScriptCanvasId(), &EditorGraphRequests::GetGraphCanvasGraphId); + } + return graphId; } ScriptCanvas::ScriptCanvasId MainWindow::GetActiveScriptCanvasId() const { - ScriptCanvas::ScriptCanvasId sceneId; - AssetTrackerRequestBus::BroadcastResult(sceneId, &AssetTrackerRequests::GetScriptCanvasId, m_activeAssetId); - return sceneId; + return FindScriptCanvasIdByAssetId(m_activeGraph); } GraphCanvas::GraphId MainWindow::GetGraphCanvasGraphId(const ScriptCanvas::ScriptCanvasId& scriptCanvasId) const { - AZ::EntityId graphCanvasId; - AssetTrackerRequestBus::BroadcastResult(graphCanvasId, &AssetTrackerRequests::GetGraphCanvasId, scriptCanvasId); - - return graphCanvasId; + AZ::EntityId graphId{}; + EditorGraphRequestBus::EventResult(graphId, scriptCanvasId, &EditorGraphRequests::GetGraphCanvasGraphId); + return graphId; } - GraphCanvas::GraphId MainWindow::FindGraphCanvasGraphIdByAssetId(const AZ::Data::AssetId& assetId) const + GraphCanvas::GraphId MainWindow::FindGraphCanvasGraphIdByAssetId(const ScriptCanvasEditor::SourceHandle& assetId) const { - AZ::EntityId graphId; - AssetTrackerRequestBus::BroadcastResult(graphId, &AssetTrackerRequests::GetGraphId, assetId); + AZ::EntityId graphId{}; + + if (assetId.IsGraphValid()) + { + EditorGraphRequestBus::EventResult + ( graphId, assetId.Get()->GetScriptCanvasId(), &EditorGraphRequests::GetGraphCanvasGraphId); + } + return graphId; } - ScriptCanvas::ScriptCanvasId MainWindow::FindScriptCanvasIdByAssetId(const AZ::Data::AssetId& assetId) const + ScriptCanvas::ScriptCanvasId MainWindow::FindScriptCanvasIdByAssetId(const ScriptCanvasEditor::SourceHandle& assetId) const { - ScriptCanvas::ScriptCanvasId scriptCanvasId; - AssetTrackerRequestBus::BroadcastResult(scriptCanvasId, &AssetTrackerRequests::GetScriptCanvasId, assetId); - return scriptCanvasId; + return assetId.IsGraphValid() ? assetId.Get()->GetScriptCanvasId() : ScriptCanvas::ScriptCanvasId{}; } ScriptCanvas::ScriptCanvasId MainWindow::GetScriptCanvasId(const GraphCanvas::GraphId& graphCanvasGraphId) const { - ScriptCanvas::ScriptCanvasId scriptCanvasId; - AssetTrackerRequestBus::BroadcastResult(scriptCanvasId, &AssetTrackerRequests::GetScriptCanvasIdFromGraphId, graphCanvasGraphId); - return scriptCanvasId; + return m_tabBar->FindScriptCanvasIdFromGraphCanvasId(graphCanvasGraphId); } bool MainWindow::IsInUndoRedo(const AZ::EntityId& graphCanvasGraphId) const @@ -2602,15 +2401,15 @@ namespace ScriptCanvasEditor return isActive; } - QVariant MainWindow::GetTabData(const AZ::Data::AssetId& assetId) + QVariant MainWindow::GetTabData(const ScriptCanvasEditor::SourceHandle& assetId) { for (int tabIndex = 0; tabIndex < m_tabBar->count(); ++tabIndex) { QVariant tabdata = m_tabBar->tabData(tabIndex); if (tabdata.isValid()) { - auto tabAssetId = tabdata.value(); - if (tabAssetId == assetId) + auto tabAssetId = tabdata.value(); + if (tabAssetId.m_assetId.AnyEquals(assetId)) { return tabdata; } @@ -2619,7 +2418,7 @@ namespace ScriptCanvasEditor return QVariant(); } - bool MainWindow::IsTabOpen(const AZ::Data::AssetId& fileAssetId, int& outTabIndex) const + bool MainWindow::IsTabOpen(const ScriptCanvasEditor::SourceHandle& fileAssetId, int& outTabIndex) const { int tabIndex = m_tabBar->FindTab(fileAssetId); if (-1 != tabIndex) @@ -2630,27 +2429,22 @@ namespace ScriptCanvasEditor return false; } - void MainWindow::ReconnectSceneBuses(AZ::Data::AssetId previousAssetId, AZ::Data::AssetId nextAssetId) + void MainWindow::ReconnectSceneBuses(ScriptCanvasEditor::SourceHandle previousAsset, ScriptCanvasEditor::SourceHandle nextAsset) { - ScriptCanvasMemoryAsset::pointer previousAsset; - AssetTrackerRequestBus::BroadcastResult(previousAsset, &AssetTrackerRequests::GetAsset, previousAssetId); - - ScriptCanvasMemoryAsset::pointer nextAsset; - AssetTrackerRequestBus::BroadcastResult(nextAsset, &AssetTrackerRequests::GetAsset, nextAssetId); - // Disconnect previous asset AZ::EntityId previousScriptCanvasSceneId; - if (previousAsset) - { - previousScriptCanvasSceneId = previousAsset->GetScriptCanvasId(); + if (previousAsset.IsGraphValid()) + { + previousScriptCanvasSceneId = previousAsset.Get()->GetScriptCanvasId(); GraphCanvas::SceneNotificationBus::MultiHandler::BusDisconnect(previousScriptCanvasSceneId); } AZ::EntityId nextAssetGraphCanvasId; - if (nextAsset) + if (nextAsset.IsGraphValid()) { // Connect the next asset - nextAssetGraphCanvasId = nextAsset->GetGraphId(); + EditorGraphRequestBus::EventResult(nextAssetGraphCanvasId, nextAsset.Get()->GetScriptCanvasId(), &EditorGraphRequests::GetGraphCanvasGraphId); + if (nextAssetGraphCanvasId.IsValid()) { GraphCanvas::SceneNotificationBus::MultiHandler::BusConnect(nextAssetGraphCanvasId); @@ -2663,19 +2457,18 @@ namespace ScriptCanvasEditor // Notify about the graph refresh GraphCanvas::AssetEditorNotificationBus::Event(ScriptCanvasEditor::AssetEditorId, &GraphCanvas::AssetEditorNotifications::OnGraphRefreshed, previousScriptCanvasSceneId, nextAssetGraphCanvasId); - } - void MainWindow::SetActiveAsset(const AZ::Data::AssetId& fileAssetId) + void MainWindow::SetActiveAsset(const ScriptCanvasEditor::SourceHandle& fileAssetId) { - if (m_activeAssetId == fileAssetId) + if (m_activeGraph.AnyEquals(fileAssetId)) { return; } - AssetHelpers::PrintInfo("SetActiveAsset : from: %s to %s", AssetHelpers::AssetIdToString(m_activeAssetId).c_str(), AssetHelpers::AssetIdToString(fileAssetId).c_str()); + AssetHelpers::PrintInfo("SetActiveAsset : from: %s to %s", m_activeGraph.ToString().c_str(), fileAssetId.ToString().c_str()); - if (fileAssetId.IsValid()) + if (fileAssetId.IsGraphValid()) { if (m_tabBar->FindTab(fileAssetId) >= 0) { @@ -2688,87 +2481,54 @@ namespace ScriptCanvasEditor } } - if (m_activeAssetId.IsValid()) + if (m_activeGraph.IsGraphValid()) { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, m_activeAssetId); - // If we are saving the asset, the Id may have changed from the in-memory to the file asset Id, in that case, // there's no need to hide the view or remove the widget - if (memoryAsset && memoryAsset->GetView()) + auto oldTab = m_tabBar->FindTab(m_activeGraph); + if (auto view = m_tabBar->ModTabView(oldTab)) { - memoryAsset->GetView()->hide(); - m_layout->removeWidget(memoryAsset->GetView()); + view->hide(); + m_layout->removeWidget(view); + m_tabBar->ClearTabView(oldTab); } } - if (fileAssetId.IsValid()) + if (fileAssetId.IsGraphValid()) { - AZ::Data::AssetId previousAssetId = m_activeAssetId; - - m_activeAssetId = fileAssetId; + ScriptCanvasEditor::SourceHandle previousAssetId = m_activeGraph; + m_activeGraph = fileAssetId; RefreshActiveAsset(); - - ReconnectSceneBuses(previousAssetId, m_activeAssetId); + ReconnectSceneBuses(previousAssetId, m_activeGraph); } else { - AZ::Data::AssetId previousAssetId = m_activeAssetId; - - m_activeAssetId.SetInvalid(); + ScriptCanvasEditor::SourceHandle previousAssetId = m_activeGraph; + m_activeGraph.Clear(); m_emptyCanvas->show(); - - ReconnectSceneBuses(previousAssetId, m_activeAssetId); - - SignalActiveSceneChanged(AZ::Data::AssetId()); + ReconnectSceneBuses(previousAssetId, m_activeGraph); + SignalActiveSceneChanged(ScriptCanvasEditor::SourceHandle()); } UpdateUndoCache(fileAssetId); - - RefreshSelection(); + RefreshSelection(); } void MainWindow::RefreshActiveAsset() { - if (m_activeAssetId.IsValid()) + if (m_activeGraph.IsGraphValid()) { - AssetHelpers::PrintInfo("RefreshActiveAsset : m_activeAssetId (%s)", AssetHelpers::AssetIdToString(m_activeAssetId).c_str()); - - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, m_activeAssetId); - - if (memoryAsset) + AssetHelpers::PrintInfo("RefreshActiveAsset : m_activeGraph (%s)", m_activeGraph.ToString().c_str()); + if (auto view = m_tabBar->ModOrCreateTabView(m_tabBar->FindTab(m_activeGraph))) { - AZ::EntityId sceneEntityId = memoryAsset->GetScriptCanvasId(); - - const auto& scriptCanvasAsset = memoryAsset->GetAsset(); - - if (scriptCanvasAsset.IsReady() && scriptCanvasAsset.Get()->GetScriptCanvasEntity()->GetState() == AZ::Entity::State::Active) - { - if (!memoryAsset->GetView()) - { - memoryAsset->CreateView(m_tabBar); - } - - auto view = memoryAsset->GetView(); - AZ_Assert(view, "Asset should have a view"); - if (view) - { - AssetHelpers::PrintInfo("RefreshActiveAsset : m_activeAssetId (%s)", AssetHelpers::AssetIdToString(m_activeAssetId).c_str()); - - view->ShowScene(sceneEntityId); - m_layout->addWidget(view); - view->show(); - - m_emptyCanvas->hide(); - } - - SignalActiveSceneChanged(m_activeAssetId); - } + view->ShowScene(m_activeGraph.Get()->GetScriptCanvasId()); + m_layout->addWidget(view); + view->show(); + m_emptyCanvas->hide(); + SignalActiveSceneChanged(m_activeGraph); } else { - // If we couldn't load a memory asset for our active asset. Just set ourselves to invalid. SetActiveAsset({}); } } @@ -2777,15 +2537,6 @@ namespace ScriptCanvasEditor void MainWindow::Clear() { m_tabBar->CloseAllTabs(); - - AssetTrackerRequests::AssetList assets; - AssetTrackerRequestBus::BroadcastResult(assets, &AssetTrackerRequests::GetAssets); - - for (auto asset : assets) - { - RemoveScriptCanvasAsset(asset->GetAsset().GetId()); - } - SetActiveAsset({}); } @@ -2794,61 +2545,22 @@ namespace ScriptCanvasEditor QVariant tabdata = m_tabBar->tabData(index); if (tabdata.isValid()) { - auto fileAssetId = tabdata.value(); - - Tracker::ScriptCanvasFileState fileState; - AssetTrackerRequestBus::BroadcastResult(fileState, &AssetTrackerRequests::GetFileState, fileAssetId); - - bool isSaving = false; - AssetTrackerRequestBus::BroadcastResult(isSaving, &AssetTrackerRequests::IsSaving, fileAssetId); - - if (isSaving) - { - m_closeCurrentGraphAfterSave = true; - return; - } - + Widget::GraphTabMetadata tabMetadata = tabdata.value(); + Tracker::ScriptCanvasFileState fileState = tabMetadata.m_fileState; UnsavedChangesOptions saveDialogResults = UnsavedChangesOptions::CONTINUE_WITHOUT_SAVING; - if (!isSaving && (fileState == Tracker::ScriptCanvasFileState::NEW || fileState == Tracker::ScriptCanvasFileState::MODIFIED || fileState == Tracker::ScriptCanvasFileState::SOURCE_REMOVED)) - { - SetActiveAsset(fileAssetId); - AZStd::string tabName; - AssetTrackerRequestBus::BroadcastResult(tabName, &AssetTrackerRequests::GetTabName, fileAssetId); - - saveDialogResults = ShowSaveDialog(tabName.c_str()); + if (fileState == Tracker::ScriptCanvasFileState::NEW + || fileState == Tracker::ScriptCanvasFileState::MODIFIED + || fileState == Tracker::ScriptCanvasFileState::SOURCE_REMOVED) + { + SetActiveAsset(tabMetadata.m_assetId); + saveDialogResults = ShowSaveDialog(m_tabBar->tabText(index).toUtf8().constData()); } if (saveDialogResults == UnsavedChangesOptions::SAVE) { - auto saveCB = [this](bool isSuccessful, AZ::Data::AssetPtr asset, AZ::Data::AssetId) - { - if (isSuccessful) - { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, asset->GetId()); - AZ_Assert(memoryAsset, "At this point we must have a MemoryAsset"); - - int tabIndex = -1; - if (IsTabOpen(memoryAsset->GetFileAssetId(), tabIndex)) - { - OnTabCloseRequest(tabIndex); - } - } - else - { - QMessageBox::critical(this, QString(), QObject::tr("Failed to save.")); - } - }; - - if (fileState == Tracker::ScriptCanvasFileState::NEW) - { - SaveAssetAsImpl(fileAssetId, saveCB); - } - else - { - SaveAsset(fileAssetId, saveCB); - } + m_closeCurrentGraphAfterSave = true; + SaveAssetImpl(tabMetadata.m_assetId, fileState == Tracker::ScriptCanvasFileState::NEW ? Save::As : Save::InPlace); } else if (saveDialogResults == UnsavedChangesOptions::CONTINUE_WITHOUT_SAVING) { @@ -2862,16 +2574,15 @@ namespace ScriptCanvasEditor QVariant tabdata = m_tabBar->tabData(index); if (tabdata.isValid()) { - auto assetId = tabdata.value(); - SaveAssetImpl(assetId, nullptr); + auto assetId = tabdata.value(); + SaveAssetImpl(assetId.m_assetId, Save::InPlace); } - } void MainWindow::CloseAllTabs() { m_isClosingTabs = true; - m_skipTabOnClose.SetInvalid(); + m_skipTabOnClose.Clear(); CloseNextTab(); } @@ -2881,7 +2592,7 @@ namespace ScriptCanvasEditor QVariant tabdata = m_tabBar->tabData(index); if (tabdata.isValid()) { - auto assetId = tabdata.value(); + auto assetId = tabdata.value().m_assetId; m_isClosingTabs = true; m_skipTabOnClose = assetId; @@ -2897,14 +2608,10 @@ namespace ScriptCanvasEditor { QClipboard* clipBoard = QGuiApplication::clipboard(); - auto assetId = tabdata.value(); - - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetId); - - if (memoryAsset) + auto assetId = tabdata.value(); + if (!assetId.m_assetId.Path().empty()) { - clipBoard->setText(memoryAsset->GetAbsolutePath().c_str()); + clipBoard->setText(assetId.m_assetId.Path().c_str()); } else { @@ -2915,7 +2622,6 @@ namespace ScriptCanvasEditor void MainWindow::OnActiveFileStateChanged() { - UpdateSaveState(); UpdateAssignToSelectionState(); } @@ -2924,10 +2630,10 @@ namespace ScriptCanvasEditor if (m_isClosingTabs) { if (m_tabBar->count() == 0 - || (m_tabBar->count() == 1 && m_skipTabOnClose.IsValid())) + || (m_tabBar->count() == 1 && m_skipTabOnClose.IsGraphValid())) { m_isClosingTabs = false; - m_skipTabOnClose.SetInvalid(); + m_skipTabOnClose.Clear(); return; } @@ -2938,9 +2644,9 @@ namespace ScriptCanvasEditor QVariant tabdata = m_tabBar->tabData(tab); if (tabdata.isValid()) { - auto assetId = tabdata.value(); + auto assetId = tabdata.value(); - if (assetId != m_skipTabOnClose) + if (!assetId.m_assetId.AnyEquals(m_skipTabOnClose)) { break; } @@ -2958,26 +2664,27 @@ namespace ScriptCanvasEditor QVariant tabdata = m_tabBar->tabData(index); if (tabdata.isValid()) { - auto tabAssetId = tabdata.value(); + auto tabAssetId = tabdata.value(); + - if (tabAssetId == m_activeAssetId) + if (tabAssetId.m_canvasWidget) { - SetActiveAsset({}); + tabAssetId.m_canvasWidget->hide(); } - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, tabAssetId); + bool activeSet = false; - if (memoryAsset && memoryAsset->GetView()) + if (tabAssetId.m_assetId.AnyEquals(m_activeGraph)) { - memoryAsset->GetView()->hide(); + SetActiveAsset({}); + activeSet = true; } m_tabBar->CloseTab(index); m_tabBar->update(); - RemoveScriptCanvasAsset(tabAssetId); + RemoveScriptCanvasAsset(tabAssetId.m_assetId); - if (m_tabBar->count() == 0) + if (!activeSet && m_tabBar->count() == 0) { // The last tab has been removed. SetActiveAsset({}); @@ -3164,7 +2871,7 @@ namespace ScriptCanvasEditor bool hasCopiableSelection = false; bool hasSelection = false; - if (m_activeAssetId.IsValid()) + if (m_activeGraph.IsGraphValid()) { if (graphCanvasGraphId.IsValid()) { @@ -3544,7 +3251,6 @@ namespace ScriptCanvasEditor UpdateAssignToSelectionState(); UpdateUndoRedoState(); - UpdateSaveState(); } void MainWindow::OnWorkspaceRestoreStart() @@ -3552,23 +3258,23 @@ namespace ScriptCanvasEditor m_isRestoringWorkspace = true; } - void MainWindow::OnWorkspaceRestoreEnd(AZ::Data::AssetId lastFocusAsset) + void MainWindow::OnWorkspaceRestoreEnd(ScriptCanvasEditor::SourceHandle lastFocusAsset) { if (m_isRestoringWorkspace) { m_isRestoringWorkspace = false; - if (m_queuedFocusOverride.IsValid()) + if (m_queuedFocusOverride.IsGraphValid()) { SetActiveAsset(m_queuedFocusOverride); - m_queuedFocusOverride.SetInvalid(); + m_queuedFocusOverride.Clear(); } - else if (lastFocusAsset.IsValid()) + else if (lastFocusAsset.IsGraphValid()) { SetActiveAsset(lastFocusAsset); } - if (!m_activeAssetId.IsValid()) + if (!m_activeGraph.IsGraphValid()) { if (m_tabBar->count() > 0) { @@ -3591,11 +3297,11 @@ namespace ScriptCanvasEditor void MainWindow::UpdateAssignToSelectionState() { - bool buttonEnabled = m_activeAssetId.IsValid(); + bool buttonEnabled = m_activeGraph.IsGraphValid(); if (buttonEnabled) { - const Tracker::ScriptCanvasFileState& fileState = GetAssetFileState(m_activeAssetId); + const Tracker::ScriptCanvasFileState& fileState = GetAssetFileState(m_activeGraph); if (fileState == Tracker::ScriptCanvasFileState::INVALID || fileState == Tracker::ScriptCanvasFileState::NEW || fileState == Tracker::ScriptCanvasFileState::SOURCE_REMOVED) { buttonEnabled = false; @@ -3622,24 +3328,10 @@ namespace ScriptCanvasEditor ui->action_Redo->setEnabled(isEnabled); } - void MainWindow::UpdateSaveState() + void MainWindow::UpdateSaveState(bool enabled) { - bool enabled = m_activeAssetId.IsValid(); - bool isSaving = false; - bool hasModifications = false; - - if (enabled) - { - Tracker::ScriptCanvasFileState fileState = GetAssetFileState(m_activeAssetId); - hasModifications = ( fileState == Tracker::ScriptCanvasFileState::MODIFIED - || fileState == Tracker::ScriptCanvasFileState::NEW - || fileState == Tracker::ScriptCanvasFileState::SOURCE_REMOVED); - - AssetTrackerRequestBus::BroadcastResult(isSaving, &AssetTrackerRequests::IsSaving, m_activeAssetId); - } - - ui->action_Save->setEnabled(enabled && !isSaving && hasModifications); - ui->action_Save_As->setEnabled(enabled && !isSaving); + ui->action_Save->setEnabled(enabled); + ui->action_Save_As->setEnabled(enabled); } void MainWindow::CreateFunctionInput() @@ -3837,21 +3529,24 @@ namespace ScriptCanvasEditor return findChild(elementName); } - AZ::EntityId MainWindow::FindEditorNodeIdByAssetNodeId(const AZ::Data::AssetId& assetId, AZ::EntityId assetNodeId) const + AZ::EntityId MainWindow::FindEditorNodeIdByAssetNodeId(const ScriptCanvasEditor::SourceHandle& assetId, AZ::EntityId assetNodeId) const { AZ::EntityId editorEntityId; - AssetTrackerRequestBus::BroadcastResult(editorEntityId, &AssetTrackerRequests::GetEditorEntityIdFromSceneEntityId, assetId, assetNodeId); + AssetTrackerRequestBus::BroadcastResult + ( editorEntityId, &AssetTrackerRequests::GetEditorEntityIdFromSceneEntityId, assetId.Id(), assetNodeId); return editorEntityId; } - AZ::EntityId MainWindow::FindAssetNodeIdByEditorNodeId(const AZ::Data::AssetId& assetId, AZ::EntityId editorNodeId) const + AZ::EntityId MainWindow::FindAssetNodeIdByEditorNodeId(const ScriptCanvasEditor::SourceHandle& assetId, AZ::EntityId editorNodeId) const { AZ::EntityId sceneEntityId; - AssetTrackerRequestBus::BroadcastResult(sceneEntityId, &AssetTrackerRequests::GetSceneEntityIdFromEditorEntityId, assetId, editorNodeId); + AssetTrackerRequestBus::BroadcastResult + ( sceneEntityId, &AssetTrackerRequests::GetSceneEntityIdFromEditorEntityId, assetId.Id(), editorNodeId); return sceneEntityId; } - GraphCanvas::Endpoint MainWindow::CreateNodeForProposalWithGroup(const AZ::EntityId& connectionId, const GraphCanvas::Endpoint& endpoint, const QPointF& scenePoint, const QPoint& screenPoint, AZ::EntityId groupTarget) + GraphCanvas::Endpoint MainWindow::CreateNodeForProposalWithGroup(const AZ::EntityId& connectionId + , const GraphCanvas::Endpoint& endpoint, const QPointF& scenePoint, const QPoint& screenPoint, AZ::EntityId groupTarget) { PushPreventUndoStateUpdate(); @@ -3961,7 +3656,7 @@ namespace ScriptCanvasEditor OnFileNew(); - if (m_activeAssetId.IsValid()) + if (m_activeGraph.IsGraphValid()) { graphId = GetActiveGraphCanvasGraphId(); } @@ -4225,12 +3920,6 @@ namespace ScriptCanvasEditor qobject_cast(parent())->close(); } - if (HasSystemTickAction(SystemTickActionFlag::UpdateSaveMenuState)) - { - RemoveSystemTickAction(SystemTickActionFlag::UpdateSaveMenuState); - UpdateSaveState(); - } - if (HasSystemTickAction(SystemTickActionFlag::CloseCurrentGraph)) { RemoveSystemTickAction(SystemTickActionFlag::CloseCurrentGraph); @@ -4247,10 +3936,7 @@ namespace ScriptCanvasEditor CloseNextTab(); } - if (m_systemTickActions == 0) - { - AZ::SystemTickBus::Handler::BusDisconnect(); - } + ClearStaleSaves(); } void MainWindow::OnCommandStarted(AZ::Crc32) @@ -4265,35 +3951,11 @@ namespace ScriptCanvasEditor void MainWindow::PrepareActiveAssetForSave() { - PrepareAssetForSave(m_activeAssetId); + PrepareAssetForSave(m_activeGraph); } - void MainWindow::PrepareAssetForSave(const AZ::Data::AssetId& assetId) + void MainWindow::PrepareAssetForSave(const ScriptCanvasEditor::SourceHandle& /*assetId*/) { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetId); - - if (memoryAsset) - { - AZ::EntityId graphId = memoryAsset->GetGraphId(); - AZ::EntityId scriptCanvasId = memoryAsset->GetScriptCanvasId(); - - AZ::Entity* entity = nullptr; - GraphRequestBus::EventResult(entity, scriptCanvasId, &GraphRequests::GetGraphEntity); - - if (entity) - { - GraphCanvas::GraphModelRequestBus::Event(graphId, &GraphCanvas::GraphModelRequests::OnSaveDataDirtied, entity->GetId()); - } - - GraphCanvas::GraphModelRequestBus::Event(graphId, &GraphCanvas::GraphModelRequests::OnSaveDataDirtied, graphId); - - ScriptCanvasEditor::Graph* graph = AZ::EntityUtils::FindFirstDerivedComponent(entity); - if (graph) - { - graph->MarkVersion(); - } - } } void MainWindow::RestartAutoTimerSave(bool forceTimer) @@ -4336,39 +3998,38 @@ namespace ScriptCanvasEditor void MainWindow::OnAssignToSelectedEntities() { - Tracker::ScriptCanvasFileState fileState; - AssetTrackerRequestBus::BroadcastResult(fileState, &AssetTrackerRequests::GetFileState, m_activeAssetId); - + Tracker::ScriptCanvasFileState fileState = GetAssetFileState(m_activeGraph);; + bool isDocumentOpen = false; AzToolsFramework::EditorRequests::Bus::BroadcastResult(isDocumentOpen, &AzToolsFramework::EditorRequests::IsLevelDocumentOpen); - + if (fileState == Tracker::ScriptCanvasFileState::NEW || fileState == Tracker::ScriptCanvasFileState::SOURCE_REMOVED || !isDocumentOpen) { return; } - + AzToolsFramework::EntityIdList selectedEntityIds; AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(selectedEntityIds, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities); - + auto selectedEntityIdIter = selectedEntityIds.begin(); - + bool isLayerAmbiguous = false; AZ::EntityId targetLayer; - + while (selectedEntityIdIter != selectedEntityIds.end()) { bool isLayerEntity = false; AzToolsFramework::Layers::EditorLayerComponentRequestBus::EventResult(isLayerEntity, (*selectedEntityIdIter), &AzToolsFramework::Layers::EditorLayerComponentRequestBus::Events::HasLayer); - + if (isLayerEntity) { if (targetLayer.IsValid()) { isLayerAmbiguous = true; } - + targetLayer = (*selectedEntityIdIter); - + selectedEntityIdIter = selectedEntityIds.erase(selectedEntityIdIter); } else @@ -4376,20 +4037,20 @@ namespace ScriptCanvasEditor ++selectedEntityIdIter; } } - + if (selectedEntityIds.empty()) { AZ::EntityId createdId; AzToolsFramework::EditorRequests::Bus::BroadcastResult(createdId, &AzToolsFramework::EditorRequests::CreateNewEntity, AZ::EntityId()); - + selectedEntityIds.emplace_back(createdId); - + if (targetLayer.IsValid() && !isLayerAmbiguous) { AZ::TransformBus::Event(createdId, &AZ::TransformBus::Events::SetParent, targetLayer); } } - + for (const AZ::EntityId& entityId : selectedEntityIds) { AssignGraphToEntityImpl(entityId); @@ -4398,7 +4059,7 @@ namespace ScriptCanvasEditor void MainWindow::OnAssignToEntity(const AZ::EntityId& entityId) { - Tracker::ScriptCanvasFileState fileState = GetAssetFileState(m_activeAssetId); + Tracker::ScriptCanvasFileState fileState = GetAssetFileState(m_activeGraph); if (fileState == Tracker::ScriptCanvasFileState::MODIFIED || fileState == Tracker::ScriptCanvasFileState::UNMODIFIED) @@ -4407,11 +4068,10 @@ namespace ScriptCanvasEditor } } - ScriptCanvasEditor::Tracker::ScriptCanvasFileState MainWindow::GetAssetFileState(AZ::Data::AssetId assetId) const + ScriptCanvasEditor::Tracker::ScriptCanvasFileState MainWindow::GetAssetFileState(ScriptCanvasEditor::SourceHandle assetId) const { - Tracker::ScriptCanvasFileState fileState = Tracker::ScriptCanvasFileState::INVALID; - AssetTrackerRequestBus::BroadcastResult(fileState, &AssetTrackerRequests::GetFileState, assetId); - return fileState; + auto dataOptional = m_tabBar->GetTabData(assetId); + return dataOptional ? dataOptional->m_fileState : Tracker::ScriptCanvasFileState::INVALID; } void MainWindow::AssignGraphToEntityImpl(const AZ::EntityId& entityId) @@ -4459,14 +4119,7 @@ namespace ScriptCanvasEditor if (usableRequestBus) { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, m_activeAssetId); - - if (memoryAsset) - { - // We need to assign the AssetId for the file asset, not the in-memory asset - usableRequestBus->SetAssetId(memoryAsset->GetFileAssetId()); - } + usableRequestBus->SetAssetId(m_activeGraph.Describe()); } } @@ -4482,11 +4135,6 @@ namespace ScriptCanvasEditor void MainWindow::AddSystemTickAction(SystemTickActionFlag action) { - if (!AZ::SystemTickBus::Handler::BusIsConnected()) - { - AZ::SystemTickBus::Handler::BusConnect(); - } - m_systemTickActions |= action; } @@ -4516,6 +4164,7 @@ namespace ScriptCanvasEditor m_filesToOpen.pop_front(); OpenFile(nextFile.toUtf8().data()); + OpenNextFile(); } else { @@ -4789,11 +4438,11 @@ namespace ScriptCanvasEditor //connect(m_unitTestDockWidget, &QDockWidget::visibilityChanged, this, &MainWindow::OnViewVisibilityChanged); } - void MainWindow::DisableAssetView(ScriptCanvasMemoryAsset::pointer memoryAsset) + void MainWindow::DisableAssetView(const ScriptCanvasEditor::SourceHandle& memoryAssetId) { - if (memoryAsset->GetView()) + if (auto view = m_tabBar->ModTabView(m_tabBar->FindTab(memoryAssetId))) { - memoryAsset->GetView()->DisableView(); + view->DisableView(); } m_tabBar->setEnabled(false); @@ -4813,11 +4462,11 @@ namespace ScriptCanvasEditor m_autoSaveTimer.stop(); } - void MainWindow::EnableAssetView(ScriptCanvasMemoryAsset::pointer memoryAsset) + void MainWindow::EnableAssetView(const ScriptCanvasEditor::SourceHandle& memoryAssetId) { - if (memoryAsset->GetView()) + if (auto view = m_tabBar->ModTabView(m_tabBar->FindTab(memoryAssetId))) { - memoryAsset->GetView()->EnableView(); + view->EnableView(); } m_tabBar->setEnabled(true); @@ -4835,5 +4484,34 @@ namespace ScriptCanvasEditor UpdateUndoRedoState(); } + + void MainWindow::ClearStaleSaves() + { + AZStd::lock_guard lock(m_mutex); + auto timeNow = AZStd::chrono::system_clock::now(); + AZStd::erase_if(m_saves, [&timeNow](const auto& item) + { + AZStd::sys_time_t delta = AZStd::chrono::seconds(timeNow - item.second).count(); + return delta > 2.0f; + }); + } + + bool MainWindow::IsRecentSave(const SourceHandle& handle) const + { + AZStd::lock_guard lock(const_cast(this)->m_mutex); + AZStd::string key = handle.Path().Native(); + AZStd::to_lower(key.begin(), key.end()); + auto iter = m_saves.find(key); + return iter != m_saves.end(); + } + + void MainWindow::MarkRecentSave(const SourceHandle& handle) + { + AZStd::lock_guard lock(m_mutex); + AZStd::string key = handle.Path().Native(); + AZStd::to_lower(key.begin(), key.end()); + m_saves[key] = AZStd::chrono::system_clock::now(); + } + #include } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.h b/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.h index 7672f0a199..fed4f28f4f 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.h @@ -43,7 +43,6 @@ #include #include #include - #include #include #include @@ -53,6 +52,7 @@ #include #include +#include #if SCRIPTCANVAS_EDITOR #include @@ -153,7 +153,7 @@ namespace ScriptCanvasEditor } }; - //! Manages the Save/Restore operations of the user's las topened and focused graphs + //! Manages the Save/Restore operations of the user's last opened and focused graphs class Workspace : AssetTrackerNotificationBus::MultiHandler { @@ -175,9 +175,9 @@ namespace ScriptCanvasEditor private: void OnAssetReady(const ScriptCanvasMemoryAsset::pointer asset) override; - void SignalAssetComplete(const AZ::Data::AssetId& fileAssetId); + void SignalAssetComplete(const ScriptCanvasEditor::SourceHandle& fileAssetId); - AZ::Data::AssetId GetSourceAssetId(const AZ::Data::AssetId& memoryAssetId) const; + ScriptCanvasEditor::SourceHandle GetSourceAssetId(const ScriptCanvasEditor::SourceHandle& memoryAssetId) const; bool m_rememberOpenCanvases; MainWindow* m_mainWindow; @@ -185,10 +185,10 @@ namespace ScriptCanvasEditor //! Setting focus is problematic unless it is done until after all currently loading graphs have finished loading //! This vector is used to track the list of graphs being opened to restore the workspace and as assets are fully //! ready and activated they are removed from this list. - AZStd::vector m_loadingAssets; + AZStd::vector m_loadingAssets; //! During restore we queue the asset Id to focus in order to do it last - AZ::Data::AssetId m_queuedAssetFocus; + ScriptCanvasEditor::SourceHandle m_queuedAssetFocus; }; enum class UnsavedChangesOptions; @@ -230,7 +230,6 @@ namespace ScriptCanvasEditor , private VariablePaletteRequestBus::Handler , private ScriptCanvas::BatchOperationNotificationBus::Handler , private AssetGraphSceneBus::Handler - , private AssetTrackerNotificationBus::MultiHandler #if SCRIPTCANVAS_EDITOR //, public IEditorNotifyListener #endif @@ -239,6 +238,7 @@ namespace ScriptCanvasEditor , private GraphCanvas::ViewNotificationBus::Handler , public AZ::SystemTickBus::Handler , private AzToolsFramework::ToolsApplicationNotificationBus::Handler + , private AzToolsFramework::AssetSystemBus::Handler , private ScriptCanvas::ScriptCanvasSettingsRequestBus::Handler { Q_OBJECT @@ -269,7 +269,7 @@ namespace ScriptCanvasEditor // Undo Handlers void PostUndoPoint(ScriptCanvas::ScriptCanvasId scriptCanvasId) override; - void SignalSceneDirty(AZ::Data::AssetId assetId) override; + void SignalSceneDirty(ScriptCanvasEditor::SourceHandle assetId) override; void PushPreventUndoStateUpdate() override; void PopPreventUndoStateUpdate() override; @@ -325,12 +325,17 @@ namespace ScriptCanvasEditor // File menu void OnFileNew(); - bool OnFileSave(const Callbacks::OnSave& saveCB); - bool OnFileSaveAs(const Callbacks::OnSave& saveCB); - bool OnFileSaveCaller(){return OnFileSave(nullptr);}; - bool OnFileSaveAsCaller(){return OnFileSaveAs(nullptr);}; - bool SaveAssetImpl(const AZ::Data::AssetId& assetId, const Callbacks::OnSave& saveCB); - bool SaveAssetAsImpl(const AZ::Data::AssetId& assetId, const Callbacks::OnSave& saveCB); + bool OnFileSave(); + bool OnFileSaveAs(); + bool OnFileSaveCaller(){return OnFileSave();}; + bool OnFileSaveAsCaller(){return OnFileSaveAs();}; + bool SaveAssetImpl_OLD(const ScriptCanvasEditor::SourceHandle& assetId, const Callbacks::OnSave& saveCB); + enum class Save + { + InPlace, + As + }; + bool SaveAssetImpl(const ScriptCanvasEditor::SourceHandle& assetId, Save save); void OnFileOpen(); // Edit menu @@ -415,30 +420,27 @@ namespace ScriptCanvasEditor void CloseNextTab(); - bool IsTabOpen(const AZ::Data::AssetId& assetId, int& outTabIndex) const; - QVariant GetTabData(const AZ::Data::AssetId& assetId); + bool IsTabOpen(const SourceHandle& assetId, int& outTabIndex) const; + QVariant GetTabData(const SourceHandle& assetId); //! GeneralRequestBus - AZ::Outcome OpenScriptCanvasAssetId(const AZ::Data::AssetId& assetId) override; - AZ::Outcome OpenScriptCanvasAsset(AZ::Data::AssetId scriptCanvasAssetId, int tabIndex = -1) override; - AZ::Outcome OpenScriptCanvasAsset(const ScriptCanvasMemoryAsset& scriptCanvasAsset, int tabIndex = -1); - int CloseScriptCanvasAsset(const AZ::Data::AssetId& assetId) override; + AZ::Outcome OpenScriptCanvasAssetId(const SourceHandle& assetId, Tracker::ScriptCanvasFileState fileState) override; + AZ::Outcome OpenScriptCanvasAsset(SourceHandle scriptCanvasAssetId, Tracker::ScriptCanvasFileState fileState, int tabIndex = -1) override; + AZ::Outcome OpenScriptCanvasAssetImplementation(const SourceHandle& sourceHandle, Tracker::ScriptCanvasFileState fileState, int tabIndex = -1); + int CloseScriptCanvasAsset(const SourceHandle& assetId) override; bool CreateScriptCanvasAssetFor(const TypeDefs::EntityComponentId& requestingEntityId) override; - bool IsScriptCanvasAssetOpen(const AZ::Data::AssetId& assetId) const override; + bool IsScriptCanvasAssetOpen(const SourceHandle& assetId) const override; const CategoryInformation* FindNodePaletteCategoryInformation(AZStd::string_view categoryPath) const override; const NodePaletteModelInformation* FindNodePaletteModelInformation(const ScriptCanvas::NodeTypeIdentifier& nodeType) const override; //// - AZ::Outcome CreateScriptCanvasAsset(AZStd::string_view assetPath, AZ::Data::AssetType assetType, int tabIndex = -1); - AZ::Outcome UpdateScriptCanvasAsset(const AZ::Data::Asset& scriptCanvasAsset); + AZ::Outcome CreateScriptCanvasAsset(AZStd::string_view assetPath, int tabIndex = -1); - void RefreshScriptCanvasAsset(const AZ::Data::Asset& scriptCanvasAsset); - //! Removes the assetId -> ScriptCanvasAsset mapping and disconnects from the asset tracker - void RemoveScriptCanvasAsset(const AZ::Data::AssetId& assetId); - void OnChangeActiveGraphTab(AZ::Data::AssetId) override; + void RemoveScriptCanvasAsset(const ScriptCanvasEditor::SourceHandle& assetId); + void OnChangeActiveGraphTab(ScriptCanvasEditor::SourceHandle) override; void CreateNewRuntimeAsset() override { OnFileNew(); } @@ -448,8 +450,8 @@ namespace ScriptCanvasEditor GraphCanvas::GraphId GetGraphCanvasGraphId(const ScriptCanvas::ScriptCanvasId& scriptCanvasId) const override; - GraphCanvas::GraphId FindGraphCanvasGraphIdByAssetId(const AZ::Data::AssetId& assetId) const override; - ScriptCanvas::ScriptCanvasId FindScriptCanvasIdByAssetId(const AZ::Data::AssetId& assetId) const override; + GraphCanvas::GraphId FindGraphCanvasGraphIdByAssetId(const ScriptCanvasEditor::SourceHandle& assetId) const override; + ScriptCanvas::ScriptCanvasId FindScriptCanvasIdByAssetId(const ScriptCanvasEditor::SourceHandle& assetId) const override; bool IsInUndoRedo(const AZ::EntityId& graphCanvasGraphId) const override; bool IsScriptCanvasInUndoRedo(const ScriptCanvas::ScriptCanvasId& scriptCanvasId) const override; @@ -517,17 +519,18 @@ namespace ScriptCanvasEditor QObject* FindElementByName(QString elementName) override; //// - AZ::EntityId FindEditorNodeIdByAssetNodeId(const AZ::Data::AssetId& assetId, AZ::EntityId assetNodeId) const override; - AZ::EntityId FindAssetNodeIdByEditorNodeId(const AZ::Data::AssetId& assetId, AZ::EntityId editorNodeId) const override; + AZ::EntityId FindEditorNodeIdByAssetNodeId(const ScriptCanvasEditor::SourceHandle& assetId, AZ::EntityId assetNodeId) const override; + AZ::EntityId FindAssetNodeIdByEditorNodeId(const ScriptCanvasEditor::SourceHandle& assetId, AZ::EntityId editorNodeId) const override; private: + void SourceFileChanged(AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid fileAssetId) override; + void SourceFileRemoved(AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid fileAssetId) override; + void DeleteNodes(const AZ::EntityId& sceneId, const AZStd::vector& nodes) override; void DeleteConnections(const AZ::EntityId& sceneId, const AZStd::vector& connections) override; void DisconnectEndpoints(const AZ::EntityId& sceneId, const AZStd::vector& endpoints) override; ///////////////////////////////////////////////////////////////////////////////////////////// - void UpdateWorkspaceStatus(const ScriptCanvasMemoryAsset& scriptCanvasAsset); - GraphCanvas::Endpoint HandleProposedConnection(const GraphCanvas::GraphId& graphId, const GraphCanvas::ConnectionId& connectionId, const GraphCanvas::Endpoint& endpoint, const GraphCanvas::NodeId& proposedNode, const QPoint& screenPoint); //! UndoNotificationBus @@ -543,29 +546,20 @@ namespace ScriptCanvasEditor void OnAutoSave(); - //! Helper function which serializes a file to disk - //! \param filename name of file to serialize the Entity - //! \param asset asset to save - void GetSuggestedFullFilenameToSaveAs(const AZ::Data::AssetId& assetId, AZStd::string& filePath, AZStd::string& fileFilter); - - void MarkAssetModified(const AZ::Data::AssetId& assetId); + void UpdateFileState(const ScriptCanvasEditor::SourceHandle& assetId, Tracker::ScriptCanvasFileState fileState); // QMainWindow void closeEvent(QCloseEvent *event) override; UnsavedChangesOptions ShowSaveDialog(const QString& filename); - bool ActivateAndSaveAsset(const AZ::Data::AssetId& unsavedAssetId, const Callbacks::OnSave& onSave); + bool ActivateAndSaveAsset(const ScriptCanvasEditor::SourceHandle& unsavedAssetId); - void SaveNewAsset(AZStd::string_view path, AZ::Data::AssetId assetId, const Callbacks::OnSave& onSave); - void SaveAsset(AZ::Data::AssetId assetId, const Callbacks::OnSave& onSave); + void SaveAs(AZStd::string_view path, ScriptCanvasEditor::SourceHandle assetId); void OpenFile(const char* fullPath); void CreateMenus(); - void SignalActiveSceneChanged(const AZ::Data::AssetId assetId); - - void SaveWorkspace(bool updateAssetList = true); - void RestoreWorkspace(); + void SignalActiveSceneChanged(const ScriptCanvasEditor::SourceHandle assetId); void RunUpgradeTool(); @@ -593,29 +587,27 @@ namespace ScriptCanvasEditor void UpdateMenuState(bool enabledState); void OnWorkspaceRestoreStart(); - void OnWorkspaceRestoreEnd(AZ::Data::AssetId lastFocusAsset); + void OnWorkspaceRestoreEnd(ScriptCanvasEditor::SourceHandle lastFocusAsset); void UpdateAssignToSelectionState(); void UpdateUndoRedoState(); - void UpdateSaveState(); + void UpdateSaveState(bool enabled); void CreateFunctionInput(); void CreateFunctionOutput(); void CreateFunctionDefinitionNode(int positionOffset); - int CreateAssetTab(const AZ::Data::AssetId& assetId, int tabIndex = -1); + int CreateAssetTab(const ScriptCanvasEditor::SourceHandle& assetId, Tracker::ScriptCanvasFileState fileState, int tabIndex = -1); //! \param asset The AssetId of the ScriptCanvas Asset. - void SetActiveAsset(const AZ::Data::AssetId& assetId); + void SetActiveAsset(const ScriptCanvasEditor::SourceHandle& assetId); void RefreshActiveAsset(); - void ReconnectSceneBuses(AZ::Data::AssetId previousAssetId, AZ::Data::AssetId nextAssetId); - - void SignalBatchOperationComplete(BatchOperatorTool* batchTool); + void ReconnectSceneBuses(ScriptCanvasEditor::SourceHandle previousAssetId, ScriptCanvasEditor::SourceHandle nextAssetId); void PrepareActiveAssetForSave(); - void PrepareAssetForSave(const AZ::Data::AssetId& asssetId); + void PrepareAssetForSave(const ScriptCanvasEditor::SourceHandle& asssetId); void RestartAutoTimerSave(bool forceTimer = false); @@ -626,24 +618,16 @@ namespace ScriptCanvasEditor void AssignGraphToEntityImpl(const AZ::EntityId& entityId); //// - Tracker::ScriptCanvasFileState GetAssetFileState(AZ::Data::AssetId assetId) const; + Tracker::ScriptCanvasFileState GetAssetFileState(ScriptCanvasEditor::SourceHandle assetId) const; - AZ::Data::AssetId GetSourceAssetId(const AZ::Data::AssetId& memoryAssetId) const + ScriptCanvasEditor::SourceHandle GetSourceAssetId(const ScriptCanvasEditor::SourceHandle& memoryAssetId) const { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, memoryAssetId); - - if (memoryAsset) - { - return memoryAsset->GetFileAssetId(); - } - - return AZ::Data::AssetId(); + return memoryAssetId; } - int InsertTabForAsset(AZStd::string_view assetPath, AZ::Data::AssetId assetId, int tabIndex = -1); + int InsertTabForAsset(AZStd::string_view assetPath, ScriptCanvasEditor::SourceHandle assetId, int tabIndex = -1); - void UpdateUndoCache(AZ::Data::AssetId assetId); + void UpdateUndoCache(ScriptCanvasEditor::SourceHandle assetId); bool HasSystemTickAction(SystemTickActionFlag action); @@ -655,34 +639,9 @@ namespace ScriptCanvasEditor void OpenNextFile(); - template - void MakeNewFile() - { - static int scriptCanvasEditorDefaultNewNameCount = 0; - AZStd::string newAssetName = AZStd::string::format(ScriptCanvas::AssetDescription::GetAssetNamePattern(), ++scriptCanvasEditorDefaultNewNameCount); - - AZStd::array assetRootArray; - if (!AZ::IO::FileIOBase::GetInstance()->ResolvePath(ScriptCanvas::AssetDescription::GetSuggestedSavePath(), assetRootArray.data(), assetRootArray.size())) - { - AZ_ErrorOnce("Script Canvas", false, "Unable to resolve @projectroot@ path"); - } - - AZStd::string assetPath; - AzFramework::StringFunc::Path::Join(assetRootArray.data(), (newAssetName + ScriptCanvas::AssetDescription::GetExtension()).data(), assetPath); - - auto createOutcome = CreateScriptCanvasAsset(assetPath, azrtti_typeid()); - if (createOutcome) - { - } - else - { - AZ_Warning("Script Canvas", createOutcome, "%s", createOutcome.GetError().data()); - } - } - - void DisableAssetView(ScriptCanvasMemoryAsset::pointer memoryAsset); - void EnableAssetView(ScriptCanvasMemoryAsset::pointer memoryAsset); + void DisableAssetView(const ScriptCanvasEditor::SourceHandle& memoryAssetId); + void EnableAssetView(const ScriptCanvasEditor::SourceHandle& memoryAssetId); QWidget* m_host = nullptr; @@ -741,22 +700,22 @@ namespace ScriptCanvasEditor GraphCanvas::GraphCanvasEditorEmptyDockWidget* m_emptyCanvas; // Displayed when there is no open graph QVBoxLayout* m_layout; - AZ::Data::AssetId m_activeAssetId; - + ScriptCanvasEditor::SourceHandle m_activeGraph; + bool m_loadingNewlySavedFile; AZStd::string m_newlySavedFile; AZStd::string m_errorFilePath; bool m_isClosingTabs; - AZ::Data::AssetId m_skipTabOnClose; + ScriptCanvasEditor::SourceHandle m_skipTabOnClose; bool m_enterState; bool m_ignoreSelection; AZ::s32 m_preventUndoStateUpdateCount; bool m_isRestoringWorkspace; - AZ::Data::AssetId m_queuedFocusOverride; + ScriptCanvasEditor::SourceHandle m_queuedFocusOverride; Ui::MainWindow* ui; AZStd::array, c_scriptCanvasEditorSettingsRecentFilesCountMax> m_recentActions; @@ -778,17 +737,17 @@ namespace ScriptCanvasEditor AZStd::vector m_selectedVariableIds; AZ::u32 m_systemTickActions; - AZStd::unordered_set< AZ::Data::AssetId > m_processedClosedAssetIds; + AZStd::unordered_set< ScriptCanvasEditor::SourceHandle > m_processedClosedAssetIds; - AZStd::unordered_set< AZ::Data::AssetId > m_loadingWorkspaceAssets; - AZStd::unordered_set< AZ::Data::AssetId > m_loadingAssets; + AZStd::unordered_set< ScriptCanvasEditor::SourceHandle > m_loadingWorkspaceAssets; + AZStd::unordered_set< ScriptCanvasEditor::SourceHandle > m_loadingAssets; AZStd::unordered_set< AZ::Uuid > m_variablePaletteTypes; AZStd::unordered_map< AZ::Crc32, QObject* > m_automationLookUpMap; bool m_closeCurrentGraphAfterSave; - AZStd::unordered_map< AZ::Data::AssetId, TypeDefs::EntityComponentId > m_assetCreationRequests; + AZStd::unordered_map< ScriptCanvasEditor::SourceHandle, TypeDefs::EntityComponentId > m_assetCreationRequests; ScriptCanvas::Debugger::ClientTransceiver m_clientTRX; GraphCanvas::StyleManager m_styleManager; @@ -797,6 +756,14 @@ namespace ScriptCanvasEditor //! this object manages the Save/Restore operations Workspace* m_workspace; - void OnSaveCallback(bool saveSuccess, AZ::Data::AssetPtr, AZ::Data::AssetId previousFileAssetId); + AZStd::unique_ptr m_fileSaver; + VersionExplorer::FileSaveResult m_fileSaveResult; + void OnSaveCallBack(const VersionExplorer::FileSaveResult& result); + + void ClearStaleSaves(); + bool IsRecentSave(const SourceHandle& handle) const; + void MarkRecentSave(const SourceHandle& handle); + AZStd::recursive_mutex m_mutex; + AZStd::unordered_map m_saves; }; } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Controller.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Controller.cpp index dbcd176ee5..5aa8598c80 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Controller.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Controller.cpp @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -53,7 +52,6 @@ namespace ScriptCanvasEditor m_view->textEdit->setVerticalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOn); connect(m_view->scanButton, &QPushButton::pressed, this, &Controller::OnButtonPressScan); connect(m_view->closeButton, &QPushButton::pressed, this, &Controller::OnButtonPressClose); - m_view->upgradeAllButton->setVisible(false); connect(m_view->upgradeAllButton, &QPushButton::pressed, this, &Controller::OnButtonPressUpgrade); m_view->progressBar->setValue(0); m_view->progressBar->setVisible(false); @@ -104,9 +102,9 @@ namespace ScriptCanvasEditor } } - QList Controller::FindTableItems(const AZ::Data::AssetInfo& info) + QList Controller::FindTableItems(const SourceHandle& info) { - return m_view->tableWidget->findItems(info.m_relativePath.c_str(), Qt::MatchFlag::MatchExactly); + return m_view->tableWidget->findItems(info.Path().c_str(), Qt::MatchFlag::MatchExactly); } void Controller::OnButtonPressClose() @@ -117,30 +115,20 @@ namespace ScriptCanvasEditor void Controller::OnButtonPressScan() { // \todo move to another file - auto isUpToDate = [this](AZ::Data::Asset asset) + auto isUpToDate = [this](const SourceHandle& asset) { - AZ::Entity* scriptCanvasEntity = nullptr; + auto graphComponent = asset.Get(); - if (asset.GetType() == azrtti_typeid()) - { - ScriptCanvasAsset* scriptCanvasAsset = asset.GetAs(); - if (!scriptCanvasAsset) - { - AZ_Warning - (ScriptCanvas::k_VersionExplorerWindow.data() - , false - , "InspectAsset: %s, AsestData failed to return ScriptCanvasAsset" - , asset.GetHint().c_str()); - return true; - } - - scriptCanvasEntity = scriptCanvasAsset->GetScriptCanvasEntity(); - AZ_Assert(scriptCanvasEntity, "The Script Canvas asset must have a valid entity"); - } - - auto graphComponent = scriptCanvasEntity->FindComponent(); - AZ_Assert(graphComponent, "The Script Canvas entity must have a Graph component"); - return !m_view->forceUpgrade->isChecked() && graphComponent->GetVersion().IsLatest(); + AZ_Warning + ( ScriptCanvas::k_VersionExplorerWindow.data() + , asset.Get() != nullptr + , "InspectAsset: %s, failed to load valid graph" + , asset.Path().c_str()); + + return graphComponent + && (!graphComponent->GetVersion().IsLatest() || m_view->forceUpgrade->isChecked()) + ? ScanConfiguration::Filter::Include + : ScanConfiguration::Filter::Exclude; }; ScanConfiguration config; @@ -156,59 +144,19 @@ namespace ScriptCanvasEditor OnButtonPressUpgradeImplementation({}); } - void Controller::OnButtonPressUpgradeImplementation(const AZ::Data::AssetInfo& assetInfo) + void Controller::OnButtonPressUpgradeImplementation(const SourceHandle& assetInfo) { - auto simpleUpdate = [this](AZ::Data::Asset asset) + auto simpleUpdate = [this](SourceHandle& asset) { - if (asset.GetType() == azrtti_typeid()) - { - ScriptCanvasAsset* scriptCanvasAsset = asset.GetAs(); - AZ_Assert(scriptCanvasAsset, "Unable to get the asset of ScriptCanvasAsset, but received type: %s" - , azrtti_typeid().template ToString().c_str()); - if (!scriptCanvasAsset) - { - return; - } + AZ_Warning(ScriptCanvas::k_VersionExplorerWindow.data(), asset.Get() != nullptr + , "The Script Canvas asset must have a Graph component"); - AZ::Entity* scriptCanvasEntity = scriptCanvasAsset->GetScriptCanvasEntity(); - AZ_Assert(scriptCanvasEntity, "View::UpgradeGraph The Script Canvas asset must have a valid entity"); - if (!scriptCanvasEntity) - { - return; - } - - AZ::Entity* queryEntity = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(queryEntity, &AZ::ComponentApplicationRequests::FindEntity, scriptCanvasEntity->GetId()); - if (queryEntity) - { - if (queryEntity->GetState() == AZ::Entity::State::Active) - { - queryEntity->Deactivate(); - } - - scriptCanvasEntity = queryEntity; - } - - if (scriptCanvasEntity->GetState() == AZ::Entity::State::Constructed) - { - scriptCanvasEntity->Init(); - } - - if (scriptCanvasEntity->GetState() == AZ::Entity::State::Init) - { - scriptCanvasEntity->Activate(); - } - - AZ_Assert(scriptCanvasEntity->GetState() == AZ::Entity::State::Active, "Graph entity is not active"); - auto graphComponent = scriptCanvasEntity->FindComponent(); - AZ_Assert(graphComponent, "The Script Canvas entity must have a Graph component"); - if (graphComponent) - { - graphComponent->UpgradeGraph - (asset - , m_view->forceUpgrade->isChecked() ? Graph::UpgradeRequest::Forced : Graph::UpgradeRequest::IfOutOfDate - , m_view->verbose->isChecked()); - } + if (asset.Get()) + { + asset.Mod()->UpgradeGraph + ( asset + , m_view->forceUpgrade->isChecked() ? Graph::UpgradeRequest::Forced : Graph::UpgradeRequest::IfOutOfDate + , m_view->verbose->isChecked()); } }; @@ -216,7 +164,7 @@ namespace ScriptCanvasEditor { int result = QMessageBox::No; QMessageBox mb - (QMessageBox::Warning + ( QMessageBox::Warning , QObject::tr("Failed to Save Upgraded File") , QObject::tr("The upgraded file could not be saved because the file is read only.\n" "Do you want to make it writeable and overwrite it?") @@ -235,12 +183,12 @@ namespace ScriptCanvasEditor ModelRequestsBus::Broadcast(&ModelRequestsTraits::Modify, config); } - void Controller::OnButtonPressUpgradeSingle(const AZ::Data::AssetInfo& assetInfo) + void Controller::OnButtonPressUpgradeSingle(const SourceHandle& info) { - OnButtonPressUpgradeImplementation(assetInfo); + OnButtonPressUpgradeImplementation(info); } - void Controller::OnUpgradeModificationBegin([[maybe_unused]] const ModifyConfiguration& config, const AZ::Data::AssetInfo& info) + void Controller::OnUpgradeModificationBegin([[maybe_unused]] const ModifyConfiguration& config, const SourceHandle& info) { for (auto* item : FindTableItems(info)) { @@ -252,16 +200,16 @@ namespace ScriptCanvasEditor void Controller::OnUpgradeModificationEnd ( [[maybe_unused]] const ModifyConfiguration& config - , const AZ::Data::AssetInfo& info + , const SourceHandle& info , ModificationResult result) { if (result.errorMessage.empty()) { - VE_LOG("Successfully modified %s", result.assetInfo.m_relativePath.c_str()); + VE_LOG("Successfully modified %s", result.asset.Path().c_str()); } else { - VE_LOG("Failed to modify %s: %s", result.assetInfo.m_relativePath.c_str(), result.errorMessage.data()); + VE_LOG("Failed to modify %s: %s", result.asset.Path().c_str(), result.errorMessage.data()); } for (auto* item : FindTableItems(info)) @@ -289,12 +237,10 @@ namespace ScriptCanvasEditor AddLogEntries(); } - void Controller::OnGraphUpgradeComplete(AZ::Data::Asset& asset, bool skipped) + void Controller::OnGraphUpgradeComplete(ScriptCanvasEditor::SourceHandle& asset, bool skipped) { ModificationResult result; result.asset = asset; - AZ::Data::AssetCatalogRequestBus::BroadcastResult - ( result.assetInfo, &AZ::Data::AssetCatalogRequests::GetAssetInfoById, asset.GetId()); if (skipped) { @@ -342,19 +288,19 @@ namespace ScriptCanvasEditor } } - void Controller::OnScanFilteredGraph(const AZ::Data::AssetInfo& info) + void Controller::OnScanFilteredGraph(const SourceHandle& info) { OnScannedGraph(info, Filtered::Yes); } - void Controller::OnScannedGraph(const AZ::Data::AssetInfo& assetInfo, [[maybe_unused]] Filtered filtered) + void Controller::OnScannedGraph(const SourceHandle& assetInfo, [[maybe_unused]] Filtered filtered) { const int rowIndex = m_view->tableWidget->rowCount(); if (filtered == Filtered::No || !m_view->onlyShowOutdated->isChecked()) { m_view->tableWidget->insertRow(rowIndex); - QTableWidgetItem* rowName = new QTableWidgetItem(tr(assetInfo.m_relativePath.c_str())); + QTableWidgetItem* rowName = new QTableWidgetItem(tr(assetInfo.Path().c_str())); m_view->tableWidget->setItem(rowIndex, static_cast(ColumnAsset), rowName); SetRowSucceeded(rowIndex); @@ -376,17 +322,11 @@ namespace ScriptCanvasEditor m_view->tableWidget->setCellWidget(rowIndex, static_cast(ColumnAction), upgradeButton); } - - char resolvedBuffer[AZ_MAX_PATH_LEN] = { 0 }; - AZStd::string path = AZStd::string::format("@devroot@/%s", assetInfo.m_relativePath.c_str()); - AZ::IO::FileIOBase::GetInstance()->ResolvePath(path.c_str(), resolvedBuffer, AZ_MAX_PATH_LEN); - AZ::StringFunc::Path::GetFullPath(resolvedBuffer, path); - AZ::StringFunc::Path::Normalize(path); - + bool result = false; AZ::Data::AssetInfo info; AZStd::string watchFolder; - QByteArray assetNameUtf8 = assetInfo.m_relativePath.c_str(); + QByteArray assetNameUtf8 = assetInfo.Path().c_str(); AzToolsFramework::AssetSystemRequestBus::BroadcastResult ( result , &AzToolsFramework::AssetSystemRequestBus::Events::GetSourceInfoBySourcePath @@ -413,41 +353,41 @@ namespace ScriptCanvasEditor OnScannedGraphResult(assetInfo); } - void Controller::OnScannedGraphResult([[maybe_unused]] const AZ::Data::AssetInfo& info) + void Controller::OnScannedGraphResult([[maybe_unused]] const SourceHandle& info) { m_view->progressBar->setValue(aznumeric_cast(m_handledAssetCount)); ++m_handledAssetCount; AddLogEntries(); } - void Controller::OnScanLoadFailure(const AZ::Data::AssetInfo& info) + void Controller::OnScanLoadFailure(const SourceHandle& info) { const int rowIndex = m_view->tableWidget->rowCount(); m_view->tableWidget->insertRow(rowIndex); QTableWidgetItem* rowName = new QTableWidgetItem - ( tr(AZStd::string::format("Load Error: %s", info.m_relativePath.c_str()).c_str())); + ( tr(AZStd::string::format("Load Error: %s", info.Path().c_str()).c_str())); m_view->tableWidget->setItem(rowIndex, static_cast(ColumnAsset), rowName); SetRowFailed(rowIndex, "Load failed"); OnScannedGraphResult(info); } - void Controller::OnScanUnFilteredGraph(const AZ::Data::AssetInfo& info) + void Controller::OnScanUnFilteredGraph(const SourceHandle& info) { OnScannedGraph(info, Filtered::No); } void Controller::OnUpgradeBegin ( const ModifyConfiguration& config - , [[maybe_unused]] const WorkingAssets& assets) + , [[maybe_unused]] const AZStd::vector& assets) { QString spinnerText = QStringLiteral("Upgrade in progress - "); - if (config.modifySingleAsset.m_assetId.IsValid()) + if (!config.modifySingleAsset.Path().empty()) { spinnerText.append(" single graph"); if (assets.size() == 1) { - for (auto* item : FindTableItems(assets.front().info)) + for (auto* item : FindTableItems(assets.front())) { int row = item->row(); SetRowBusy(row); @@ -498,7 +438,7 @@ namespace ScriptCanvasEditor m_view->scanButton->setEnabled(true); } - void Controller::OnUpgradeDependenciesGathered(const AZ::Data::AssetInfo& info, Result result) + void Controller::OnUpgradeDependenciesGathered(const SourceHandle& info, Result result) { for (auto* item : FindTableItems(info)) { @@ -527,7 +467,7 @@ namespace ScriptCanvasEditor void Controller::OnUpgradeDependencySortBegin ( [[maybe_unused]] const ModifyConfiguration& config - , const WorkingAssets& assets) + , const AZStd::vector& assets) { m_handledAssetCount = 0; m_view->progressBar->setVisible(true); @@ -553,7 +493,7 @@ namespace ScriptCanvasEditor void Controller::OnUpgradeDependencySortEnd ( [[maybe_unused]] const ModifyConfiguration& config - , const WorkingAssets& assets + , const AZStd::vector& assets , [[maybe_unused]] const AZStd::vector& sortedOrder) { m_handledAssetCount = 0; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Controller.h b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Controller.h index 9842ea3da4..2d7b78060e 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Controller.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Controller.h @@ -65,36 +65,36 @@ namespace ScriptCanvasEditor void AddLogEntries(); void EnableAllUpgradeButtons(); - QList FindTableItems(const AZ::Data::AssetInfo& assetInfo); + QList FindTableItems(const SourceHandle& assetInfo); void OnButtonPressClose(); void OnButtonPressScan(); void OnButtonPressUpgrade(); - void OnButtonPressUpgradeImplementation(const AZ::Data::AssetInfo& assetInfo); - void OnButtonPressUpgradeSingle(const AZ::Data::AssetInfo& assetInfo); + void OnButtonPressUpgradeImplementation(const SourceHandle& assetInfo); + void OnButtonPressUpgradeSingle(const SourceHandle& assetInfo); - void OnGraphUpgradeComplete(AZ::Data::Asset&, bool skipped) override; + void OnGraphUpgradeComplete(SourceHandle&, bool skipped) override; void OnScanBegin(size_t assetCount) override; void OnScanComplete(const ScanResult& result) override; - void OnScanFilteredGraph(const AZ::Data::AssetInfo& info) override; - void OnScanLoadFailure(const AZ::Data::AssetInfo& info) override; - void OnScanUnFilteredGraph(const AZ::Data::AssetInfo& info) override; + void OnScanFilteredGraph(const SourceHandle& info) override; + void OnScanLoadFailure(const SourceHandle& info) override; + void OnScanUnFilteredGraph(const SourceHandle& info) override; enum class Filtered { No, Yes }; - void OnScannedGraph(const AZ::Data::AssetInfo& info, Filtered filtered); - void OnScannedGraphResult(const AZ::Data::AssetInfo& info); + void OnScannedGraph(const SourceHandle& info, Filtered filtered); + void OnScannedGraphResult(const SourceHandle& info); // for single operation UI updates, just check the assets size, or note it on the request - void OnUpgradeBegin(const ModifyConfiguration& config, const WorkingAssets& assets) override; + void OnUpgradeBegin(const ModifyConfiguration& config, const AZStd::vector& assets) override; void OnUpgradeComplete(const ModificationResults& results) override; - void OnUpgradeDependenciesGathered(const AZ::Data::AssetInfo& info, Result result) override; - void OnUpgradeDependencySortBegin(const ModifyConfiguration& config, const WorkingAssets& assets) override; + void OnUpgradeDependenciesGathered(const SourceHandle& info, Result result) override; + void OnUpgradeDependencySortBegin(const ModifyConfiguration& config, const AZStd::vector& assets) override; void OnUpgradeDependencySortEnd ( const ModifyConfiguration& config - , const WorkingAssets& assets + , const AZStd::vector& assets , const AZStd::vector& sortedOrder) override; - void OnUpgradeModificationBegin(const ModifyConfiguration& config, const AZ::Data::AssetInfo& info) override; - void OnUpgradeModificationEnd(const ModifyConfiguration& config, const AZ::Data::AssetInfo& info, ModificationResult result) override; + void OnUpgradeModificationBegin(const ModifyConfiguration& config, const SourceHandle& info) override; + void OnUpgradeModificationEnd(const ModifyConfiguration& config, const SourceHandle& info, ModificationResult result) override; void SetLoggingPreferences(); void SetSpinnerIsBusy(bool isBusy); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/FileSaver.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/FileSaver.cpp index f067feeca4..49a35eac8a 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/FileSaver.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/FileSaver.cpp @@ -8,44 +8,14 @@ #include #include -#include +#include #include #include #include #include #include #include - -namespace FileSaverCpp -{ - class FileEventHandler - : public AZ::IO::FileIOEventBus::Handler - { - public: - int m_errorCode = 0; - AZStd::string m_fileName; - - FileEventHandler() - { - BusConnect(); - } - - ~FileEventHandler() - { - BusDisconnect(); - } - - void OnError(const AZ::IO::SystemFile* /*file*/, const char* fileName, int errorCode) override - { - m_errorCode = errorCode; - - if (fileName) - { - m_fileName = fileName; - } - } - }; -} +#include namespace ScriptCanvasEditor { @@ -58,19 +28,22 @@ namespace ScriptCanvasEditor , m_onComplete(onComplete) {} + const SourceHandle& FileSaver::GetSource() const + { + return m_source; + } + void FileSaver::PerformMove ( AZStd::string tmpFileName , AZStd::string target , size_t remainingAttempts) { - FileSaverCpp::FileEventHandler fileEventHandler; - if (remainingAttempts == 0) { AZ::SystemTickBus::QueueFunction([this, tmpFileName]() { FileSaveResult result; - result.fileSaveError = "Failed to move updated file from temporary location to tmpFileName destination"; + result.fileSaveError = "Failed to move updated file from temporary location to original destination."; result.tempFileRemovalError = RemoveTempFile(tmpFileName); m_onComplete(result); }); @@ -98,7 +71,9 @@ namespace ScriptCanvasEditor auto streamer = AZ::Interface::Get(); AZ::IO::FileRequestPtr flushRequest = streamer->FlushCache(target.c_str()); // Bump the slice asset up in the asset processor's queue. - AzFramework::AssetSystemRequestBus::Broadcast(&AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetBySearchTerm, target.c_str()); + AzFramework::AssetSystemRequestBus::Broadcast + (&AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetBySearchTerm, target.c_str()); + AZ::SystemTickBus::QueueFunction([this, tmpFileName]() { FileSaveResult result; @@ -108,28 +83,29 @@ namespace ScriptCanvasEditor } else { - AZ_Warning(ScriptCanvas::k_VersionExplorerWindow.data(), false, "moving converted file to tmpFileName destination failed: %s, trying again", target.c_str()); + AZ_Warning(ScriptCanvas::k_VersionExplorerWindow.data(), false + , "moving converted file to tmpFileName destination failed: %s, trying again", target.c_str()); auto streamer = AZ::Interface::Get(); AZ::IO::FileRequestPtr flushRequest = streamer->FlushCache(target.c_str()); - streamer->SetRequestCompleteCallback(flushRequest, [this, tmpFileName, target, remainingAttempts]([[maybe_unused]] AZ::IO::FileRequestHandle request) + streamer->SetRequestCompleteCallback(flushRequest + , [this, tmpFileName, target, remainingAttempts]([[maybe_unused]] AZ::IO::FileRequestHandle request) { // Continue saving. - AZ::SystemTickBus::QueueFunction([this, tmpFileName, target, remainingAttempts]() { PerformMove(tmpFileName, target, remainingAttempts - 1); }); + AZ::SystemTickBus::QueueFunction( + [this, tmpFileName, target, remainingAttempts]() { PerformMove(tmpFileName, target, remainingAttempts - 1); }); }); streamer->QueueRequest(flushRequest); } } } - void FileSaver::OnSourceFileReleased(AZ::Data::Asset asset) + void FileSaver::OnSourceFileReleased(const SourceHandle& source) { - AZStd::string relativePath, fullPath; - AZ::Data::AssetCatalogRequestBus::BroadcastResult(relativePath, &AZ::Data::AssetCatalogRequests::GetAssetPathById, asset.GetId()); - bool fullPathFound = false; - AzToolsFramework::AssetSystemRequestBus::BroadcastResult(fullPathFound, &AzToolsFramework::AssetSystemRequestBus::Events::GetFullSourcePathFromRelativeProductPath, relativePath, fullPath); + AZStd::string fullPath = source.Path().c_str(); AZStd::string tmpFileName; // here we are saving the graph to a temp file instead of the original file and then copying the temp file to the original file. - // This ensures that AP will not a get a file change notification on an incomplete graph file causing it to fail processing. Temp files are ignored by AP. + // This ensures that AP will not a get a file change notification on an incomplete graph file causing it to fail processing. + // Temp files are ignored by AP. if (!AZ::IO::CreateTempFileName(fullPath.c_str(), tmpFileName)) { FileSaveResult result; @@ -138,23 +114,24 @@ namespace ScriptCanvasEditor return; } - bool tempSavedSucceeded = false; + AZStd::string saveError; + AZ::IO::FileIOStream fileStream(tmpFileName.c_str(), AZ::IO::OpenMode::ModeWrite | AZ::IO::OpenMode::ModeText); if (fileStream.IsOpen()) { - if (asset.GetType() == azrtti_typeid()) + auto saveOutcome = ScriptCanvasEditor::SaveToStream(source, fileStream); + if (!saveOutcome.IsSuccess()) { - ScriptCanvasEditor::ScriptCanvasAssetHandler handler; - tempSavedSucceeded = handler.SaveAssetData(asset, &fileStream); + saveError = saveOutcome.TakeError(); } fileStream.Close(); } - if (!tempSavedSucceeded) + if (!saveError.empty()) { FileSaveResult result; - result.fileSaveError = "Save asset data to temporary file failed"; + result.fileSaveError = AZStd::string::format("Save asset data to temporary file failed: %s", saveError.c_str()); m_onComplete(result); return; } @@ -164,26 +141,26 @@ namespace ScriptCanvasEditor , fullPath.c_str() , true , [this, fullPath, tmpFileName]([[maybe_unused]] bool success, const AzToolsFramework::SourceControlFileInfo& info) - { - constexpr const size_t k_maxAttemps = 10; + { + constexpr const size_t k_maxAttemps = 10; - if (!info.IsReadOnly()) - { - PerformMove(tmpFileName, fullPath, k_maxAttemps); - } - else if (m_onReadOnlyFile && m_onReadOnlyFile()) - { - AZ::IO::SystemFile::SetWritable(info.m_filePath.c_str(), true); - PerformMove(tmpFileName, fullPath, k_maxAttemps); - } - else - { - FileSaveResult result; - result.fileSaveError = "Source file was and remained read-only"; - result.tempFileRemovalError = RemoveTempFile(tmpFileName); - m_onComplete(result); - } - }); + if (!info.IsReadOnly()) + { + PerformMove(tmpFileName, fullPath, k_maxAttemps); + } + else if (m_onReadOnlyFile && m_onReadOnlyFile()) + { + AZ::IO::SystemFile::SetWritable(info.m_filePath.c_str(), true); + PerformMove(tmpFileName, fullPath, k_maxAttemps); + } + else + { + FileSaveResult result; + result.fileSaveError = "Source file was and remained read-only"; + result.tempFileRemovalError = RemoveTempFile(tmpFileName); + m_onComplete(result); + } + }); } AZStd::string FileSaver::RemoveTempFile(AZStd::string_view tempFile) @@ -191,7 +168,7 @@ namespace ScriptCanvasEditor AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance(); if (!fileIO) { - return "GraphUpgradeComplete: No FileIO instance"; + return "No FileIO instance"; } if (fileIO->Exists(tempFile.data()) && !fileIO->Remove(tempFile.data())) @@ -202,30 +179,30 @@ namespace ScriptCanvasEditor return ""; } - void FileSaver::Save(AZ::Data::Asset asset) + void FileSaver::Save(const SourceHandle& source) { - AZStd::string relativePath, fullPath; - AZ::Data::AssetCatalogRequestBus::BroadcastResult(relativePath, &AZ::Data::AssetCatalogRequests::GetAssetPathById, asset.GetId()); - bool fullPathFound = false; - AzToolsFramework::AssetSystemRequestBus::BroadcastResult - (fullPathFound - , &AzToolsFramework::AssetSystemRequestBus::Events::GetFullSourcePathFromRelativeProductPath - , relativePath, fullPath); - - if (!fullPathFound) + m_source = source; + + if (source.Path().empty()) { FileSaveResult result; - result.fileSaveError = "Full source path not found"; + result.fileSaveError = "No save location specified"; m_onComplete(result); } else { auto streamer = AZ::Interface::Get(); - AZ::IO::FileRequestPtr flushRequest = streamer->FlushCache(fullPath); - streamer->SetRequestCompleteCallback(flushRequest, [this, asset]([[maybe_unused]] AZ::IO::FileRequestHandle request) + AZ::IO::FileRequestPtr flushRequest = streamer->FlushCache(source.Path().c_str()); + streamer->SetRequestCompleteCallback(flushRequest, [this]([[maybe_unused]] AZ::IO::FileRequestHandle request) { - this->OnSourceFileReleased(asset); + AZStd::lock_guard lock(m_mutex); + if (!m_sourceFileReleased) + { + m_sourceFileReleased = true; + AZ::SystemTickBus::QueueFunction([this]() { this->OnSourceFileReleased(m_source); }); + } }); + streamer->QueueRequest(flushRequest); } } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/FileSaver.h b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/FileSaver.h index dd333927ed..e87ee060f7 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/FileSaver.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/FileSaver.h @@ -29,14 +29,19 @@ namespace ScriptCanvasEditor ( AZStd::function onReadOnlyFile , AZStd::function onComplete); - void Save(AZ::Data::Asset asset); + const SourceHandle& GetSource() const; + void Save(const SourceHandle& source); private: + AZStd::mutex m_mutex; + + bool m_sourceFileReleased = false; + SourceHandle m_source; AZStd::function m_onComplete; AZStd::function m_onReadOnlyFile; - void OnSourceFileReleased(AZ::Data::Asset asset); - + void OnSourceFileReleased(const SourceHandle& source); + void PerformMove ( AZStd::string source , AZStd::string target diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Model.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Model.cpp index d8d242adbb..86a1c1f42e 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Model.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Model.cpp @@ -101,7 +101,7 @@ namespace ScriptCanvasEditor return; } - if (modification.modifySingleAsset.m_assetId.IsValid()) + if (!modification.modifySingleAsset.Path().empty()) { const auto& results = m_scanner->GetResult(); auto iter = AZStd::find_if @@ -109,7 +109,7 @@ namespace ScriptCanvasEditor , results.m_unfiltered.end() , [&modification](const auto& candidate) { - return candidate.info.m_assetId == modification.modifySingleAsset.m_assetId; + return candidate.AnyEquals(modification.modifySingleAsset); }); if (iter == results.m_unfiltered.end()) @@ -120,7 +120,7 @@ namespace ScriptCanvasEditor m_state = State::ModifySingle; - m_modifier = AZStd::make_unique(modification, WorkingAssets{ *iter }, [this]() { OnModificationComplete(); }); + m_modifier = AZStd::make_unique(modification, AZStd::vector{ *iter }, [this]() { OnModificationComplete(); }); } else { diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/ModelTraits.h b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/ModelTraits.h index 01eb200542..4ab9015a6c 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/ModelTraits.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/ModelTraits.h @@ -9,53 +9,51 @@ #include #include +#include namespace ScriptCanvasEditor { namespace VersionExplorer { - struct WorkingAsset - { - AZ::Data::Asset asset; - AZ::Data::AssetInfo info; - }; - - using WorkingAssets = AZStd::vector; - struct ModifyConfiguration { - AZStd::function)> modification; + AZStd::function modification; AZStd::function onReadOnlyFile; - AZ::Data::AssetInfo modifySingleAsset; + SourceHandle modifySingleAsset; bool backupGraphBeforeModification = false; bool successfulDependencyUpgradeRequired = true; }; struct ModificationResult { - AZ::Data::Asset asset; - AZ::Data::AssetInfo assetInfo; + SourceHandle asset; AZStd::string errorMessage; }; struct ModificationResults { - AZStd::vector m_successes; + AZStd::vector m_successes; AZStd::vector m_failures; }; struct ScanConfiguration { - AZStd::function)> filter; + enum class Filter + { + Include, + Exclude + }; + + AZStd::function filter; bool reportFilteredGraphs = false; }; struct ScanResult { - AZStd::vector m_catalogAssets; - WorkingAssets m_unfiltered; - AZStd::vector m_filteredAssets; - AZStd::vector m_loadErrors; + AZStd::vector m_catalogAssets; + AZStd::vector m_unfiltered; + AZStd::vector m_filteredAssets; + AZStd::vector m_loadErrors; }; enum Result @@ -88,20 +86,20 @@ namespace ScriptCanvasEditor public: virtual void OnScanBegin(size_t assetCount) = 0; virtual void OnScanComplete(const ScanResult& result) = 0; - virtual void OnScanFilteredGraph(const AZ::Data::AssetInfo& info) = 0; - virtual void OnScanLoadFailure(const AZ::Data::AssetInfo& info) = 0; - virtual void OnScanUnFilteredGraph(const AZ::Data::AssetInfo& info) = 0; + virtual void OnScanFilteredGraph(const SourceHandle& info) = 0; + virtual void OnScanLoadFailure(const SourceHandle& info) = 0; + virtual void OnScanUnFilteredGraph(const SourceHandle& info) = 0; - virtual void OnUpgradeBegin(const ModifyConfiguration& config, const WorkingAssets& assets) = 0; + virtual void OnUpgradeBegin(const ModifyConfiguration& config, const AZStd::vector& assets) = 0; virtual void OnUpgradeComplete(const ModificationResults& results) = 0; - virtual void OnUpgradeDependenciesGathered(const AZ::Data::AssetInfo& info, Result result) = 0; - virtual void OnUpgradeDependencySortBegin(const ModifyConfiguration& config, const WorkingAssets& assets) = 0; + virtual void OnUpgradeDependenciesGathered(const SourceHandle& info, Result result) = 0; + virtual void OnUpgradeDependencySortBegin(const ModifyConfiguration& config, const AZStd::vector& assets) = 0; virtual void OnUpgradeDependencySortEnd ( const ModifyConfiguration& config - , const WorkingAssets& assets + , const AZStd::vector& assets , const AZStd::vector& sortedOrder) = 0; - virtual void OnUpgradeModificationBegin(const ModifyConfiguration& config, const AZ::Data::AssetInfo& info) = 0; - virtual void OnUpgradeModificationEnd(const ModifyConfiguration& config, const AZ::Data::AssetInfo& info, ModificationResult result) = 0; + virtual void OnUpgradeModificationBegin(const ModifyConfiguration& config, const SourceHandle& info) = 0; + virtual void OnUpgradeModificationEnd(const ModifyConfiguration& config, const SourceHandle& info, ModificationResult result) = 0; }; using ModelNotificationsBus = AZ::EBus; } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Modifier.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Modifier.cpp index f3da1ba309..3c8605e915 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Modifier.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Modifier.cpp @@ -6,24 +6,21 @@ * */ +#include #include #include #include #include +#include #include -namespace ModifierCpp -{ - -} - namespace ScriptCanvasEditor { namespace VersionExplorer { Modifier::Modifier ( const ModifyConfiguration& modification - , WorkingAssets&& assets + , AZStd::vector&& assets , AZStd::function onComplete) : m_state(State::GatheringDependencies) , m_config(modification) @@ -35,11 +32,12 @@ namespace ScriptCanvasEditor AZ::SystemTickBus::Handler::BusConnect(); } - const AZ::Data::AssetInfo& Modifier::GetCurrentAsset() const + size_t Modifier::GetCurrentIndex() const { return m_state == State::GatheringDependencies - ? m_assets[m_assetIndex].info - : m_assets[m_dependencyOrderedAssetIndicies[m_assetIndex]].info; + ? m_assetIndex + : m_dependencyOrderedAssetIndicies[m_assetIndex]; + } AZStd::unordered_set& Modifier::GetOrCreateDependencyIndexSet() @@ -65,14 +63,10 @@ namespace ScriptCanvasEditor AZ_Assert(serializeContext, "SerializeContext is required to enumerate dependent assets in the ScriptCanvas file"); bool anyFailures = false; - auto asset = LoadAsset(); - if (asset - && asset.GetAs() - && asset.GetAs()->GetScriptCanvasGraph() - && asset.GetAs()->GetScriptCanvasGraph()->GetGraphData()) + if (m_result.asset.Get() && m_result.asset.Mod()->GetGraphData()) { - auto graphData = asset.GetAs()->GetScriptCanvasGraph()->GetGraphData(); + auto graphData = m_result.asset.Mod()->GetGraphData(); auto dependencyGrabber = [this] ( void* instancePointer @@ -107,71 +101,69 @@ namespace ScriptCanvasEditor , nullptr)) { anyFailures = true; - VE_LOG("Modifier: ERROR - Failed to gather dependencies from graph data: %s" - , GetCurrentAsset().m_relativePath.c_str()) + VE_LOG("Modifier: ERROR - Failed to gather dependencies from graph data: %s" + , m_result.asset.Path().c_str()) } } else { anyFailures = true; VE_LOG("Modifier: ERROR - Failed to load asset %s for modification, even though it scanned properly" - , GetCurrentAsset().m_relativePath.c_str()); + , m_result.asset.Path().c_str()); } ModelNotificationsBus::Broadcast ( &ModelNotificationsTraits::OnUpgradeDependenciesGathered - , GetCurrentAsset() + , m_result.asset , anyFailures ? Result::Failure : Result::Success); + ReleaseCurrentAsset(); + // Flush asset database events to ensure no asset references are held by closures queued on Ebuses. AZ::Data::AssetManager::Instance().DispatchEvents(); } - AZ::Data::Asset Modifier::LoadAsset() + void Modifier::LoadAsset() { - AZ::Data::Asset asset = AZ::Data::AssetManager::Instance().GetAsset - ( GetCurrentAsset().m_assetId - , azrtti_typeid() - , AZ::Data::AssetLoadBehavior::PreLoad); - - asset.BlockUntilLoadComplete(); - - if (asset.IsReady()) - { - return asset; - } - else + auto& handle = m_result.asset; + if (!handle.IsGraphValid()) { - return {}; + auto outcome = LoadFromFile(handle.Path().c_str()); + if (outcome.IsSuccess()) + { + handle = outcome.TakeValue(); + } } } void Modifier::ModificationComplete(const ModificationResult& result) { - m_result = result; - - if (result.errorMessage.empty()) + if (!result.errorMessage.empty()) { - SaveModifiedGraph(result); + ReportModificationError(result.errorMessage); + } + else if (m_result.asset.Describe() != result.asset.Describe()) + { + ReportModificationError("Received modifiction complete notification for different result"); } else { - ReportModificationError(result.errorMessage); + SaveModifiedGraph(result); } } void Modifier::ModifyCurrentAsset() { m_result = {}; - m_result.assetInfo = GetCurrentAsset(); - - ModelNotificationsBus::Broadcast(&ModelNotificationsTraits::OnUpgradeModificationBegin, m_config, GetCurrentAsset()); + m_result.asset = m_assets[GetCurrentIndex()]; + ModelNotificationsBus::Broadcast(&ModelNotificationsTraits::OnUpgradeModificationBegin, m_config, m_result.asset); + LoadAsset(); - if (auto asset = LoadAsset()) + if (m_result.asset.IsGraphValid()) { ModificationNotificationsBus::Handler::BusConnect(); m_modifyState = ModifyState::InProgress; - m_config.modification(asset); + m_config.modification(m_result.asset); } else { @@ -182,24 +174,30 @@ namespace ScriptCanvasEditor void Modifier::ModifyNextAsset() { ModelNotificationsBus::Broadcast - ( &ModelNotificationsTraits::OnUpgradeModificationEnd, m_config, GetCurrentAsset(), m_result); + ( &ModelNotificationsTraits::OnUpgradeModificationEnd, m_config, m_result.asset, m_result); ModificationNotificationsBus::Handler::BusDisconnect(); m_modifyState = ModifyState::Idle; + ReleaseCurrentAsset(); ++m_assetIndex; m_result = {}; } + void Modifier::ReleaseCurrentAsset() + { + m_result.asset = m_result.asset.Describe(); + } + void Modifier::ReportModificationError(AZStd::string_view report) { - m_result.asset = {}; m_result.errorMessage = report; - m_results.m_failures.push_back(m_result); + m_results.m_failures.push_back({ m_result.asset.Describe(), report }); ModifyNextAsset(); } void Modifier::ReportModificationSuccess() { - m_results.m_successes.push_back(m_result.assetInfo); + m_result.asset = m_result.asset.Describe(); + m_results.m_successes.push_back({ m_result.asset.Describe(), {} }); ModifyNextAsset(); } @@ -227,7 +225,7 @@ namespace ScriptCanvasEditor { VE_LOG ( "Temporary file not removed for %s: %s" - , m_result.assetInfo.m_relativePath.c_str() + , m_result.asset.Path().c_str() , result.tempFileRemovalError.c_str()); } @@ -259,7 +257,7 @@ namespace ScriptCanvasEditor m_modifyState = ModifyState::Saving; m_fileSaver = AZStd::make_unique ( m_config.onReadOnlyFile - , [this](const FileSaveResult& result) { OnFileSaveComplete(result); }); + , [this](const FileSaveResult& fileSaveResult) { OnFileSaveComplete(fileSaveResult); }); m_fileSaver->Save(result.asset); } @@ -287,7 +285,7 @@ namespace ScriptCanvasEditor for (size_t index = 0; index != m_assets.size(); ++index) { - m_assetInfoIndexById.insert({ m_assets[index].info.m_assetId.m_guid, index }); + m_assetInfoIndexById.insert({ m_assets[index].Id(), index }); } } else @@ -299,7 +297,7 @@ namespace ScriptCanvasEditor m_dependencyOrderedAssetIndicies.push_back(index); } - // go straight into ModifyinGraphs + // go straight into ModifyingGraphs m_assetIndex = m_assets.size(); } } @@ -322,6 +320,7 @@ namespace ScriptCanvasEditor else { GatherDependencies(); + ReleaseCurrentAsset(); ++m_assetIndex; } } @@ -380,10 +379,10 @@ namespace ScriptCanvasEditor if (markedTemporary.contains(index)) { AZ_Error - (ScriptCanvas::k_VersionExplorerWindow.data() + (ScriptCanvas::k_VersionExplorerWindow.data() , false , "Modifier: Dependency sort has failed during, circular dependency detected for Asset: %s" - , modifier->GetCurrentAsset().m_relativePath.c_str()); + , modifier->m_result.asset.Path().c_str()); return; } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Modifier.h b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Modifier.h index 981a1eb746..32b9253bb5 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Modifier.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Modifier.h @@ -26,7 +26,7 @@ namespace ScriptCanvasEditor Modifier ( const ModifyConfiguration& modification - , WorkingAssets&& assets + , AZStd::vector&& assets , AZStd::function onComplete); const ModificationResults& GetResult() const; @@ -67,9 +67,10 @@ namespace ScriptCanvasEditor State m_state = State::GatheringDependencies; ModifyState m_modifyState = ModifyState::Idle; size_t m_assetIndex = 0; + AZStd::function m_onComplete; // asset infos in scanned order - WorkingAssets m_assets; + AZStd::vector m_assets; // dependency sorted order indices into the asset vector AZStd::vector m_dependencyOrderedAssetIndicies; // dependency indices by asset info index (only exist if graphs have them) @@ -82,13 +83,14 @@ namespace ScriptCanvasEditor AZStd::unique_ptr m_fileSaver; FileSaveResult m_fileSaveResult; + size_t GetCurrentIndex() const; void GatherDependencies(); - const AZ::Data::AssetInfo& GetCurrentAsset() const; AZStd::unordered_set& GetOrCreateDependencyIndexSet(); - AZ::Data::Asset LoadAsset(); + void LoadAsset(); void ModifyCurrentAsset(); void ModifyNextAsset(); void ModificationComplete(const ModificationResult& result) override; + void ReleaseCurrentAsset(); void ReportModificationError(AZStd::string_view report); void ReportModificationSuccess(); void ReportSaveResult(); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Scanner.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Scanner.cpp index bc69f6e634..816ded8a7b 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Scanner.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Scanner.cpp @@ -6,9 +6,49 @@ * */ +#include +#include +#include +#include +#include #include #include -#include +#include + +namespace ScannerCpp +{ + void TraverseTree + ( QModelIndex index + , AzToolsFramework::AssetBrowser::AssetBrowserFilterModel& model + , ScriptCanvasEditor::VersionExplorer::ScanResult& result) + { + QModelIndex sourceIndex = model.mapToSource(index); + AzToolsFramework::AssetBrowser::AssetBrowserEntry* entry = + reinterpret_cast(sourceIndex.internalPointer()); + + if (entry + && entry->GetEntryType() == AzToolsFramework::AssetBrowser::AssetBrowserEntry::AssetEntryType::Source + && azrtti_istypeof(entry) + && entry->GetFullPath().ends_with(".scriptcanvas")) + { + auto sourceEntry = azrtti_cast(entry); + + AZStd::string fullPath = sourceEntry->GetFullPath(); + AzFramework::StringFunc::Path::Normalize(fullPath); + + result.m_catalogAssets.push_back( + ScriptCanvasEditor::SourceHandle(nullptr, sourceEntry->GetSourceUuid(), fullPath)); + } + + const int rowCount = model.rowCount(index); + + for (int i = 0; i < rowCount; ++i) + { + TraverseTree(model.index(i, 0, index), model, result); + } + } +} + namespace ScriptCanvasEditor { @@ -18,60 +58,54 @@ namespace ScriptCanvasEditor : m_config(config) , m_onComplete(onComplete) { - AZ::Data::AssetCatalogRequestBus::Broadcast - ( &AZ::Data::AssetCatalogRequestBus::Events::EnumerateAssets - , nullptr - , [this](const AZ::Data::AssetId, const AZ::Data::AssetInfo& assetInfo) - { - if (assetInfo.m_assetType == azrtti_typeid()) - { - m_result.m_catalogAssets.push_back(assetInfo); - } - } - , nullptr); - - ModelNotificationsBus::Broadcast(&ModelNotificationsTraits::OnScanBegin, m_result.m_catalogAssets.size()); + AzToolsFramework::AssetBrowser::AssetBrowserModel* assetBrowserModel = nullptr; + AzToolsFramework::AssetBrowser::AssetBrowserComponentRequestBus::BroadcastResult + ( assetBrowserModel, &AzToolsFramework::AssetBrowser::AssetBrowserComponentRequests::GetAssetBrowserModel); + + if (assetBrowserModel) + { + auto stringFilter = new AzToolsFramework::AssetBrowser::StringFilter(); + stringFilter->SetName("ScriptCanvas"); + stringFilter->SetFilterString(".scriptcanvas"); + stringFilter->SetFilterPropagation(AzToolsFramework::AssetBrowser::AssetBrowserEntryFilter::PropagateDirection::Down); + + AzToolsFramework::AssetBrowser::AssetBrowserFilterModel assetFilterModel; + assetFilterModel.SetFilter(AzToolsFramework::AssetBrowser::FilterConstType(stringFilter)); + assetFilterModel.setSourceModel(assetBrowserModel); + + ScannerCpp::TraverseTree(QModelIndex(), assetFilterModel, m_result); + } + AZ::SystemTickBus::Handler::BusConnect(); } - void Scanner::FilterAsset(AZ::Data::Asset asset) + void Scanner::FilterAsset(SourceHandle asset) { - if (m_config.filter && m_config.filter(asset)) + if (m_config.filter && m_config.filter(asset) == ScanConfiguration::Filter::Exclude) { - VE_LOG("Scanner: Excluded: %s ", GetCurrentAsset().m_relativePath.c_str()); - m_result.m_filteredAssets.push_back(GetCurrentAsset()); - ModelNotificationsBus::Broadcast(&ModelNotificationsTraits::OnScanFilteredGraph, GetCurrentAsset()); + VE_LOG("Scanner: Excluded: %s ", ModCurrentAsset().Path().c_str()); + m_result.m_filteredAssets.push_back(ModCurrentAsset().Describe()); + ModelNotificationsBus::Broadcast(&ModelNotificationsTraits::OnScanFilteredGraph, ModCurrentAsset()); } else { - VE_LOG("Scanner: Included: %s ", GetCurrentAsset().m_relativePath.c_str()); - m_result.m_unfiltered.push_back({ asset, GetCurrentAsset() }); - ModelNotificationsBus::Broadcast(&ModelNotificationsTraits::OnScanUnFilteredGraph, GetCurrentAsset()); + VE_LOG("Scanner: Included: %s ", ModCurrentAsset().Path().c_str()); + m_result.m_unfiltered.push_back(ModCurrentAsset().Describe()); + ModelNotificationsBus::Broadcast(&ModelNotificationsTraits::OnScanUnFilteredGraph, ModCurrentAsset()); } } - const AZ::Data::AssetInfo& Scanner::GetCurrentAsset() const - { - return m_result.m_catalogAssets[m_catalogAssetIndex]; - } - const ScanResult& Scanner::GetResult() const { return m_result; } - AZ::Data::Asset Scanner::LoadAsset() + SourceHandle Scanner::LoadAsset() { - AZ::Data::Asset asset = AZ::Data::AssetManager::Instance().GetAsset - ( GetCurrentAsset().m_assetId - , azrtti_typeid() - , AZ::Data::AssetLoadBehavior::PreLoad); - - asset.BlockUntilLoadComplete(); - - if (asset.IsReady()) + auto fileOutcome = LoadFromFile(ModCurrentAsset().Path().c_str()); + if (fileOutcome.IsSuccess()) { - return asset; + return fileOutcome.GetValue(); } else { @@ -79,6 +113,11 @@ namespace ScriptCanvasEditor } } + SourceHandle& Scanner::ModCurrentAsset() + { + return m_result.m_catalogAssets[m_catalogAssetIndex]; + } + void Scanner::OnSystemTick() { if (m_catalogAssetIndex == m_result.m_catalogAssets.size()) @@ -93,19 +132,19 @@ namespace ScriptCanvasEditor } else { - if (auto asset = LoadAsset()) + if (auto asset = LoadAsset(); asset.IsGraphValid()) { - VE_LOG("Scanner: Loaded: %s ", GetCurrentAsset().m_relativePath.c_str()); + VE_LOG("Scanner: Loaded: %s ", ModCurrentAsset().Path().c_str()); FilterAsset(asset); } else { - VE_LOG("Scanner: Failed to load: %s ", GetCurrentAsset().m_relativePath.c_str()); - m_result.m_loadErrors.push_back(GetCurrentAsset()); - ModelNotificationsBus::Broadcast(&ModelNotificationsTraits::OnScanLoadFailure, GetCurrentAsset()); + VE_LOG("Scanner: Failed to load: %s ", ModCurrentAsset().Path().c_str()); + m_result.m_loadErrors.push_back(ModCurrentAsset().Describe()); + ModelNotificationsBus::Broadcast(&ModelNotificationsTraits::OnScanLoadFailure, ModCurrentAsset()); } - VE_LOG("Scanner: scan of %s complete", GetCurrentAsset().m_relativePath.c_str()); + VE_LOG("Scanner: scan of %s complete", ModCurrentAsset().Path().c_str()); ++m_catalogAssetIndex; } } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Scanner.h b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Scanner.h index fb030845c7..8e086a10b0 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Scanner.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Scanner.h @@ -33,9 +33,9 @@ namespace ScriptCanvasEditor ScanConfiguration m_config; ScanResult m_result; - void FilterAsset(AZ::Data::Asset); - const AZ::Data::AssetInfo& GetCurrentAsset() const; - AZ::Data::Asset LoadAsset(); + void FilterAsset(SourceHandle); + SourceHandle LoadAsset(); + SourceHandle& ModCurrentAsset(); void OnSystemTick() override; }; } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.cpp index 14bc1c4dc8..c557a83f0c 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.cpp @@ -55,26 +55,25 @@ namespace ScriptCanvasEditor for (auto& failedUpdate : result->m_failures) { - auto& assetInfo = failedUpdate.assetInfo; - auto assetId = assetInfo.m_assetId; - + auto asset = failedUpdate.asset; + m_ui->tableWidget->insertRow(rows); connect(m_ui->closeButton, &QPushButton::pressed, this, &QDialog::accept); - connect(m_ui->tableWidget, &QTableWidget::itemDoubleClicked, this, [this, rows, assetId](QTableWidgetItem* item) + connect(m_ui->tableWidget, &QTableWidget::itemDoubleClicked, this, [this, rows, asset](QTableWidgetItem* item) { if (item && item->data(Qt::UserRole).toInt() == rows) { - OpenGraph(assetId); + OpenGraph(asset); } } ); - auto openGraph = [this, assetId] { - OpenGraph(assetId); + auto openGraph = [this, asset] { + OpenGraph(asset); }; - QTableWidgetItem* rowName = new QTableWidgetItem(tr(assetInfo.m_relativePath.c_str())); + QTableWidgetItem* rowName = new QTableWidgetItem(tr(asset.Path().c_str())); rowName->setData(Qt::UserRole, rows); m_ui->tableWidget->setItem(rows, 0, rowName); @@ -91,15 +90,15 @@ namespace ScriptCanvasEditor } } - void UpgradeHelper::OpenGraph(AZ::Data::AssetId assetId) + void UpgradeHelper::OpenGraph(const SourceHandle& asset) { // Open the graph in SC editor AzToolsFramework::OpenViewPane(/*LyViewPane::ScriptCanvas*/"Script Canvas"); AZ::Outcome openOutcome = AZ::Failure(AZStd::string()); - if (assetId.IsValid()) + if (!asset.Path().empty()) { - GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAsset, assetId, -1); + GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAsset, asset, Tracker::ScriptCanvasFileState::UNMODIFIED, -1); } if (!openOutcome) diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.h b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.h index 36949c1828..4c0c073d70 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.h @@ -35,6 +35,8 @@ namespace Ui namespace ScriptCanvasEditor { + // class SourceHandle; + //! A tool that collects and upgrades all Script Canvas graphs in the asset catalog class UpgradeHelper : public AzQtComponents::StyledDialog @@ -51,6 +53,6 @@ namespace ScriptCanvasEditor AZStd::unique_ptr m_ui; - void OpenGraph(AZ::Data::AssetId assetId); + void OpenGraph(const SourceHandle& assetId); }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/ScriptCanvasAssetBase.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/ScriptCanvasAssetBase.h index 265c35d310..1dc0b38e01 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/ScriptCanvasAssetBase.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/ScriptCanvasAssetBase.h @@ -8,16 +8,17 @@ #pragma once +#include #include #include #include - #include namespace ScriptCanvas { class ScriptCanvasAssetBase : public AZ::Data::AssetData + , public AZStd::enable_shared_from_this , ScriptCanvas::ScriptCanvasAssetBusRequestBus::Handler { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Core.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Core.cpp index 9b2d0e4982..1ac7a33821 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Core.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Core.cpp @@ -6,15 +6,18 @@ * */ + #include #include #include #include #include #include +#include -#include "Core.h" #include "Attributes.h" +#include "Core.h" +#include namespace ScriptCanvas { @@ -182,5 +185,156 @@ namespace ScriptCanvas serializeContext->RegisterType(typeId, AZStd::move(classData), EventPlaceholderAnyCreator); } +} + +namespace ScriptCanvasEditor +{ + SourceHandle::SourceHandle() + : m_id(AZ::Uuid::CreateNull()) + {} + + SourceHandle::SourceHandle(const SourceHandle& data, const AZ::Uuid& id, const AZ::IO::Path& path) + : m_data(data.m_data) + , m_id(id) + , m_path(path) + { + m_path.MakePreferred(); + m_id = id; + } + + SourceHandle::SourceHandle(ScriptCanvas::DataPtr graph, const AZ::Uuid& id, const AZ::IO::Path& path) + : m_data(graph) + , m_id(id) + , m_path(path) + { + m_path.MakePreferred(); + m_id = id; + } + + SourceHandle::SourceHandle(const SourceHandle& data, const AZ::IO::Path& path) + : m_data(data.m_data) + , m_id(AZ::Uuid::CreateNull()) + , m_path(path) + { + m_path.MakePreferred(); + } + + SourceHandle::SourceHandle(ScriptCanvas::DataPtr graph, const AZ::IO::Path& path) + : m_data(graph) + , m_id(AZ::Uuid::CreateNull()) + , m_path(path) + { + m_path.MakePreferred(); + } + + bool SourceHandle::AnyEquals(const SourceHandle& other) const + { + return m_data && m_data == other.m_data + || !m_id.IsNull() && m_id == other.m_id + || !m_path.empty() && m_path == other.m_path; + } + + void SourceHandle::Clear() + { + m_data = nullptr; + m_id = AZ::Uuid::CreateNull(); + m_path.clear(); + } + + // return a SourceHandle with only the Id and Path, but without a pointer to the data + SourceHandle SourceHandle::Describe() const + { + return SourceHandle(nullptr, m_id, m_path); + } + + GraphPtrConst SourceHandle::Get() const + { + return m_data ? m_data->GetEditorGraph() : nullptr; + } + + const AZ::Uuid& SourceHandle::Id() const + { + return m_id; + } + + bool SourceHandle::IsDescriptionValid() const + { + return !m_id.IsNull() && !m_path.empty(); + } + + bool SourceHandle::IsGraphValid() const + { + return m_data != nullptr; + } + GraphPtr SourceHandle::Mod() const + { + return m_data ? m_data->ModEditorGraph() : nullptr; + } + + bool SourceHandle::operator==(const SourceHandle& other) const + { + return m_data.get() == other.m_data.get() + && m_id == other.m_id + && m_path == other.m_path; + } + + bool SourceHandle::operator!=(const SourceHandle& other) const + { + return !(*this == other); + } + + const AZ::IO::Path& SourceHandle::Path() const + { + return m_path; + } + + bool SourceHandle::PathEquals(const SourceHandle& other) const + { + return m_path == other.m_path; + } + + void SourceHandle::Reflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context)) + { + serializeContext->Class() + ->Version(0) + ->Field("id", &SourceHandle::m_id) + ->Field("path", &SourceHandle::m_path) + ; + } + } + + AZStd::string SourceHandle::ToString() const + { + return AZStd::string::format + ( "%s, %s, %s" + , IsGraphValid() ? "O" : "X" + , m_path.empty() ? m_path.c_str() : "" + , m_id.IsNull() ? "" : m_id.ToString().c_str()); + } +} + +namespace ScriptCanvas +{ + const Graph* ScriptCanvasData::GetGraph() const + { + return AZ::EntityUtils::FindFirstDerivedComponent(m_scriptCanvasEntity.get()); + } + + const ScriptCanvasEditor::Graph* ScriptCanvasData::GetEditorGraph() const + { + return reinterpret_cast(GetGraph()); + } + + Graph* ScriptCanvasData::ModGraph() + { + return AZ::EntityUtils::FindFirstDerivedComponent(m_scriptCanvasEntity.get()); + } + + ScriptCanvasEditor::Graph* ScriptCanvasData::ModEditorGraph() + { + return reinterpret_cast(ModGraph()); + } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Core.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Core.h index 0e64c19dcb..215041e1fd 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Core.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Core.h @@ -9,18 +9,19 @@ #pragma once #include +#include +#include +#include #include +#include #include #include -#include #include +#include #include #include #include #include -#include -#include - #include #include @@ -61,6 +62,10 @@ namespace ScriptCanvas class Node; class Edge; + class Graph; + + using GraphPtr = Graph*; + using GraphPtrConst = const Graph*; using ID = AZ::EntityId; @@ -297,6 +302,105 @@ namespace ScriptCanvas void ReflectEventTypeOnDemand(const AZ::TypeId& typeId, AZStd::string_view name, AZ::IRttiHelper* rttiHelper = nullptr); } +namespace ScriptCanvas +{ + class ScriptCanvasData; + + using DataPtr = AZStd::intrusive_ptr; + using DataPtrConst = AZStd::intrusive_ptr; +} + +namespace ScriptCanvasEditor +{ + class Graph; + + using GraphPtr = Graph*; + using GraphPtrConst = const Graph*; + + class SourceHandle + { + public: + AZ_TYPE_INFO(SourceHandle, "{65855A98-AE2F-427F-BFC8-69D45265E312}"); + AZ_CLASS_ALLOCATOR(SourceHandle, AZ::SystemAllocator, 0); + + static void Reflect(AZ::ReflectContext* context); + + SourceHandle(); + + SourceHandle(const SourceHandle& data, const AZ::Uuid& id, const AZ::IO::Path& path); + + SourceHandle(ScriptCanvas::DataPtr graph, const AZ::Uuid& id, const AZ::IO::Path& path); + + SourceHandle(const SourceHandle& data, const AZ::IO::Path& path); + + SourceHandle(ScriptCanvas::DataPtr graph, const AZ::IO::Path& path); + + bool AnyEquals(const SourceHandle& other) const; + + void Clear(); + + // return a SourceHandle with only the Id and Path, but without a pointer to the data + SourceHandle Describe() const; + + GraphPtrConst Get() const; + + const AZ::Uuid& Id() const; + + bool IsDescriptionValid() const; + + bool IsGraphValid() const; + + GraphPtr Mod() const; + + bool operator==(const SourceHandle& other) const; + + bool operator!=(const SourceHandle& other) const; + + const AZ::IO::Path& Path() const; + + bool PathEquals(const SourceHandle& other) const; + + AZStd::string ToString() const; + + private: + ScriptCanvas::DataPtr m_data; + AZ::Uuid m_id = AZ::Uuid::CreateNull(); + AZ::IO::Path m_path; + }; +} + +namespace ScriptCanvas +{ + class ScriptCanvasData + : public AZStd::intrusive_refcount + { + public: + + AZ_RTTI(ScriptCanvasData, "{1072E894-0C67-4091-8B64-F7DB324AD13C}"); + AZ_CLASS_ALLOCATOR(ScriptCanvasData, AZ::SystemAllocator, 0); + ScriptCanvasData() = default; + virtual ~ScriptCanvasData() = default; + ScriptCanvasData(ScriptCanvasData&& other); + ScriptCanvasData& operator=(ScriptCanvasData&& other); + + static void Reflect(AZ::ReflectContext* reflectContext); + + AZ::Entity* GetScriptCanvasEntity() const { return m_scriptCanvasEntity.get(); } + + const Graph* GetGraph() const; + + const ScriptCanvasEditor::Graph* GetEditorGraph() const; + + Graph* ModGraph(); + + ScriptCanvasEditor::Graph* ModEditorGraph(); + + AZStd::unique_ptr m_scriptCanvasEntity; + private: + ScriptCanvasData(const ScriptCanvasData&) = delete; + }; +} + namespace AZStd { template<> @@ -304,11 +408,28 @@ namespace AZStd { using argument_type = ScriptCanvas::SlotId; using result_type = AZStd::size_t; - AZ_FORCE_INLINE size_t operator()(const argument_type& ref) const + + inline size_t operator()(const argument_type& ref) const { return AZStd::hash()(ref.m_id); } }; + + template<> + struct hash + { + using argument_type = ScriptCanvasEditor::SourceHandle; + using result_type = AZStd::size_t; + + inline size_t operator()(const argument_type& handle) const + { + size_t h = 0; + hash_combine(h, handle.Id()); + hash_combine(h, handle.Path()); + hash_combine(h, handle.Get()); + return h; + } + }; } #define SCRIPT_CANVAS_INFINITE_LOOP_DETECTION_COUNT (2000000) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp index 9d848ff998..43d4e9496d 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -52,6 +51,7 @@ namespace GraphCpp VariablePanelSymantics, AddVersionData, RemoveFunctionGraphMarker, + FixupVersionDataTypeId, // label your version above Current }; @@ -71,9 +71,17 @@ namespace ScriptCanvas componentElementNode.AddElementWithData(context, "m_assetType", azrtti_typeid()); } - if (componentElementNode.GetVersion() < GraphCpp::GraphVersion::RemoveFunctionGraphMarker) + if (auto subElement = componentElementNode.FindElement(AZ_CRC_CE("isFunctionGraph")); subElement > 0) { - componentElementNode.RemoveElementByName(AZ_CRC_CE("isFunctionGraph")); + componentElementNode.RemoveElement(subElement); + } + + if (auto subElement = componentElementNode.FindSubElement(AZ_CRC_CE("versionData"))) + { + if (subElement->GetId() == azrtti_typeid()) + { + componentElementNode.RemoveElementByName(AZ_CRC_CE("versionData")); + } } return true; @@ -1190,11 +1198,6 @@ namespace ScriptCanvas m_isObserved = isObserved; } - AZ::Data::AssetType Graph::GetAssetType() const - { - return m_assetType; - } - void Graph::VersioningRemoveSlot(ScriptCanvas::Node& scriptCanvasNode, const SlotId& slotId) { bool deletedSlot = true; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h index 46e8a103bb..76fc3a6c7b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h @@ -14,14 +14,12 @@ #include #include #include - #include #include #include #include #include #include - #include namespace ScriptCanvas @@ -189,8 +187,6 @@ namespace ScriptCanvas bool IsGraphObserved() const override; void SetIsGraphObserved(bool isObserved) override; - - AZ::Data::AssetType GetAssetType() const override; //// const AZStd::unordered_map& GetNodeMapping() const { return m_nodeMapping; } @@ -200,7 +196,7 @@ namespace ScriptCanvas GraphData m_graphData; AZ::Data::AssetType m_assetType; - + private: ScriptCanvasId m_scriptCanvasId; ExecutionMode m_executionMode = ExecutionMode::Interpreted; @@ -209,7 +205,7 @@ namespace ScriptCanvas GraphVariableManagerRequests* m_variableRequests = nullptr; // Keeps a mapping of the Node EntityId -> NodeComponent. - // Saves looking up the NodeComponent everytime we need the Node. + // Saves looking up the NodeComponent every time we need the Node. AZStd::unordered_map m_nodeMapping; bool m_isObserved; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/GraphBus.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/GraphBus.h index 6b7133d47e..53d1a95964 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/GraphBus.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/GraphBus.h @@ -147,9 +147,6 @@ namespace ScriptCanvas //! returns a pair of with the supplied id //! The variable datum pointer is non-null if the variable has been found virtual GraphVariable* FindVariableById(const VariableId& variableId) = 0; - - virtual AZ::Data::AssetType GetAssetType() const = 0; - }; using GraphRequestBus = AZ::EBus; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Nodeable.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Nodeable.cpp index 093f87e1f7..7bb37a87dc 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Nodeable.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Nodeable.cpp @@ -80,6 +80,7 @@ namespace ScriptCanvas ->Attribute(AZ::ScriptCanvasAttributes::VariableCreationForbidden, AZ::AttributeIsValid::IfPresent) ->Attribute(AZ::Script::Attributes::UseClassIndexAllowNil, AZ::AttributeIsValid::IfPresent) ->Constructor() + ->Attribute(AZ::Script::Attributes::DefaultConstructorOverrideIndex, 0) ->Method("Deactivate", &Nodeable::Deactivate) ->Method("InitializeExecutionState", &Nodeable::InitializeExecutionState) ->Method("InitializeExecutionOuts", &Nodeable::InitializeExecutionOuts) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp index bbd16dfb96..1855b348f2 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp @@ -68,7 +68,7 @@ namespace ExecutionInterpretedAPICpp { if (lua_isstring(lua, -1)) { - AZ::ScriptContext::FromNativeContext(lua)->Error(AZ::ScriptContext::ErrorType::Error, true, "%s", lua_tostring(lua, -1)); + AZ::ScriptContext::FromNativeContext(lua)->Error(AZ::ScriptContext::ErrorType::Error, true, lua_tostring(lua, -1)); } else { @@ -401,7 +401,7 @@ namespace ScriptCanvas // \note: the the object is being constructed, and is assumed to never leave or re-enter Lua again AZ_Assert(lua_isuserdata(lua, -2) && !lua_islightuserdata(lua, -2), "Error in compiled lua file, 1st argument to OverrideNodeableMetatable is not userdata (Nodeable)"); AZ_Assert(lua_istable(lua, -1), "Error in compiled lua file, 2nd argument to OverrideNodeableMetatable is not a Lua table"); - + [[maybe_unused]] auto userData = reinterpret_cast(lua_touserdata(lua, -2)); AZ_Assert(userData && userData->magicData == AZ_CRC_CE("AZLuaUserData"), "this isn't user data"); // Lua: LuaUserData::nodeable, class_mt diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpreted.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpreted.cpp index 0f090574b5..3ae52846cd 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpreted.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpreted.cpp @@ -143,6 +143,8 @@ namespace ScriptCanvas AZ_Assert(m_luaRegistryIndex == LUA_NOREF, "ExecutionStateInterpreted already in the Lua registry and risks double deletion"); // Lua: instance m_luaRegistryIndex = luaL_ref(m_luaState, LUA_REGISTRYINDEX); + AZ_Assert(m_luaRegistryIndex != LUA_REFNIL, "ExecutionStateInterpreted was nil when trying to gain a reference"); + AZ_Assert(m_luaRegistryIndex != LUA_NOREF, "ExecutionStateInterpreted failed to gain a reference"); } void ExecutionStateInterpreted::Reflect(AZ::ReflectContext* reflectContext) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpretedPerActivation.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpretedPerActivation.cpp index 44b1364682..425af171c5 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpretedPerActivation.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpretedPerActivation.cpp @@ -117,7 +117,7 @@ namespace ScriptCanvas lua_pushvalue(lua, -2); // Lua: instance, graph_VM.k_OnGraphStartFunctionName, instance const int result = Execution::InterpretedSafeCall(lua, 1, 0); - // Lua: instance ? + // Lua: instance, ? if (result == LUA_OK) { // Lua: instance diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/ParsingMetaData.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/ParsingMetaData.cpp index 476b21d0d6..681bd3b0e4 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/ParsingMetaData.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/ParsingMetaData.cpp @@ -152,19 +152,19 @@ namespace ScriptCanvas { if (azrtti_istypeof(execution->GetId().m_node)) { - return MetaDataPtr(aznew FormatStringMetaData()); + return AZStd::make_shared(); } else if (azrtti_istypeof(execution->GetId().m_node)) { - return MetaDataPtr(aznew PrintMetaData()); + return AZStd::make_shared(); } else if (azrtti_istypeof(execution->GetId().m_node)) { - return MetaDataPtr(aznew MathExpressionMetaData()); + return AZStd::make_shared(); } else if (execution->GetSymbol() == Symbol::FunctionCall) { - return MetaDataPtr(aznew FunctionCallDefaultMetaData()); + return AZStd::make_shared(); } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Aggregator.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Aggregator.cpp deleted file mode 100644 index 73fe7300ac..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Aggregator.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -namespace ScriptCanvas -{ - namespace Profiler - { - - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Aggregator.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Aggregator.h deleted file mode 100644 index 679a770bcc..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Aggregator.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once -namespace ScriptCanvas -{ - namespace Profiler - { - - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Driller.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Driller.cpp deleted file mode 100644 index 3865f60b77..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Driller.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include -#include - -namespace ScriptCanvas -{ - namespace Profiler - { - void Driller::OnNodeExecute(Node* node) - { - m_output->BeginTag(AZ_CRC("ScriptCanvasGraphDriller", 0xb161ccb2)); - { - m_output->BeginTag(AZ_CRC("OnNodeExecute", 0x3e51a5eb)); - { - m_output->Write(AZ_CRC("NodeName", 0x606d4587), node->GetEntity()->GetName()); - m_output->Write(AZ_CRC("NodeType", 0xb2906ca8), node->RTTI_GetTypeName()); - } - m_output->EndTag(AZ_CRC("StringEvent", 0xd1e005df)); - } - m_output->EndTag(AZ_CRC("ScriptCanvasGraphDriller", 0xb161ccb2)); - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Driller.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Driller.h deleted file mode 100644 index dffed6fffd..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Driller.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once -#include -#include - -namespace ScriptCanvas -{ - class Graph; - class Node; - - namespace Profiler - { - class DrillerInterface - : public AZ::Debug::DrillerEBusTraits - { - public: - - // On Entry - // On Execute/Upate - // On Exit - virtual void OnNodeExecute(Node*) = 0; - - }; - - using DrillerBus = AZ::EBus; - - class DrillerCommandInterface - : public AZ::Debug::DrillerEBusTraits - { - public: - - virtual Graph* RequestDrilledGraph() = 0; - }; - - using DrillerCommandBus = AZ::EBus; - - class Driller - : public AZ::Debug::Driller - , public DrillerBus::Handler - { - bool m_isDetailedCapture; - - Graph* m_drilledGraph; - - using ParamArrayType = AZStd::vector; - ParamArrayType m_params; - - public: - - AZ_CLASS_ALLOCATOR(Driller, AZ::SystemAllocator, 0); - - const char* GroupName() const override { return "ScriptCanvasDrillers"; } - const char* GetName() const override { return "ScriptCanvasGraphDriller"; } - const char* GetDescription() const override { return "Drilling the Script Canvas execution engine"; } - int GetNumParams() const override { return static_cast(m_params.size()); } - const Param* GetParam(int index) const override { return &m_params[index]; } - - Driller() - : m_isDetailedCapture(false) - , m_drilledGraph(nullptr) - { - Param isDetailed; - isDetailed.desc = "IsDetailedDrill"; - isDetailed.name = AZ_CRC("IsDetailedDrill", 0x2155cef2); - isDetailed.type = Param::PT_BOOL; - isDetailed.value = 0; - m_params.push_back(isDetailed); - } - - void Start(const Param* params = nullptr, int numParams = 0) override - { - m_isDetailedCapture = m_params[0].value != 0; - if (params) - { - for (int i = 0; i < numParams; i++) - { - if (params[i].name == m_params[0].name) - { - m_isDetailedCapture = params[i].value != 0; - } - } - } - - DrillerCommandBus::BroadcastResult(m_drilledGraph, &DrillerCommandInterface::RequestDrilledGraph); -// AZ_TEST_ASSERT(m_drilledGraph != nullptr); /// Make sure we have our object by the time we started the driller - - m_output->BeginTag(AZ_CRC("ScriptCanvasGraphDriller", 0xb161ccb2)); - m_output->Write(AZ_CRC("OnStart", 0x8b372fca), m_isDetailedCapture); - // write drilled object initial state - m_output->EndTag(AZ_CRC("ScriptCanvasGraphDriller", 0xb161ccb2)); - - BusConnect(); - } - - void Stop() override - { - //m_drilledGraph = nullptr; - //m_output->BeginTag(AZ_CRC("ScriptCanvasGraphDriller")); - //m_output->Write(AZ_CRC("OnStop"), m_isDetailedCapture); - //m_output->EndTag(AZ_CRC("ScriptCanvasGraphDriller")); - //BusDisconnect(); - } - - void OnNodeExecute(Node* node) override; - }; - - - } -} - diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/DrillerEvents.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/DrillerEvents.cpp deleted file mode 100644 index 73fe7300ac..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/DrillerEvents.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -namespace ScriptCanvas -{ - namespace Profiler - { - - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/DrillerEvents.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/DrillerEvents.h deleted file mode 100644 index 1aa522367d..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/DrillerEvents.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once -#include -#include - -namespace ScriptCanvas -{ - namespace Profiler - { - namespace Event - { - class GraphExecutionStart - { - public: - AZ_CLASS_ALLOCATOR(GraphExecutionStart, AZ::SystemAllocator, 0) - AZ_RTTI(GraphExecutionStart, "{AAB7E2E1-9096-4F51-90CA-259A057F2D88}"); - - GraphExecutionStart() - {} - }; - } - - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/TranslationUtilities.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/TranslationUtilities.cpp index a9ca526373..bbf3a77c55 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/TranslationUtilities.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/TranslationUtilities.cpp @@ -9,7 +9,6 @@ #include "TranslationUtilities.h" #include -#include #include #include #include @@ -71,34 +70,6 @@ namespace TranslationUtilitiesCPP return AZStd::string::format("%s%s_VM.%s", TranslationUtilitiesCPP::k_fileDirectoryPathLua, source.m_name.data(), extension.data()); } - class FileEventHandler - : public AZ::IO::FileIOEventBus::Handler - { - public: - int m_errorCode = 0; - AZStd::string m_fileName; - - FileEventHandler() - { - BusConnect(); - } - - ~FileEventHandler() - { - BusDisconnect(); - } - - void OnError(const AZ::IO::SystemFile* /*file*/, const char* fileName, int errorCode) override - { - m_errorCode = errorCode; - - if (fileName) - { - m_fileName = fileName; - } - } - }; - AZ::Outcome SaveFile(const Grammar::Source& source, AZStd::string_view text, AZStd::string_view extension) { AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance(); @@ -111,25 +82,23 @@ namespace TranslationUtilitiesCPP // \todo get a (debug) file path based on the extension const AZStd::string filePath = TranslationUtilitiesCPP::GetDebugLuaFilePath(source, extension); - FileEventHandler eventHandler; - AZ::IO::HandleType fileHandle = AZ::IO::InvalidHandle; const AZ::IO::Result fileOpenResult = fileIO->Open(filePath.c_str(), AZ::IO::OpenMode::ModeWrite | AZ::IO::OpenMode::ModeText, fileHandle); if (fileOpenResult != AZ::IO::ResultCode::Success) { - return AZ::Failure(AZStd::string::format("Failed to open file: %s, error code: %d", filePath.c_str(), eventHandler.m_errorCode)); + return AZ::Failure(AZStd::string::format("Failed to open file: %sd", filePath.c_str())); } const AZ::IO::Result fileWriteResult = fileIO->Write(fileHandle, text.begin(), text.size()); if (fileWriteResult != AZ::IO::ResultCode::Success) { - return AZ::Failure(AZStd::string::format("Failed to write file: %s, error code: %d", filePath.c_str(), eventHandler.m_errorCode)); + return AZ::Failure(AZStd::string::format("Failed to write file: %s", filePath.c_str())); } const AZ::IO::Result fileCloseResult = fileIO->Close(fileHandle); if (fileCloseResult != AZ::IO::ResultCode::Success) { - return AZ::Failure(AZStd::string::format("Failed to close file: %s, error code: %d", filePath.c_str(), eventHandler.m_errorCode)); + return AZ::Failure(AZStd::string::format("Failed to close file: %s", filePath.c_str())); } return AZ::Success(); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.cpp index 3d76883adc..59b924196b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.cpp @@ -335,6 +335,11 @@ namespace ScriptCanvas return &m_datum; } + Datum& GraphVariable::ModDatum() + { + return m_datum; + } + void GraphVariable::ConfigureDatumView(ModifiableDatumView& datumView) { datumView.ConfigureView((*this)); @@ -493,14 +498,6 @@ namespace ScriptCanvas return m_sortPriority; } - bool GraphVariable::IsInFunction() const - { - AZ::Data::AssetType assetType = AZ::Data::AssetType::CreateNull(); - ScriptCanvas::GraphRequestBus::EventResult(assetType, m_scriptCanvasId, &ScriptCanvas::GraphRequests::GetAssetType); - - return assetType == azrtti_typeid(); - } - AZ::u32 GraphVariable::OnInitialValueSourceChanged() { VariableNotificationBus::Event(GetGraphScopedId(), &VariableNotifications::OnVariableInitialValueSourceChanged); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.h index dbc0a814c6..db83076f67 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.h @@ -127,6 +127,8 @@ namespace ScriptCanvas const Datum* GetDatum() const; + Datum& ModDatum(); + bool IsComponentProperty() const; void ConfigureDatumView(ModifiableDatumView& accessController); @@ -194,9 +196,7 @@ namespace ScriptCanvas choices.emplace_back(AZStd::make_pair(static_cast(VariableFlags::Scope::Function), s_ScopeNames[1])); return choices; } - - bool IsInFunction() const; - + void OnScopeTypedChanged(); AZ::u32 OnInitialValueSourceChanged(); void OnSortPriorityChanged(); diff --git a/Gems/ScriptCanvas/Code/Tests/ScriptCanvasUnitTest_BehaviorContextUtils.cpp b/Gems/ScriptCanvas/Code/Tests/ScriptCanvasUnitTest_BehaviorContextUtils.cpp index 472da7dfeb..c06b30253f 100644 --- a/Gems/ScriptCanvas/Code/Tests/ScriptCanvasUnitTest_BehaviorContextUtils.cpp +++ b/Gems/ScriptCanvas/Code/Tests/ScriptCanvasUnitTest_BehaviorContextUtils.cpp @@ -37,7 +37,6 @@ namespace ScriptCanvasUnitTest const char* GetExecutableFolder() const override { return nullptr; } const char* GetBinFolder() const { return nullptr; } const char* GetAppRoot() override { return nullptr; } - AZ::Debug::DrillerManager* GetDrillerManager() override { return nullptr; } void EnumerateEntities(const EntityCallback& /*callback*/) override {} void Init(AZ::BehaviorContext* behaviorContext) diff --git a/Gems/ScriptCanvas/Code/Tests/ScriptCanvasUnitTest_ScriptCanvasBuilderComponent.cpp b/Gems/ScriptCanvas/Code/Tests/ScriptCanvasUnitTest_ScriptCanvasBuilderComponent.cpp index 470bdc18fe..a469899d4a 100644 --- a/Gems/ScriptCanvas/Code/Tests/ScriptCanvasUnitTest_ScriptCanvasBuilderComponent.cpp +++ b/Gems/ScriptCanvas/Code/Tests/ScriptCanvasUnitTest_ScriptCanvasBuilderComponent.cpp @@ -41,7 +41,6 @@ namespace ScriptCanvasUnitTest const char* GetExecutableFolder() const override { return nullptr; } const char* GetBinFolder() const { return nullptr; } const char* GetAppRoot() override { return nullptr; } - AZ::Debug::DrillerManager* GetDrillerManager() override { return nullptr; } void EnumerateEntities(const EntityCallback& /*callback*/) override {} // AssetBuilderBus diff --git a/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.cpp b/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.cpp index a0f26bcec9..25a4b58a74 100644 --- a/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.cpp +++ b/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.cpp @@ -188,7 +188,7 @@ namespace ScriptCanvasEditorTools } } - AZ::Entity* TranslationGeneration::TranslateAZEvent(const AZ::BehaviorMethod& method) + AZ::Entity* TranslationGeneration::GetAZEventNode(const AZ::BehaviorMethod& method) { // Make sure the method returns an AZ::Event by reference or pointer if (AZ::MethodReturnsAzEventByReferenceOrPointer(method)) @@ -248,6 +248,11 @@ namespace ScriptCanvasEditorTools { const AZ::BehaviorMethod* behaviorMethod = methodPair.second; + if (TranslateSingleAZEvent(behaviorMethod)) + { + continue; + } + Method methodEntry; AZStd::string cleanName = GraphCanvas::TranslationKey::Sanitize(methodPair.first); @@ -363,87 +368,94 @@ namespace ScriptCanvasEditorTools return true; } - void TranslationGeneration::TranslateAZEvents() + //! Generate the translation data for a specific AZ::Event + bool TranslationGeneration::TranslateSingleAZEvent(const AZ::BehaviorMethod* method) { - GraphCanvas::TranslationKey translationKey; - AZStd::vector nodes; - - // Methods - for (const auto& behaviorMethod : m_behaviorContext->m_methods) + AZ::Entity* node = GetAZEventNode(*method); + if (!node) { - const auto& method = *behaviorMethod.second; - AZ::Entity* node = TranslateAZEvent(method); - if (node) - { - nodes.push_back(node); - } + return false; } - // Methods in classes - for (auto behaviorClass : m_behaviorContext->m_classes) + TranslationFormat translationRoot; + + ScriptCanvas::Nodes::Core::AzEventHandler* nodeComponent = node->FindComponent(); + nodeComponent->Init(); + nodeComponent->Configure(); + + const ScriptCanvas::Nodes::Core::AzEventEntry& azEventEntry{ nodeComponent->GetEventEntry() }; + + Entry entry; + entry.m_key = azEventEntry.m_eventName; + entry.m_context = "AZEventHandler"; + entry.m_details.m_name = azEventEntry.m_eventName; + + SplitCamelCase(entry.m_details.m_name); + + for (const ScriptCanvas::Slot& slot : nodeComponent->GetSlots()) { - for (auto behaviorMethod : behaviorClass.second->m_methods) + Slot slotEntry; + + if (slot.IsVisible()) { - const auto& method = *behaviorMethod.second; - AZ::Entity* node = TranslateAZEvent(method); - if (node) + slotEntry.m_key = slot.GetName(); + + if (slot.GetId() == azEventEntry.m_azEventInputSlotId) + { + slotEntry.m_details.m_name = azEventEntry.m_eventName; + } + else { - nodes.push_back(node); + slotEntry.m_details.m_name = slot.GetName(); } + + entry.m_slots.push_back(slotEntry); } } - TranslationFormat translationRoot; - - for (auto& node : nodes) - { - ScriptCanvas::Nodes::Core::AzEventHandler* nodeComponent = node->FindComponent(); - nodeComponent->Init(); - nodeComponent->Configure(); - - const ScriptCanvas::Nodes::Core::AzEventEntry& azEventEntry{ nodeComponent->GetEventEntry() }; - - Entry entry; - entry.m_key = azEventEntry.m_eventName; - entry.m_context = "AZEventHandler"; - entry.m_details.m_name = azEventEntry.m_eventName; + translationRoot.m_entries.push_back(entry); - SplitCamelCase(entry.m_details.m_name); + // delete the node, don't need to keep it beyond this point + delete node; - for (const ScriptCanvas::Slot& slot : nodeComponent->GetSlots()) - { - Slot slotEntry; - if (slot.IsVisible()) - { - slotEntry.m_key = slot.GetName(); + AZStd::string filename = GraphCanvas::TranslationKey::Sanitize(entry.m_key); - if (slot.GetId() == azEventEntry.m_azEventInputSlotId) - { - slotEntry.m_details.m_name = azEventEntry.m_eventName; - } - else - { - slotEntry.m_details.m_name = slot.GetName(); - } + AZStd::string targetFile = AZStd::string::format("AZEvents/%s", filename.c_str()); - entry.m_slots.push_back(slotEntry); - } - } + SaveJSONData(targetFile, translationRoot); - translationRoot.m_entries.push_back(entry); + translationRoot.m_entries.clear(); - // delete the node, don't need to keep it beyond this point - delete node; + return true; + } - AZStd::string filename = GraphCanvas::TranslationKey::Sanitize(entry.m_key); + void TranslationGeneration::TranslateAZEvents() + { + GraphCanvas::TranslationKey translationKey; + AZStd::vector methods; - AZStd::string targetFile = AZStd::string::format("AZEvents/%s", filename.c_str()); + // Methods + for (const auto& behaviorMethod : m_behaviorContext->m_methods) + { + const auto method = behaviorMethod.second; + methods.push_back(method); + } - SaveJSONData(targetFile, translationRoot); + // Methods in classes + for (auto behaviorClass : m_behaviorContext->m_classes) + { + for (auto behaviorMethod : behaviorClass.second->m_methods) + { + const auto method = behaviorMethod.second; + methods.push_back(method); + } + } - translationRoot.m_entries.clear(); + for (auto& method : methods) + { + TranslateSingleAZEvent(method); } } @@ -484,6 +496,7 @@ namespace ScriptCanvasEditorTools { TranslateNode(node); } + } void TranslationGeneration::TranslateNode(const AZ::TypeId& nodeTypeId) @@ -558,8 +571,11 @@ namespace ScriptCanvasEditorTools nodeComponent->Init(); nodeComponent->Configure(); - int inputIndex = 0; - int outputIndex = 0; + int exeInputIndex = 0; + int exeOutputIndex = 0; + + int dataInputIndex = 0; + int dataOutputIndex = 0; const auto& allSlots = nodeComponent->GetAllSlots(); for (const auto& slot : allSlots) @@ -570,16 +586,16 @@ namespace ScriptCanvasEditorTools { if (slot->GetDescriptor().IsInput()) { - slotEntry.m_key = AZStd::string::format("Input_%s", slot->GetName().c_str()); - inputIndex++; + slotEntry.m_key = AZStd::string::format("Input_%s_%d", slot->GetName().c_str(), exeInputIndex); + exeInputIndex++; slotEntry.m_details.m_name = slot->GetName(); slotEntry.m_details.m_tooltip = slot->GetToolTip(); } else if (slot->GetDescriptor().IsOutput()) { - slotEntry.m_key = AZStd::string::format("Output_%s", slot->GetName().c_str()); - outputIndex++; + slotEntry.m_key = AZStd::string::format("Output_%s_%d", slot->GetName().c_str(), exeOutputIndex); + exeOutputIndex++; slotEntry.m_details.m_name = slot->GetName(); slotEntry.m_details.m_tooltip = slot->GetToolTip(); @@ -618,8 +634,8 @@ namespace ScriptCanvasEditorTools if (slot->GetDescriptor().IsInput()) { - slotEntry.m_key = AZStd::string::format("DataInput_%s", slot->GetName().c_str()); - inputIndex++; + slotEntry.m_key = AZStd::string::format("DataInput_%s_%d", slot->GetName().c_str(), dataInputIndex); + dataInputIndex++; AZStd::string argumentKey = slotTypeKey; AZStd::string argumentName = slot->GetName(); @@ -632,8 +648,8 @@ namespace ScriptCanvasEditorTools } else if (slot->GetDescriptor().IsOutput()) { - slotEntry.m_key = AZStd::string::format("DataOutput_%s", slot->GetName().c_str()); - outputIndex++; + slotEntry.m_key = AZStd::string::format("DataOutput_%s_%d", slot->GetName().c_str(), dataOutputIndex); + dataOutputIndex++; AZStd::string resultKey = slotTypeKey; AZStd::string resultName = slot->GetName(); @@ -943,6 +959,7 @@ namespace ScriptCanvasEditorTools AZStd::string methodName = "Get"; methodName.append(cleanName); method.m_key = methodName; + method.m_context = "Getter"; method.m_details.m_name = methodName; method.m_details.m_tooltip = behaviorProperty->m_getter->m_debugDescription ? behaviorProperty->m_getter->m_debugDescription : ""; @@ -953,7 +970,7 @@ namespace ScriptCanvasEditorTools // We know this is a getter, so there will only be one parameter, we will use the method name as a best // guess for the argument name SplitCamelCase(cleanName); - method.m_arguments[1].m_details.m_name = cleanName; + method.m_results[0].m_details.m_name = cleanName; entry->m_methods.push_back(method); @@ -970,6 +987,7 @@ namespace ScriptCanvasEditorTools methodName.append(cleanName); method.m_key = methodName; + method.m_context = "Setter"; method.m_details.m_name = methodName; method.m_details.m_tooltip = behaviorProperty->m_setter->m_debugDescription ? behaviorProperty->m_getter->m_debugDescription : ""; @@ -1345,7 +1363,7 @@ namespace ScriptCanvasEditorTools scratchBuffer.Clear(); - AzQtComponents::ShowFileOnDesktop(endPath.c_str()); + // AzQtComponents::ShowFileOnDesktop(endPath.c_str()); } diff --git a/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.h b/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.h index c6d482e115..a5fec82361 100644 --- a/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.h +++ b/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.h @@ -108,7 +108,7 @@ namespace ScriptCanvasEditorTools void TranslateEBus(const AZ::BehaviorEBus* behaviorEBus); //! Generate the translation data for a specific AZ::Event - AZ::Entity* TranslateAZEvent(const AZ::BehaviorMethod& method); + bool TranslateSingleAZEvent(const AZ::BehaviorMethod* method); //! Generate the translation data for AZ::Events void TranslateAZEvents(); @@ -136,6 +136,9 @@ namespace ScriptCanvasEditorTools private: + //! Returns the entity for a valid AZ::Event + AZ::Entity* GetAZEventNode(const AZ::BehaviorMethod& method); + //! Utility to populate a BehaviorMethod's translation data void TranslateMethod(AZ::BehaviorMethod* behaviorMethod, Method& methodEntry); diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake index eb50f5cb51..34b2c4d326 100644 --- a/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake @@ -191,8 +191,6 @@ set(FILES Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.cpp Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeable.cpp Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeableNode.cpp - Include/ScriptCanvas/Profiler/Aggregator.cpp - Include/ScriptCanvas/Profiler/DrillerEvents.cpp Include/ScriptCanvas/Serialization/BehaviorContextObjectSerializer.cpp Include/ScriptCanvas/Serialization/DatumSerializer.cpp Include/ScriptCanvas/Serialization/RuntimeVariableSerializer.cpp diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake index 609f7cd454..77ccf7fda9 100644 --- a/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake @@ -27,7 +27,9 @@ set(FILES Editor/Assets/ScriptCanvasAsset.cpp Editor/Include/ScriptCanvas/Assets/ScriptCanvasAssetBus.h Editor/Include/ScriptCanvas/Assets/ScriptCanvasAssetTypes.h + Editor/Include/ScriptCanvas/Assets/ScriptCanvasFileHandling.h Editor/Include/ScriptCanvas/Assets/ScriptCanvasAssetHandler.h + Editor/Assets/ScriptCanvasFileHandling.cpp Editor/Assets/ScriptCanvasAssetHandler.cpp Editor/Assets/ScriptCanvasAssetHolder.h Editor/Assets/ScriptCanvasAssetHolder.cpp @@ -55,6 +57,8 @@ set(FILES Editor/Components/EditorGraphVariableManagerComponent.cpp Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponent.h Editor/Components/EditorScriptCanvasComponent.cpp + Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponentSerializer.h + Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponentSerializer.cpp Editor/Components/IconComponent.h Editor/Components/IconComponent.cpp Editor/Include/ScriptCanvas/GraphCanvas/DynamicSlotBus.h @@ -178,6 +182,8 @@ set(FILES Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.h Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp Editor/View/Widgets/ScriptCanvasNodePaletteToolbar.ui + Editor/View/Widgets/SourceHandlePropertyAssetCtrl.h + Editor/View/Widgets/SourceHandlePropertyAssetCtrl.cpp Editor/View/Widgets/WidgetBus.h Editor/View/Widgets/DataTypePalette/DataTypePaletteModel.cpp Editor/View/Widgets/DataTypePalette/DataTypePaletteModel.h diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_headers.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_headers.cmake index 7dfe9653b6..7f39c2f3d0 100644 --- a/Gems/ScriptCanvas/Code/scriptcanvasgem_headers.cmake +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_headers.cmake @@ -351,9 +351,6 @@ set(FILES Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeable.h Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeableNode.h - Include/ScriptCanvas/Profiler/Driller.h - Include/ScriptCanvas/Profiler/Aggregator.h - Include/ScriptCanvas/Profiler/DrillerEvents.h Include/ScriptCanvas/Serialization/BehaviorContextObjectSerializer.h Include/ScriptCanvas/Serialization/DatumSerializer.h Include/ScriptCanvas/Serialization/RuntimeVariableSerializer.h diff --git a/Gems/ScriptCanvasTesting/Assets/ScriptCanvas/UnitTests/LY_SC_UnitTest_NodeableDelay.scriptcanvas b/Gems/ScriptCanvasTesting/Assets/ScriptCanvas/UnitTests/LY_SC_UnitTest_NodeableDelay.scriptcanvas index a5d22135c7..b9ccf8d42b 100644 --- a/Gems/ScriptCanvasTesting/Assets/ScriptCanvas/UnitTests/LY_SC_UnitTest_NodeableDelay.scriptcanvas +++ b/Gems/ScriptCanvasTesting/Assets/ScriptCanvas/UnitTests/LY_SC_UnitTest_NodeableDelay.scriptcanvas @@ -1,3436 +1,2173 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "ScriptCanvasData", + "ClassData": { + "m_scriptCanvas": { + "Id": { + "id": 7992795709152 + }, + "Name": "LY_SC_UnitTest_NodeableDelay", + "Components": { + "Component_[13769957497174641973]": { + "$type": "EditorGraphVariableManagerComponent", + "Id": 13769957497174641973, + "m_variableData": { + "m_nameVariableMap": [ + { + "Key": { + "m_id": "{13A4B0B3-756F-403C-A9E0-CC40DA27EE2C}" + }, + "Value": { + "Datum": { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 2.0, + "label": "Number" + }, + "VariableId": { + "m_id": "{13A4B0B3-756F-403C-A9E0-CC40DA27EE2C}" + }, + "VariableName": "Two" + } + }, + { + "Key": { + "m_id": "{A3A19E5B-D7BE-46D4-B876-9832C1D26D0B}" + }, + "Value": { + "Datum": { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 1.0, + "label": "Number" + }, + "VariableId": { + "m_id": "{A3A19E5B-D7BE-46D4-B876-9832C1D26D0B}" + }, + "VariableName": "One" + } + }, + { + "Key": { + "m_id": "{AD81163D-DA91-4E66-AE45-ADEDC64CAAF0}" + }, + "Value": { + "Datum": { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 0 + }, + "isNullPointer": false, + "$type": "bool", + "value": true, + "label": "Boolean" + }, + "VariableId": { + "m_id": "{AD81163D-DA91-4E66-AE45-ADEDC64CAAF0}" + }, + "VariableName": "Switch" + } + } + ] + }, + "CopiedVariableRemapping": [ + { + "Key": { + "m_id": "{53E25781-037F-4D34-905C-0151A205EC74}" + }, + "Value": { + "m_id": "{AD81163D-DA91-4E66-AE45-ADEDC64CAAF0}" + } + }, + { + "Key": { + "m_id": "{6ACE5B7C-104E-4B49-8386-8718283621A5}" + }, + "Value": { + "m_id": "{A3A19E5B-D7BE-46D4-B876-9832C1D26D0B}" + } + }, + { + "Key": { + "m_id": "{DA754EF7-9F41-46E5-A603-751C5AECABC1}" + }, + "Value": { + "m_id": "{13A4B0B3-756F-403C-A9E0-CC40DA27EE2C}" + } + } + ] + }, + "Component_[6702463496795695700]": { + "$type": "{4D755CA9-AB92-462C-B24F-0B3376F19967} Graph", + "Id": 6702463496795695700, + "m_graphData": { + "m_nodes": [ + { + "Id": { + "id": 8022860480224 + }, + "Name": "SC Node(GetVariable)", + "Components": { + "Component_[10003864966711545946]": { + "$type": "GetVariableNode", + "Id": 10003864966711545946, + "Slots": [ + { + "id": { + "m_id": "{8650478F-4E17-40B5-B13C-E8C02A524201}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "toolTip": "When signaled sends the property referenced by this node to a Data Output slot", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{273B6C2E-CBE7-479A-B6C6-4CC6E51636B6}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "toolTip": "Signaled after the referenced property has been pushed to the Data Output slot", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{12714A1C-FDCF-4A0C-8127-1B6B17A804CC}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Number", + "DisplayDataType": { + "m_type": 3 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 2 + }, + "DataType": 1 + } + ], + "m_variableId": { + "m_id": "{A3A19E5B-D7BE-46D4-B876-9832C1D26D0B}" + }, + "m_variableDataOutSlotId": { + "m_id": "{12714A1C-FDCF-4A0C-8127-1B6B17A804CC}" + } + } + } + }, + { + "Id": { + "id": 8005680611040 + }, + "Name": "SC-Node(Mark Complete)", + "Components": { + "Component_[1561479662366255748]": { + "$type": "{E42861BD-1956-45AE-8DD7-CCFC1E3E5ACF} Method", + "Id": 1561479662366255748, + "Slots": [ + { + "isVisibile": false, + "id": { + "m_id": "{C1E634E4-B55F-46D0-95EB-B3947D5E99ED}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "EntityID: 0", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{A585F499-C8AE-4B8A-9EB2-46C95DA2BFC8}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Report", + "toolTip": "additional notes for the test report", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{1A41311D-2629-4A55-8469-AB6EA8F8E00F}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{B0C71D36-F38C-48FC-80B7-58641E38A45F}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + } + ], + "Datums": [ + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 1 + }, + "isNullPointer": false, + "$type": "EntityId", + "value": { + "id": 4276206253 + } + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 5 + }, + "isNullPointer": false, + "$type": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9} AZStd::string", + "value": "Delay test complete", + "label": "Report" + } + ], + "methodType": 2, + "methodName": "Mark Complete", + "className": "Unit Testing", + "resultSlotIDs": [ + {} + ], + "prettyClassName": "Unit Testing" + } + } + }, + { + "Id": { + "id": 8018565512928 + }, + "Name": "SC-Node(DelayNodeableNode)", + "Components": { + "Component_[18208529655338450188]": { + "$type": "DelayNodeableNode", + "Id": 18208529655338450188, + "Slots": [ + { + "id": { + "m_id": "{F8445BAB-538D-411E-B386-51DA322E636F}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + { + "$type": "DisallowReentrantExecutionContract" + } + ], + "slotName": "Start", + "toolTip": "When signaled, execution is delayed at this node according to the specified properties.", + "DisplayGroup": { + "Value": 2675529103 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{FCE9085E-1FBB-4C65-BF21-A4886EE2B83B}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Start: Time", + "toolTip": "Amount of time to delay, in seconds.", + "DisplayGroup": { + "Value": 2675529103 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{AB0955E5-BC42-4C62-BB8D-C14ECE24AA28}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Start: Loop", + "toolTip": "If true, the delay will restart after triggering the Out slot.", + "DisplayGroup": { + "Value": 2675529103 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{00BF555A-CCC7-45F0-BDA1-7FCA587F5DF6}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Start: Hold", + "toolTip": "Amount of time to wait before restarting, in seconds.", + "DisplayGroup": { + "Value": 2675529103 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{6C92F041-AD12-4EDB-BD7D-2A1B126A0AE1}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "On Start", + "toolTip": "When signaled, execution is delayed at this node according to the specified properties.", + "DisplayGroup": { + "Value": 2675529103 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{C84ED69D-1250-441D-99EC-1FA09EBD4A33}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + { + "$type": "DisallowReentrantExecutionContract" + } + ], + "slotName": "Reset", + "toolTip": "When signaled, execution is delayed at this node according to the specified properties.", + "DisplayGroup": { + "Value": 1352515405 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{24A2AD52-B382-4875-B3F7-45072F3D95DC}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Reset: Time", + "toolTip": "Amount of time to delay, in seconds.", + "DisplayGroup": { + "Value": 1352515405 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{6CCC46D4-1ACA-4ED3-8F41-CE21DBB074BE}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Reset: Loop", + "toolTip": "If true, the delay will restart after triggering the Out slot.", + "DisplayGroup": { + "Value": 1352515405 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{3BA65C96-1800-44A7-9132-E8618EC309CE}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Reset: Hold", + "toolTip": "Amount of time to wait before restarting, in seconds.", + "DisplayGroup": { + "Value": 1352515405 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{7B52E7FE-906E-4E96-9025-DFD220C9A532}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "On Reset", + "toolTip": "When signaled, execution is delayed at this node according to the specified properties.", + "DisplayGroup": { + "Value": 1352515405 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{7311AE3A-E23F-476D-BCC5-2D6A7B39AD53}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + { + "$type": "DisallowReentrantExecutionContract" + } + ], + "slotName": "Cancel", + "toolTip": "Cancels the current delay.", + "DisplayGroup": { + "Value": 1444332914 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{017884F2-6FB0-4E88-BBE8-FE9277108BD3}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "On Cancel", + "toolTip": "Cancels the current delay.", + "DisplayGroup": { + "Value": 1444332914 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{6249B81E-1341-41B1-B843-F4658C1EAE31}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Done", + "toolTip": "Signaled when the delay reaches zero.", + "DisplayGroup": { + "Value": 271442091 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + }, + "IsLatent": true + }, + { + "id": { + "m_id": "{1A0F9D41-14F3-4CF0-8C00-7E2374129768}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Elapsed", + "toolTip": "The amount of time that has elapsed since the delay began.", + "DisplayDataType": { + "m_type": 3 + }, + "DisplayGroup": { + "Value": 271442091 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 2 + }, + "DataType": 1 + } + ], + "Datums": [ + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0, + "label": "Start: Time" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 0 + }, + "isNullPointer": false, + "$type": "bool", + "value": false, + "label": "Start: Loop" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0, + "label": "Start: Hold" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0, + "label": "Reset: Time" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 0 + }, + "isNullPointer": false, + "$type": "bool", + "value": false, + "label": "Reset: Loop" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0, + "label": "Reset: Hold" + } + ], + "slotExecutionMap": { + "ins": [ + { + "_slotId": { + "m_id": "{F8445BAB-538D-411E-B386-51DA322E636F}" + }, + "_inputs": [ + { + "_slotId": { + "m_id": "{FCE9085E-1FBB-4C65-BF21-A4886EE2B83B}" + } + }, + { + "_slotId": { + "m_id": "{AB0955E5-BC42-4C62-BB8D-C14ECE24AA28}" + } + }, + { + "_slotId": { + "m_id": "{00BF555A-CCC7-45F0-BDA1-7FCA587F5DF6}" + } + } + ], + "_outs": [ + { + "_slotId": { + "m_id": "{6C92F041-AD12-4EDB-BD7D-2A1B126A0AE1}" + }, + "_name": "On Start", + "_interfaceSourceId": "{33362E36-3930-0000-0000-D138AF020000}" + } + ], + "_interfaceSourceId": "{B86FAF85-CA00-0000-296D-0737FD7F0000}" + }, + { + "_slotId": { + "m_id": "{C84ED69D-1250-441D-99EC-1FA09EBD4A33}" + }, + "_inputs": [ + { + "_slotId": { + "m_id": "{24A2AD52-B382-4875-B3F7-45072F3D95DC}" + } + }, + { + "_slotId": { + "m_id": "{6CCC46D4-1ACA-4ED3-8F41-CE21DBB074BE}" + } + }, + { + "_slotId": { + "m_id": "{3BA65C96-1800-44A7-9132-E8618EC309CE}" + } + } + ], + "_outs": [ + { + "_slotId": { + "m_id": "{7B52E7FE-906E-4E96-9025-DFD220C9A532}" + }, + "_name": "On Reset", + "_interfaceSourceId": "{33362E36-3930-0000-0000-D138AF020000}" + } + ], + "_interfaceSourceId": "{B86FAF85-CA00-0000-296D-0737FD7F0000}" + }, + { + "_slotId": { + "m_id": "{7311AE3A-E23F-476D-BCC5-2D6A7B39AD53}" + }, + "_outs": [ + { + "_slotId": { + "m_id": "{017884F2-6FB0-4E88-BBE8-FE9277108BD3}" + }, + "_name": "On Cancel", + "_interfaceSourceId": "{33362E36-3930-0000-0000-D138AF020000}" + } + ], + "_interfaceSourceId": "{B86FAF85-CA00-0000-296D-0737FD7F0000}" + } + ], + "latents": [ + { + "_slotId": { + "m_id": "{6249B81E-1341-41B1-B843-F4658C1EAE31}" + }, + "_name": "Done", + "_outputs": [ + { + "_slotId": { + "m_id": "{1A0F9D41-14F3-4CF0-8C00-7E2374129768}" + } + } + ], + "_interfaceSourceId": "{B86FAF85-CA00-0000-296D-0737FD7F0000}" + } + ] + } + } + } + }, + { + "Id": { + "id": 8031450414816 + }, + "Name": "SC-Node(Expect Greater Than Equal)", + "Components": { + "Component_[408430974986181037]": { + "$type": "MethodOverloaded", + "Id": 408430974986181037, + "Slots": [ + { + "isVisibile": false, + "id": { + "m_id": "{2EABD0D3-B2DE-4AED-9069-ACC8A92B54DE}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "EntityID: 0", + "DisplayDataType": { + "m_type": 1 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "IsOverload": true, + "id": { + "m_id": "{B9873274-15A8-4642-BCB8-423D302618FD}" + }, + "DynamicTypeOverride": 3, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Candidate", + "toolTip": "left of >=", + "DisplayDataType": { + "m_type": 3 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "IsOverload": true, + "id": { + "m_id": "{DCB3BEE9-00E3-4421-BC84-5B1380607AA5}" + }, + "DynamicTypeOverride": 3, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Reference", + "toolTip": "right of >=", + "DisplayDataType": { + "m_type": 3 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1, + "IsReference": true, + "VariableReference": { + "m_id": "{A3A19E5B-D7BE-46D4-B876-9832C1D26D0B}" + } + }, + { + "id": { + "m_id": "{01E90D0B-05A6-4C3F-9E86-FEC7139E4322}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Report", + "toolTip": "additional notes for the test report", + "DisplayDataType": { + "m_type": 5 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{5BB85516-23AA-4860-8D8E-4E25F83AAF27}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{21EA60AA-6B22-4623-997C-22363E687A4B}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + } + ], + "Datums": [ + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 1 + }, + "isNullPointer": false, + "$type": "EntityId", + "value": { + "id": 4276206253 + }, + "label": "EntityID: 0" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0, + "label": "Candidate" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0, + "label": "Reference" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 5 + }, + "isNullPointer": false, + "$type": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9} AZStd::string", + "value": "Elapsed should be more than 1 after start", + "label": "Report" + } + ], + "methodType": 2, + "methodName": "Expect Greater Than Equal", + "className": "Unit Testing", + "resultSlotIDs": [ + {} + ], + "prettyClassName": "Unit Testing", + "orderedInputSlotIds": [ + { + "m_id": "{2EABD0D3-B2DE-4AED-9069-ACC8A92B54DE}" + }, + { + "m_id": "{B9873274-15A8-4642-BCB8-423D302618FD}" + }, + { + "m_id": "{DCB3BEE9-00E3-4421-BC84-5B1380607AA5}" + }, + { + "m_id": "{01E90D0B-05A6-4C3F-9E86-FEC7139E4322}" + } + ] + } + } + }, + { + "Id": { + "id": 8009975578336 + }, + "Name": "SC-Node(Gate)", + "Components": { + "Component_[5398707513550245442]": { + "$type": "Gate", + "Id": 5398707513550245442, + "Slots": [ + { + "id": { + "m_id": "{BF03B031-321A-4DD1-A00A-ECFF9E03518F}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "toolTip": "Input signal", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{B1583C42-4290-4016-B123-A8F3CBFDE3D1}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "True", + "toolTip": "Signaled if the condition provided evaluates to true.", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{BD9FC7E9-30C7-4155-AB5A-A09819A44FD5}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "False", + "toolTip": "Signaled if the condition provided evaluates to false.", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{4B14B289-18EA-4BFA-B35C-D307A6F64B37}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Condition", + "toolTip": "If true the node will signal the Output and proceed execution", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1, + "IsReference": true, + "VariableReference": { + "m_id": "{AD81163D-DA91-4E66-AE45-ADEDC64CAAF0}" + } + } + ], + "Datums": [ + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 0 + }, + "isNullPointer": false, + "$type": "bool", + "value": false, + "label": "Condition" + } + ] + } + } + }, + { + "Id": { + "id": 8001385643744 + }, + "Name": "SC-Node(Expect Greater Than Equal)", + "Components": { + "Component_[7351797194887752307]": { + "$type": "MethodOverloaded", + "Id": 7351797194887752307, + "Slots": [ + { + "isVisibile": false, + "id": { + "m_id": "{34C9C07C-C858-4F59-A249-AAC3C29B587E}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "EntityID: 0", + "DisplayDataType": { + "m_type": 1 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "IsOverload": true, + "id": { + "m_id": "{38A5CD98-69C7-4DA5-BF7D-C562F7458B07}" + }, + "DynamicTypeOverride": 3, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Candidate", + "toolTip": "left of >=", + "DisplayDataType": { + "m_type": 3 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "IsOverload": true, + "id": { + "m_id": "{3B50E608-A44A-4DBC-A34C-C2ECA322DAD6}" + }, + "DynamicTypeOverride": 3, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Reference", + "toolTip": "right of >=", + "DisplayDataType": { + "m_type": 3 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1, + "IsReference": true, + "VariableReference": { + "m_id": "{13A4B0B3-756F-403C-A9E0-CC40DA27EE2C}" + } + }, + { + "id": { + "m_id": "{628B2C9B-841D-4E63-ABBB-2AA8601B5C7A}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Report", + "toolTip": "additional notes for the test report", + "DisplayDataType": { + "m_type": 5 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{95EA03BD-BE8E-4DC1-8291-D8127AD75A37}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{9617463C-E5F5-4292-99C3-C7C92891246F}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + } + ], + "Datums": [ + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 1 + }, + "isNullPointer": false, + "$type": "EntityId", + "value": { + "id": 4276206253 + }, + "label": "EntityID: 0" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0, + "label": "Candidate" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0, + "label": "Reference" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 5 + }, + "isNullPointer": false, + "$type": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9} AZStd::string", + "value": "Elapsed should be more than 2 after reset", + "label": "Report" + } + ], + "methodType": 2, + "methodName": "Expect Greater Than Equal", + "className": "Unit Testing", + "resultSlotIDs": [ + {} + ], + "prettyClassName": "Unit Testing", + "orderedInputSlotIds": [ + { + "m_id": "{34C9C07C-C858-4F59-A249-AAC3C29B587E}" + }, + { + "m_id": "{38A5CD98-69C7-4DA5-BF7D-C562F7458B07}" + }, + { + "m_id": "{3B50E608-A44A-4DBC-A34C-C2ECA322DAD6}" + }, + { + "m_id": "{628B2C9B-841D-4E63-ABBB-2AA8601B5C7A}" + } + ] + } + } + }, + { + "Id": { + "id": 7997090676448 + }, + "Name": "SC Node(SetVariable)", + "Components": { + "Component_[8054056332975461684]": { + "$type": "SetVariableNode", + "Id": 8054056332975461684, + "Slots": [ + { + "id": { + "m_id": "{D29241A9-9B27-42C0-9A30-A75AA4AA3F0F}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "toolTip": "When signaled sends the variable referenced by this node to a Data Output slot", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{49682E58-579D-474A-A3E0-52E7DDDA4A7C}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "toolTip": "Signaled after the referenced variable has been pushed to the Data Output slot", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{CCE01CC2-4E14-4F15-AC5A-219A4509CE94}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Boolean", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{CC6D2BF3-87BC-4B14-A27B-82D5C0E3DF2D}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Boolean", + "DisplayDataType": { + "m_type": 0 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 2 + }, + "DataType": 1 + } + ], + "Datums": [ + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 0 + }, + "isNullPointer": false, + "$type": "bool", + "value": false, + "label": "Boolean" + } + ], + "m_variableId": { + "m_id": "{AD81163D-DA91-4E66-AE45-ADEDC64CAAF0}" + }, + "m_variableDataInSlotId": { + "m_id": "{CCE01CC2-4E14-4F15-AC5A-219A4509CE94}" + }, + "m_variableDataOutSlotId": { + "m_id": "{CC6D2BF3-87BC-4B14-A27B-82D5C0E3DF2D}" + } + } + } + }, + { + "Id": { + "id": 8027155447520 + }, + "Name": "SC Node(GetVariable)", + "Components": { + "Component_[8637439810651459247]": { + "$type": "GetVariableNode", + "Id": 8637439810651459247, + "Slots": [ + { + "id": { + "m_id": "{C8560B11-DD0D-4A18-98A1-228FB7911DD1}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "toolTip": "When signaled sends the property referenced by this node to a Data Output slot", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{AB6805D8-5CAA-446B-8C36-CB8A2C30347D}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "toolTip": "Signaled after the referenced property has been pushed to the Data Output slot", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{D9BC724B-4BDF-4F62-AF73-238559A85E94}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Number", + "DisplayDataType": { + "m_type": 3 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 2 + }, + "DataType": 1 + } + ], + "m_variableId": { + "m_id": "{13A4B0B3-756F-403C-A9E0-CC40DA27EE2C}" + }, + "m_variableDataOutSlotId": { + "m_id": "{D9BC724B-4BDF-4F62-AF73-238559A85E94}" + } + } + } + }, + { + "Id": { + "id": 8014270545632 + }, + "Name": "SC-Node(Start)", + "Components": { + "Component_[9134219784961524494]": { + "$type": "Start", + "Id": 9134219784961524494, + "Slots": [ + { + "id": { + "m_id": "{11EB8AA6-BB4E-480D-93DA-85D5969F4ECB}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "toolTip": "Signaled when the entity that owns this graph is fully activated.", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + } + ] + } + } + } + ], + "m_connections": [ + { + "Id": { + "id": 8035745382112 + }, + "Name": "srcEndpoint=(If: True), destEndpoint=(Expect Greater Than Equal: In)", + "Components": { + "Component_[5647411303754655744]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 5647411303754655744, + "sourceEndpoint": { + "nodeId": { + "id": 8009975578336 + }, + "slotId": { + "m_id": "{B1583C42-4290-4016-B123-A8F3CBFDE3D1}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8031450414816 + }, + "slotId": { + "m_id": "{5BB85516-23AA-4860-8D8E-4E25F83AAF27}" + } + } + } + } + }, + { + "Id": { + "id": 8040040349408 + }, + "Name": "srcEndpoint=(Expect Greater Than Equal: Out), destEndpoint=(Set Variable: In)", + "Components": { + "Component_[15155445988139558066]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 15155445988139558066, + "sourceEndpoint": { + "nodeId": { + "id": 8031450414816 + }, + "slotId": { + "m_id": "{21EA60AA-6B22-4623-997C-22363E687A4B}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 7997090676448 + }, + "slotId": { + "m_id": "{D29241A9-9B27-42C0-9A30-A75AA4AA3F0F}" + } + } + } + } + }, + { + "Id": { + "id": 8044335316704 + }, + "Name": "srcEndpoint=(On Graph Start: Out), destEndpoint=(Get Variable: In)", + "Components": { + "Component_[2459001120525165713]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 2459001120525165713, + "sourceEndpoint": { + "nodeId": { + "id": 8014270545632 + }, + "slotId": { + "m_id": "{11EB8AA6-BB4E-480D-93DA-85D5969F4ECB}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8022860480224 + }, + "slotId": { + "m_id": "{8650478F-4E17-40B5-B13C-E8C02A524201}" + } + } + } + } + }, + { + "Id": { + "id": 8048630284000 + }, + "Name": "srcEndpoint=(If: False), destEndpoint=(Expect Greater Than Equal: In)", + "Components": { + "Component_[10745739214458161764]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 10745739214458161764, + "sourceEndpoint": { + "nodeId": { + "id": 8009975578336 + }, + "slotId": { + "m_id": "{BD9FC7E9-30C7-4155-AB5A-A09819A44FD5}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8001385643744 + }, + "slotId": { + "m_id": "{95EA03BD-BE8E-4DC1-8291-D8127AD75A37}" + } + } + } + } + }, + { + "Id": { + "id": 8052925251296 + }, + "Name": "srcEndpoint=(Set Variable: Out), destEndpoint=(Get Variable: In)", + "Components": { + "Component_[7371956956721983493]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 7371956956721983493, + "sourceEndpoint": { + "nodeId": { + "id": 7997090676448 + }, + "slotId": { + "m_id": "{49682E58-579D-474A-A3E0-52E7DDDA4A7C}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8027155447520 + }, + "slotId": { + "m_id": "{C8560B11-DD0D-4A18-98A1-228FB7911DD1}" + } + } + } + } + }, + { + "Id": { + "id": 8057220218592 + }, + "Name": "srcEndpoint=(Expect Greater Than Equal: Out), destEndpoint=(Mark Complete: In)", + "Components": { + "Component_[14854123337262345427]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 14854123337262345427, + "sourceEndpoint": { + "nodeId": { + "id": 8001385643744 + }, + "slotId": { + "m_id": "{9617463C-E5F5-4292-99C3-C7C92891246F}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8005680611040 + }, + "slotId": { + "m_id": "{1A41311D-2629-4A55-8469-AB6EA8F8E00F}" + } + } + } + } + }, + { + "Id": { + "id": 8061515185888 + }, + "Name": "srcEndpoint=(Get Variable: Out), destEndpoint=(Delay: Start)", + "Components": { + "Component_[18301940095446866928]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 18301940095446866928, + "sourceEndpoint": { + "nodeId": { + "id": 8022860480224 + }, + "slotId": { + "m_id": "{273B6C2E-CBE7-479A-B6C6-4CC6E51636B6}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8018565512928 + }, + "slotId": { + "m_id": "{F8445BAB-538D-411E-B386-51DA322E636F}" + } + } + } + } + }, + { + "Id": { + "id": 8065810153184 + }, + "Name": "srcEndpoint=(Get Variable: Out), destEndpoint=(Delay: Reset)", + "Components": { + "Component_[14359507626343113257]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 14359507626343113257, + "sourceEndpoint": { + "nodeId": { + "id": 8027155447520 + }, + "slotId": { + "m_id": "{AB6805D8-5CAA-446B-8C36-CB8A2C30347D}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8018565512928 + }, + "slotId": { + "m_id": "{C84ED69D-1250-441D-99EC-1FA09EBD4A33}" + } + } + } + } + }, + { + "Id": { + "id": 8070105120480 + }, + "Name": "srcEndpoint=(Get Variable: Number), destEndpoint=(Delay: Start: Time)", + "Components": { + "Component_[6761547457125237874]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 6761547457125237874, + "sourceEndpoint": { + "nodeId": { + "id": 8022860480224 + }, + "slotId": { + "m_id": "{12714A1C-FDCF-4A0C-8127-1B6B17A804CC}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8018565512928 + }, + "slotId": { + "m_id": "{FCE9085E-1FBB-4C65-BF21-A4886EE2B83B}" + } + } + } + } + }, + { + "Id": { + "id": 8074400087776 + }, + "Name": "srcEndpoint=(Get Variable: Number), destEndpoint=(Delay: Reset: Time)", + "Components": { + "Component_[8979388687790412978]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 8979388687790412978, + "sourceEndpoint": { + "nodeId": { + "id": 8027155447520 + }, + "slotId": { + "m_id": "{D9BC724B-4BDF-4F62-AF73-238559A85E94}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8018565512928 + }, + "slotId": { + "m_id": "{24A2AD52-B382-4875-B3F7-45072F3D95DC}" + } + } + } + } + }, + { + "Id": { + "id": 8078695055072 + }, + "Name": "srcEndpoint=(Delay: Done), destEndpoint=(If: In)", + "Components": { + "Component_[14625041809622283132]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 14625041809622283132, + "sourceEndpoint": { + "nodeId": { + "id": 8018565512928 + }, + "slotId": { + "m_id": "{6249B81E-1341-41B1-B843-F4658C1EAE31}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8009975578336 + }, + "slotId": { + "m_id": "{BF03B031-321A-4DD1-A00A-ECFF9E03518F}" + } + } + } + } + }, + { + "Id": { + "id": 8082990022368 + }, + "Name": "srcEndpoint=(Delay: Elapsed), destEndpoint=(Expect Greater Than Equal: Candidate)", + "Components": { + "Component_[12771954348451341510]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 12771954348451341510, + "sourceEndpoint": { + "nodeId": { + "id": 8018565512928 + }, + "slotId": { + "m_id": "{1A0F9D41-14F3-4CF0-8C00-7E2374129768}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8001385643744 + }, + "slotId": { + "m_id": "{38A5CD98-69C7-4DA5-BF7D-C562F7458B07}" + } + } + } + } + }, + { + "Id": { + "id": 8087284989664 + }, + "Name": "srcEndpoint=(Delay: Elapsed), destEndpoint=(Expect Greater Than Equal: Candidate)", + "Components": { + "Component_[1854855865676689941]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 1854855865676689941, + "sourceEndpoint": { + "nodeId": { + "id": 8018565512928 + }, + "slotId": { + "m_id": "{1A0F9D41-14F3-4CF0-8C00-7E2374129768}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8031450414816 + }, + "slotId": { + "m_id": "{B9873274-15A8-4642-BCB8-423D302618FD}" + } + } + } + } + } + ] + }, + "m_assetType": "{3E2AC8CD-713F-453E-967F-29517F331784}", + "versionData": { + "_grammarVersion": 1, + "_runtimeVersion": 1, + "_fileVersion": 1 + }, + "GraphCanvasData": [ + { + "Key": { + "id": 7992795709152 + }, + "Value": { + "ComponentData": { + "{5F84B500-8C45-40D1-8EFC-A5306B241444}": { + "$type": "SceneComponentSaveData", + "ViewParams": { + "Scale": 0.8886388, + "AnchorX": -310.5873718261719, + "AnchorY": 346.5975036621094 + } + } + } + } + }, + { + "Key": { + "id": 7997090676448 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "SetVariableNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 1280.0, + 380.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".setVariable" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{404AE5EA-7F73-4B52-9B4C-DA5712B7E2E2}" + } + } + } + }, + { + "Key": { + "id": 8001385643744 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "MethodNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 840.0, + 880.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".method" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{153AFB90-173C-4090-B709-DA73D04A8F62}" + } + } + } + }, + { + "Key": { + "id": 8005680611040 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "MethodNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 1280.0, + 880.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".method" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{9ED03175-1B9D-4E72-A6A5-C089ABF0FF81}" + } + } + } + }, + { + "Key": { + "id": 8009975578336 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "LogicNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 460.0, + 640.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{BCF7E6DA-F30B-4AB8-96A3-B7948455532C}" + } + } + } + }, + { + "Key": { + "id": 8014270545632 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "TimeNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + -280.0, + 480.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{6F87177E-AF30-42E2-BD5F-1DCF623B7235}" + } + } + } + }, + { + "Key": { + "id": 8018565512928 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "TimeNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 100.0, + 500.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{C812E74B-E34B-40D5-B0AE-5A1D21FEB7D4}" + } + } + } + }, + { + "Key": { + "id": 8022860480224 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "GetVariableNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + -80.0, + 480.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".getVariable" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{3BCB878A-9CB7-4370-9903-52FC5505138C}" + } + } + } + }, + { + "Key": { + "id": 8027155447520 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "GetVariableNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + -100.0, + 640.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".getVariable" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{6FC2D332-3653-4AD6-BB34-098CC4BD9F32}" + } + } + } + }, + { + "Key": { + "id": 8031450414816 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "MethodNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 820.0, + 380.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".method" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{6898E2CC-0226-4598-A801-BE4527FA0010}" + } + } + } + } + ], + "StatisticsHelper": { + "InstanceCounter": [ + { + "Key": 4199610336680704683, + "Value": 1 + }, + { + "Key": 4693003892664749777, + "Value": 1 + }, + { + "Key": 5235960430898951644, + "Value": 1 + }, + { + "Key": 5789802440471445818, + "Value": 2 + }, + { + "Key": 8348694667250199036, + "Value": 1 + }, + { + "Key": 8452971738487658154, + "Value": 1 + }, + { + "Key": 10204019744198319120, + "Value": 1 + }, + { + "Key": 16802392214997617505, + "Value": 1 + } + ] + } + } + } + } + } +} \ No newline at end of file diff --git a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestFixture.h b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestFixture.h index 6e38f71eec..7239d1e747 100644 --- a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestFixture.h +++ b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestFixture.h @@ -10,10 +10,8 @@ #include #include -#include #include #include -#include #include #include #include @@ -67,7 +65,6 @@ namespace ScriptCanvasTests { ScriptCanvasEditor::TraceSuppressionBus::Broadcast(&ScriptCanvasEditor::TraceSuppressionRequests::SuppressPrintf, true); AZ::ComponentApplication::Descriptor descriptor; - descriptor.m_enableDrilling = false; descriptor.m_useExistingAllocator = true; AZ::DynamicModuleDescriptor dynamicModuleDescriptor; diff --git a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.cpp b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.cpp index f69412358f..f4abbea7b2 100644 --- a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.cpp +++ b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.cpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_VM.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_VM.cpp index 2a20ca84df..2c455d80f5 100644 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_VM.cpp +++ b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_VM.cpp @@ -25,126 +25,6 @@ using namespace ScriptCanvasTests; using namespace TestNodes; using namespace ScriptCanvas::Execution; -// TODO: This fails to compile on Linux only -//ScriptCanvas::Grammar::SubgraphInterface* CreateExecutionMap(AZ::BehaviorContext& behaviorContext) -//{ -// using namespace ScriptCanvas; -// using namespace ScriptCanvas::Grammar; -// -// auto ins = CreateInsFromBehaviorContextMethods("TestNodeableObject", behaviorContext, { "Branch" } ); -// auto branchOutVoidTrue = CreateOut("BranchTrue", { "condition", "message" }); -// auto branchOutVoidFalse = CreateOut("BranchFalse", { "condition", "message", "vector" }); -// -// auto branchOut = FindInByName("Branch", ins); -// -// EXPECT_NE(branchOut, nullptr); -// if (branchOut) -// { -// branchOut->outs.emplace_back(AZStd::move(branchOutVoidTrue)); -// branchOut->outs.emplace_back(AZStd::move(branchOutVoidFalse)); -// } -// -// return aznew SubgraphInterface(AZStd::move(ins)); -//} - - -TEST_F(ScriptCanvasTestFixture, TestLuaObjectOrientation) -{ - using namespace ScriptCanvas; - using namespace ScriptCanvas::Grammar; - - AZ::ScriptContext sc; - sc.BindTo(m_behaviorContext); - RegisterAPI(sc.NativeContext()); - EXPECT_TRUE(sc.Execute( - R"LUA( - -assert(Nodeable ~= nil, 'Nodeable was nill') -assert(Nodeable.__call ~= nil, 'Nodeable.__call was nil') -assert(type(Nodeable.__call) == 'function', 'Nodeable.__call was not a function') - -local nodeable = Nodeable() -assert(nodeable ~= nil, 'nodeable was nil') -assert(type(nodeable) == "userdata", 'nodeable not userdata') - -local SubGraph = {} -SubGraph.s_name = "SubGraphery" -SubGraph.s_createdCount = 0 -function SubGraph:IncrementCreated() - SubGraph.s_createdCount = 1 + SubGraph.s_createdCount -end - -setmetatable(SubGraph, { __index = Nodeable }) -- exposed through BehaviorContext -local SubGraphInstanceMetatable = { __index = SubGraph } - -assert(getmetatable(SubGraph).__index == Nodeable, 'getmetatable(SubGraph).__index = Nodeable') -assert(type(getmetatable(SubGraph).__index) == 'table', "type(getmetatable(SubGraph).__index) ~= 'table'") - -function SubGraph.new() -- Add executionState input here and to Nodeable() - -- now individual instance values can be initialized - local instance = OverrideNodeableMetatable(Nodeable(), SubGraphInstanceMetatable) - assert(type(instance.s_createdCount) == 'number', 'subgraph.s_createdCount was not a number') - instance:IncrementCreated() - instance.name = 'SubGraph '..tostring(instance.s_createdCount) - return instance -end - -function SubGraph.newTable() -- Add executionState input here and to Nodeable() - -- now individual instance values can be initialized - local instance = setmetatable({}, SubGraphInstanceMetatable) - -- assert(getmetatable(instance) == SubGraphInstanceMetatable, "subgraphT") - assert(type(instance.s_createdCount) == 'number', 'subgraphT.s_createdCount was not a number') - instance:IncrementCreated() - instance.name = 'SubGraph '..tostring(instance.s_createdCount) - return instance -end - -function SubGraph:Foo() - return "I, " .. tostring(self.name) .. ", am a user function" -end - -local subgraphT = SubGraph.newTable() -assert(subgraphT ~= nil, "subgraphT was nil") -assert(type(subgraphT) == 'table', 'subgraphT was not a table') -assert(type(subgraphT.IsActive)== 'function', "subgraphT IsActive was not a function") -assert(type(subgraphT.Foo) == 'function', 'subgraphT was not a function') -local subgraphTResult = subgraphT:Foo() -assert(subgraphTResult == "I, SubGraph 1, am a user function", 'subgraphT did not return the right results:' .. tostring(subgraphTResult)) -assert(subgraphT.s_createdCount == 1, "subgraphT created count was not one: ".. tostring(subgraphT.s_createdCount)) -subgraphT = SubGraph.newTable() -assert(subgraphT.s_createdCount == 2, "subgraphT created count was not two: ".. tostring(subgraphT.s_createdCount)) - -local subgraph = SubGraph.new() -assert(subgraph ~= nil, "subgraph was nil") -assert(type(subgraph) == 'userdata', 'was not userdata') -assert(type(subgraph.IsActive)== 'function', "IsActive was not a function") -assert(not subgraph.IsActive(subgraph), "did not inherit properly") -assert(not subgraph:IsActive(), "did not inherit properly") -assert(type(subgraph.Foo) == 'function', 'was not a function') -local subgraphResult = subgraph:Foo() -assert(subgraphResult == "I, SubGraph 3, am a user function", 'subgraph:Foo() did not return the right results: ' .. tostring(subgraphResult)) -assert(subgraph.s_createdCount == 3, "created count was not three: "..tostring(subgraph.s_createdCount)) - -local subgraph2 = SubGraph.new() -assert(subgraph2 ~= nil, "subgraph2 was nil") -assert(type(subgraph2) == 'userdata', 'subgraph2 was not userdata') -assert(type(subgraph2.IsActive)== 'function', "subgraph2 IsActive was not a function") -assert(not subgraph2.IsActive(subgraph2), "subgraph2 did not inherit properly") -assert(not subgraph2:IsActive(), "subgraph2 did not inherit properly") -assert(type(subgraph2.Foo) == 'function', 'subgraph2 was not a function') -local subgraph2Result = subgraph2:Foo() -assert(subgraph2Result == "I, SubGraph 4, am a user function", 'subgraph2:Foo() did not return the right results: ' .. tostring(subgraph2Result)) -assert(subgraph2.s_createdCount == 4, "created count was not three: "..tostring(subgraph2.s_createdCount)) - -return SubGraph - -)LUA" -)); - -} - - -// // TEST_F(ScriptCanvasTestFixture, NativeNodeableStack) // { // TestNodeableObject nodeable; diff --git a/Gems/ScriptEvents/Code/Tests/ScriptEventsTestFixture.h b/Gems/ScriptEvents/Code/Tests/ScriptEventsTestFixture.h index 53d4fd58b9..0db1f1143d 100644 --- a/Gems/ScriptEvents/Code/Tests/ScriptEventsTestFixture.h +++ b/Gems/ScriptEvents/Code/Tests/ScriptEventsTestFixture.h @@ -58,7 +58,6 @@ namespace ScriptEventsTests { AZ::ComponentApplication::Descriptor descriptor; - descriptor.m_enableDrilling = false; // We'll manage our own driller in these tests descriptor.m_useExistingAllocator = true; // Use the SystemAllocator we own in this test. appStartup.m_createStaticModulesCallback = diff --git a/Gems/Terrain/Assets/Shaders/Terrain/TerrainPBR_ForwardPass.shader b/Gems/Terrain/Assets/Shaders/Terrain/TerrainPBR_ForwardPass.shader index 66072567ec..0f7455f957 100644 --- a/Gems/Terrain/Assets/Shaders/Terrain/TerrainPBR_ForwardPass.shader +++ b/Gems/Terrain/Assets/Shaders/Terrain/TerrainPBR_ForwardPass.shader @@ -44,5 +44,6 @@ ] }, - "DrawList" : "forward" + "DrawList" : "forward", + "DisabledRHIBackends": ["metal"] } diff --git a/Gems/Terrain/Code/Source/Components/TerrainHeightGradientListComponent.cpp b/Gems/Terrain/Code/Source/Components/TerrainHeightGradientListComponent.cpp index e9c9874af5..108ae70632 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainHeightGradientListComponent.cpp +++ b/Gems/Terrain/Code/Source/Components/TerrainHeightGradientListComponent.cpp @@ -48,6 +48,15 @@ namespace Terrain ->Attribute(AZ::Edit::Attributes::RequiredService, AZ_CRC_CE("GradientService")) ; } + + if (auto behaviorContext = azrtti_cast(context)) + { + behaviorContext->Class() + ->Attribute(AZ::Script::Attributes::Category, "Terrain") + ->Constructor() + ->Property("gradientEntities", BehaviorValueProperty(&TerrainHeightGradientListConfig::m_gradientEntities)) + ; + } } } diff --git a/Gems/Terrain/Code/Source/Components/TerrainHeightGradientListComponent.h b/Gems/Terrain/Code/Source/Components/TerrainHeightGradientListComponent.h index b5b1a44192..12a51b2ac1 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainHeightGradientListComponent.h +++ b/Gems/Terrain/Code/Source/Components/TerrainHeightGradientListComponent.h @@ -44,6 +44,7 @@ namespace Terrain AZStd::vector m_gradientEntities; }; + static const AZ::Uuid TerrainHeightGradientListComponentTypeId = "{1BB3BA6C-6D4A-4636-B542-F23ECBA8F2AB}"; class TerrainHeightGradientListComponent : public AZ::Component @@ -54,7 +55,7 @@ namespace Terrain public: template friend class LmbrCentral::EditorWrappedComponentBase; - AZ_COMPONENT(TerrainHeightGradientListComponent, "{1BB3BA6C-6D4A-4636-B542-F23ECBA8F2AB}"); + AZ_COMPONENT(TerrainHeightGradientListComponent, TerrainHeightGradientListComponentTypeId); static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& services); static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& services); static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& services); @@ -64,6 +65,8 @@ namespace Terrain TerrainHeightGradientListComponent() = default; ~TerrainHeightGradientListComponent() = default; + ////////////////////////////////////////////////////////////////////////// + // TerrainAreaHeightRequestBus void GetHeight(const AZ::Vector3& inPosition, AZ::Vector3& outPosition, bool& terrainExists) override; ////////////////////////////////////////////////////////////////////////// diff --git a/Gems/Terrain/Code/Source/Components/TerrainLayerSpawnerComponent.cpp b/Gems/Terrain/Code/Source/Components/TerrainLayerSpawnerComponent.cpp index c3803c25e8..83259415bd 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainLayerSpawnerComponent.cpp +++ b/Gems/Terrain/Code/Source/Components/TerrainLayerSpawnerComponent.cpp @@ -54,6 +54,17 @@ namespace Terrain ->DataElement(AZ::Edit::UIHandlers::Default, &TerrainLayerSpawnerConfig::m_useGroundPlane, "Use Ground Plane", "Determines whether or not to provide a default ground plane") ; } + + if (auto behaviorContext = azrtti_cast(context)) + { + behaviorContext->Class() + ->Attribute(AZ::Script::Attributes::Category, "Terrain") + ->Constructor() + ->Property("layer", BehaviorValueProperty(&TerrainLayerSpawnerConfig::m_layer)) + ->Property("priority", BehaviorValueProperty(&TerrainLayerSpawnerConfig::m_priority)) + ->Property("useGroundPlane", BehaviorValueProperty(&TerrainLayerSpawnerConfig::m_useGroundPlane)) + ->Method("GetSelectableLayers", &TerrainLayerSpawnerConfig::GetSelectableLayers); + } } } diff --git a/Gems/Terrain/Code/Source/Components/TerrainLayerSpawnerComponent.h b/Gems/Terrain/Code/Source/Components/TerrainLayerSpawnerComponent.h index 683f9e9f06..3ce73b7a5a 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainLayerSpawnerComponent.h +++ b/Gems/Terrain/Code/Source/Components/TerrainLayerSpawnerComponent.h @@ -52,6 +52,7 @@ namespace Terrain bool m_useGroundPlane = true; }; + static const AZ::Uuid TerrainLayerSpawnerComponentTypeId = "{3848605F-A4EA-478C-B710-84AB8DCA9EC5}"; class TerrainLayerSpawnerComponent : public AZ::Component @@ -61,7 +62,7 @@ namespace Terrain public: template friend class LmbrCentral::EditorWrappedComponentBase; - AZ_COMPONENT(TerrainLayerSpawnerComponent, "{3848605F-A4EA-478C-B710-84AB8DCA9EC5}"); + AZ_COMPONENT(TerrainLayerSpawnerComponent, TerrainLayerSpawnerComponentTypeId); static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& services); static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& services); static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& services); diff --git a/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp b/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp index 6c76e90fd0..1299403659 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp +++ b/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp @@ -16,16 +16,47 @@ #include #include +#include #include namespace Terrain { + void TerrainPhysicsSurfaceMaterialMapping::Reflect(AZ::ReflectContext* context) + { + if (auto serialize = azrtti_cast(context)) + { + serialize->Class() + ->Version(1) + ->Field("Surface", &TerrainPhysicsSurfaceMaterialMapping::m_surfaceTag) + ->Field("Material", &TerrainPhysicsSurfaceMaterialMapping::m_materialId); + + if (auto edit = serialize->GetEditContext()) + { + edit->Class( + "Terrain Surface Material Mapping", "Mapping between a surface and a physics material.") + + ->ClassElement(AZ::Edit::ClassElements::EditorData, "") + ->Attribute(AZ::Edit::Attributes::AutoExpand, true) + ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::Show) + + ->DataElement( + AZ::Edit::UIHandlers::ComboBox, &TerrainPhysicsSurfaceMaterialMapping::m_surfaceTag, "Surface Tag", + "Surface type to map to a physics material.") + ->DataElement(AZ::Edit::UIHandlers::Default, &TerrainPhysicsSurfaceMaterialMapping::m_materialId, "Material ID", "") + ->Attribute(AZ::Edit::Attributes::AutoExpand, true) + ->Attribute(AZ::Edit::Attributes::ShowProductAssetFileName, true); + } + } + } void TerrainPhysicsColliderConfig::Reflect(AZ::ReflectContext* context) { + TerrainPhysicsSurfaceMaterialMapping::Reflect(context); + if (auto serialize = azrtti_cast(context)) { serialize->Class() - ->Version(1) + ->Version(2)->Field( + "Mappings", &TerrainPhysicsColliderConfig::m_surfaceMaterialMappings) ; if (auto edit = serialize->GetEditContext()) @@ -35,7 +66,11 @@ namespace Terrain "Provides terrain data to a physics collider with configurable surface mappings.") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) - ->Attribute(AZ::Edit::Attributes::AutoExpand, true); + ->Attribute(AZ::Edit::Attributes::AutoExpand, true) + ->DataElement( + AZ::Edit::UIHandlers::Default, &TerrainPhysicsColliderConfig::m_surfaceMaterialMappings, + "Surface to Material Mappings", "Maps surfaces to physics materials") + ; } } } @@ -249,6 +284,34 @@ namespace Terrain } } + uint8_t TerrainPhysicsColliderComponent::GetMaterialIdIndex(const Physics::MaterialId& materialId, const AZStd::vector& materialList) const + { + const auto& materialIter = AZStd::find(materialList.begin(), materialList.end(), materialId); + if (materialIter != materialList.end()) + { + return static_cast(materialIter - materialList.begin()); + } + + return 0; + } + + Physics::MaterialId TerrainPhysicsColliderComponent::FindMaterialIdForSurfaceTag(const SurfaceData::SurfaceTag tag) const + { + uint8_t index = 0; + + for (auto& mapping : m_configuration.m_surfaceMaterialMappings) + { + if (mapping.m_surfaceTag == tag) + { + return mapping.m_materialId; + } + index++; + } + + // If this surface isn't mapped, use the default material. + return Physics::MaterialId(); + } + void TerrainPhysicsColliderComponent::GenerateHeightsAndMaterialsInBounds( AZStd::vector& heightMaterials) const { @@ -266,6 +329,8 @@ namespace Terrain heightMaterials.clear(); heightMaterials.reserve(gridWidth * gridHeight); + AZStd::vector materialList = GetMaterialList(); + for (int32_t row = 0; row < gridHeight; row++) { const float y = row * gridResolution.GetY() + worldSize.GetMin().GetY(); @@ -286,9 +351,19 @@ namespace Terrain terrainExists = false; } + // Find the best surface tag at this point. + AzFramework::SurfaceData::SurfaceTagWeight surfaceWeight; + AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( + surfaceWeight, &AzFramework::Terrain::TerrainDataRequests::GetMaxSurfaceWeightFromFloats, x, y, + AzFramework::Terrain::TerrainDataRequests::Sampler::DEFAULT, nullptr); + Physics::HeightMaterialPoint point; point.m_height = height - worldCenterZ; point.m_quadMeshType = terrainExists ? Physics::QuadMeshType::SubdivideUpperLeftToBottomRight : Physics::QuadMeshType::Hole; + + Physics::MaterialId materialId = FindMaterialIdForSurfaceTag(surfaceWeight.m_surfaceType); + point.m_materialIndex = GetMaterialIdIndex(materialId, materialList); + heightMaterials.emplace_back(point); } } @@ -332,7 +407,21 @@ namespace Terrain AZStd::vector TerrainPhysicsColliderComponent::GetMaterialList() const { - return AZStd::vector(); + AZStd::vector materialList; + + // Ensure the list contains the default material as the first entry. + materialList.emplace_back(Physics::MaterialId()); + + for (auto& mapping : m_configuration.m_surfaceMaterialMappings) + { + const auto& existingInstance = AZStd::find(materialList.begin(), materialList.end(), mapping.m_materialId); + if (existingInstance == materialList.end()) + { + materialList.emplace_back(mapping.m_materialId); + } + } + + return materialList; } AZStd::vector TerrainPhysicsColliderComponent::GetHeights() const diff --git a/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.h b/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.h index 6462909c89..1a7fbf9c72 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.h +++ b/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.h @@ -12,6 +12,7 @@ #include #include +#include #include #include @@ -24,6 +25,19 @@ namespace LmbrCentral namespace Terrain { + static const uint8_t InvalidSurfaceTagIndex = 0xFF; + + struct TerrainPhysicsSurfaceMaterialMapping final + { + public: + AZ_CLASS_ALLOCATOR(TerrainPhysicsSurfaceMaterialMapping, AZ::SystemAllocator, 0); + AZ_RTTI(TerrainPhysicsSurfaceMaterialMapping, "{A88B5289-DFCD-4564-8395-E2177DFE5B18}"); + static void Reflect(AZ::ReflectContext* context); + + SurfaceData::SurfaceTag m_surfaceTag; + Physics::MaterialId m_materialId; + }; + class TerrainPhysicsColliderConfig : public AZ::ComponentConfig { @@ -32,6 +46,7 @@ namespace Terrain AZ_RTTI(TerrainPhysicsColliderConfig, "{E9EADB8F-C3A5-4B9C-A62D-2DBC86B4CE59}", AZ::ComponentConfig); static void Reflect(AZ::ReflectContext* context); + AZStd::vector m_surfaceMaterialMappings; }; @@ -77,6 +92,9 @@ namespace Terrain bool ReadInConfig(const AZ::ComponentConfig* baseConfig) override; bool WriteOutConfig(AZ::ComponentConfig* outBaseConfig) const override; + uint8_t GetMaterialIdIndex(const Physics::MaterialId& materialId, const AZStd::vector& materialList) const; + Physics::MaterialId FindMaterialIdForSurfaceTag(const SurfaceData::SurfaceTag tag) const; + void GenerateHeightsInBounds(AZStd::vector& heights) const; void GenerateHeightsAndMaterialsInBounds(AZStd::vector& heightMaterials) const; diff --git a/Gems/Terrain/Code/Source/Components/TerrainSurfaceGradientListComponent.cpp b/Gems/Terrain/Code/Source/Components/TerrainSurfaceGradientListComponent.cpp index 748221d69e..4d93842654 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainSurfaceGradientListComponent.cpp +++ b/Gems/Terrain/Code/Source/Components/TerrainSurfaceGradientListComponent.cpp @@ -8,6 +8,7 @@ #include +#include #include #include @@ -46,6 +47,17 @@ namespace Terrain ; } } + + if (auto behaviorContext = azrtti_cast(context)) + { + behaviorContext->Class() + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Attribute(AZ::Script::Attributes::Category, "Terrain") + ->Attribute(AZ::Script::Attributes::Module, "terrain") + ->Constructor() + ->Property("gradientEntityId", BehaviorValueProperty(&TerrainSurfaceGradientMapping::m_gradientEntityId)) + ->Property("surfaceTag", BehaviorValueProperty(&TerrainSurfaceGradientMapping::m_surfaceTag)); + } } void TerrainSurfaceGradientListConfig::Reflect(AZ::ReflectContext* context) diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/Components/TerrainMacroMaterialComponent.cpp b/Gems/Terrain/Code/Source/TerrainRenderer/Components/TerrainMacroMaterialComponent.cpp index a65cbad50b..304d5aecd4 100644 --- a/Gems/Terrain/Code/Source/TerrainRenderer/Components/TerrainMacroMaterialComponent.cpp +++ b/Gems/Terrain/Code/Source/TerrainRenderer/Components/TerrainMacroMaterialComponent.cpp @@ -93,7 +93,8 @@ namespace Terrain void TerrainMacroMaterialComponent::Reflect(AZ::ReflectContext* context) { TerrainMacroMaterialConfig::Reflect(context); - + TerrainMacroMaterialRequests::Reflect(context); + AZ::SerializeContext* serialize = azrtti_cast(context); if (serialize) { diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMacroMaterialBus.cpp b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMacroMaterialBus.cpp new file mode 100644 index 0000000000..b1c6f2d54b --- /dev/null +++ b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMacroMaterialBus.cpp @@ -0,0 +1,93 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include "TerrainMacroMaterialBus.h" +#include +#include + +namespace Terrain +{ + // Create a handler that can be accessed from Python scripts to receive terrain change notifications. + class TerrainMacroMaterialNotificationHandler final + : public Terrain::TerrainMacroMaterialNotificationBus::Handler + , public AZ::BehaviorEBusHandler + { + public: + AZ_EBUS_BEHAVIOR_BINDER( + TerrainMacroMaterialNotificationHandler, + "{B0ED8B29-0E0D-4567-BEAF-C842C4DB2700}", + AZ::SystemAllocator, + OnTerrainMacroMaterialCreated, + OnTerrainMacroMaterialChanged, + OnTerrainMacroMaterialRegionChanged, + OnTerrainMacroMaterialDestroyed); + + void OnTerrainMacroMaterialCreated( + [[maybe_unused]] AZ::EntityId macroMaterialEntity, + [[maybe_unused]] const Terrain::MacroMaterialData& macroMaterial) override + { + Call(FN_OnTerrainMacroMaterialCreated); + } + + void OnTerrainMacroMaterialChanged( + [[maybe_unused]] AZ::EntityId macroMaterialEntity, + [[maybe_unused]] const Terrain::MacroMaterialData& macroMaterial) override + { + Call(FN_OnTerrainMacroMaterialChanged); + } + + void OnTerrainMacroMaterialRegionChanged( + [[maybe_unused]] AZ::EntityId macroMaterialEntity, + [[maybe_unused]] const AZ::Aabb& oldRegion, + [[maybe_unused]] const AZ::Aabb& newRegion) override + { + Call(FN_OnTerrainMacroMaterialRegionChanged); + } + + void OnTerrainMacroMaterialDestroyed([[maybe_unused]] AZ::EntityId macroMaterialEntity) override + { + Call(FN_OnTerrainMacroMaterialDestroyed); + } + + static void Reflect(AZ::ReflectContext* context) + { + if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) + { + behaviorContext->EBus("TerrainMacroMaterialAutomationBus") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation) + ->Attribute(AZ::Script::Attributes::Module, "terrain") + ->Handler(); + } + } + }; + + void TerrainMacroMaterialRequests::Reflect(AZ::ReflectContext* context) + { + if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) + { + behaviorContext->EBus("TerrainMacroMaterialRequestBus") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Attribute(AZ::Script::Attributes::Category, "Terrain") + ->Attribute(AZ::Script::Attributes::Module, "terrain") + ->Event("GetTerrainMacroMaterialData", &Terrain::TerrainMacroMaterialRequestBus::Events::GetTerrainMacroMaterialData) + ; + + behaviorContext->EBus("TerrainMacroMaterialNotificationBus") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Attribute(AZ::Script::Attributes::Category, "Terrain") + ->Attribute(AZ::Script::Attributes::Module, "terrain") + ->Event("OnTerrainMacroMaterialCreated", &Terrain::TerrainMacroMaterialNotifications::OnTerrainMacroMaterialCreated) + ->Event("OnTerrainMacroMaterialChanged", &Terrain::TerrainMacroMaterialNotifications::OnTerrainMacroMaterialChanged) + ->Event("OnTerrainMacroMaterialRegionChanged", &Terrain::TerrainMacroMaterialNotifications::OnTerrainMacroMaterialRegionChanged) + ->Event("OnTerrainMacroMaterialDestroyed", &Terrain::TerrainMacroMaterialNotifications::OnTerrainMacroMaterialDestroyed) + ; + + Terrain::TerrainMacroMaterialNotificationHandler::Reflect(context); + } + } +} // namespace Terrain diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMacroMaterialBus.h b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMacroMaterialBus.h index af1e755b32..9a7151da56 100644 --- a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMacroMaterialBus.h +++ b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMacroMaterialBus.h @@ -16,8 +16,10 @@ namespace Terrain { - struct MacroMaterialData + struct MacroMaterialData final { + AZ_RTTI(MacroMaterialData, "{DC68E20A-3251-4E4E-8BC7-F6A2521FEF46}"); + AZ::EntityId m_entityId; AZ::Aabb m_bounds = AZ::Aabb::CreateNull(); @@ -35,6 +37,8 @@ namespace Terrain : public AZ::ComponentBus { public: + static void Reflect(AZ::ReflectContext* context); + //////////////////////////////////////////////////////////////////////// // EBusTraits using MutexType = AZStd::recursive_mutex; diff --git a/Gems/Terrain/Code/Tests/TerrainMacroMaterialTests.cpp b/Gems/Terrain/Code/Tests/TerrainMacroMaterialTests.cpp new file mode 100644 index 0000000000..a3b772035f --- /dev/null +++ b/Gems/Terrain/Code/Tests/TerrainMacroMaterialTests.cpp @@ -0,0 +1,86 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include + +#include + +#include +#include +#include + +#include +#include + +using ::testing::NiceMock; +using ::testing::AtLeast; +using ::testing::_; + + +class TerrainMacroMaterialComponentTest + : public ::testing::Test +{ +protected: + AZ::ComponentApplication m_app; + + UnitTest::MockAxisAlignedBoxShapeComponent* m_shapeComponent; + + void SetUp() override + { + AZ::ComponentApplication::Descriptor appDesc; + appDesc.m_memoryBlocksByteSize = 20 * 1024 * 1024; + appDesc.m_recordingMode = AZ::Debug::AllocationRecords::RECORD_NO_RECORDS; + appDesc.m_stackRecordLevels = 20; + + m_app.Create(appDesc); + } + + void TearDown() override + { + m_app.Destroy(); + } + + AZStd::unique_ptr CreateEntity() + { + auto entity = AZStd::make_unique(); + entity->Init(); + + return entity; + } +}; + +TEST_F(TerrainMacroMaterialComponentTest, MissingRequiredComponentsActivateFailure) +{ + auto entity = CreateEntity(); + + auto macroMaterialComponent = entity->CreateComponent(); + m_app.RegisterComponentDescriptor(macroMaterialComponent->CreateDescriptor()); + + const AZ::Entity::DependencySortOutcome sortOutcome = entity->EvaluateDependenciesGetDetails(); + EXPECT_FALSE(sortOutcome.IsSuccess()); + + entity.reset(); +} + +TEST_F(TerrainMacroMaterialComponentTest, RequiredComponentsPresentEntityActivateSuccess) +{ + auto entity = CreateEntity(); + + auto macroMaterialComponent = entity->CreateComponent(); + m_app.RegisterComponentDescriptor(macroMaterialComponent->CreateDescriptor()); + + auto shapeComponent = entity->CreateComponent(); + m_app.RegisterComponentDescriptor(shapeComponent->CreateDescriptor()); + + entity->Activate(); + EXPECT_EQ(entity->GetState(), AZ::Entity::State::Active); + + entity.reset(); +} diff --git a/Gems/Terrain/Code/Tests/TerrainPhysicsColliderTests.cpp b/Gems/Terrain/Code/Tests/TerrainPhysicsColliderTests.cpp index 8770c1d6dd..340acfbaac 100644 --- a/Gems/Terrain/Code/Tests/TerrainPhysicsColliderTests.cpp +++ b/Gems/Terrain/Code/Tests/TerrainPhysicsColliderTests.cpp @@ -290,3 +290,165 @@ TEST_F(TerrainPhysicsColliderComponentTest, TerrainPhysicsColliderReturnsRelativ m_entity->Reset(); } + +TEST_F(TerrainPhysicsColliderComponentTest, TerrainPhysicsColliderReturnsMaterials) +{ + // Check that the TerrainPhysicsCollider returns all the assigned materials. + CreateEntity(); + + m_boxComponent = m_entity->CreateComponent(); + m_app.RegisterComponentDescriptor(m_boxComponent->CreateDescriptor()); + + // Create two SurfaceTag/Material mappings and add them to the collider. + Terrain::TerrainPhysicsColliderConfig config; + + const Physics::MaterialId mat1 = Physics::MaterialId::Create(); + const Physics::MaterialId mat2 = Physics::MaterialId::Create(); + + const SurfaceData::SurfaceTag tag1 = SurfaceData::SurfaceTag("tag1"); + const SurfaceData::SurfaceTag tag2 = SurfaceData::SurfaceTag("tag2"); + + Terrain::TerrainPhysicsSurfaceMaterialMapping mapping1; + mapping1.m_materialId = mat1; + mapping1.m_surfaceTag = tag1; + config.m_surfaceMaterialMappings.emplace_back(mapping1); + + Terrain::TerrainPhysicsSurfaceMaterialMapping mapping2; + mapping2.m_materialId = mat2; + mapping2.m_surfaceTag = tag2; + config.m_surfaceMaterialMappings.emplace_back(mapping2); + + m_colliderComponent = m_entity->CreateComponent(config); + m_app.RegisterComponentDescriptor(m_colliderComponent->CreateDescriptor()); + + m_entity->Activate(); + + AZStd::vector materialList; + Physics::HeightfieldProviderRequestsBus::EventResult( + materialList, m_entity->GetId(), &Physics::HeightfieldProviderRequestsBus::Events::GetMaterialList); + + // The materialList should be 3 items long: the two materials we've added, plus a default material. + EXPECT_EQ(materialList.size(), 3); + + Physics::MaterialId defaultMaterial = Physics::MaterialId(); + EXPECT_EQ(materialList[0], defaultMaterial); + EXPECT_EQ(materialList[1], mat1); + EXPECT_EQ(materialList[2], mat2); + + m_entity.reset(); +} + +TEST_F(TerrainPhysicsColliderComponentTest, TerrainPhysicsColliderReturnsMaterialsWhenNotMapped) +{ + // Check that the TerrainPhysicsCollider returns a default material when no surfaces are mapped. + CreateEntity(); + + m_boxComponent = m_entity->CreateComponent(); + m_app.RegisterComponentDescriptor(m_boxComponent->CreateDescriptor()); + + m_colliderComponent = m_entity->CreateComponent(); + m_app.RegisterComponentDescriptor(m_colliderComponent->CreateDescriptor()); + + m_entity->Activate(); + + AZStd::vector materialList; + Physics::HeightfieldProviderRequestsBus::EventResult( + materialList, m_entity->GetId(), &Physics::HeightfieldProviderRequestsBus::Events::GetMaterialList); + + // The materialList should be 1 items long: which should be the default material. + EXPECT_EQ(materialList.size(), 1); + + Physics::MaterialId defaultMaterial = Physics::MaterialId(); + EXPECT_EQ(materialList[0], defaultMaterial); + + m_entity.reset(); +} + +TEST_F(TerrainPhysicsColliderComponentTest, TerrainPhysicsColliderGetHeightsAndMaterialsReturnsCorrectly) +{ + // Check that the TerrainPhysicsCollider returns a heightfield of the expected size. + CreateEntity(); + + m_boxComponent = m_entity->CreateComponent(); + m_app.RegisterComponentDescriptor(m_boxComponent->CreateDescriptor()); + + // Create two SurfaceTag/Material mappings and add them to the collider. + Terrain::TerrainPhysicsColliderConfig config; + + const Physics::MaterialId mat1 = Physics::MaterialId::Create(); + const Physics::MaterialId mat2 = Physics::MaterialId::Create(); + + const SurfaceData::SurfaceTag tag1 = SurfaceData::SurfaceTag("tag1"); + const SurfaceData::SurfaceTag tag2 = SurfaceData::SurfaceTag("tag2"); + + Terrain::TerrainPhysicsSurfaceMaterialMapping mapping1; + mapping1.m_materialId = mat1; + mapping1.m_surfaceTag = tag1; + config.m_surfaceMaterialMappings.emplace_back(mapping1); + + Terrain::TerrainPhysicsSurfaceMaterialMapping mapping2; + mapping2.m_materialId = mat2; + mapping2.m_surfaceTag = tag2; + config.m_surfaceMaterialMappings.emplace_back(mapping2); + + m_colliderComponent = m_entity->CreateComponent(config); + m_app.RegisterComponentDescriptor(m_colliderComponent->CreateDescriptor()); + + m_entity->Activate(); + + const AZ::Vector3 boundsMin = AZ::Vector3(0.0f); + const AZ::Vector3 boundsMax = AZ::Vector3(256.0f, 256.0f, 32768.0f); + + NiceMock boxShape(m_entity->GetId()); + const AZ::Aabb bounds = AZ::Aabb::CreateFromMinMax(boundsMin, boundsMax); + ON_CALL(boxShape, GetEncompassingAabb).WillByDefault(Return(bounds)); + + const float mockHeight = 32768.0f; + AZ::Vector2 mockHeightResolution = AZ::Vector2(1.0f); + + AzFramework::SurfaceData::SurfaceTagWeight return1; + return1.m_surfaceType = tag1; + return1.m_weight = 1.0f; + + AzFramework::SurfaceData::SurfaceTagWeight return2; + return2.m_surfaceType = tag2; + return2.m_weight = 1.0f; + + NiceMock terrainListener; + ON_CALL(terrainListener, GetTerrainHeightQueryResolution).WillByDefault(Return(mockHeightResolution)); + ON_CALL(terrainListener, GetHeightFromFloats).WillByDefault(Return(mockHeight)); + ON_CALL(terrainListener, GetMaxSurfaceWeightFromFloats) + .WillByDefault( + [return1, return2]( + [[maybe_unused]] float x, [[maybe_unused]] float y, + [[maybe_unused]] AzFramework::Terrain::TerrainDataRequests::Sampler sampleFilter, [[maybe_unused]] bool* terrainExistsPtr) + { + // return tag1 for the first half of the rows, tag2 for the rest. + if (y < 128.0) + { + return return1; + } + return return2; + }); + + AZStd::vector heightsAndMaterials; + + Physics::HeightfieldProviderRequestsBus::EventResult( + heightsAndMaterials, m_entity->GetId(), &Physics::HeightfieldProviderRequestsBus::Events::GetHeightsAndMaterials); + + // We set the bounds to 256, so check that the correct number of entries are present. + EXPECT_EQ(heightsAndMaterials.size(), 256 * 256); + + const float expectedHeightValue = 16384.0f; + + // + // Check an entry from the first half of the returned list. + EXPECT_EQ(heightsAndMaterials[0].m_materialIndex, 1); + EXPECT_NEAR(heightsAndMaterials[0].m_height, expectedHeightValue, 0.01f); + + // Check an entry from the second half of the list + EXPECT_EQ(heightsAndMaterials[256 * 128].m_materialIndex, 2); + EXPECT_NEAR(heightsAndMaterials[256 * 128].m_height, expectedHeightValue, 0.01f); + + m_entity.reset(); +} diff --git a/Gems/Terrain/Code/terrain_files.cmake b/Gems/Terrain/Code/terrain_files.cmake index 893477e10d..3feacf6254 100644 --- a/Gems/Terrain/Code/terrain_files.cmake +++ b/Gems/Terrain/Code/terrain_files.cmake @@ -33,6 +33,7 @@ set(FILES Source/TerrainRenderer/TerrainFeatureProcessor.cpp Source/TerrainRenderer/TerrainFeatureProcessor.h Source/TerrainRenderer/TerrainAreaMaterialRequestBus.h + Source/TerrainRenderer/TerrainMacroMaterialBus.cpp Source/TerrainRenderer/TerrainMacroMaterialBus.h Source/TerrainSystem/TerrainSystem.cpp Source/TerrainSystem/TerrainSystem.h diff --git a/Gems/Terrain/Code/terrain_tests_files.cmake b/Gems/Terrain/Code/terrain_tests_files.cmake index 3e37e509a7..88de53f8cf 100644 --- a/Gems/Terrain/Code/terrain_tests_files.cmake +++ b/Gems/Terrain/Code/terrain_tests_files.cmake @@ -14,5 +14,6 @@ set(FILES Tests/SurfaceMaterialsListTest.cpp Tests/MockAxisAlignedBoxShapeComponent.h Tests/TerrainHeightGradientListTests.cpp + Tests/TerrainMacroMaterialTests.cpp Tests/TerrainSurfaceGradientListTests.cpp ) diff --git a/Gems/Vegetation/Code/CMakeLists.txt b/Gems/Vegetation/Code/CMakeLists.txt index 735bb35bd9..53fa6bd59f 100644 --- a/Gems/Vegetation/Code/CMakeLists.txt +++ b/Gems/Vegetation/Code/CMakeLists.txt @@ -103,6 +103,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) AZ::AzTest AZ::AzFrameworkTestShared Gem::Vegetation.Static + Gem::LmbrCentral.Mocks ) ly_add_googletest( NAME Gem::Vegetation.Tests diff --git a/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorVegetationComponentTypeIds.h b/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorVegetationComponentTypeIds.h index 0c9db4811c..b79bae92a0 100644 --- a/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorVegetationComponentTypeIds.h +++ b/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorVegetationComponentTypeIds.h @@ -35,7 +35,4 @@ namespace Vegetation // Vegetation Area Selectors static const char* EditorDescriptorWeightSelectorComponentTypeId = "{0FB90550-149B-4E05-B22C-2753F6526E97}"; - - // Vegetation Reference Shape - static const char* EditorReferenceShapeComponentTypeId = "{21BC79CA-C2F4-428F-AF2E-B76E233D4254}"; } diff --git a/Gems/Vegetation/Code/Source/VegetationEditorModule.cpp b/Gems/Vegetation/Code/Source/VegetationEditorModule.cpp index 3210df644f..8d4e1d0558 100644 --- a/Gems/Vegetation/Code/Source/VegetationEditorModule.cpp +++ b/Gems/Vegetation/Code/Source/VegetationEditorModule.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -50,7 +49,6 @@ namespace Vegetation EditorLevelSettingsComponent::CreateDescriptor(), EditorMeshBlockerComponent::CreateDescriptor(), EditorPositionModifierComponent::CreateDescriptor(), - EditorReferenceShapeComponent::CreateDescriptor(), EditorRotationModifierComponent::CreateDescriptor(), EditorScaleModifierComponent::CreateDescriptor(), EditorShapeIntersectionFilterComponent::CreateDescriptor(), diff --git a/Gems/Vegetation/Code/Source/VegetationModule.cpp b/Gems/Vegetation/Code/Source/VegetationModule.cpp index b103575ed1..747617d033 100644 --- a/Gems/Vegetation/Code/Source/VegetationModule.cpp +++ b/Gems/Vegetation/Code/Source/VegetationModule.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -52,7 +51,6 @@ namespace Vegetation LevelSettingsComponent::CreateDescriptor(), MeshBlockerComponent::CreateDescriptor(), PositionModifierComponent::CreateDescriptor(), - ReferenceShapeComponent::CreateDescriptor(), RotationModifierComponent::CreateDescriptor(), ScaleModifierComponent::CreateDescriptor(), ShapeIntersectionFilterComponent::CreateDescriptor(), diff --git a/Gems/Vegetation/Code/Tests/VegetationComponentFilterTests.cpp b/Gems/Vegetation/Code/Tests/VegetationComponentFilterTests.cpp index abb76c8c2d..221a2da432 100644 --- a/Gems/Vegetation/Code/Tests/VegetationComponentFilterTests.cpp +++ b/Gems/Vegetation/Code/Tests/VegetationComponentFilterTests.cpp @@ -8,6 +8,8 @@ #include "VegetationTest.h" #include "VegetationMocks.h" +#include + #include #include #include diff --git a/Gems/Vegetation/Code/Tests/VegetationMocks.h b/Gems/Vegetation/Code/Tests/VegetationMocks.h index 4c526447d3..ece0833433 100644 --- a/Gems/Vegetation/Code/Tests/VegetationMocks.h +++ b/Gems/Vegetation/Code/Tests/VegetationMocks.h @@ -312,74 +312,6 @@ namespace UnitTest } }; - class MockShape - : public LmbrCentral::ShapeComponentRequestsBus::Handler - { - public: - AZ::Entity m_entity; - mutable int m_count = 0; - - MockShape() - { - LmbrCentral::ShapeComponentRequestsBus::Handler::BusConnect(m_entity.GetId()); - } - - ~MockShape() - { - LmbrCentral::ShapeComponentRequestsBus::Handler::BusDisconnect(); - } - - AZ::Crc32 GetShapeType() override - { - ++m_count; - return AZ_CRC("TestShape", 0x856ca50c); - } - - AZ::Aabb m_aabb = AZ::Aabb::CreateNull(); - AZ::Aabb GetEncompassingAabb() override - { - ++m_count; - return m_aabb; - } - - AZ::Transform m_localTransform = AZ::Transform::CreateIdentity(); - AZ::Aabb m_localBounds = AZ::Aabb::CreateNull(); - void GetTransformAndLocalBounds(AZ::Transform& transform, AZ::Aabb& bounds) override - { - ++m_count; - transform = m_localTransform; - bounds = m_localBounds; - } - - bool m_pointInside = true; - bool IsPointInside([[maybe_unused]] const AZ::Vector3& point) override - { - ++m_count; - return m_pointInside; - } - - float m_distanceSquaredFromPoint = 0.0f; - float DistanceSquaredFromPoint([[maybe_unused]] const AZ::Vector3& point) override - { - ++m_count; - return m_distanceSquaredFromPoint; - } - - AZ::Vector3 m_randomPointInside = AZ::Vector3::CreateZero(); - AZ::Vector3 GenerateRandomPointInside([[maybe_unused]] AZ::RandomDistributionType randomDistribution) override - { - ++m_count; - return m_randomPointInside; - } - - bool m_intersectRay = false; - bool IntersectRay([[maybe_unused]] const AZ::Vector3& src, [[maybe_unused]] const AZ::Vector3& dir, [[maybe_unused]] float& distance) override - { - ++m_count; - return m_intersectRay; - } - }; - struct MockSurfaceHandler : public SurfaceData::SurfaceDataSystemRequestBus::Handler { diff --git a/Gems/Vegetation/Code/Tests/VegetationTest.cpp b/Gems/Vegetation/Code/Tests/VegetationTest.cpp index 774a9fcd00..033e988c9b 100644 --- a/Gems/Vegetation/Code/Tests/VegetationTest.cpp +++ b/Gems/Vegetation/Code/Tests/VegetationTest.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -190,8 +189,6 @@ namespace UnitTest EXPECT_FALSE((AreComponentsCompatible())); EXPECT_FALSE((AreComponentsCompatible())); - EXPECT_FALSE((AreComponentsCompatible())); - EXPECT_FALSE((AreComponentsCompatible())); EXPECT_FALSE((AreComponentsCompatible())); @@ -231,7 +228,6 @@ namespace UnitTest CreateWith(); CreateWith(); CreateWith(); - CreateWith(); CreateWith(); CreateWith(); CreateWith(); @@ -287,94 +283,6 @@ namespace UnitTest EXPECT_EQ(defaultProcessTime, instConfig->m_maxInstanceProcessTimeMicroseconds); } - TEST_F(VegetationComponentTestsBasics, ReferenceShapeComponent_WithValidReference) - { - UnitTest::MockShape testShape; - - Vegetation::ReferenceShapeConfig config; - config.m_shapeEntityId = testShape.m_entity.GetId(); - - Vegetation::ReferenceShapeComponent* component; - auto entity = CreateEntity(config, &component); - - AZ::RandomDistributionType randomDistribution = AZ::RandomDistributionType::Normal; - AZ::Vector3 randPos = AZ::Vector3::CreateOne(); - LmbrCentral::ShapeComponentRequestsBus::EventResult(randPos, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GenerateRandomPointInside, randomDistribution); - EXPECT_EQ(AZ::Vector3::CreateZero(), randPos); - - testShape.m_aabb = AZ::Aabb::CreateFromPoint(AZ::Vector3(1.0f, 21.0f, 31.0f)); - AZ::Aabb resultAABB; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultAABB, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetEncompassingAabb); - EXPECT_EQ(testShape.m_aabb, resultAABB); - - AZ::Crc32 resultCRC = {}; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultCRC, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetShapeType); - EXPECT_EQ(AZ_CRC("TestShape", 0x856ca50c), resultCRC); - - testShape.m_localBounds = AZ::Aabb::CreateFromPoint(AZ::Vector3(1.0f, 21.0f, 31.0f)); - testShape.m_localTransform = AZ::Transform::CreateTranslation(testShape.m_localBounds.GetCenter()); - AZ::Transform resultTransform = AZ::Transform::CreateIdentity(); - AZ::Aabb resultBounds = AZ::Aabb::CreateNull(); - LmbrCentral::ShapeComponentRequestsBus::Event(entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetTransformAndLocalBounds, resultTransform, resultBounds); - EXPECT_EQ(testShape.m_localTransform, resultTransform); - EXPECT_EQ(testShape.m_localBounds, resultBounds); - - testShape.m_pointInside = true; - bool resultPointInside = false; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultPointInside, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IsPointInside, AZ::Vector3::CreateZero()); - EXPECT_EQ(testShape.m_pointInside, resultPointInside); - - testShape.m_distanceSquaredFromPoint = 456.0f; - float resultdistanceSquaredFromPoint = 0; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultdistanceSquaredFromPoint, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::DistanceSquaredFromPoint, AZ::Vector3::CreateZero()); - EXPECT_EQ(testShape.m_distanceSquaredFromPoint, resultdistanceSquaredFromPoint); - - testShape.m_intersectRay = false; - bool resultIntersectRay = false; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultIntersectRay, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IntersectRay, AZ::Vector3::CreateZero(), AZ::Vector3::CreateZero(), 0.0f); - EXPECT_TRUE(testShape.m_intersectRay == resultIntersectRay); - } - - TEST_F(VegetationComponentTestsBasics, ReferenceShapeComponent_WithInvalidReference) - { - Vegetation::ReferenceShapeConfig config; - config.m_shapeEntityId = AZ::EntityId(); - - Vegetation::ReferenceShapeComponent* component; - auto entity = CreateEntity(config, &component); - - AZ::RandomDistributionType randomDistribution = AZ::RandomDistributionType::Normal; - AZ::Vector3 randPos = AZ::Vector3::CreateOne(); - LmbrCentral::ShapeComponentRequestsBus::EventResult(randPos, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GenerateRandomPointInside, randomDistribution); - EXPECT_EQ(randPos, AZ::Vector3::CreateZero()); - - AZ::Aabb resultAABB; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultAABB, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetEncompassingAabb); - EXPECT_EQ(resultAABB, AZ::Aabb::CreateNull()); - - AZ::Crc32 resultCRC; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultCRC, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetShapeType); - EXPECT_EQ(resultCRC, AZ::Crc32(AZ::u32(0))); - - AZ::Transform resultTransform; - AZ::Aabb resultBounds; - LmbrCentral::ShapeComponentRequestsBus::Event(entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetTransformAndLocalBounds, resultTransform, resultBounds); - EXPECT_EQ(resultTransform, AZ::Transform::CreateIdentity()); - EXPECT_EQ(resultBounds, AZ::Aabb::CreateNull()); - - bool resultPointInside = true; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultPointInside, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IsPointInside, AZ::Vector3::CreateZero()); - EXPECT_EQ(resultPointInside, false); - - float resultdistanceSquaredFromPoint = 0; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultdistanceSquaredFromPoint, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::DistanceSquaredFromPoint, AZ::Vector3::CreateZero()); - EXPECT_EQ(resultdistanceSquaredFromPoint, FLT_MAX); - - bool resultIntersectRay = true; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultIntersectRay, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IntersectRay, AZ::Vector3::CreateZero(), AZ::Vector3::CreateZero(), 0.0f); - EXPECT_EQ(resultIntersectRay, false); - } - TEST_F(VegetationComponentTestsBasics, Components_HaveMinMaxRanges) { ValidateHasMinMaxRanges(); diff --git a/Gems/Vegetation/Code/vegetation_editor_files.cmake b/Gems/Vegetation/Code/vegetation_editor_files.cmake index aa6b399db9..9e4ea2ca78 100644 --- a/Gems/Vegetation/Code/vegetation_editor_files.cmake +++ b/Gems/Vegetation/Code/vegetation_editor_files.cmake @@ -36,8 +36,6 @@ set(FILES Source/Editor/EditorMeshBlockerComponent.h Source/Editor/EditorPositionModifierComponent.cpp Source/Editor/EditorPositionModifierComponent.h - Source/Editor/EditorReferenceShapeComponent.cpp - Source/Editor/EditorReferenceShapeComponent.h Source/Editor/EditorRotationModifierComponent.cpp Source/Editor/EditorRotationModifierComponent.h Source/Editor/EditorScaleModifierComponent.cpp diff --git a/Gems/Vegetation/Code/vegetation_files.cmake b/Gems/Vegetation/Code/vegetation_files.cmake index 64048b5d91..b4d4e3a356 100644 --- a/Gems/Vegetation/Code/vegetation_files.cmake +++ b/Gems/Vegetation/Code/vegetation_files.cmake @@ -46,7 +46,6 @@ set(FILES Include/Vegetation/Ebuses/AreaBlenderRequestBus.h Include/Vegetation/Ebuses/BlockerRequestBus.h Include/Vegetation/Ebuses/DescriptorListCombinerRequestBus.h - Include/Vegetation/Ebuses/ReferenceShapeRequestBus.h Include/Vegetation/Ebuses/MeshBlockerRequestBus.h Include/Vegetation/Ebuses/SpawnerRequestBus.h Include/Vegetation/Ebuses/DescriptorListRequestBus.h @@ -71,8 +70,6 @@ set(FILES Source/Components/MeshBlockerComponent.h Source/Components/PositionModifierComponent.cpp Source/Components/PositionModifierComponent.h - Source/Components/ReferenceShapeComponent.cpp - Source/Components/ReferenceShapeComponent.h Source/Components/RotationModifierComponent.cpp Source/Components/RotationModifierComponent.h Source/Components/ScaleModifierComponent.cpp diff --git a/Gems/VirtualGamepad/Code/CMakeLists.txt b/Gems/VirtualGamepad/Code/CMakeLists.txt index f493190071..d32834633f 100644 --- a/Gems/VirtualGamepad/Code/CMakeLists.txt +++ b/Gems/VirtualGamepad/Code/CMakeLists.txt @@ -21,6 +21,7 @@ ly_add_target( AZ::AzCore AZ::AzFramework Legacy::CryCommon + Gem::LyShine ) ly_add_target( diff --git a/Gems/WhiteBox/Code/Tests/WhiteBoxComponentTest.cpp b/Gems/WhiteBox/Code/Tests/WhiteBoxComponentTest.cpp index 0e93f38195..ce592ee2ed 100644 --- a/Gems/WhiteBox/Code/Tests/WhiteBoxComponentTest.cpp +++ b/Gems/WhiteBox/Code/Tests/WhiteBoxComponentTest.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -38,10 +39,6 @@ namespace UnitTest static const AzToolsFramework::ManipulatorManagerId TestManipulatorManagerId = AzToolsFramework::ManipulatorManagerId(AZ::Crc32("TestManipulatorManagerId")); - class NullDebugDisplayRequests : public AzFramework::DebugDisplayRequests - { - }; - class WhiteBoxManipulatorFixture : public WhiteBoxTestFixture { public: @@ -67,7 +64,8 @@ namespace UnitTest // create the direct call manipulator viewport interaction and an immediate mode dispatcher AZStd::unique_ptr viewportManipulatorInteraction = - AZStd::make_unique(); + AZStd::make_unique( + AZStd::make_shared()); AZStd::unique_ptr actionDispatcher = AZStd::make_unique( *viewportManipulatorInteraction); diff --git a/RETIRED_CODE.md b/RETIRED_CODE.md index 56a9df4fd1..285c06b0b2 100644 --- a/RETIRED_CODE.md +++ b/RETIRED_CODE.md @@ -2,7 +2,7 @@ The main goal of this list, is to enable future developers to find old code that might be useful when implementing new,or re-implementing missing features. -|Date | Commit hash | Short description of removed functionality| +|Date | PR | Short description of removed functionality| |--|--|--| | 2021-11-25 | | ObjectManager - parameter begin/end editing callbacks| | 2021-11-25 | | ObjectManager - `InvertSelection()`| @@ -30,4 +30,11 @@ The main goal of this list, is to enable future developers to find old code that | 2021-11-28 | | unused CUndoBaseLibraryManager and CUndoBaseLibrary| | 2021-11-28 | | IXmlNode - unused shareChildren/deleteChildAt/clone/insertChild/replaceChild functionality| | 2021-11-28 | | CXmlArchive - unused Load/Save methods| - +| 2021-12-03 | #6086 | MemoryDriller, PlatformMemoryInstrumentation - Driller no longer functional (Profiler was deleted months ago)| +| 2021-12-03 | #6086 | TraceMessageDrillerBus, TraceMessagesDriller - Driller no longer functional (Profiler was deleted months ago)| +| 2021-12-03 | #6086 | ThreadDrillerEvents - Driller no longer functional (Profiler was deleted months ago)| +| 2021-12-03 | #6086 | CarrierDrillerBus, CarrierDriller, ReplicaDriller, SessionDriller, SessionDrillerBus (from GridMate) - Driller no longer functional (Profiler was deleted months ago)| +| 2021-12-03 | #6086 | AssetTracking, Gems/AssetMemoryAnalyzer - Relies on driller that is no longer functional (Profiler was deleted months ago)| +| 2021-12-03 | #6086 | DrillerBus, DrillerManager, DrillerEvents, EventTraceDrillerBus, Driller, DrillerDefaultStringPool - Driller no longer functional (Profiler was deleted months ago)| +| 2021-12-03 | #6086 | FileIOEvents - Prone to false-positives (errors from other threads), not really useful| +| 2021-12-03 | #6086 | FileIOBus - Unused and not the best way to implement a filesystem replacement| diff --git a/Registry/AssetProcessorPlatformConfig.setreg b/Registry/AssetProcessorPlatformConfig.setreg index cf793a9802..30e19762ac 100644 --- a/Registry/AssetProcessorPlatformConfig.setreg +++ b/Registry/AssetProcessorPlatformConfig.setreg @@ -457,6 +457,7 @@ "RC physmaterial": { "glob": "*.physmaterial", "params": "copy", + "critical": "true", "productAssetType": "{9E366D8C-33BB-4825-9A1F-FA3ADBE11D0F}" }, "RC ocm": { diff --git a/Templates/DefaultProject/Template/Code/enabled_gems.cmake b/Templates/DefaultProject/Template/Code/enabled_gems.cmake index 833fe57660..e0902a5989 100644 --- a/Templates/DefaultProject/Template/Code/enabled_gems.cmake +++ b/Templates/DefaultProject/Template/Code/enabled_gems.cmake @@ -22,6 +22,7 @@ set(ENABLED_GEMS Multiplayer PhysX PrimitiveAssets + PrefabBuilder SaveData ScriptCanvasPhysics ScriptEvents diff --git a/Tools/LyTestTools/ly_test_tools/_internal/managers/abstract_resource_locator.py b/Tools/LyTestTools/ly_test_tools/_internal/managers/abstract_resource_locator.py index d11980658d..4514e5d812 100755 --- a/Tools/LyTestTools/ly_test_tools/_internal/managers/abstract_resource_locator.py +++ b/Tools/LyTestTools/ly_test_tools/_internal/managers/abstract_resource_locator.py @@ -384,3 +384,14 @@ class AbstractResourceLocator(object): "editor_log() is not implemented on the base AbstractResourceLocator() class. " "It must be defined by the inheriting class - " "i.e. _WindowsResourceLocator(AbstractResourceLocator).editor_log()") + + @abstractmethod + def crash_log(self): + """ + Return path to the project's crash log dir using the builds project and platform + :return: path to error.log/crash.log + """ + raise NotImplementedError( + "crash_log() is not implemented on the base AbstractResourceLocator() class. " + "It must be defined by the inheriting class - " + "i.e. _WindowsResourceLocator(AbstractResourceLocator).crash_log()") diff --git a/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/linux.py b/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/linux.py index 151a4a3e2b..ec88dce7c3 100644 --- a/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/linux.py +++ b/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/linux.py @@ -53,6 +53,12 @@ class _LinuxResourceManager(AbstractResourceLocator): """ return os.path.join(self.project_log(), "Editor.log") + def crash_log(self): + """ + Return path to the project's crash log dir using the builds project and platform + :return: path to Crash.log + """ + return os.path.join(self.project_log(), "crash.log") class LinuxWorkspaceManager(AbstractWorkspaceManager): """ diff --git a/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/mac.py b/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/mac.py index 4a187b188c..673bfa5050 100755 --- a/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/mac.py +++ b/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/mac.py @@ -62,6 +62,12 @@ class _MacResourceLocator(AbstractResourceLocator): """ return os.path.join(self.project_log(), "Editor.log") + def crash_log(self): + """ + Return path to the project's crash log dir using the builds project and platform + :return: path to crash.log + """ + return os.path.join(self.project_log(), "crash.log") class MacWorkspaceManager(AbstractWorkspaceManager): """ diff --git a/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/windows.py b/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/windows.py index 29289166d4..b31cc6bb5c 100755 --- a/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/windows.py +++ b/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/windows.py @@ -68,6 +68,12 @@ class _WindowsResourceLocator(AbstractResourceLocator): """ return os.path.join(self.project_log(), "Editor.log") + def crash_log(self): + """ + Return path to the project's crash log dir using the builds project and platform + :return: path to Error.log + """ + return os.path.join(self.project_log(), "error.log") class WindowsWorkspaceManager(AbstractWorkspaceManager): """ diff --git a/Tools/LyTestTools/ly_test_tools/environment/file_system.py b/Tools/LyTestTools/ly_test_tools/environment/file_system.py index c67ecc5b23..e8fb1d13cf 100755 --- a/Tools/LyTestTools/ly_test_tools/environment/file_system.py +++ b/Tools/LyTestTools/ly_test_tools/environment/file_system.py @@ -293,61 +293,75 @@ def delete(file_list, del_files, del_dirs): return True -def create_backup(source, backup_dir): +def create_backup(source, backup_dir, backup_name=None): """ Creates a backup of a single source file by creating a copy of it with the same name + '.bak' in backup_dir e.g.: foo.txt is stored as backup_dir/foo.txt.bak + If backup_name is provided, it will create a copy of the source file named "backup_name + .bak" instead. :param source: Full path to file to backup :param backup_dir: Path to the directory to store backup. + :param backup_name: [Optional] Name of the backed up file to use instead or the source name. """ if not backup_dir or not os.path.isdir(backup_dir): logger.error(f'Cannot create backup due to invalid backup directory {backup_dir}') - return + return False if not os.path.exists(source): logger.warning(f'Source file {source} does not exist, aborting backup creation.') - return + return False - source_filename = os.path.basename(source) - dest = os.path.join(backup_dir, f'{source_filename}.bak') + dest = None + if backup_name is None: + source_filename = os.path.basename(source) + dest = os.path.join(backup_dir, f'{source_filename}.bak') + else: + dest = os.path.join(backup_dir, f'{backup_name}.bak') logger.info(f'Saving backup of {source} in {dest}') if os.path.exists(dest): logger.warning(f'Backup file already exists at {dest}, it will be overwritten.') try: - shutil.copy(source, dest) + shutil.copy2(source, dest) except Exception: # intentionally broad logger.warning('Could not create backup, exception occurred while copying.', exc_info=True) + return False + return True -def restore_backup(original_file, backup_dir): +def restore_backup(original_file, backup_dir, backup_name=None): """ Restores a backup file to its original location. Works with a single file only. :param original_file: Full path to file to overwrite. :param backup_dir: Path to the directory storing the backup. + :param backup_name: [Optional] Provide if the backup file name is different from source. eg backup file = myFile_1.txt.bak original file = myfile.txt """ if not backup_dir or not os.path.isdir(backup_dir): logger.error(f'Cannot restore backup due to invalid or nonexistent directory {backup_dir}.') - return + return False - source_filename = os.path.basename(original_file) - backup = os.path.join(backup_dir, f'{source_filename}.bak') + backup = None + if backup_name is None: + source_filename = os.path.basename(original_file) + backup = os.path.join(backup_dir, f'{source_filename}.bak') + else: + backup = os.path.join(backup_dir, f'{backup_name}.bak') if not os.path.exists(backup): logger.warning(f'Backup file {backup} does not exist, aborting backup restoration.') - return + return False logger.info(f'Restoring backup of {original_file} from {backup}') try: - shutil.copy(backup, original_file) + shutil.copy2(backup, original_file) except Exception: # intentionally broad logger.warning('Could not restore backup, exception occurred while copying.', exc_info=True) - + return False + return True def delete_oldest(path_glob, keep_num, del_files=True, del_dirs=False): """ Delete oldest builds, keeping a specific number """ diff --git a/Tools/LyTestTools/ly_test_tools/launchers/platforms/android/launcher.py b/Tools/LyTestTools/ly_test_tools/launchers/platforms/android/launcher.py index 75eaa65e94..9433f426b5 100755 --- a/Tools/LyTestTools/ly_test_tools/launchers/platforms/android/launcher.py +++ b/Tools/LyTestTools/ly_test_tools/launchers/platforms/android/launcher.py @@ -163,9 +163,23 @@ class AndroidLauncher(Launcher): return True - def setup(self): + def setup(self, backupFiles=True, launch_ap=True, configure_settings=True): + """ + Perform setup of this launcher, must be called before launching. + Subclasses should call its parent's setup() before calling its own code, unless it changes configuration files + + :param backupFiles: Bool to backup setup files + :param launch_ap: Bool to launch the asset processor + :param configure_settings: Bool to update settings caches + :return: None + """ # Backup - self.backup_settings() + if backupFiles: + self.backup_settings() + + # None reverts to function default + if launch_ap is None: + launch_ap = True # Enable Android capabilities and verify environment is setup before continuing. self._is_valid_android_environment() @@ -174,7 +188,7 @@ class AndroidLauncher(Launcher): # Modify and re-configure self.configure_settings() self.workspace.shader_compiler.start() - super(AndroidLauncher, self).setup() + super(AndroidLauncher, self).setup(backupFiles, launch_ap, configure_settings) def teardown(self): ly_test_tools.mobile.android.undo_tcp_port_changes(self._device_id) diff --git a/Tools/LyTestTools/ly_test_tools/launchers/platforms/base.py b/Tools/LyTestTools/ly_test_tools/launchers/platforms/base.py index c9458899b4..c47b9c8b67 100755 --- a/Tools/LyTestTools/ly_test_tools/launchers/platforms/base.py +++ b/Tools/LyTestTools/ly_test_tools/launchers/platforms/base.py @@ -75,6 +75,8 @@ class Launcher(object): ~/ly_test_tools/devices.ini (a.k.a. %USERPROFILE%/ly_test_tools/devices.ini) :param backupFiles: Bool to backup setup files + :param launch_ap: Bool to launch the asset processor + :param configure_settings: Bool to update settings caches :return: None """ # Remove existing logs and dmp files before launching for self.save_project_log_files() @@ -153,7 +155,6 @@ class Launcher(object): :return: None """ self.workspace.asset_processor.stop() - self.save_project_log_files() def save_project_log_files(self): # type: () -> None diff --git a/Tools/LyTestTools/ly_test_tools/launchers/platforms/linux/launcher.py b/Tools/LyTestTools/ly_test_tools/launchers/platforms/linux/launcher.py index 112629b349..377121f2e0 100644 --- a/Tools/LyTestTools/ly_test_tools/launchers/platforms/linux/launcher.py +++ b/Tools/LyTestTools/ly_test_tools/launchers/platforms/linux/launcher.py @@ -52,7 +52,7 @@ class LinuxLauncher(Launcher): if backupFiles: self.backup_settings() - # Base setup defaults to None + # None reverts to function default if launch_ap is None: launch_ap = True @@ -162,7 +162,7 @@ class LinuxLauncher(Launcher): def configure_settings(self): """ - Configures system level settings and syncs the launcher to the targeted console IP. + Configures system level settings :return: None """ @@ -170,7 +170,6 @@ class LinuxLauncher(Launcher): host_ip = '127.0.0.1' self.args.append(f'--regset="/Amazon/AzCore/Bootstrap/project_path={self.workspace.paths.project()}"') self.args.append(f'--regset="/Amazon/AzCore/Bootstrap/remote_ip={host_ip}"') - self.args.append('--regset="/Amazon/AzCore/Bootstrap/wait_for_connect=1"') self.args.append(f'--regset="/Amazon/AzCore/Bootstrap/allowed_list={host_ip}"') self.workspace.settings.modify_platform_setting("r_ShaderCompilerServer", host_ip) @@ -179,20 +178,25 @@ class LinuxLauncher(Launcher): class DedicatedLinuxLauncher(LinuxLauncher): - def setup(self, backupFiles=True, launch_ap=False): + def setup(self, backupFiles=True, launch_ap=False, configure_settings=True): """ Perform setup of this launcher, must be called before launching. Subclasses should call its parent's setup() before calling its own code, unless it changes configuration files :param backupFiles: Bool to backup setup files - :param lauch_ap: Bool to lauch the asset processor + :param launch_ap: Bool to launch the asset processor + :param configure_settings: Bool to update settings caches :return: None """ - # Base setup defaults to None + # Backup + if backupFiles: + self.backup_settings() + + # None reverts to function default if launch_ap is None: launch_ap = False - super(DedicatedLinuxLauncher, self).setup(backupFiles, launch_ap) + super(DedicatedLinuxLauncher, self).setup(backupFiles, launch_ap, configure_settings) def binary_path(self): """ diff --git a/Tools/LyTestTools/ly_test_tools/launchers/platforms/win/launcher.py b/Tools/LyTestTools/ly_test_tools/launchers/platforms/win/launcher.py index d18431ba82..c29aa7b10b 100755 --- a/Tools/LyTestTools/ly_test_tools/launchers/platforms/win/launcher.py +++ b/Tools/LyTestTools/ly_test_tools/launchers/platforms/win/launcher.py @@ -44,21 +44,22 @@ class WinLauncher(Launcher): Subclasses should call its parent's setup() before calling its own code, unless it changes configuration files :param backupFiles: Bool to backup setup files - :param lauch_ap: Bool to lauch the asset processor + :param launch_ap: Bool to lauch the asset processor + :param configure_settings: Bool to update settings caches :return: None """ # Backup if backupFiles: self.backup_settings() - # Base setup defaults to None + # None reverts to function default if launch_ap is None: launch_ap = True # Modify and re-configure if configure_settings: self.configure_settings() - super(WinLauncher, self).setup(backupFiles, launch_ap) + super(WinLauncher, self).setup(backupFiles, launch_ap, configure_settings) def launch(self): """ @@ -161,7 +162,7 @@ class WinLauncher(Launcher): def configure_settings(self): """ - Configures system level settings and syncs the launcher to the targeted console IP. + Configures system level settings :return: None """ @@ -169,7 +170,6 @@ class WinLauncher(Launcher): host_ip = '127.0.0.1' self.args.append(f'--regset="/Amazon/AzCore/Bootstrap/project_path={self.workspace.paths.project()}"') self.args.append(f'--regset="/Amazon/AzCore/Bootstrap/remote_ip={host_ip}"') - self.args.append('--regset="/Amazon/AzCore/Bootstrap/wait_for_connect=1"') self.args.append(f'--regset="/Amazon/AzCore/Bootstrap/allowed_list={host_ip}"') self.workspace.settings.modify_platform_setting("log_RemoteConsoleAllowedAddresses", host_ip) @@ -177,20 +177,25 @@ class WinLauncher(Launcher): class DedicatedWinLauncher(WinLauncher): - def setup(self, backupFiles=True, launch_ap=False): + def setup(self, backupFiles=True, launch_ap=False, configure_settings=True): """ Perform setup of this launcher, must be called before launching. Subclasses should call its parent's setup() before calling its own code, unless it changes configuration files :param backupFiles: Bool to backup setup files - :param lauch_ap: Bool to lauch the asset processor + :param launch_ap: Bool to launch the asset processor + :param configure_settings: Bool to update settings caches :return: None """ - # Base setup defaults to None + # Backup + if backupFiles: + self.backup_settings() + + # None reverts to function default if launch_ap is None: launch_ap = False - super(DedicatedWinLauncher, self).setup(backupFiles, launch_ap) + super(DedicatedWinLauncher, self).setup(backupFiles, launch_ap, configure_settings) def binary_path(self): """ diff --git a/Tools/LyTestTools/ly_test_tools/o3de/asset_processor_utils.py b/Tools/LyTestTools/ly_test_tools/o3de/asset_processor_utils.py index f30ed2f233..8551e5c0ef 100644 --- a/Tools/LyTestTools/ly_test_tools/o3de/asset_processor_utils.py +++ b/Tools/LyTestTools/ly_test_tools/o3de/asset_processor_utils.py @@ -8,11 +8,12 @@ SPDX-License-Identifier: Apache-2.0 OR MIT import logging import os import subprocess +import psutil import ly_test_tools.environment.process_utils as process_utils logger = logging.getLogger(__name__) - +processList = ["AssetProcessor_tmp","AssetProcessor","AssetProcessorBatch","AssetBuilder","rc","Lua Editor"] def start_asset_processor(bin_dir): """ @@ -39,9 +40,16 @@ def kill_asset_processor(): :return: None """ - process_utils.kill_processes_named('AssetProcessor_tmp', ignore_extensions=True) - process_utils.kill_processes_named('AssetProcessor', ignore_extensions=True) - process_utils.kill_processes_named('AssetProcessorBatch', ignore_extensions=True) - process_utils.kill_processes_named('AssetBuilder', ignore_extensions=True) - process_utils.kill_processes_named('rc', ignore_extensions=True) - process_utils.kill_processes_named('Lua Editor', ignore_extensions=True) + for n in processList: + process_utils.kill_processes_named(n, ignore_extensions=True) + + +# Uses psutil to check if a specified process is running. +def check_ap_running(processName): + for proc in psutil.process_iter(): + try: + if processName.lower() in proc.name().lower(): + return True + except (psutil.AccessDenied, psutil.NoSuchProcess, psutil.ZombieProcess): + pass + return False diff --git a/Tools/LyTestTools/ly_test_tools/o3de/editor_test.py b/Tools/LyTestTools/ly_test_tools/o3de/editor_test.py index 29b6573f7a..f29a22002e 100644 --- a/Tools/LyTestTools/ly_test_tools/o3de/editor_test.py +++ b/Tools/LyTestTools/ly_test_tools/o3de/editor_test.py @@ -48,6 +48,7 @@ import ly_test_tools.environment.waiter as waiter import ly_test_tools.environment.process_utils as process_utils import ly_test_tools.o3de.editor_test import ly_test_tools.o3de.editor_test_utils as editor_utils +import ly_test_tools._internal.pytest_plugin from ly_test_tools.o3de.asset_processor import AssetProcessor from ly_test_tools.launchers.exceptions import WaitTimeoutError @@ -757,7 +758,7 @@ class EditorTestSuite(): cmdline = [ "--runpythontest", test_filename, "-logfile", f"@log@/{log_name}", - "-project-log-path", editor_utils.retrieve_log_path(run_id, workspace)] + test_cmdline_args + "-project-log-path", ly_test_tools._internal.pytest_plugin.output_path] + test_cmdline_args editor.args.extend(cmdline) editor.start(backupFiles = False, launch_ap = False, configure_settings=False) @@ -823,7 +824,7 @@ class EditorTestSuite(): cmdline = [ "--runpythontest", test_filenames_str, "-logfile", f"@log@/{log_name}", - "-project-log-path", editor_utils.retrieve_log_path(run_id, workspace)] + test_cmdline_args + "-project-log-path", ly_test_tools._internal.pytest_plugin.output_path] + test_cmdline_args editor.args.extend(cmdline) editor.start(backupFiles = False, launch_ap = False, configure_settings=False) @@ -900,7 +901,6 @@ class EditorTestSuite(): results[test_spec_name] = Result.Timeout.create(timed_out_result.test_spec, results[test_spec_name].output, self.timeout_editor_shared_test, result.editor_log) - return results def _run_single_test(self, request: Request, workspace: AbstractWorkspace, editor: Editor, diff --git a/Tools/LyTestTools/tests/unit/test_file_system.py b/Tools/LyTestTools/tests/unit/test_file_system.py index 2ddd3f8934..2fdcf8131e 100755 --- a/Tools/LyTestTools/tests/unit/test_file_system.py +++ b/Tools/LyTestTools/tests/unit/test_file_system.py @@ -751,7 +751,7 @@ class TestFileBackup(unittest.TestCase): self._dummy_file = 'dummy.txt' self._dummy_backup_file = os.path.join(self._dummy_dir, '{}.bak'.format(self._dummy_file)) - @mock.patch('shutil.copy') + @mock.patch('shutil.copy2') @mock.patch('os.path.exists') @mock.patch('os.path.isdir') def test_BackupSettings_SourceExists_BackupCreated(self, mock_path_isdir, mock_backup_exists, mock_copy): @@ -763,7 +763,7 @@ class TestFileBackup(unittest.TestCase): mock_copy.assert_called_with(self._dummy_file, self._dummy_backup_file) @mock.patch('ly_test_tools.environment.file_system.logger.warning') - @mock.patch('shutil.copy') + @mock.patch('shutil.copy2') @mock.patch('os.path.exists') @mock.patch('os.path.isdir') def test_BackupSettings_BackupExists_WarningLogged(self, mock_path_isdir, mock_backup_exists, mock_copy, mock_logger_warning): @@ -776,7 +776,7 @@ class TestFileBackup(unittest.TestCase): mock_logger_warning.assert_called_once() @mock.patch('ly_test_tools.environment.file_system.logger.warning') - @mock.patch('shutil.copy') + @mock.patch('shutil.copy2') @mock.patch('os.path.exists') @mock.patch('os.path.isdir') def test_BackupSettings_SourceNotExists_WarningLogged(self, mock_path_isdir, mock_backup_exists, mock_copy, mock_logger_warning): @@ -789,7 +789,7 @@ class TestFileBackup(unittest.TestCase): mock_logger_warning.assert_called_once() @mock.patch('ly_test_tools.environment.file_system.logger.warning') - @mock.patch('shutil.copy') + @mock.patch('shutil.copy2') @mock.patch('os.path.exists') @mock.patch('os.path.isdir') def test_BackupSettings_CannotCopy_WarningLogged(self, mock_path_isdir, mock_backup_exists, mock_copy, mock_logger_warning): @@ -821,7 +821,7 @@ class TestFileBackupRestore(unittest.TestCase): self._dummy_file = 'dummy.txt' self._dummy_backup_file = os.path.join(self._dummy_dir, '{}.bak'.format(self._dummy_file)) - @mock.patch('shutil.copy') + @mock.patch('shutil.copy2') @mock.patch('os.path.exists') @mock.patch('os.path.isdir') def test_RestoreSettings_BackupRestore_Success(self, mock_path_isdir, mock_exists, mock_copy): @@ -832,7 +832,7 @@ class TestFileBackupRestore(unittest.TestCase): mock_copy.assert_called_with(self._dummy_backup_file, self._dummy_file) @mock.patch('ly_test_tools.environment.file_system.logger.warning') - @mock.patch('shutil.copy') + @mock.patch('shutil.copy2') @mock.patch('os.path.exists') @mock.patch('os.path.isdir') def test_RestoreSettings_CannotCopy_WarningLogged(self, mock_path_isdir, mock_exists, mock_copy, mock_logger_warning): @@ -846,7 +846,7 @@ class TestFileBackupRestore(unittest.TestCase): mock_logger_warning.assert_called_once() @mock.patch('ly_test_tools.environment.file_system.logger.warning') - @mock.patch('shutil.copy') + @mock.patch('shutil.copy2') @mock.patch('os.path.exists') @mock.patch('os.path.isdir') def test_RestoreSettings_BackupNotExists_WarningLogged(self, mock_path_isdir, mock_exists, mock_copy, mock_logger_warning): diff --git a/Tools/LyTestTools/tests/unit/test_launcher_base.py b/Tools/LyTestTools/tests/unit/test_launcher_base.py index 5264e1bc28..4fe72b889e 100755 --- a/Tools/LyTestTools/tests/unit/test_launcher_base.py +++ b/Tools/LyTestTools/tests/unit/test_launcher_base.py @@ -146,15 +146,6 @@ class TestBaseLauncher: mock_stop_ap.assert_called_once() - @mock.patch('ly_test_tools.launchers.platforms.base.Launcher.save_project_log_files') - def test_Teardown_TeardownCalled_CallsSaveProjectLogFiles(self, under_test): - mock_workspace = mock.MagicMock() - mock_args = ['foo'] - mock_launcher = ly_test_tools.launchers.Launcher(mock_workspace, mock_args) - - mock_launcher.teardown() - under_test.assert_called_once() - @mock.patch('os.path.exists', mock.MagicMock(return_value=True)) @mock.patch('ly_test_tools._internal.managers.artifact_manager.ArtifactManager.save_artifact') @mock.patch('os.listdir') diff --git a/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake b/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake index 3f2dc8cedf..994f42e983 100644 --- a/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake +++ b/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake @@ -26,7 +26,7 @@ ly_associate_package(PACKAGE_NAME DirectXShaderCompilerDxc-1.6.2104-o3de-rev3-ma ly_associate_package(PACKAGE_NAME SPIRVCross-2021.04.29-rev1-mac TARGETS SPIRVCross PACKAGE_HASH 78c6376ed2fd195b9b1f5fb2b56e5267a32c3aa21fb399e905308de470eb4515) ly_associate_package(PACKAGE_NAME tiff-4.2.0.15-rev3-mac TARGETS TIFF PACKAGE_HASH c2615ccdadcc0e1d6c5ed61e5965c4d3a82193d206591b79b805c3b3ff35a4bf) ly_associate_package(PACKAGE_NAME freetype-2.10.4.16-mac TARGETS freetype PACKAGE_HASH f159b346ac3251fb29cb8dd5f805c99b0015ed7fdb3887f656945ca701a61d0d) -ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.7.167-rev5-mac TARGETS AWSNativeSDK PACKAGE_HASH ffb890bd9cf23afb429b9214ad9bac1bf04696f07a0ebb93c42058c482ab2f01) +ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.7.167-rev6-mac TARGETS AWSNativeSDK PACKAGE_HASH 9b058376dec042ace98e198e902b399739adeb9e9398a6c210171fb530164577) ly_associate_package(PACKAGE_NAME Lua-5.3.5-rev6-mac TARGETS Lua PACKAGE_HASH b9079fd35634774c9269028447562c6b712dbc83b9c64975c095fd423ff04c08) ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev5-mac TARGETS PhysX PACKAGE_HASH 83940b3876115db82cd8ffcb9e902278e75846d6ad94a41e135b155cee1ee186) ly_associate_package(PACKAGE_NAME mcpp-2.7.2_az.2-rev1-mac TARGETS mcpp PACKAGE_HASH be9558905c9c49179ef3d7d84f0a5472415acdf7fe2d76eb060d9431723ddf2e) @@ -40,7 +40,7 @@ ly_associate_package(PACKAGE_NAME libpng-1.6.37-mac ly_associate_package(PACKAGE_NAME libsamplerate-0.2.1-rev2-mac TARGETS libsamplerate PACKAGE_HASH b912af40c0ac197af9c43d85004395ba92a6a859a24b7eacd920fed5854a97fe) ly_associate_package(PACKAGE_NAME zlib-1.2.11-rev5-mac TARGETS ZLIB PACKAGE_HASH b6fea9c79b8bf106d4703b67fecaa133f832ad28696c2ceef45fb5f20013c096) ly_associate_package(PACKAGE_NAME squish-ccr-deb557d-rev1-mac TARGETS squish-ccr PACKAGE_HASH 155bfbfa17c19a9cd2ef025de14c5db598f4290045d5b0d83ab58cb345089a77) -ly_associate_package(PACKAGE_NAME astc-encoder-3.2-rev2-mac TARGETS astc-encoder PACKAGE_HASH 06f129d26995845824f1fb906a5135b2c71d44d66c768342af85fa28a175906f) +ly_associate_package(PACKAGE_NAME astc-encoder-3.2-rev5-mac TARGETS astc-encoder PACKAGE_HASH bdb1146cc6bbacc07901564fe884529d7cacc9bb44895597327341d3b9833ab0) ly_associate_package(PACKAGE_NAME ISPCTexComp-36b80aa-rev1-mac TARGETS ISPCTexComp PACKAGE_HASH 8a4e93277b8face6ea2fd57c6d017bdb55643ed3d6387110bc5f6b3b884dd169) ly_associate_package(PACKAGE_NAME lz4-1.9.3-vcpkg-rev4-mac TARGETS lz4 PACKAGE_HASH 891ff630bf34f7ab1d8eaee2ea0a8f1fca89dbdc63fca41ee592703dd488a73b) ly_associate_package(PACKAGE_NAME azslc-1.7.34-rev1-mac TARGETS azslc PACKAGE_HASH a9d81946b42ffa55c0d14d6a9249b3340e59a8fb8835e7a96c31df80f14723bc) diff --git a/cmake/LYTestWrappers.cmake b/cmake/LYTestWrappers.cmake index 9b139645fb..03146b6045 100644 --- a/cmake/LYTestWrappers.cmake +++ b/cmake/LYTestWrappers.cmake @@ -32,6 +32,7 @@ endif() # Set and create folders for PyTest and GTest xml output ly_set(PYTEST_XML_OUTPUT_DIR ${CMAKE_BINARY_DIR}/Testing/Pytest) ly_set(GTEST_XML_OUTPUT_DIR ${CMAKE_BINARY_DIR}/Testing/Gtest) +ly_set(LYTESTTOOLS_OUTPUT_DIR ${CMAKE_BINARY_DIR}/Testing/LyTestTools) file(MAKE_DIRECTORY ${PYTEST_XML_OUTPUT_DIR}) file(MAKE_DIRECTORY ${GTEST_XML_OUTPUT_DIR}) @@ -309,6 +310,7 @@ function(ly_add_pytest) endif() string(REPLACE "::" "_" pytest_report_directory "${PYTEST_XML_OUTPUT_DIR}/${ly_add_pytest_NAME}.xml") + string(REPLACE "::" "_" pytest_output_directory "${LYTESTTOOLS_OUTPUT_DIR}/${ly_add_pytest_NAME}") # Add the script path to the test target params set(LY_TEST_PARAMS "${ly_add_pytest_PATH}") @@ -318,7 +320,7 @@ function(ly_add_pytest) PARENT_NAME ${ly_add_pytest_NAME} TEST_SUITE ${ly_add_pytest_TEST_SUITE} LABELS FRAMEWORK_pytest - TEST_COMMAND ${LY_PYTEST_EXECUTABLE} ${ly_add_pytest_PATH} ${ly_add_pytest_EXTRA_ARGS} --junitxml=${pytest_report_directory} ${custom_marks_args} + TEST_COMMAND ${LY_PYTEST_EXECUTABLE} ${ly_add_pytest_PATH} ${ly_add_pytest_EXTRA_ARGS} --output-path ${pytest_output_directory} --junitxml=${pytest_report_directory} ${custom_marks_args} TEST_LIBRARY pytest COMPONENT ${ly_add_pytest_COMPONENT} ${ly_add_pytest_UNPARSED_ARGUMENTS} diff --git a/cmake/Packaging.cmake b/cmake/Packaging.cmake index d716efb225..4ba4e750de 100644 --- a/cmake/Packaging.cmake +++ b/cmake/Packaging.cmake @@ -111,6 +111,7 @@ set(CPACK_STRIP_FILES TRUE) # always strip symbols on packaging set(CPACK_PACKAGE_CHECKSUM SHA256) # Generate checksum file set(CPACK_PRE_BUILD_SCRIPTS ${pal_dir}/PackagingPreBuild_${PAL_HOST_PLATFORM_NAME_LOWERCASE}.cmake) set(CPACK_POST_BUILD_SCRIPTS ${pal_dir}/PackagingPostBuild_${PAL_HOST_PLATFORM_NAME_LOWERCASE}.cmake) +set(CPACK_CODESIGN_SCRIPT ${pal_dir}/PackagingCodeSign_${PAL_HOST_PLATFORM_NAME_LOWERCASE}.cmake) set(CPACK_LY_PYTHON_CMD ${LY_PYTHON_CMD}) # IMPORTANT: required to be included AFTER setting all property overrides diff --git a/cmake/Platform/Linux/PackagingCodeSign_linux.cmake b/cmake/Platform/Linux/PackagingCodeSign_linux.cmake new file mode 100644 index 0000000000..c4b6375385 --- /dev/null +++ b/cmake/Platform/Linux/PackagingCodeSign_linux.cmake @@ -0,0 +1,33 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +function(ly_sign_binaries in_path) + message(STATUS "Executing package signing...") + file(REAL_PATH "${CPACK_SOURCE_DIR}/.." _root_path) + unset(_signing_command) + + cmake_path(SET _sign_script "${_root_path}/scripts/signer/Platform/Linux/signer.sh") + + list(APPEND _signing_command + ${_sign_script} + ) + message(STATUS "Signing package files in ${in_path}") + execute_process( + COMMAND ${_signing_command} ${in_path} + RESULT_VARIABLE _signing_result + ERROR_VARIABLE _signing_errors + OUTPUT_VARIABLE _signing_output + ECHO_OUTPUT_VARIABLE + ) + + if(NOT ${_signing_result} EQUAL 0) + message(FATAL_ERROR "An error occurred during signing files. ${_signing_errors}") + else() + message(STATUS "Signing complete!") + endif() +endfunction() diff --git a/cmake/Platform/Linux/PackagingPostBuild_linux.cmake b/cmake/Platform/Linux/PackagingPostBuild_linux.cmake index d92ee908fd..ebeefe3833 100644 --- a/cmake/Platform/Linux/PackagingPostBuild_linux.cmake +++ b/cmake/Platform/Linux/PackagingPostBuild_linux.cmake @@ -8,6 +8,7 @@ file(REAL_PATH "${CPACK_SOURCE_DIR}/.." LY_ROOT_FOLDER) include(${LY_ROOT_FOLDER}/cmake/Platform/Common/PackagingPostBuild_common.cmake) +include(${CPACK_CODESIGN_SCRIPT}) file(${CPACK_PACKAGE_CHECKSUM} ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}.deb file_checksum) file(WRITE ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}.deb.sha256 "${file_checksum} ${CPACK_PACKAGE_FILE_NAME}.deb") @@ -19,6 +20,10 @@ if(CPACK_UPLOAD_URL) set(CPACK_UPLOAD_DIRECTORY ${CPACK_PACKAGE_DIRECTORY}/CPackUploads) endif() + # Sign and regenerate checksum + ly_sign_binaries("${CPACK_TOPLEVEL_DIRECTORY}/*.deb" "") + file(WRITE ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}.deb.sha256 "${file_checksum} ${CPACK_PACKAGE_FILE_NAME}.deb") + # Copy the artifacts intended to be uploaded to a remote server into the folder specified # through CPACK_UPLOAD_DIRECTORY. This mimics the same process cpack does natively for # some other frameworks that have built-in online installer support. @@ -27,14 +32,13 @@ if(CPACK_UPLOAD_URL) file(GLOB _artifacts "${CPACK_TOPLEVEL_DIRECTORY}/*.deb" "${CPACK_TOPLEVEL_DIRECTORY}/*.sha256" + "${LY_ROOT_FOLDER}/scripts/signer/Platform/Linux/*.gpg" ) file(COPY ${_artifacts} DESTINATION ${CPACK_UPLOAD_DIRECTORY} ) message(STATUS "Artifacts copied to ${CPACK_UPLOAD_DIRECTORY}") - # TODO: copy gpg file to CPACK_UPLOAD_DIRECTORY - ly_upload_to_url( ${CPACK_UPLOAD_URL} ${CPACK_UPLOAD_DIRECTORY} @@ -51,8 +55,6 @@ if(CPACK_UPLOAD_URL) ${latest_deb_package} ) ly_upload_to_latest(${CPACK_UPLOAD_URL} ${latest_deb_package}) - - # TODO: upload gpg file to latest # Generate a checksum file for latest and upload it set(latest_hash_file "${CPACK_UPLOAD_DIRECTORY}/${CPACK_PACKAGE_NAME}_latest.deb.sha256") diff --git a/cmake/Platform/Linux/PackagingPreBuild_linux.cmake b/cmake/Platform/Linux/PackagingPreBuild_linux.cmake index 31dc393307..39108355ea 100644 --- a/cmake/Platform/Linux/PackagingPreBuild_linux.cmake +++ b/cmake/Platform/Linux/PackagingPreBuild_linux.cmake @@ -9,8 +9,6 @@ file(REAL_PATH "${CPACK_SOURCE_DIR}/.." LY_ROOT_FOLDER) include(${LY_ROOT_FOLDER}/cmake/Platform/Common/PackagingPreBuild_common.cmake) -if(NOT CPACK_UPLOAD_URL) # Skip signing if we are not uploading the package +if(NOT CPACK_UPLOAD_URL) # Skip this step if we are not uploading the package return() endif() - -# TODO: do signing diff --git a/cmake/Platform/Linux/platform_linux_files.cmake b/cmake/Platform/Linux/platform_linux_files.cmake index d30959b8d2..dd10c47ca6 100644 --- a/cmake/Platform/Linux/platform_linux_files.cmake +++ b/cmake/Platform/Linux/platform_linux_files.cmake @@ -18,6 +18,7 @@ set(FILES LYTestWrappers_linux.cmake LYWrappers_linux.cmake Packaging_linux.cmake + PackagingCodeSign_linux.cmake PackagingPostBuild_linux.cmake PackagingPreBuild_linux.cmake PAL_linux.cmake diff --git a/cmake/Platform/Windows/PackagingCodeSign_windows.cmake b/cmake/Platform/Windows/PackagingCodeSign_windows.cmake new file mode 100644 index 0000000000..8ef7f79e40 --- /dev/null +++ b/cmake/Platform/Windows/PackagingCodeSign_windows.cmake @@ -0,0 +1,56 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +function(ly_sign_binaries in_path in_path_type) + message(STATUS "Executing package signing...") + file(REAL_PATH "${CPACK_SOURCE_DIR}/.." _root_path) + unset(_signing_command) + + cmake_path(SET _sign_script "${_root_path}/scripts/signer/Platform/Windows/signer.ps1") + + find_program(_psiexec_path psexec.exe) + if(_psiexec_path) + list(APPEND _signing_command + ${_psiexec_path} + -accepteula + -nobanner + -s + ) + endif() + + find_program(_powershell_path powershell.exe REQUIRED) + list(APPEND _signing_command + ${_powershell_path} + -NoLogo + -ExecutionPolicy Bypass + -File ${_sign_script} + ) + + # This requires to have a valid local certificate. In continuous integration, these certificates are stored + # in the machine directly. + # You can generate a test certificate to be able to run this in a PowerShell elevated promp with: + # New-SelfSignedCertificate -DnsName foo.o3de.com -Type CodeSigning -CertStoreLocation Cert:\CurrentUser\My + # Export-Certificate -Cert (Get-ChildItem Cert:\CurrentUser\My\) -Filepath "c:\selfsigned.crt" + # Import-Certificate -FilePath "c:\selfsigned.crt" -Cert Cert:\CurrentUser\TrustedPublisher + # Import-Certificate -FilePath "c:\selfsigned.crt" -Cert Cert:\CurrentUser\Root + + message(STATUS "Signing ${in_path_type} files in ${in_path}") + execute_process( + COMMAND ${_signing_command} -${in_path_type} ${in_path} + RESULT_VARIABLE _signing_result + ERROR_VARIABLE _signing_errors + OUTPUT_VARIABLE _signing_output + ECHO_OUTPUT_VARIABLE + ) + + if(NOT ${_signing_result} EQUAL 0) + message(FATAL_ERROR "An error occurred during signing files for ${in_path_type}. ${_signing_errors}") + else() + message(STATUS "Signing complete!") + endif() +endfunction() diff --git a/cmake/Platform/Windows/PackagingPostBuild_windows.cmake b/cmake/Platform/Windows/PackagingPostBuild_windows.cmake index 0993135c23..10f0f902a3 100644 --- a/cmake/Platform/Windows/PackagingPostBuild_windows.cmake +++ b/cmake/Platform/Windows/PackagingPostBuild_windows.cmake @@ -8,6 +8,7 @@ file(REAL_PATH "${CPACK_SOURCE_DIR}/.." LY_ROOT_FOLDER) include(${LY_ROOT_FOLDER}/cmake/Platform/Common/PackagingPostBuild_common.cmake) +include(${CPACK_CODESIGN_SCRIPT}) # convert the path to a windows style path using string replace because TO_NATIVE_PATH # only works on real paths @@ -59,39 +60,7 @@ set(_light_command ) if(CPACK_UPLOAD_URL) # Skip signing if we are not uploading the package - file(TO_NATIVE_PATH "${LY_ROOT_FOLDER}/scripts/signer/Platform/Windows/signer.ps1" _sign_script) - - unset(_signing_command) - find_program(_psiexec_path psexec.exe) - if(_psiexec_path) - list(APPEND _signing_command - ${_psiexec_path} - -accepteula - -nobanner - -s - ) - endif() - - find_program(_powershell_path powershell.exe REQUIRED) - list(APPEND _signing_command - ${_powershell_path} - -NoLogo - -ExecutionPolicy Bypass - -File ${_sign_script} - ) - - message(STATUS "Signing package files in ${_cpack_wix_out_dir}") - execute_process( - COMMAND ${_signing_command} -packagePath ${_cpack_wix_out_dir} - RESULT_VARIABLE _signing_result - ERROR_VARIABLE _signing_errors - OUTPUT_VARIABLE _signing_output - ECHO_OUTPUT_VARIABLE - ) - - if(NOT ${_signing_result} EQUAL 0) - message(FATAL_ERROR "An error occurred during signing package files. ${_signing_errors}") - endif() + ly_sign_binaries("${_cpack_wix_out_dir}" "packagePath") endif() message(STATUS "Creating Bootstrap Installer...") @@ -116,18 +85,7 @@ endif() message(STATUS "Bootstrap installer generated to ${_bootstrap_output_file}") if(CPACK_UPLOAD_URL) # Skip signing if we are not uploading the package - message(STATUS "Signing bootstrap installer in ${_bootstrap_output_file}") - execute_process( - COMMAND ${_signing_command} -bootstrapPath ${_bootstrap_output_file} - RESULT_VARIABLE _signing_result - ERROR_VARIABLE _signing_errors - OUTPUT_VARIABLE _signing_output - ECHO_OUTPUT_VARIABLE - ) - - if(NOT ${_signing_result} EQUAL 0) - message(FATAL_ERROR "An error occurred during signing bootstrap installer. ${_signing_errors}") - endif() + ly_sign_binaries("${_bootstrap_output_file}" "bootstrapPath") endif() # use the internal default path if somehow not specified from cpack_configure_downloads diff --git a/cmake/Platform/Windows/PackagingPreBuild_windows.cmake b/cmake/Platform/Windows/PackagingPreBuild_windows.cmake index 29995518da..b6b5708a8c 100644 --- a/cmake/Platform/Windows/PackagingPreBuild_windows.cmake +++ b/cmake/Platform/Windows/PackagingPreBuild_windows.cmake @@ -8,53 +8,11 @@ file(REAL_PATH "${CPACK_SOURCE_DIR}/.." LY_ROOT_FOLDER) include(${LY_ROOT_FOLDER}/cmake/Platform/Common/PackagingPreBuild_common.cmake) +include(${CPACK_CODESIGN_SCRIPT}) if(NOT CPACK_UPLOAD_URL) # Skip signing if we are not uploading the package return() endif() -file(REAL_PATH "${CPACK_SOURCE_DIR}/.." _root_path) set(_cpack_wix_out_dir ${CPACK_TOPLEVEL_DIRECTORY}) -file(TO_NATIVE_PATH "${_root_path}/scripts/signer/Platform/Windows/signer.ps1" _sign_script) - -unset(_signing_command) -find_program(_psiexec_path psexec.exe) -if(_psiexec_path) - list(APPEND _signing_command - ${_psiexec_path} - -accepteula - -nobanner - -s - ) -endif() - -find_program(_powershell_path powershell.exe REQUIRED) -list(APPEND _signing_command - ${_powershell_path} - -NoLogo - -ExecutionPolicy Bypass - -File ${_sign_script} -) - -# This requires to have a valid local certificate. In continuous integration, these certificates are stored -# in the machine directly. -# You can generate a test certificate to be able to run this in a PowerShell elevated promp with: -# New-SelfSignedCertificate -DnsName foo.o3de.com -Type CodeSigning -CertStoreLocation Cert:\CurrentUser\My -# Export-Certificate -Cert (Get-ChildItem Cert:\CurrentUser\My\) -Filepath "c:\selfsigned.crt" -# Import-Certificate -FilePath "c:\selfsigned.crt" -Cert Cert:\CurrentUser\TrustedPublisher -# Import-Certificate -FilePath "c:\selfsigned.crt" -Cert Cert:\CurrentUser\Root - -message(STATUS "Signing executable files in ${_cpack_wix_out_dir}") -execute_process( - COMMAND ${_signing_command} -exePath ${_cpack_wix_out_dir} - RESULT_VARIABLE _signing_result - ERROR_VARIABLE _signing_errors - OUTPUT_VARIABLE _signing_output - ECHO_OUTPUT_VARIABLE -) - -if(NOT ${_signing_result} EQUAL 0) - message(FATAL_ERROR "An error occurred during signing executable files. ${_signing_errors}") -else() - message(STATUS "Signing exes complete!") -endif() +ly_sign_binaries("${_cpack_wix_out_dir}" "exePath") \ No newline at end of file diff --git a/cmake/Platform/Windows/platform_windows_files.cmake b/cmake/Platform/Windows/platform_windows_files.cmake index 984d985380..8ad242f842 100644 --- a/cmake/Platform/Windows/platform_windows_files.cmake +++ b/cmake/Platform/Windows/platform_windows_files.cmake @@ -25,6 +25,7 @@ set(FILES PALDetection_windows.cmake Install_windows.cmake Packaging_windows.cmake + PackagingCodeSign_windows.cmake PackagingPostBuild_windows.cmake PackagingPreBuild_windows.cmake Packaging/Bootstrapper.wxs diff --git a/cmake/Version.cmake b/cmake/Version.cmake index de93ebefef..c5504ec62a 100644 --- a/cmake/Version.cmake +++ b/cmake/Version.cmake @@ -16,3 +16,8 @@ if("$ENV{O3DE_VERSION}") # Overriding through environment set(LY_VERSION_STRING "$ENV{O3DE_VERSION}") endif() + +if("$ENV{O3DE_BUILD_VERSION}") + # Overriding through environment + set(LY_VERSION_BUILD_NUMBER "$ENV{O3DE_BUILD_VERSION}") +endif() diff --git a/engine.json b/engine.json index 2d182c78aa..737ac24fea 100644 --- a/engine.json +++ b/engine.json @@ -7,7 +7,6 @@ "O3DEBuildNumber": 0, "external_subdirectories": [ "Gems/Achievements", - "Gems/AssetMemoryAnalyzer", "Gems/AssetValidation", "Gems/Atom", "Gems/AtomContent", diff --git a/scripts/build/Jenkins/tools/jenkins_pipeline_metrics.py b/scripts/build/Jenkins/tools/jenkins_pipeline_metrics.py index 8b0164e3e8..6ea2e135a7 100644 --- a/scripts/build/Jenkins/tools/jenkins_pipeline_metrics.py +++ b/scripts/build/Jenkins/tools/jenkins_pipeline_metrics.py @@ -16,9 +16,8 @@ from datetime import datetime, timezone from requests.auth import HTTPBasicAuth cur_dir = os.path.dirname(os.path.abspath(__file__)) -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(cur_dir)), 'package')) -from util import * - +sys.path.insert(0, os.path.abspath(f'{cur_dir}/../../../util')) +import util class JenkinsAPIClient: def __init__(self, jenkins_base_url, jenkins_username, jenkins_api_token): @@ -36,7 +35,7 @@ class JenkinsAPIClient: except Exception: traceback.print_exc() print(f'WARN: Get request {url} failed, retying....') - error(f'Get request {url} failed, see exception for more details.') + util.error(f'Get request {url} failed, see exception for more details.') def get_builds(self, pipeline_name, branch_name=''): url = self.jenkins_base_url + self.blueocean_api_path + f'/{pipeline_name}/{branch_name}/runs' @@ -123,9 +122,9 @@ def upload_files_to_s3(env, formatted_date): else: python = os.path.join(engine_root, 'python', 'python.sh') upload_csv_cmd = [python, upload_to_s3_script_path, '--base_dir', cur_dir, '--file_regex', env['CSV_REGEX'], '--bucket', env['BUCKET'], '--key_prefix', csv_s3_prefix] - execute_system_call(upload_csv_cmd) + util.execute_system_call(upload_csv_cmd) upload_manifest_cmd = [python, upload_to_s3_script_path, '--base_dir', cur_dir, '--file_regex', env['MANIFEST_REGEX'], '--bucket', env['BUCKET'], '--key_prefix', manifest_s3_prefix] - execute_system_call(upload_manifest_cmd) + util.execute_system_call(upload_manifest_cmd) def get_required_env(env, keys): @@ -134,7 +133,7 @@ def get_required_env(env, keys): try: env[key] = os.environ[key].strip() except KeyError: - error(f'{key} is not set in environment variable') + util.error(f'{key} is not set in environment variable') success = False return success @@ -143,7 +142,7 @@ def main(): env = {} required_env_list = ['JENKINS_URL', 'PIPELINE_NAME', 'BRANCH_NAME', 'JENKINS_USERNAME', 'JENKINS_API_TOKEN', 'BUCKET', 'CSV_REGEX', 'CSV_PREFIX', 'MANIFEST_REGEX', 'MANIFEST_PREFIX', 'DAYS_TO_COLLECT'] if not get_required_env(env, required_env_list): - error('Required environment variable is not set, see log for more details.') + util.error('Required environment variable is not set, see log for more details.') target_date = datetime.today().date() formatted_date = f'{target_date.year}/{target_date:%m}/{target_date:%d}' diff --git a/scripts/build/Platform/Linux/build_config.json b/scripts/build/Platform/Linux/build_config.json index db9e2e7b8a..5290a32f6d 100644 --- a/scripts/build/Platform/Linux/build_config.json +++ b/scripts/build/Platform/Linux/build_config.json @@ -84,7 +84,7 @@ "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "all", "CTEST_OPTIONS": "-E (AutomatedTesting::Atom_TestSuite_Main|AutomatedTesting::TerrainTests_Main|Gem::EMotionFX.Editor.Tests) -L (SUITE_smoke|SUITE_main) -LE (REQUIRES_gpu) --no-tests=error", - "TEST_RESULTS": "True" + "TEST_RESULTS": "False" } }, "test_profile_nounity": { @@ -97,7 +97,7 @@ "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "all", "CTEST_OPTIONS": "-E (AutomatedTesting::Atom_TestSuite_Main|AutomatedTesting::TerrainTests_Main|Gem::EMotionFX.Editor.Tests) -L (SUITE_smoke|SUITE_main) -LE (REQUIRES_gpu) --no-tests=error", - "TEST_RESULTS": "True" + "TEST_RESULTS": "False" } }, "asset_profile": { @@ -146,7 +146,7 @@ "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_periodic", "CTEST_OPTIONS": "-L (SUITE_periodic) --no-tests=error", - "TEST_RESULTS": "True" + "TEST_RESULTS": "False" } }, "sandbox_test_profile": { @@ -182,7 +182,7 @@ "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_benchmark", "CTEST_OPTIONS": "-L (SUITE_benchmark) --no-tests=error", - "TEST_RESULTS": "True" + "TEST_RESULTS": "False" } }, "release": { @@ -230,6 +230,9 @@ "nightly-clean", "nightly-installer" ], + "PIPELINE_ENV":{ + "NODE_LABEL":"linux-707531fc7-packaging" + }, "COMMAND": "build_installer_linux.sh", "PARAMETERS": { "CONFIGURATION": "profile", diff --git a/scripts/build/Platform/Linux/build_linux.sh b/scripts/build/Platform/Linux/build_linux.sh index 328445738b..2f33827c5b 100755 --- a/scripts/build/Platform/Linux/build_linux.sh +++ b/scripts/build/Platform/Linux/build_linux.sh @@ -40,7 +40,7 @@ if [[ ! -z "$RUN_CONFIGURE" ]]; then eval echo [ci_build] ${CONFIGURE_CMD} eval ${CONFIGURE_CMD} # Save the run only if success - eval echo "${CONFIGURE_CMD}" > ${LAST_CONFIGURE_CMD_FILE} + echo "${CONFIGURE_CMD}" > ${LAST_CONFIGURE_CMD_FILE} fi eval echo [ci_build] cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $(grep -c processor /proc/cpuinfo) -- ${CMAKE_NATIVE_BUILD_ARGS} diff --git a/scripts/build/Platform/Mac/build_config.json b/scripts/build/Platform/Mac/build_config.json index 34b02a1aec..fb960a96fa 100644 --- a/scripts/build/Platform/Mac/build_config.json +++ b/scripts/build/Platform/Mac/build_config.json @@ -103,7 +103,7 @@ "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_periodic", "CTEST_OPTIONS": "-L \"(SUITE_periodic)\"", - "TEST_RESULTS": "True" + "TEST_RESULTS": "False" } }, "benchmark_test_profile": { @@ -120,7 +120,7 @@ "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_benchmark", "CTEST_OPTIONS": "-L \"(SUITE_benchmark)\"", - "TEST_RESULTS": "True" + "TEST_RESULTS": "False" } }, "release": { diff --git a/scripts/build/Platform/Mac/build_mac.sh b/scripts/build/Platform/Mac/build_mac.sh index a0401f664c..2ea5eeab8a 100755 --- a/scripts/build/Platform/Mac/build_mac.sh +++ b/scripts/build/Platform/Mac/build_mac.sh @@ -42,7 +42,7 @@ RUN_CONFIGURE=1 if [[ ! -z "$RUN_CONFIGURE" ]]; then # have to use eval since $CMAKE_OPTIONS (${EXTRA_CMAKE_OPTIONS}) contains quotes that need to be processed - echo [ci_build] ${CONFIGURE_CMD} + eval echo [ci_build] ${CONFIGURE_CMD} eval ${CONFIGURE_CMD} # Save the run only if success echo "${CONFIGURE_CMD}" > ${LAST_CONFIGURE_CMD_FILE} diff --git a/scripts/build/Platform/Windows/package_build_config.json b/scripts/build/Platform/Windows/package_build_config.json deleted file mode 100644 index 1a94fb802a..0000000000 --- a/scripts/build/Platform/Windows/package_build_config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "profile_atom": { - "COMMAND":"build_windows.cmd", - "PARAMETERS": { - "CONFIGURATION":"profile", - "OUTPUT_DIRECTORY":"windows", - "CMAKE_OPTIONS":"-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0", - "CMAKE_LY_PROJECTS":"AtomTest;AtomSampleViewer", - "CMAKE_TARGET":"ALL_BUILD", - "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo" - } - } -} diff --git a/scripts/build/package/PackageEnv.py b/scripts/build/package/PackageEnv.py deleted file mode 100755 index 1f2d102214..0000000000 --- a/scripts/build/package/PackageEnv.py +++ /dev/null @@ -1,191 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -from Params import Params -from util import * - - -class PackageEnv(Params): - def __init__(self, platform, type, json_file): - super(PackageEnv, self).__init__() - self.__cur_dir = os.path.dirname(os.path.abspath(__file__)) - global_env_file = os.path.join(self.__cur_dir, json_file) - with open(global_env_file, 'r') as source: - data = json.load(source) - self.__global_env = data.get('global_env') - platform_env_file = os.path.join(self.__cur_dir, 'Platform', platform, json_file) - if not os.path.exists(platform_env_file): - print(f'{platform_env_file} is not found.') - # Search restricted platform folders - engine_root = self.get('ENGINE_ROOT') - # Use real path in case engine root is a symlink path - if os.name == 'posix' and os.path.islink(engine_root): - engine_root = os.readlink(engine_root) - rel_path = os.path.relpath(self.__cur_dir, engine_root) - platform_env_file = os.path.join(engine_root, 'restricted', platform, rel_path, json_file) - if not os.path.exists(platform_env_file): - ly_build_error(f'{platform_env_file} is not found.') - with open(platform_env_file, 'r') as source: - data = json.load(source) - types = data.get('types') - if type not in types: - ly_build_error(f'Package type {type} is not supported') - self.__platform = platform - self.__platform_env = data.get('local_env') - self.__platform_env.update(self.__global_env) - self.__type = type - self.__type_env = types.get(type) - - def get_platform(self): - return self.__platform - - def get_type(self): - return self.__type - - def get_platform_env(self): - return self.__platform_env - - def get_type_env(self): - return self.__type_env - - def __get_platform_value(self, key): - key = key.upper() - value = self.__platform_env.get(key) - if value is None: - ly_build_error(f'{key} is not defined in global env nor in local env') - return value - - def __get_type_value(self, key): - key = key.upper() - value = self.__type_env.get(key) - if value is None: - ly_build_error(f'{key} is not defined in package type {self.__type} for platform {self.__platform}') - return value - - def __evaluate_boolean(self, v): - return str(v).lower() in ['1', 'true'] - - def __get_engine_root(self): - def validate_engine_root(engine_root): - if not os.path.isdir(engine_root): - return False - return os.path.exists(os.path.join(engine_root, 'engine.json')) - - workspace = os.getenv('WORKSPACE') - if workspace is not None: - print(f'Environment variable WORKSPACE={workspace} detected') - if validate_engine_root(workspace): - print(f'Setting ENGINE_ROOT to {workspace}') - return workspace - print('Cannot locate ENGINE_ROOT with Environment variable WORKSPACE') - - engine_root = os.getenv('ENGINE_ROOT', '') - if validate_engine_root(engine_root): - return engine_root - - print('Environment variable ENGINE_ROOT is not set or invalid, checking ENGINE_ROOT in env json file') - engine_root = self.__global_env.get('ENGINE_ROOT') - if validate_engine_root(engine_root): - return engine_root - - # Set engine_root based on script location - engine_root = os.path.dirname(os.path.dirname(os.path.dirname(self.__cur_dir))) - print(f'ENGINE_ROOT from env json file is invalid, defaulting to {engine_root}') - if validate_engine_root(engine_root): - return engine_root - else: - error('Cannot Locate ENGINE_ROOT') - - def __get_thirdparty_home(self): - third_party_home = os.getenv('LY_3RDPARTY_PATH', '') - if os.path.exists(third_party_home): - print(f'LY_3RDPARTY_PATH found, using {third_party_home} as 3rdParty path.') - return third_party_home - third_party_home = self.__get_platform_value('THIRDPARTY_HOME') - if os.path.isdir(third_party_home): - return third_party_home - - # Set engine_root based on script location - print('THIRDPARTY_HOME is not valid, looking for THIRD_PARTY_HOME') - - # Finding THIRD_PARTY_HOME - cur_dir = self.__get_engine_root() - last_dir = None - while last_dir != cur_dir: - third_party_home = os.path.join(cur_dir, '3rdParty') - print(f'Cheking THIRDPARTY_HOME {third_party_home}') - if os.path.exists(os.path.join(third_party_home, '3rdParty.txt')): - print(f'Setting THIRDPARTY_HOME to {third_party_home}') - return third_party_home - last_dir = cur_dir - cur_dir = os.path.dirname(cur_dir) - error('Cannot locate THIRDPARTY_HOME') - - def __get_package_name_pattern(self): - package_name_pattern = self.__get_platform_value('PACKAGE_NAME_PATTERN') - if os.getenv('PACKAGE_NAME_PATTERN') is not None: - package_name_pattern = os.getenv('PACKAGE_NAME_PATTERN') - return package_name_pattern - - def __get_branch_name(self): - branch_name = self.__get_platform_value('BRANCH_NAME') - if os.getenv('BRANCH_NAME') is not None: - branch_name = os.getenv('BRANCH_NAME') - branch_name = branch_name.replace('/', '_').replace('\\', '_') - return branch_name - - def __get_build_number(self): - build_number = self.__get_platform_value('BUILD_NUMBER') - if os.getenv('BUILD_NUMBER') is not None: - build_number = os.getenv('BUILD_NUMBER') - return build_number - - def __get_scrub_params(self): - return self.__get_type_value('SCRUB_PARAMS') - - def __get_validator_platforms(self): - return self.__get_type_value('VALIDATOR_PLATFORMS') - - def __get_package_targets(self): - return self.__get_type_value('PACKAGE_TARGETS') - - def __get_build_targets(self): - return self.__get_type_value('BUILD_TARGETS') - - def __get_asset_processor_path(self): - return self.__get_type_value('ASSET_PROCESSOR_PATH') - - def __get_asset_game_folders(self): - return self.__get_type_value('ASSET_GAME_FOLDERS') - - def __get_asset_platform(self): - return self.__get_type_value('ASSET_PLATFORM') - - def __get_bootstrap_cfg_game_folder(self): - return self.__get_type_value('BOOTSTRAP_CFG_GAME_FOLDER') - - def __get_skip_build(self): - skip_build = os.getenv('SKIP_BUILD') - if skip_build is None: - skip_build = self.__get_type_value('SKIP_BUILD') - return self.__evaluate_boolean(skip_build) - - def __get_skip_scrubbing(self): - skip_scrubbing = os.getenv('SKIP_SCRUBBING') - if skip_scrubbing is None: - skip_scrubbing = self.__type_env.get('SKIP_SCRUBBING', 'False') - return self.__evaluate_boolean(skip_scrubbing) - - def __get_internal_s3_bucket(self): - return self.__get_platform_value('INTERNAL_S3_BUCKET') - - def __get_qa_s3_bucket(self): - return self.__get_platform_value('QA_S3_BUCKET') - - def __get_s3_prefix(self): - return self.__get_platform_value('S3_PREFIX') diff --git a/scripts/build/package/Params.py b/scripts/build/package/Params.py deleted file mode 100755 index 994d28486a..0000000000 --- a/scripts/build/package/Params.py +++ /dev/null @@ -1,80 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# -import os -import sys -import re -from util import ly_build_error - - -class Params(object): - def __init__(self): - # Cache params - self.__params = {} - - def get(self, param_name): - param_value = self.__params.get(param_name) - if param_value is not None: - return param_value - # Call __get_${param_name} function - func = getattr(self, '_{}__get_{}'.format(self.__class__.__name__, param_name.lower()), None) - if func is not None: - param_value = func() - # Replace all ${env} in value - if isinstance(param_value, str): - param_value = self.__process_string(param_name, param_value) - elif isinstance(param_value, list): - param_value = self.__process_list(param_name, param_value) - elif isinstance(param_value, dict): - param_value = self.__process_dict(param_name, param_value) - # Cache param - self.__params[param_name] = param_value - return param_value - ly_build_error('method __get_{} is not defined in class {}'.format(param_name.lower(), self.__class__.__name__)) - - def set(self, param_name, param_value): - self.__params[param_name] = param_value - - def exists(self, param_name): - try: - self.get(param_name) - except LyBuildError: - return False - return True - - def __process_string(self, param_name, param_value): - # Find all param with format ${param} - params = re.findall('\${(\w+)}', param_value) - # Avoid using the same param name in value, like 'WORKSPACE': '${WORKSPACE} some string' - if param_name in params: - ly_build_error('The use of same parameter name({}) in value is not allowed'.format(param_name)) - # Replace ${param} with actual value - for param in params: - param_value = param_value.replace('${' + param + '}', self.get(param)) - return param_value - - def __process_list(self, param_name, param_value): - processed_list = [] - for entry in param_value: - if isinstance(entry, str): - entry = self.__process_string(param_name, entry) - elif isinstance(entry, list): - entry = self.__process_list(param_name, entry) - elif isinstance(entry, dict): - entry = self.__process_dict(param_name, entry) - processed_list.append(entry) - return processed_list - - def __process_dict(self, param_name, param_value): - for key in param_value: - if isinstance(param_value[key], str): - param_value[key] = self.__process_string(param_name, param_value[key]) - elif isinstance(param_value[key], list): - param_value[key] = self.__process_list(param_name, param_value[key]) - elif isinstance(param_value[key], dict): - param_value[key] = self.__process_dict(param_name, param_value[key]) - return param_value \ No newline at end of file diff --git a/scripts/build/package/Platform/3rdParty/package_env.json b/scripts/build/package/Platform/3rdParty/package_env.json deleted file mode 100644 index 5059132664..0000000000 --- a/scripts/build/package/Platform/3rdParty/package_env.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "local_env": { - "S3_PREFIX": "${BRANCH_NAME}/3rdParty" - }, - "types": { - "3rdParty_all": { - "PACKAGE_TARGETS":[ - { - "FILE_LIST": "3rdParty.json", - "FILE_LIST_TYPE": "3rdParty", - "PACKAGE_NAME": "${PACKAGE_NAME_PATTERN}-3rdParty-all-${BUILD_NUMBER}.zip" - } - ], - "BOOTSTRAP_CFG_GAME_FOLDER":"CMakeTestbed", - "SKIP_BUILD": 1, - "SKIP_SCRUBBING": 1 - } - } -} diff --git a/scripts/build/package/Platform/3rdParty/package_filelists/3rdParty.json b/scripts/build/package/Platform/3rdParty/package_filelists/3rdParty.json deleted file mode 100644 index 915368dd0b..0000000000 --- a/scripts/build/package/Platform/3rdParty/package_filelists/3rdParty.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "@3rdParty": { - "3rdParty.txt": "#include", - "AWS/AWSNativeSDK/1.7.167-az.2/**": "#include", - "CMake/3.19.1/**": "#include", - "DirectXShaderCompiler/1.0.1-az.1/**": "#include", - "DirectXShaderCompiler/2020.08.07/**": "#include", - "DirectXShaderCompiler/5.0.0-az/**": "#include", - "dyad/0.2.0-17-amazon/**": "#include", - "etc2comp/2017_04_24-az.2/**": "#include", - "expat/2.1.0-pkg.3/**": "#include", - "FbxSdk/2016.1.2-az.1/**": "#include", - "OpenSSL/1.1.1b-noasm-az/**": "#include", - "Qt/5.15.1.2-az/**": "#include", - "tiff/3.9.5-az.3/**": "#include", - "Wwise/2019.2.8.7432/**": "#include" - } -} \ No newline at end of file diff --git a/scripts/build/package/Platform/Android/package_env.json b/scripts/build/package/Platform/Android/package_env.json deleted file mode 100644 index 017937413a..0000000000 --- a/scripts/build/package/Platform/Android/package_env.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "local_env": { - "S3_PREFIX": "${BRANCH_NAME}/Android" - }, - "types":{ - "all":{ - "PACKAGE_TARGETS":[ - { - "FILE_LIST": "all.json", - "FILE_LIST_TYPE": "All", - "PACKAGE_NAME": "${PACKAGE_NAME_PATTERN}-android-all-${BUILD_NUMBER}.zip" - } - ], - "BOOTSTRAP_CFG_GAME_FOLDER":"AutomatedTesting", - "SKIP_BUILD": 0, - "BUILD_TARGETS":[ - { - "BUILD_CONFIG_FILENAME": "build_config.json", - "PLATFORM": "Android", - "TYPE": "profile" - } - ] - } - } -} diff --git a/scripts/build/package/Platform/Mac/package_env.json b/scripts/build/package/Platform/Mac/package_env.json deleted file mode 100644 index f21c9fdaab..0000000000 --- a/scripts/build/package/Platform/Mac/package_env.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "local_env": { - "S3_PREFIX": "${BRANCH_NAME}/Mac" - }, - "types":{ - "all":{ - "PACKAGE_TARGETS":[ - { - "FILE_LIST": "all.json", - "FILE_LIST_TYPE": "All", - "PACKAGE_NAME": "${PACKAGE_NAME_PATTERN}-mac-all-${BUILD_NUMBER}.zip" - }, - { - "FILE_LIST": "3rdParty.json", - "FILE_LIST_TYPE": "Mac", - "PACKAGE_NAME": "${PACKAGE_NAME_PATTERN}-mac-3rdParty-${BUILD_NUMBER}.zip" - }, - { - "FILE_LIST": "3rdParty.json", - "FILE_LIST_TYPE": "3rdParty", - "PACKAGE_NAME": "${PACKAGE_NAME_PATTERN}-mac-3rdParty-Warsaw-${BUILD_NUMBER}.zip" - } - ], - "BOOTSTRAP_CFG_GAME_FOLDER":"CMakeTestbed", - "SKIP_BUILD": 0, - "BUILD_TARGETS":[ - { - "BUILD_CONFIG_FILENAME": "build_config.json", - "PLATFORM": "Mac", - "TYPE": "profile" - }, - { - "BUILD_CONFIG_FILENAME": "build_config.json", - "PLATFORM": "iOS", - "TYPE": "profile" - } - ] - } - } -} diff --git a/scripts/build/package/Platform/Mac/package_filelists/3rdParty.json b/scripts/build/package/Platform/Mac/package_filelists/3rdParty.json deleted file mode 100644 index ff019f701f..0000000000 --- a/scripts/build/package/Platform/Mac/package_filelists/3rdParty.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "@3rdParty":{ - "3rdParty.txt":"#include", - "AWS/AWSNativeSDK/1.7.167-az.2":{ - "*":"#include", - "include/**":"#include", - "LICENSE*":"#include", - "lib/mac/**":"#include", - "bin/mac/**":"#include", - "lib/ios/**":"#include", - "bin/ios/**":"#include" - }, - "DirectXShaderCompiler/1.0.1-az.1":{ - "*":"#include", - "src/**":"#include", - "bin/darwin_x64/**":"#include" - }, - "DirectXShaderCompiler/2020.08.07":{ - "*":"#include", - "bin/darwin_x64/**":"#include" - }, - "DirectXShaderCompiler/5.0.0-az":{ - "*":"#include", - "bin/darwin_x64/**":"#include" - }, - "etc2comp/2017_04_24-az.2":{ - "*":"#include", - "EtcLib/Etc/**":"#include", - "EtcLib/EtcCodec/**":"#include", - "EtcLib/*":"#include", - "EtcLib/OSX_x86/**":"#include" - }, - "expat/2.1.0-pkg.3":{ - "*":"#include", - "amiga/**":"#include", - "bcb5/**":"#include", - "conftools/**":"#include", - "doc/**":"#include", - "examples/**":"#include", - "lib/**":"#include", - "m4/**":"#include", - "tests/**":"#include", - "vms/**":"#include", - "win32/**":"#include", - "xmlwf/**":"#include", - "build/osx/**":"#include" - }, - "FreeType2/2.5.0.1-pkg.3":{ - "freetype-2.5.0.1/**":"#include", - "dist/**":"#include", - "mac/**":"#include", - "ios*/**":"#include", - "build/osx/**":"#include" - }, - "Redistributables/FbxSdk/2016.1.2":{ - "*mac*":"#include" - }, - "OpenSSL/1.1.1b-noasm-az":{ - "include/**":"#include", - "ssl/**":"#include", - "LICENSE":"#include", - "bin/**":"#include", - "lib/darwin*/**":"#include", - "lib/ios*/**":"#include" - }, - "Qt/5.15.1.2-az":{ - "LICENSE":"#include", - "LGPL_EXCEPTION.TXT":"#include", - "LICENSE.GPLV3":"#include", - "LICENSE.LGPLV3":"#include", - "QT-NOTICE.TXT":"#include", - "clang_64/**":"#include" - }, - "tiff/3.9.5-az.3":{ - "COPYRIGHT":"#include", - "README":"#include", - "RELEASE-DATE":"#include", - "VERSION":"#include", - "libtiff/macosx_clang/**":"#include" - } - } -} \ No newline at end of file diff --git a/scripts/build/package/Platform/Windows/package_env.json b/scripts/build/package/Platform/Windows/package_env.json deleted file mode 100644 index bfe526bc16..0000000000 --- a/scripts/build/package/Platform/Windows/package_env.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "local_env": { - "S3_PREFIX": "${BRANCH_NAME}/Windows" - }, - "types":{ - "all":{ - "PACKAGE_TARGETS":[ - { - "FILE_LIST": "all.json", - "FILE_LIST_TYPE": "All", - "PACKAGE_NAME": "${PACKAGE_NAME_PATTERN}-windows-all-${BUILD_NUMBER}.zip" - }, - { - "FILE_LIST": "symbols.json", - "FILE_LIST_TYPE": "All", - "PACKAGE_NAME": "${PACKAGE_NAME_PATTERN}-windows-all-symbols-${BUILD_NUMBER}.zip" - }, - { - "FILE_LIST": "3rdParty.json", - "FILE_LIST_TYPE": "Windows", - "PACKAGE_NAME": "${PACKAGE_NAME_PATTERN}-windows-3rdparty-${BUILD_NUMBER}.zip" - } - ], - "BOOTSTRAP_CFG_GAME_FOLDER":"CMakeTestbed", - "SKIP_BUILD": 0, - "BUILD_TARGETS":[ - { - "BUILD_CONFIG_FILENAME": "build_config.json", - "PLATFORM": "Windows", - "TYPE": "profile" - } - ] - } - } -} diff --git a/scripts/build/package/Platform/Windows/package_filelists/3rdParty.json b/scripts/build/package/Platform/Windows/package_filelists/3rdParty.json deleted file mode 100644 index d9e5d85090..0000000000 --- a/scripts/build/package/Platform/Windows/package_filelists/3rdParty.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "@3rdParty":{ - "3rdParty.txt":"#include", - "AMD/AGS Lib/2.2":{ - "*":"#include", - "inc/**":"#include", - "lib/x64/**":"#include" - }, - "AWS/AWSNativeSDK/1.7.167-az.2":{ - "*":"#include", - "include/**":"#include", - "LICENSE*":"#include", - "lib/windows/**":"#include", - "bin/windows/**":"#include", - "lib/android/arm64-v8a/**":"#include", - "bin/android/arm64-v8a/**":"#include", - "bin/linux/**":"#include", - "lib/linux/**":"#include" - }, - "DirectXShaderCompiler/1.0.1-az.1":{ - "*":"#include", - "src/**":"#include", - "bin/win_x64/**":"#include" - }, - "DirectXShaderCompiler/2020.08.07":{ - "*":"#include", - "bin/win_x64/**":"#include" - }, - "DirectXShaderCompiler/5.0.0-az":{ - "*":"#include", - "bin/win_x64/**":"#include" - }, - "dyad/0.2.0-17-amazon":{ - "*":"#include", - "doc/**":"#include", - "example/**":"#include", - "projects/**":"#include", - "src/**":"#include", - "lib/x64_v140_Debug/**":"#include", - "lib/x64_v140_Release/**":"#include", - "lib/linux_debug/**":"#include", - "lib/linux_release/**":"#include" - }, - "etc2comp/2017_04_24-az.2":{ - "EtcLib/Etc/**":"#include", - "EtcLib/EtcCodec/**":"#include", - "LICENSE":"#include", - "EtcLib/Windows_x86_64/**":"#include", - "EtcLib/Linux_x64_linux/**":"#include" - }, - "expat/2.1.0-pkg.3":{ - "*":"#include", - "amiga/**":"#include", - "bcb5/**":"#include", - "conftools/**":"#include", - "doc/**":"#include", - "examples/**":"#include", - "lib/**":"#include", - "m4/**":"#include", - "tests/**":"#include", - "vms/**":"#include", - "win32/**":"#include", - "xmlwf/**":"#include", - "build/win_x64/vc140/**":"#include", - "build/win_x64/android_ndk_r12/android-*/**":"#include", - "build/linux/**":"#include" - }, - "FreeType2/2.5.0.1-pkg.3":{ - "freetype-2.5.0.1/**":"#include", - "dist/**":"#include", - "vc140_x64/**":"#include", - "build/win_x64/vc140/**":"#include", - "android*/**":"#include", - "build/win_x64/android_ndk_r12/android-*/**":"#include", - "build/linux/clang-3.4/**":"#include" - }, - "Redistributables/FbxSdk/2016.1.2":{ - "*win*":"#include", - "*vs2013*":"#exclude" - }, - "OpenSSL/1.1.1b-noasm-az":{ - "include/**":"#include", - "ssl/**":"#include", - "LICENSE":"#include", - "bin/**":"#include", - "lib/vc140_x64_debug/**":"#include", - "lib/vc140_x64_release/**":"#include", - "lib/android_ndk_r15c/android-*/**":"#include", - "lib/linux-x86_64-clang-debug/**":"#include", - "lib/linux-x86_64-clang-release/**":"#include" - }, - "Qt/5.15.1.2-az":{ - "LICENSE":"#include", - "LGPL_EXCEPTION.TXT":"#include", - "LICENSE.GPLV3":"#include", - "LICENSE.LGPLV3":"#include", - "QT-NOTICE.TXT":"#include", - "msvc*/**":"#include", - "gcc_64/**":"#include" - }, - "tiff/3.9.5-az.3":{ - "COPYRIGHT":"#include", - "README":"#include", - "RELEASE-DATE":"#include", - "VERSION":"#include", - "libtiff/buildLib32Lib64.bat":"#include", - "libtiff/readme.txt":"#include", - "include/libtiff/*.h":"#include", - "libtiff/*vc140.lib":"#include", - "libtiff/linux_gcc/**":"#include" - } - } -} \ No newline at end of file diff --git a/scripts/build/package/glob3.py b/scripts/build/package/glob3.py deleted file mode 100755 index b46683a4be..0000000000 --- a/scripts/build/package/glob3.py +++ /dev/null @@ -1,163 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -import os -import re -import fnmatch - -__all__ = ["glob", "iglob", "escape"] - -def glob(pathname, recursive=False): - """Return a list of paths matching a pathname pattern. - The pattern may contain simple shell-style wildcards a la - fnmatch. However, unlike fnmatch, filenames starting with a - dot are special cases that are not matched by '*' and '?' - patterns. - If recursive is true, the pattern '**' will match any files and - zero or more directories and subdirectories. - """ - return list(iglob(pathname, recursive=recursive)) - -def iglob(pathname, recursive=False): - """Return an iterator which yields the paths matching a pathname pattern. - The pattern may contain simple shell-style wildcards a la - fnmatch. However, unlike fnmatch, filenames starting with a - dot are special cases that are not matched by '*' and '?' - patterns. - If recursive is true, the pattern '**' will match any files and - zero or more directories and subdirectories. - """ - it = _iglob(pathname, recursive, False) - if recursive and _isrecursive(pathname): - s = next(it) # skip empty string - assert not s - return it - -def _iglob(pathname, recursive, dironly): - dirname, basename = os.path.split(pathname) - if not has_magic(pathname): - assert not dironly - if basename: - if os.path.lexists(pathname): - yield pathname - else: - # Patterns ending with a slash should match only directories - if os.path.isdir(dirname): - yield pathname - return - if not dirname: - if recursive and _isrecursive(basename): - yield _glob2(dirname, basename, dironly) - else: - yield _glob1(dirname, basename, dironly) - return - # `os.path.split()` returns the argument itself as a dirname if it is a - # drive or UNC path. Prevent an infinite recursion if a drive or UNC path - # contains magic characters (i.e. r'\\?\C:'). - if dirname != pathname and has_magic(dirname): - dirs = _iglob(dirname, recursive, True) - else: - dirs = [dirname] - if has_magic(basename): - if recursive and _isrecursive(basename): - glob_in_dir = _glob2 - else: - glob_in_dir = _glob1 - else: - glob_in_dir = _glob0 - for dirname in dirs: - for name in glob_in_dir(dirname, basename, dironly): - yield os.path.join(dirname, name) - -# These 2 helper functions non-recursively glob inside a literal directory. -# They return a list of basenames. _glob1 accepts a pattern while _glob0 -# takes a literal basename (so it only has to check for its existence). - -def _glob1(dirname, pattern, dironly): - names = list(_iterdir(dirname, dironly)) - return fnmatch.filter(names, pattern) - -def _glob0(dirname, basename, dironly): - if not basename: - # `os.path.split()` returns an empty basename for paths ending with a - # directory separator. 'q*x/' should match only directories. - if os.path.isdir(dirname): - return [basename] - else: - if os.path.lexists(os.path.join(dirname, basename)): - return [basename] - return [] - -# Following functions are not public but can be used by third-party code. - -def glob0(dirname, pattern): - return _glob0(dirname, pattern, False) - -def glob1(dirname, pattern): - return _glob1(dirname, pattern, False) - -# This helper function recursively yields relative pathnames inside a literal -# directory. - -def _glob2(dirname, pattern, dironly): - assert _isrecursive(pattern) - return [pattern[:0]] + list(_rlistdir(dirname, dironly)) - -# If dironly is false, yields all file names inside a directory. -# If dironly is true, yields only directory names. -def _iterdir(dirname, dironly): - if not dirname: - if isinstance(dirname, bytes): - dirname = bytes(os.curdir, 'ASCII') - else: - dirname = os.curdir - try: - for entry in os.listdir(dirname): - yield entry - except OSError: - return - -# Recursively yields relative pathnames inside a literal directory. -def _rlistdir(dirname, dironly): - if not os.path.islink(dirname): - names = list(_iterdir(dirname, dironly)) - for x in names: - yield x - path = os.path.join(dirname, x) if dirname else x - for y in _rlistdir(path, dironly): - yield os.path.join(x, y) -magic_check = re.compile('([*?[])') -magic_check_bytes = re.compile(b'([*?[])') - -def has_magic(s): - if isinstance(s, bytes): - match = magic_check_bytes.search(s) - else: - match = magic_check.search(s) - return match is not None - -def _ishidden(path): - return path[0] in ('.', b'.'[0]) - -def _isrecursive(pattern): - if isinstance(pattern, bytes): - return pattern == b'**' - else: - return pattern == '**' - -def escape(pathname): - """Escape all special characters. - """ - # Escaping is done by wrapping any of "*?[" between square brackets. - # Metacharacters do not work in the drive part and shouldn't be escaped. - drive, pathname = os.path.splitdrive(pathname) - if isinstance(pathname, bytes): - pathname = magic_check_bytes.sub(br'[\1]', pathname) - else: - pathname = magic_check.sub(r'[\1]', pathname) - return drive + pathname \ No newline at end of file diff --git a/scripts/build/package/package.py b/scripts/build/package/package.py deleted file mode 100755 index d33601ba45..0000000000 --- a/scripts/build/package/package.py +++ /dev/null @@ -1,187 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# -import os -import sys -import zipfile -import timeit -import progressbar -from optparse import OptionParser -from PackageEnv import PackageEnv -cur_dir = cur_dir = os.path.dirname(os.path.abspath(__file__)) -sys.path.insert(0, f'{cur_dir}/..') -from ci_build import build -from util import * -from glob3 import glob - - -def package(options): - package_env = PackageEnv(options.platform, options.type, options.package_env) - - if not package_env.get('SKIP_BUILD'): - print(package_env.get('SKIP_BUILD')) - print('SKIP_BUILD is False, running CMake build...') - cmake_build(package_env) - - # TODO Compile Assets - #if package_env.exists('ASSET_PROCESSOR_PATH'): - # compile_assets(package_env) - - #create packages - package_targets = package_env.get('PACKAGE_TARGETS') - for package_target in package_targets: - create_package(package_env, package_target) - upload_package(package_env, package_target) - - -def get_python_path(package_env): - if sys.platform == 'win32': - return os.path.join(package_env.get('ENGINE_ROOT'), 'python', 'python.cmd') - else: - return os.path.join(package_env.get('ENGINE_ROOT'), 'python', 'python.sh') - - -def cmake_build(package_env): - build_targets = package_env.get('BUILD_TARGETS') - for build_target in build_targets: - build(build_target['BUILD_CONFIG_FILENAME'], build_target['PLATFORM'], build_target['TYPE']) - - -def create_package(package_env, package_target): - print('Creating zipfile for package target {}'.format(package_target)) - cur_dir = os.path.dirname(os.path.abspath(__file__)) - file_list_type = package_target['FILE_LIST_TYPE'] - if file_list_type == 'All': - filelist = os.path.join(cur_dir, 'package_filelists', package_target['FILE_LIST']) - else: - filelist = os.path.join(cur_dir, 'Platform', file_list_type, 'package_filelists', package_target['FILE_LIST']) - with open(filelist, 'r') as source: - data = json.load(source) - lyengine = package_env.get('ENGINE_ROOT') - print('Calculating filelists...') - files = {} - - if '@lyengine' in data: - files.update(filter_files(data['@lyengine'], lyengine)) - if '@3rdParty' in data: - files.update(filter_files(data['@3rdParty'], package_env.get('THIRDPARTY_HOME'))) - package_path = os.path.join(lyengine, package_target['PACKAGE_NAME']) - print('Creating zipfile at {}'.format(package_path)) - start = timeit.default_timer() - with progressbar.ProgressBar(max_value=len(files), redirect_stderr=True) as bar: - with zipfile.ZipFile(package_path, 'w', compression=zipfile.ZIP_DEFLATED, allowZip64=True) as myzip: - i = 0 - bar.update(i) - last_bar_update = timeit.default_timer() - for f in files: - if os.path.islink(f): - zipInfo = zipfile.ZipInfo(files[f]) - zipInfo.create_system = 3 - # long type of hex val of '0xA1ED0000L', - # say, symlink attr magic... - zipInfo.external_attr |= 0xA0000000 - myzip.writestr(zipInfo, os.readlink(f)) - else: - myzip.write(f, files[f]) - i += 1 - # Update progress bar every 2 minutes - if int(timeit.default_timer() - last_bar_update) > 120: - last_bar_update = timeit.default_timer() - bar.update(i) - bar.update(i) - - stop = timeit.default_timer() - total_time = int(stop - start) - print('{} is created. Total time: {} seconds.'.format(package_path, total_time)) - - def get_MD5(file_path): - from hashlib import md5 - chunk_size = 200 * 1024 - h = md5() - with open(file_path, 'rb') as f: - while True: - chunk = f.read(chunk_size) - if len(chunk): - h.update(chunk) - else: - break - return h.hexdigest() - - md5_file = '{}.MD5'.format(package_path) - print('Creating MD5 file at {}'.format(md5_file)) - start = timeit.default_timer() - with open(md5_file, 'w') as output: - output.write(get_MD5(package_path)) - stop = timeit.default_timer() - total_time = int(stop - start) - print('{} is created. Total time: {} seconds.'.format(md5_file, total_time)) - - -def upload_package(package_env, package_target): - package_name = package_target['PACKAGE_NAME'] - engine_root = package_env.get('ENGINE_ROOT') - internal_s3_bucket = package_env.get('INTERNAL_S3_BUCKET') - qa_s3_bucket = package_env.get('QA_S3_BUCKET') - s3_prefix = package_env.get('S3_PREFIX') - print(f'Uploading {package_name} to S3://{internal_s3_bucket}/{s3_prefix}/{package_name}') - cmd = ['aws', 's3', 'cp', os.path.join(engine_root, package_name), f's3://{internal_s3_bucket}/{s3_prefix}/{package_name}'] - execute_system_call(cmd, stdout=subprocess.DEVNULL) - print(f'Uploading {package_name} to S3://{qa_s3_bucket}/{s3_prefix}/{package_name}') - cmd = ['aws', 's3', 'cp', os.path.join(engine_root, package_name), f's3://{qa_s3_bucket}/{s3_prefix}/{package_name}', '--acl', 'bucket-owner-full-control'] - execute_system_call(cmd, stdout=subprocess.DEVNULL) - - -def filter_files(data, base, prefix='', support_symlinks=True): - includes = {} - excludes = set() - for key, value in data.items(): - pattern = os.path.join(base, prefix, key) - if not isinstance(value, dict): - pattern = os.path.normpath(pattern) - result = glob(pattern, recursive=True) - files = [x for x in result if os.path.isfile(x) or (support_symlinks and os.path.islink(x))] - if value == "#exclude": - excludes.update(files) - elif value == "#include": - for file in files: - includes[file] = os.path.relpath(file, base) - else: - if value.startswith('#move:'): - for file in files: - file_name = os.path.relpath(file, os.path.join(base, prefix)) - dst_dir = value.replace('#move:', '').strip(' ') - includes[file] = os.path.join(dst_dir, file_name) - elif value.startswith('#rename:'): - for file in files: - dst_file = value.replace('#rename:', '').strip(' ') - includes[file] = dst_file - else: - warn('Unknown directive {} for pattern {}'.format(value, pattern)) - else: - includes.update(filter_files(value, base, os.path.join(prefix, key), support_symlinks)) - - for exclude in excludes: - try: - includes.pop(exclude) - except KeyError: - pass - return includes - - -def parse_args(): - parser = OptionParser() - parser.add_option("--platform", dest="platform", default='consoles', help="Target platform to package") - parser.add_option("--type", dest="type", default='consoles', help="Package type") - parser.add_option("--package_env", dest="package_env", default="package_env.json", - help="JSON file that defines package environment variables") - (options, args) = parser.parse_args() - return options, args - - -if __name__ == "__main__": - (options, args) = parse_args() - package(options) diff --git a/scripts/build/package/package_env.json b/scripts/build/package/package_env.json deleted file mode 100644 index 732ff12286..0000000000 --- a/scripts/build/package/package_env.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "global_env":{ - "ENGINE_ROOT":"", - "THIRDPARTY_HOME":"", - "BRANCH_NAME":"", - "PACKAGE_NAME_PATTERN":"${BRANCH_NAME}-spectra", - "BUILD_NUMBER":"0", - "INTERNAL_S3_BUCKET": "ly-spectra-packages", - "QA_S3_BUCKET": "amazon.ly.lionbridgeshare/ly-spectra-packages" - } -} diff --git a/scripts/build/package/package_filelists/all.json b/scripts/build/package/package_filelists/all.json deleted file mode 100644 index b1f3f270ca..0000000000 --- a/scripts/build/package/package_filelists/all.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "@lyengine": { - "**": "#include", - ".git/**": "#exclude", - ".gitattributes": "#exclude", - ".gitignore": "#exclude", - ".gitmodules": "#exclude", - ".lfsconfig": "#exclude", - ".p4ignore": "#exclude", - ".submodules": "#exclude", - "**/*.pyc": "#exclude", - "**/*.pdb": "#exclude", - "build/*/packages/*/*.stamp": "#exclude" - } -} \ No newline at end of file diff --git a/scripts/build/package/package_filelists/symbols.json b/scripts/build/package/package_filelists/symbols.json deleted file mode 100644 index 3f30f6ec1f..0000000000 --- a/scripts/build/package/package_filelists/symbols.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "@lyengine": { - "**/*.pdb": "#include" - } -} \ No newline at end of file diff --git a/scripts/build/package/platform_exclusions.json b/scripts/build/package/platform_exclusions.json deleted file mode 100644 index f54aeb07c9..0000000000 --- a/scripts/build/package/platform_exclusions.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "all": { - "@lyengine": { - "**/Gems/Atom/RHI/DX12/External/pix/**": "#exclude", - "**/.idea/**": "#exclude", - "**/*.csproj*": "#exclude", - "**/.owner": "#exclude", - "**/WinPixEventRuntime.dll": "#exclude", - "**/XenonConsole.exe": "#exclude" - } - } -} diff --git a/scripts/o3de.py b/scripts/o3de.py index 05c3b53ba6..bf3bd32a52 100755 --- a/scripts/o3de.py +++ b/scripts/o3de.py @@ -7,20 +7,25 @@ # import argparse +import logging import pathlib import sys +logger = logging.getLogger('o3de') -def add_args(parser, subparsers) -> None: + +def add_args(parser: argparse.ArgumentParser) -> None: """ add_args is called to add expected parser arguments and subparsers arguments to each command such that it can be invoked by o3de.py Ex o3de.py can invoke the register downloadable commands by importing register, call add_args and execute: python o3de.py register --gem-path "C:/TestGem" - :param parser: the caller instantiates a parser and passes it in here - :param subparsers: the caller instantiates subparsers and passes it in here + :param parser: the caller instantiates an ArgumentParser and passes it in here """ + subparsers = parser.add_subparsers(help='To get help on a sub-command:\no3de.py -h', + title='Sub-Commands') + # As o3de.py shares the same name as the o3de package attempting to use a regular # from o3de import line tries to import from the current o3de.py script and not the package # So the {current script directory} / 'o3de' is added to the front of the sys.path @@ -28,24 +33,25 @@ def add_args(parser, subparsers) -> None: o3de_package_dir = (script_dir / 'o3de').resolve() # add the scripts/o3de directory to the front of the sys.path sys.path.insert(0, str(o3de_package_dir)) - from o3de import engine_properties, engine_template, gem_properties, global_project, register, print_registration, get_registration, \ + from o3de import engine_properties, engine_template, gem_properties, \ + global_project, register, print_registration, get_registration, \ enable_gem, disable_gem, project_properties, sha256, download # Remove the temporarily added path sys.path = sys.path[1:] - # global_project + # global project global_project.add_args(subparsers) - # engine templaate + # engine template engine_template.add_args(subparsers) - # register + # registration register.add_args(subparsers) - # show + # show registration print_registration.add_args(subparsers) - # get-registered + # get registration get_registration.add_args(subparsers) # add a gem to a project @@ -74,11 +80,8 @@ if __name__ == "__main__": # parse the command line args the_parser = argparse.ArgumentParser() - # add subparsers - the_subparsers = the_parser.add_subparsers(help='sub-command help') - # add args to the parser - add_args(the_parser, the_subparsers) + add_args(the_parser) # parse args the_args = the_parser.parse_args() @@ -89,7 +92,8 @@ if __name__ == "__main__": sys.exit(1) # run - ret = the_args.func(the_args) + ret = the_args.func(the_args) if hasattr(the_args, 'func') else 1 + logger.info('Success!' if ret == 0 else 'Completed with issues: result {}'.format(ret)) # return sys.exit(ret) diff --git a/scripts/o3de/o3de/cmake.py b/scripts/o3de/o3de/cmake.py index ffac496387..ec970d06f4 100644 --- a/scripts/o3de/o3de/cmake.py +++ b/scripts/o3de/o3de/cmake.py @@ -13,10 +13,10 @@ import logging import os import pathlib -from o3de import manifest +from o3de import manifest, utils -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.cmake') +logging.basicConfig(format=utils.LOG_FORMAT) enable_gem_start_marker = 'set(ENABLED_GEMS' enable_gem_end_marker = ')' diff --git a/scripts/o3de/o3de/disable_gem.py b/scripts/o3de/o3de/disable_gem.py index 158507fca1..0b0e465d12 100644 --- a/scripts/o3de/o3de/disable_gem.py +++ b/scripts/o3de/o3de/disable_gem.py @@ -15,10 +15,10 @@ import os import pathlib import sys -from o3de import cmake, manifest +from o3de import cmake, manifest, utils -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.disable_gem') +logging.basicConfig(format=utils.LOG_FORMAT) def disable_gem_in_project(gem_name: str = None, @@ -73,7 +73,6 @@ def disable_gem_in_project(gem_name: str = None, logger.error(f'Gem Path {gem_path} does not exist.') return 1 - # Read gem.json from the gem path gem_json_data = manifest.get_gem_json_data(gem_path=gem_path, project_path=project_path) if not gem_json_data: @@ -116,6 +115,10 @@ def add_parser_args(parser): Ex. Directly run from this file alone with: python disable_gem.py --project-path D:/Test --gem-name Atom :param parser: the caller passes an argparse parser like instance to this method """ + + # Sub-commands should declare their own verbosity flag, if desired + utils.add_verbosity_arg(parser) + group = parser.add_mutually_exclusive_group(required=True) group.add_argument('-pp', '--project-path', type=pathlib.Path, required=False, help='The path to the project.') @@ -155,8 +158,6 @@ def main(): # parse the command line args the_parser = argparse.ArgumentParser() - # add subparsers - # add args to the parser add_parser_args(the_parser) @@ -165,6 +166,7 @@ def main(): # run ret = the_args.func(the_args) if hasattr(the_args, 'func') else 1 + logger.info('Success!' if ret == 0 else 'Completed with issues: result {}'.format(ret)) # return sys.exit(ret) diff --git a/scripts/o3de/o3de/download.py b/scripts/o3de/o3de/download.py index e88355bf06..8e28561e50 100644 --- a/scripts/o3de/o3de/download.py +++ b/scripts/o3de/o3de/download.py @@ -24,8 +24,9 @@ from datetime import datetime from o3de import manifest, repo, utils, validation, register -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.download') +logging.basicConfig(format=utils.LOG_FORMAT) + def unzip_manifest_json_data(download_zip_path: pathlib.Path, zip_file_name: str) -> dict: json_data = {} @@ -38,6 +39,7 @@ def unzip_manifest_json_data(download_zip_path: pathlib.Path, zip_file_name: str return json_data + def validate_downloaded_zip_sha256(download_uri_json_data: dict, download_zip_path: pathlib.Path, manifest_json_name) -> int: # if the json has a sha256 check it against a sha256 of the zip diff --git a/scripts/o3de/o3de/enable_gem.py b/scripts/o3de/o3de/enable_gem.py index 1614dc4eda..fc4dc6e9cf 100644 --- a/scripts/o3de/o3de/enable_gem.py +++ b/scripts/o3de/o3de/enable_gem.py @@ -16,10 +16,10 @@ import os import pathlib import sys -from o3de import cmake, manifest, register, validation +from o3de import cmake, manifest, register, validation, utils -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.enable_gem') +logging.basicConfig(format=utils.LOG_FORMAT) def enable_gem_in_project(gem_name: str = None, @@ -132,6 +132,10 @@ def add_parser_args(parser): Ex. Directly run from this file alone with: python enable_gem.py --project-path "D:/TestProject" --gem-path "D:/TestGem" :param parser: the caller passes an argparse parser like instance to this method """ + + # Sub-commands should declare their own verbosity flag, if desired + utils.add_verbosity_arg(parser) + group = parser.add_mutually_exclusive_group(required=True) group.add_argument('-pp', '--project-path', type=pathlib.Path, required=False, help='The path to the project.') @@ -171,8 +175,6 @@ def main(): # parse the command line args the_parser = argparse.ArgumentParser() - # add subparsers - # add args to the parser add_parser_args(the_parser) @@ -181,6 +183,7 @@ def main(): # run ret = the_args.func(the_args) if hasattr(the_args, 'func') else 1 + logger.info('Success!' if ret == 0 else 'Completed with issues: result {}'.format(ret)) # return sys.exit(ret) diff --git a/scripts/o3de/o3de/engine_properties.py b/scripts/o3de/o3de/engine_properties.py index 92930dbb1c..636e32704e 100644 --- a/scripts/o3de/o3de/engine_properties.py +++ b/scripts/o3de/o3de/engine_properties.py @@ -15,8 +15,9 @@ import logging from o3de import manifest, utils -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.engine_properties') +logging.basicConfig(format=utils.LOG_FORMAT) + def edit_engine_props(engine_path: pathlib.Path = None, engine_name: str = None, @@ -25,6 +26,11 @@ def edit_engine_props(engine_path: pathlib.Path = None, if not engine_path and not engine_name: logger.error(f'Either a engine path or a engine name must be supplied to lookup engine.json') return 1 + + if not new_name and not new_version: + logger.error('A new engine name or new version, or both must be supplied.') + return 1 + if not engine_path: engine_path = manifest.get_registered(engine_name=engine_name) diff --git a/scripts/o3de/o3de/engine_template.py b/scripts/o3de/o3de/engine_template.py index e93f972301..369086c9c3 100755 --- a/scripts/o3de/o3de/engine_template.py +++ b/scripts/o3de/o3de/engine_template.py @@ -20,8 +20,8 @@ import re from o3de import manifest, register, validation, utils -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.engine_template') +logging.basicConfig(format=utils.LOG_FORMAT) binary_file_ext = { '.pak', @@ -86,6 +86,7 @@ restricted_platforms = { template_file_name = 'template.json' this_script_parent = pathlib.Path(os.path.dirname(os.path.realpath(__file__))) + def _replace_license_text(source_data: str): while '{BEGIN_LICENSE}' in source_data: start = source_data.find('{BEGIN_LICENSE}') @@ -181,7 +182,7 @@ def _execute_template_json(json_data: dict, # regular copy if not templated for copy_file in json_data['copyFiles']: # construct the input file name - in_file = template_path / 'Template' /copy_file['file'] + in_file = template_path / 'Template' / copy_file['file'] # the file can be marked as optional, if it is and it does not exist skip if copy_file['isOptional'] and copy_file['isOptional'] == 'true': @@ -246,7 +247,7 @@ def _execute_restricted_template_json(json_data: dict, for copy_file in json_data['copyFiles']: # construct the input file name in_file = template_restricted_path / restricted_platform / template_restricted_platform_relative_path\ - / template_name / 'Template'/ copy_file['file'] + / template_name / 'Template' / copy_file['file'] # the file can be marked as optional, if it is and it does not exist skip if copy_file['isOptional'] and copy_file['isOptional'] == 'true': @@ -364,7 +365,7 @@ def create_template(source_path: pathlib.Path, keep_restricted_in_template: bool = False, keep_license_text: bool = False, replace: list = None, - force: bool = False) -> int: + force: bool = False) -> int: """ Create a template from a source directory using replacement @@ -1205,12 +1206,12 @@ def create_from_template(destination_path: pathlib.Path, # something is wrong with either the --template-restricted-platform-relative or the template is. if template_restricted_platform_relative_path != template_json_restricted_platform_relative_path: logger.error(f'The supplied --template-restricted-platform-relative-path' - f' "{template_restricted_platform_relative_path}" does not match the' - f' templates.json "restricted_platform_relative_path". Either' - f' --template-restricted-platform-relative-path is incorrect or the templates' - f' "restricted_platform_relative_path" is wrong. Note that since this template' - f' specifies "restricted_platform_relative_path" it need not be supplied and' - f' "{template_json_restricted_platform_relative_path}" will be used.') + f' "{template_restricted_platform_relative_path}" does not match the' + f' templates.json "restricted_platform_relative_path". Either' + f' --template-restricted-platform-relative-path is incorrect or the templates' + f' "restricted_platform_relative_path" is wrong. Note that since this template' + f' specifies "restricted_platform_relative_path" it need not be supplied and' + f' "{template_json_restricted_platform_relative_path}" will be used.') return 1 else: # The user has not supplied --template-restricted-platform-relative-path, try to read it from @@ -1306,7 +1307,7 @@ def create_from_template(destination_path: pathlib.Path, os.makedirs(destination_restricted_path, exist_ok=True) # read the restricted_name from the destination restricted.json - restricted_json = destination_restricted_path / restricted.json + restricted_json = destination_restricted_path / 'restricted.json' if not os.path.isfile(restricted_json): with open(restricted_json, 'w') as s: restricted_json_data = {} @@ -1956,7 +1957,6 @@ def create_gem(gem_path: pathlib.Path, replacements.append(("${NameLower}", gem_name.lower())) replacements.append(("${SanitizedCppName}", sanitized_cpp_name)) - # module id is a uuid with { and - if module_id: replacements.append(("${ModuleClassId}", module_id)) @@ -2157,8 +2157,13 @@ def add_args(subparsers) -> None: call add_args and execute: python o3de.py create-gem --gem-path TestGem :param subparsers: the caller instantiates subparsers and passes it in here """ + # turn a directory into a template create_template_subparser = subparsers.add_parser('create-template') + + # Sub-commands should declare their own verbosity flag, if desired + utils.add_verbosity_arg(create_template_subparser) + create_template_subparser.add_argument('-sp', '--source-path', type=pathlib.Path, required=True, help='The path to the source that you want to make into a template') create_template_subparser.add_argument('-tp', '--template-path', type=pathlib.Path, required=False, @@ -2233,6 +2238,10 @@ def add_args(subparsers) -> None: # create from template create_from_template_subparser = subparsers.add_parser('create-from-template') + + # Sub-commands should declare their own verbosity flag, if desired + utils.add_verbosity_arg(create_from_template_subparser) + create_from_template_subparser.add_argument('-dp', '--destination-path', type=pathlib.Path, required=True, help='The path to where you want the template instantiated,' ' can be absolute or relative to the current working directory.' @@ -2316,6 +2325,10 @@ def add_args(subparsers) -> None: # creation of a project from a template (like create from template but makes project assumptions) create_project_subparser = subparsers.add_parser('create-project') + + # Sub-commands should declare their own verbosity flag, if desired + utils.add_verbosity_arg(create_project_subparser) + create_project_subparser.add_argument('-pp', '--project-path', type=pathlib.Path, required=True, help='The location of the project you wish to create from the template,' ' can be an absolute path or relative to the current working directory.' @@ -2330,7 +2343,7 @@ def add_args(subparsers) -> None: group = create_project_subparser.add_mutually_exclusive_group(required=False) group.add_argument('-tp', '--template-path', type=pathlib.Path, required=False, default=None, - help='the path to the template you want to instance, can be absolute or' + help='The path to the template you want to instance, can be absolute or' ' relative to default templates path') group.add_argument('-tn', '--template-name', type=str, required=False, default=None, @@ -2340,7 +2353,7 @@ def add_args(subparsers) -> None: group = create_project_subparser.add_mutually_exclusive_group(required=False) group.add_argument('-prp', '--project-restricted-path', type=pathlib.Path, required=False, default=None, - help='path to the projects restricted folder, can be absolute or relative to' + help='The path to the projects restricted folder, can be absolute or relative to' ' the default restricted projects directory') group.add_argument('-prn', '--project-restricted-name', type=str, required=False, default=None, @@ -2351,7 +2364,7 @@ def add_args(subparsers) -> None: group.add_argument('-trp', '--template-restricted-path', type=pathlib.Path, required=False, default=None, help='The templates restricted path can be absolute or relative to' - 'the default restricted templates directory') + ' the default restricted templates directory') group.add_argument('-trn', '--template-restricted-name', type=str, required=False, default=None, help='The name of the registered templates restricted path. If supplied this will resolve' @@ -2413,6 +2426,10 @@ def add_args(subparsers) -> None: # creation of a gem from a template (like create from template but makes gem assumptions) create_gem_subparser = subparsers.add_parser('create-gem') + + # Sub-commands should declare their own verbosity flag, if desired + utils.add_verbosity_arg(create_gem_subparser) + create_gem_subparser.add_argument('-gp', '--gem-path', type=pathlib.Path, required=True, help='The gem path, can be absolute or relative to the current working directory') create_gem_subparser.add_argument('-gn', '--gem-name', type=str, @@ -2512,16 +2529,18 @@ if __name__ == "__main__": the_parser = argparse.ArgumentParser() # add subparsers - the_subparsers = the_parser.add_subparsers(help='sub-command help', dest='command', required=True) + subparsers = the_parser.add_subparsers(help='To get help on a sub-command:\nengine_template.py -h', + title='Sub-Commands', dest='command', required=True) - # add args to the parser - add_args(the_subparsers) + # add args to the parsers + add_args(subparsers) # parse args the_args = the_parser.parse_args() # run ret = the_args.func(the_args) if hasattr(the_args, 'func') else 1 + logger.info('Success!' if ret == 0 else 'Completed with issues: result {}'.format(ret)) # return sys.exit(ret) diff --git a/scripts/o3de/o3de/gem_properties.py b/scripts/o3de/o3de/gem_properties.py index faaa4f86ec..423dc47115 100644 --- a/scripts/o3de/o3de/gem_properties.py +++ b/scripts/o3de/o3de/gem_properties.py @@ -15,8 +15,8 @@ import logging from o3de import manifest, utils -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.gem_properties') +logging.basicConfig(format=utils.LOG_FORMAT) def update_values_in_key_list(existing_values: list, new_values: list or str, remove_values: list or str, diff --git a/scripts/o3de/o3de/get_registration.py b/scripts/o3de/o3de/get_registration.py index 8b8d53a8b0..675d1d009e 100644 --- a/scripts/o3de/o3de/get_registration.py +++ b/scripts/o3de/o3de/get_registration.py @@ -12,17 +12,18 @@ import sys from o3de import manifest + def _run_get_registered(args: argparse) -> str or pathlib.Path: if args.override_home_folder: manifest.override_home_folder = args.override_home_folder return manifest.get_registered(args.engine_name, - args.project_name, - args.gem_name, - args.template_name, - args.default_folder, - args.repo_name, - args.restricted_name) + args.project_name, + args.gem_name, + args.template_name, + args.default_folder, + args.repo_name, + args.restricted_name) def add_parser_args(parser): diff --git a/scripts/o3de/o3de/global_project.py b/scripts/o3de/o3de/global_project.py index 9463306912..7ff90bead4 100644 --- a/scripts/o3de/o3de/global_project.py +++ b/scripts/o3de/o3de/global_project.py @@ -14,14 +14,15 @@ import re import pathlib import json -from o3de import manifest, validation +from o3de import manifest, validation, utils -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.global_project') +logging.basicConfig(format=utils.LOG_FORMAT) DEFAULT_BOOTSTRAP_SETREG = pathlib.Path('~/.o3de/Registry/bootstrap.setreg').expanduser() PROJECT_PATH_KEY = ('Amazon', 'AzCore', 'Bootstrap', 'project_path') + def get_json_data(input_path: pathlib.Path): setreg_json_data = {} # If the output_path exist validate that it is a valid json file diff --git a/scripts/o3de/o3de/manifest.py b/scripts/o3de/o3de/manifest.py index e46b819a7c..6c470a7c65 100644 --- a/scripts/o3de/o3de/manifest.py +++ b/scripts/o3de/o3de/manifest.py @@ -18,8 +18,8 @@ import hashlib from o3de import validation, utils -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.manifest') +logging.basicConfig(format=utils.LOG_FORMAT) # Directory methods override_home_folder = None @@ -41,6 +41,7 @@ def get_o3de_folder() -> pathlib.Path: o3de_folder.mkdir(parents=True, exist_ok=True) return o3de_folder + def get_o3de_user_folder() -> pathlib.Path: o3de_user_folder = get_home_folder() / 'O3DE' o3de_user_folder.mkdir(parents=True, exist_ok=True) @@ -177,6 +178,7 @@ def get_default_o3de_manifest_json_data() -> dict: return json_data + def get_o3de_manifest() -> pathlib.Path: manifest_path = get_o3de_folder() / 'o3de_manifest.json' if not manifest_path.is_file(): @@ -228,11 +230,11 @@ def save_o3de_manifest(json_data: dict, manifest_path: pathlib.Path = None) -> b def get_gems_from_subdirectories(external_subdirs: list) -> list: - ''' + """ Helper Method for scanning a set of external subdirectories for gem.json files - ''' + """ def is_gem_subdirectory(subdir_files): - for name in files: + for name in subdir_files: if name == 'gem.json': return True return False @@ -285,13 +287,14 @@ def get_repos() -> list: json_data = load_o3de_manifest() return json_data['repos'] if 'repos' in json_data else [] + # engine.json queries def get_engine_projects() -> list: engine_path = get_this_engine_path() engine_object = get_engine_json_data(engine_path=engine_path) if engine_object: return list(map(lambda rel_path: (pathlib.Path(engine_path) / rel_path).as_posix(), - engine_object['projects'])) if 'projects' in engine_object else [] + engine_object['projects'])) if 'projects' in engine_object else [] return [] @@ -313,7 +316,7 @@ def get_engine_templates() -> list: engine_object = get_engine_json_data(engine_path=engine_path) if engine_object: return list(map(lambda rel_path: (pathlib.Path(engine_path) / rel_path).as_posix(), - engine_object['templates'])) if 'templates' in engine_object else [] + engine_object['templates'])) if 'templates' in engine_object else [] return [] @@ -335,7 +338,7 @@ def get_project_external_subdirectories(project_path: pathlib.Path) -> list: project_object = get_project_json_data(project_path=project_path) if project_object: return list(map(lambda rel_path: (pathlib.Path(project_path) / rel_path).as_posix(), - project_object['external_subdirectories'])) if 'external_subdirectories' in project_object else [] + project_object['external_subdirectories'])) if 'external_subdirectories' in project_object else [] return [] @@ -343,7 +346,7 @@ def get_project_templates(project_path: pathlib.Path) -> list: project_object = get_project_json_data(project_path=project_path) if project_object: return list(map(lambda rel_path: (pathlib.Path(project_path) / rel_path).as_posix(), - project_object['templates'])) if 'templates' in project_object else [] + project_object['templates'])) if 'templates' in project_object else [] return [] @@ -433,6 +436,7 @@ def get_templates_for_generic_creation(): # temporary until we have a better wa return list(filter(filter_project_and_gem_templates_out, get_all_templates())) + def get_json_file_path(object_typename: str, object_path: str or pathlib.Path) -> pathlib.Path: if not object_typename or not object_path: @@ -468,6 +472,7 @@ def get_json_data_file(object_json: pathlib.Path, return None + def get_json_data(object_typename: str, object_path: str or pathlib.Path, object_validator: callable) -> dict or None: @@ -538,6 +543,7 @@ def get_restricted_json_data(restricted_name: str = None, restricted_path: str o return get_json_data('restricted', restricted_path, validation.valid_o3de_restricted_json) + def get_repo_json_data(repo_uri: str) -> dict or None: if not repo_uri: logger.error('Must specify a Repo Uri.') @@ -547,7 +553,8 @@ def get_repo_json_data(repo_uri: str) -> dict or None: return get_json_data_file(repo_json, "Repo", validation.valid_o3de_repo_json) -def get_repo_path(repo_uri: str, cache_folder: str = None) -> pathlib.Path: + +def get_repo_path(repo_uri: str, cache_folder: str or pathlib.Path = None) -> pathlib.Path: if not cache_folder: cache_folder = get_o3de_cache_folder() @@ -555,6 +562,7 @@ def get_repo_path(repo_uri: str, cache_folder: str = None) -> pathlib.Path: repo_sha256 = hashlib.sha256(repo_manifest.encode()) return cache_folder / str(repo_sha256.hexdigest() + '.json') + def get_registered(engine_name: str = None, project_name: str = None, gem_name: str = None, @@ -599,75 +607,90 @@ def get_registered(engine_name: str = None, engine_path = pathlib.Path(engine).resolve() engine_json = engine_path / 'engine.json' - with engine_json.open('r') as f: - try: - engine_json_data = json.load(f) - except json.JSONDecodeError as e: - logger.warning(f'{engine_json} failed to load: {str(e)}') - else: - this_engines_name = engine_json_data['engine_name'] - if this_engines_name == engine_name: - return engine_path + if not pathlib.Path(engine_json).is_file(): + logger.warning(f'{engine_json} does not exist') + else: + with engine_json.open('r') as f: + try: + engine_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{engine_json} failed to load: {str(e)}') + else: + this_engines_name = engine_json_data['engine_name'] + if this_engines_name == engine_name: + return engine_path elif isinstance(project_name, str): projects = get_all_projects() for project_path in projects: project_path = pathlib.Path(project_path).resolve() project_json = project_path / 'project.json' - with project_json.open('r') as f: - try: - project_json_data = json.load(f) - except json.JSONDecodeError as e: - logger.warning(f'{project_json} failed to load: {str(e)}') - else: - this_projects_name = project_json_data['project_name'] - if this_projects_name == project_name: - return project_path + if not pathlib.Path(project_json).is_file(): + logger.warning(f'{project_json} does not exist') + else: + with project_json.open('r') as f: + try: + project_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{project_json} failed to load: {str(e)}') + else: + this_projects_name = project_json_data['project_name'] + if this_projects_name == project_name: + return project_path elif isinstance(gem_name, str): gems = get_all_gems(project_path) for gem_path in gems: gem_path = pathlib.Path(gem_path).resolve() gem_json = gem_path / 'gem.json' - with gem_json.open('r') as f: - try: - gem_json_data = json.load(f) - except json.JSONDecodeError as e: - logger.warning(f'{gem_json} failed to load: {str(e)}') - else: - this_gems_name = gem_json_data['gem_name'] - if this_gems_name == gem_name: - return gem_path + if not pathlib.Path(gem_json).is_file(): + logger.warning(f'{gem_json} does not exist') + else: + with gem_json.open('r') as f: + try: + gem_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{gem_json} failed to load: {str(e)}') + else: + this_gems_name = gem_json_data['gem_name'] + if this_gems_name == gem_name: + return gem_path elif isinstance(template_name, str): templates = get_all_templates(project_path) for template_path in templates: template_path = pathlib.Path(template_path).resolve() template_json = template_path / 'template.json' - with template_json.open('r') as f: - try: - template_json_data = json.load(f) - except json.JSONDecodeError as e: - logger.warning(f'{template_path} failed to load: {str(e)}') - else: - this_templates_name = template_json_data['template_name'] - if this_templates_name == template_name: - return template_path + if not pathlib.Path(template_json).is_file(): + logger.warning(f'{template_json} does not exist') + else: + with template_json.open('r') as f: + try: + template_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{template_path} failed to load: {str(e)}') + else: + this_templates_name = template_json_data['template_name'] + if this_templates_name == template_name: + return template_path elif isinstance(restricted_name, str): restricted = get_all_restricted(project_path) for restricted_path in restricted: restricted_path = pathlib.Path(restricted_path).resolve() restricted_json = restricted_path / 'restricted.json' - with restricted_json.open('r') as f: - try: - restricted_json_data = json.load(f) - except json.JSONDecodeError as e: - logger.warning(f'{restricted_json} failed to load: {str(e)}') - else: - this_restricted_name = restricted_json_data['restricted_name'] - if this_restricted_name == restricted_name: - return restricted_path + if not pathlib.Path(restricted_json).is_file(): + logger.warning(f'{restricted_json} does not exist') + else: + with restricted_json.open('r') as f: + try: + restricted_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{restricted_json} failed to load: {str(e)}') + else: + this_restricted_name = restricted_json_data['restricted_name'] + if this_restricted_name == restricted_name: + return restricted_path elif isinstance(default_folder, str): if default_folder == 'engines': diff --git a/scripts/o3de/o3de/print_registration.py b/scripts/o3de/o3de/print_registration.py index 4b4c9d6515..f81decb6c3 100644 --- a/scripts/o3de/o3de/print_registration.py +++ b/scripts/o3de/o3de/print_registration.py @@ -14,10 +14,10 @@ import pathlib import sys import urllib.parse -from o3de import manifest, validation +from o3de import manifest, validation, utils -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.print_registration') +logging.basicConfig(format=utils.LOG_FORMAT) def get_project_path(project_path: pathlib.Path, project_name: str) -> pathlib.Path: diff --git a/scripts/o3de/o3de/project_properties.py b/scripts/o3de/o3de/project_properties.py index 04731ad3de..bbddd5adab 100644 --- a/scripts/o3de/o3de/project_properties.py +++ b/scripts/o3de/o3de/project_properties.py @@ -15,8 +15,9 @@ import logging from o3de import manifest, utils -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.project_properties') +logging.basicConfig(format=utils.LOG_FORMAT) + def get_project_props(name: str = None, path: pathlib.Path = None) -> dict: proj_json = manifest.get_project_json_data(project_name=name, project_path=path) @@ -26,6 +27,7 @@ def get_project_props(name: str = None, path: pathlib.Path = None) -> dict: return None return proj_json + def edit_project_props(proj_path: pathlib.Path = None, proj_name: str = None, new_name: str = None, @@ -71,9 +73,9 @@ def edit_project_props(proj_path: pathlib.Path = None, tag_list = replace_tags.split() if isinstance(replace_tags, str) else replace_tags proj_json['user_tags'] = tag_list - return 0 if manifest.save_o3de_manifest(proj_json, pathlib.Path(proj_path) / 'project.json') else 1 + def _edit_project_props(args: argparse) -> int: return edit_project_props(args.project_path, args.project_name, @@ -86,6 +88,7 @@ def _edit_project_props(args: argparse) -> int: args.delete_tags, args.replace_tags) + def add_parser_args(parser): group = parser.add_mutually_exclusive_group(required=True) group.add_argument('-pp', '--project-path', type=pathlib.Path, required=False, @@ -112,10 +115,12 @@ def add_parser_args(parser): help='Replace entirety of user_tags property with space delimited list of values') parser.set_defaults(func=_edit_project_props) + def add_args(subparsers) -> None: enable_project_props_subparser = subparsers.add_parser('edit-project-properties') add_parser_args(enable_project_props_subparser) - + + def main(): the_parser = argparse.ArgumentParser() add_parser_args(the_parser) @@ -123,5 +128,6 @@ def main(): ret = the_args.func(the_args) if hasattr(the_args, 'func') else 1 sys.exit(ret) + if __name__ == "__main__": main() diff --git a/scripts/o3de/o3de/register.py b/scripts/o3de/o3de/register.py index 2500df1568..7625ee8ba9 100644 --- a/scripts/o3de/o3de/register.py +++ b/scripts/o3de/o3de/register.py @@ -23,8 +23,8 @@ import urllib.request from o3de import get_registration, manifest, repo, utils, validation -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.register') +logging.basicConfig(format=utils.LOG_FORMAT) def register_shipped_engine_o3de_objects(force: bool = False) -> int: @@ -306,9 +306,9 @@ def register_o3de_object_path(json_data: dict, try: paths_to_remove.append(o3de_object_path.relative_to(save_path.parent)) except ValueError: - pass # It is not an error if a relative path cannot be formed + pass # It is not an error if a relative path cannot be formed manifest_data[o3de_object_key] = list(filter(lambda p: pathlib.Path(p) not in paths_to_remove, - manifest_data.setdefault(o3de_object_key, []))) + manifest_data.setdefault(o3de_object_key, []))) if remove: if save_path: @@ -411,7 +411,7 @@ def register_project_path(json_data: dict, if not remove: # registering a project has the additional step of setting the project.json 'engine' field - this_engine_json = manifest.get_engine_json_data(engine_path=manifest.get_this_engine_path()) + this_engine_json = manifest.get_engine_json_data(engine_path=engine_path if engine_path else manifest.get_this_engine_path()) if not this_engine_json: return 1 project_json_data = manifest.get_project_json_data(project_path=project_path) @@ -732,14 +732,14 @@ def register(engine_path: pathlib.Path = None, logger.error(f'Gem path cannot be empty.') return 1 result = result or register_gem_path(json_data, gem_path, remove, - external_subdir_engine_path, external_subdir_project_path) + external_subdir_engine_path, external_subdir_project_path) if isinstance(external_subdir_path, pathlib.PurePath): if not external_subdir_path: logger.error(f'External Subdirectory path is None.') return 1 result = result or register_external_subdirectory(json_data, external_subdir_path, remove, - external_subdir_engine_path, external_subdir_project_path) + external_subdir_engine_path, external_subdir_project_path) if isinstance(template_path, pathlib.PurePath): if not template_path: @@ -841,6 +841,10 @@ def add_parser_args(parser): Ex. Directly run from this file alone with: python register.py --engine-path "C:/o3de" :param parser: the caller passes an argparse parser like instance to this method """ + + # Sub-commands should declare their own verbosity flag, if desired + utils.add_verbosity_arg(parser) + group = parser.add_mutually_exclusive_group(required=True) group.add_argument('--this-engine', action='store_true', required=False, default=False, @@ -888,18 +892,18 @@ def add_parser_args(parser): help='Refresh the repo cache.') parser.add_argument('-ohf', '--override-home-folder', type=pathlib.Path, required=False, - help='By default the home folder is the user folder, override it to this folder.') + help='By default the home folder is the user folder, override it to this folder.') parser.add_argument('-r', '--remove', action='store_true', required=False, - default=False, - help='Remove entry.') + default=False, + help='Remove entry.') parser.add_argument('-f', '--force', action='store_true', default=False, - help='For the update of the registration field being modified.') + help='For the update of the registration field being modified.') - external_subdir_group = parser.add_argument_group(title='external-subdirectory', - description='path arguments to use with the --external-subdirectory option') + external_subdir_group = parser.add_argument_group(title='external-subdirectory', + description='path arguments to use with the --external-subdirectory option') external_subdir_path_group = external_subdir_group.add_mutually_exclusive_group() external_subdir_path_group.add_argument('-esep', '--external-subdirectory-engine-path', type=pathlib.Path, - help='If supplied, registers the external subdirectory with the engine.json at' \ + help='If supplied, registers the external subdirectory with the engine.json at' \ ' the engine-path location') external_subdir_path_group.add_argument('-espp', '--external-subdirectory-project-path', type=pathlib.Path) parser.set_defaults(func=_run_register) @@ -924,8 +928,6 @@ def main(): # parse the command line args the_parser = argparse.ArgumentParser() - # add subparsers - # add args to the parser add_parser_args(the_parser) @@ -934,6 +936,7 @@ def main(): # run ret = the_args.func(the_args) if hasattr(the_args, 'func') else 1 + logger.info('Success!' if ret == 0 else 'Completed with issues: result {}'.format(ret)) # return sys.exit(ret) diff --git a/scripts/o3de/o3de/repo.py b/scripts/o3de/o3de/repo.py index 22c7c54c8f..41c2d235d9 100644 --- a/scripts/o3de/o3de/repo.py +++ b/scripts/o3de/o3de/repo.py @@ -15,8 +15,8 @@ import hashlib from datetime import datetime from o3de import manifest, utils, validation -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.repo') +logging.basicConfig(format=utils.LOG_FORMAT) def process_add_o3de_repo(file_name: str or pathlib.Path, diff --git a/scripts/o3de/o3de/sha256.py b/scripts/o3de/o3de/sha256.py index b8f8e522d4..c2eaae073f 100644 --- a/scripts/o3de/o3de/sha256.py +++ b/scripts/o3de/o3de/sha256.py @@ -15,8 +15,8 @@ import sys from o3de import utils -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.sha256') +logging.basicConfig(format=utils.LOG_FORMAT) def sha256(file_path: str or pathlib.Path, @@ -35,7 +35,7 @@ def sha256(file_path: str or pathlib.Path, logger.error(f'Json path {json_path} does not exist.') return 1 - sha256 = hashlib.sha256(file_path.open('rb').read()).hexdigest() + the_sha256 = hashlib.sha256(file_path.open('rb').read()).hexdigest() if json_path: with json_path.open('r') as s: @@ -44,7 +44,7 @@ def sha256(file_path: str or pathlib.Path, except json.JSONDecodeError as e: logger.error(f'Failed to read Json path {json_path}: {str(e)}') return 1 - json_data.update({"sha256": sha256}) + json_data.update({"sha256": the_sha256}) utils.backup_file(json_path) with json_path.open('w') as s: try: @@ -53,7 +53,7 @@ def sha256(file_path: str or pathlib.Path, logger.error(f'Failed to write Json path {json_path}: {str(e)}') return 1 else: - print(sha256) + print(the_sha256) return 0 @@ -70,9 +70,9 @@ def add_parser_args(parser): :param parser: the caller passes an argparse parser like instance to this method """ parser.add_argument('-f', '--file-path', type=str, required=True, - help='The path to the file you want to sha256.') + help='The path to the file you want to sha256.') parser.add_argument('-j', '--json-path', type=str, required=False, - help='optional path to an o3de json file to add the "sha256" element to.') + help='Optional path to an o3de json file to add the "sha256" element to.') parser.set_defaults(func=_run_sha256) diff --git a/scripts/o3de/o3de/utils.py b/scripts/o3de/o3de/utils.py index 6f1dd8b2c5..6628e6c946 100644 --- a/scripts/o3de/o3de/utils.py +++ b/scripts/o3de/o3de/utils.py @@ -8,6 +8,7 @@ """ This file contains utility functions """ +import argparse import sys import uuid import os @@ -17,11 +18,54 @@ import urllib.request import logging import zipfile -logger = logging.getLogger() -logging.basicConfig() +LOG_FORMAT = '[%(levelname)s] %(name)s: %(message)s' + +logger = logging.getLogger('o3de.utils') +logging.basicConfig(format=LOG_FORMAT) COPY_BUFSIZE = 64 * 1024 + +class VerbosityAction(argparse.Action): + def __init__(self, + option_strings, + dest, + default=None, + required=False, + help=None): + super().__init__( + option_strings=option_strings, + dest=dest, + nargs=0, + default=default, + required=required, + help=help, + ) + + def __call__(self, parser, namespace, values, option_string=None): + count = getattr(namespace, self.dest, None) + if count is None: + count = self.default + count += 1 + setattr(namespace, self.dest, count) + # get the parent logger instance + log = logging.getLogger('o3de') + if count >= 2: + log.setLevel(logging.DEBUG) + elif count == 1: + log.setLevel(logging.INFO) + + +def add_verbosity_arg(parser: argparse.ArgumentParser) -> None: + """ + Add a consistent/common verbosity option to an arg parser + :param parser: The ArgumentParser to modify + :return: None + """ + parser.add_argument('-v', dest='verbosity', action=VerbosityAction, default=0, + help='Additional logging verbosity, can be -v or -vv') + + def copyfileobj(fsrc, fdst, callback, length=0): # This is functionally the same as the python shutil copyfileobj but # allows for a callback to return the download progress in blocks and allows @@ -43,10 +87,11 @@ def copyfileobj(fsrc, fdst, callback, length=0): return 1 return 0 + def validate_identifier(identifier: str) -> bool: """ - Determine if the identifier supplied is valid. - :param identifier: the name which needs to to checked + Determine if the identifier supplied is valid + :param identifier: the name which needs to be checked :return: bool: if the identifier is valid or not """ if not identifier: @@ -65,7 +110,7 @@ def validate_identifier(identifier: str) -> bool: def sanitize_identifier_for_cpp(identifier: str) -> str: """ Convert the provided identifier to a valid C++ identifier - :param identifier: the name which needs to to sanitized + :param identifier: the name which needs to be sanitized :return: str: sanitized identifier """ if not identifier: @@ -81,8 +126,8 @@ def sanitize_identifier_for_cpp(identifier: str) -> str: def validate_uuid4(uuid_string: str) -> bool: """ - Determine if the uuid supplied is valid. - :param uuid_string: the uuid which needs to to checked + Determine if the uuid supplied is valid + :param uuid_string: the uuid which needs to be checked :return: bool: if the uuid is valid or not """ try: @@ -117,11 +162,13 @@ def backup_folder(folder: str or pathlib.Path) -> None: if backup_folder_name.is_dir(): renamed = True + def download_file(parsed_uri, download_path: pathlib.Path, force_overwrite: bool = False, download_progress_callback = None) -> int: """ + Download file :param parsed_uri: uniform resource identifier to zip file to download :param download_path: location path on disk to download file - :download_progress_callback: callback called with the download progress as a percentage, returns true to request to cancel the download + :param download_progress_callback: callback called with the download progress as a percentage, returns true to request to cancel the download """ if download_path.is_file(): if not force_overwrite: @@ -142,10 +189,12 @@ def download_file(parsed_uri, download_path: pathlib.Path, force_overwrite: bool download_file_size = s.headers['content-length'] except KeyError: pass + def download_progress(downloaded_bytes): if download_progress_callback: return download_progress_callback(int(downloaded_bytes), int(download_file_size)) return False + with download_path.open('wb') as f: download_cancelled = copyfileobj(s, f, download_progress) if download_cancelled: @@ -183,13 +232,12 @@ def download_zip_file(parsed_uri, download_zip_path: pathlib.Path, force_overwri def find_ancestor_file(target_file_name: pathlib.PurePath, start_path: pathlib.Path, max_scan_up_range: int=0) -> pathlib.Path or None: """ - Find a file with the given name in the ancestor directories by walking up the starting path until the file is found. - - :param target_file_name: Name of the file to find. - :param start_path: path to start looking for the file. + Find a file with the given name in the ancestor directories by walking up the starting path until the file is found + :param target_file_name: Name of the file to find + :param start_path: path to start looking for the file :param max_scan_up_range: maximum number of directories to scan upwards when searching for target file if the value is 0, then there is no max - :return: Path to the file or None if not found. + :return: Path to the file or None if not found """ current_path = pathlib.Path(start_path) candidate_path = current_path / target_file_name @@ -211,17 +259,17 @@ def find_ancestor_file(target_file_name: pathlib.PurePath, start_path: pathlib.P return candidate_path if candidate_path.exists() else None + def find_ancestor_dir_containing_file(target_file_name: pathlib.PurePath, start_path: pathlib.Path, max_scan_up_range: int=0) -> pathlib.Path or None: """ - Find nearest ancestor directory that contains the file with the given name by walking up - from the starting path. - - :param target_file_name: Name of the file to find. - :param start_path: path to start looking for the file. + Find the nearest ancestor directory that contains the file with the given name by walking up + from the starting path + :param target_file_name: Name of the file to find + :param start_path: path to start looking for the file :param max_scan_up_range: maximum number of directories to scan upwards when searching for target file if the value is 0, then there is no max - :return: Path to the directory containing file or None if not found. + :return: Path to the directory containing file or None if not found """ ancestor_file = find_ancestor_file(target_file_name, start_path, max_scan_up_range) return ancestor_file.parent if ancestor_file else None diff --git a/scripts/o3de/o3de/validation.py b/scripts/o3de/o3de/validation.py index 5c683f0667..cd0958a250 100644 --- a/scripts/o3de/o3de/validation.py +++ b/scripts/o3de/o3de/validation.py @@ -11,6 +11,7 @@ This file validating o3de object json files import json import pathlib + def valid_o3de_json_dict(json_data: dict, key: str) -> bool: return key in json_data @@ -23,9 +24,9 @@ def valid_o3de_repo_json(file_name: str or pathlib.Path) -> bool: with file_name.open('r') as f: try: json_data = json.load(f) - test = json_data['repo_name'] - test = json_data['origin'] - except (json.JSONDecodeError, KeyError) as e: + _ = json_data['repo_name'] + _ = json_data['origin'] + except (json.JSONDecodeError, KeyError): return False return True @@ -38,8 +39,8 @@ def valid_o3de_engine_json(file_name: str or pathlib.Path) -> bool: with file_name.open('r') as f: try: json_data = json.load(f) - test = json_data['engine_name'] - except (json.JSONDecodeError, KeyError) as e: + _ = json_data['engine_name'] + except (json.JSONDecodeError, KeyError): return False return True @@ -52,8 +53,8 @@ def valid_o3de_project_json(file_name: str or pathlib.Path) -> bool: with file_name.open('r') as f: try: json_data = json.load(f) - test = json_data['project_name'] - except (json.JSONDecodeError, KeyError) as e: + _ = json_data['project_name'] + except (json.JSONDecodeError, KeyError): return False return True @@ -66,8 +67,8 @@ def valid_o3de_gem_json(file_name: str or pathlib.Path) -> bool: with file_name.open('r') as f: try: json_data = json.load(f) - test = json_data['gem_name'] - except (json.JSONDecodeError, KeyError) as e: + _ = json_data['gem_name'] + except (json.JSONDecodeError, KeyError): return False return True @@ -76,11 +77,12 @@ def valid_o3de_template_json(file_name: str or pathlib.Path) -> bool: file_name = pathlib.Path(file_name).resolve() if not file_name.is_file(): return False + with file_name.open('r') as f: try: json_data = json.load(f) - test = json_data['template_name'] - except (json.JSONDecodeError, KeyError) as e: + _ = json_data['template_name'] + except (json.JSONDecodeError, KeyError): return False return True @@ -89,10 +91,11 @@ def valid_o3de_restricted_json(file_name: str or pathlib.Path) -> bool: file_name = pathlib.Path(file_name).resolve() if not file_name.is_file(): return False + with file_name.open('r') as f: try: json_data = json.load(f) - test = json_data['restricted_name'] - except (json.JSONDecodeError, KeyError) as e: + _ = json_data['restricted_name'] + except (json.JSONDecodeError, KeyError): return False return True diff --git a/scripts/signer/Platform/Linux/signer.sh b/scripts/signer/Platform/Linux/signer.sh old mode 100644 new mode 100755 diff --git a/scripts/build/package/util.py b/scripts/util/util.py old mode 100755 new mode 100644 similarity index 78% rename from scripts/build/package/util.py rename to scripts/util/util.py index bed2b79833..18970e55b9 --- a/scripts/build/package/util.py +++ b/scripts/util/util.py @@ -13,26 +13,11 @@ import sys import subprocess -class LyBuildError(Exception): - def __init__(self, message): - super(LyBuildError, self).__init__(message) - - -def ly_build_error(message): - raise LyBuildError(message) - - def error(message): print(('Error: {}'.format(message))) exit(1) -# Exit with status code 0 means it won't fail the whole build process -def safe_exit_with_error(message): - print(('Error: {}'.format(message))) - exit(0) - - def warn(message): print(('Warning: {}'.format(message)))